Showing posts with label BGP. Show all posts
Showing posts with label BGP. Show all posts

CCNP : BGP Quick Notes

BGP Quick Notes
Points to remember

A transit AS is an AS that routes traffic from one external AS to another external AS

The “show ip bgp” command is used to display entries in the BGP routing table.

The AS-PATH attribute is used to prevent BGP routing loops. When receiving an BGP advertisement, the router checks the AS-PATH attribute, if it see it’s own AS number in the AS-Path then it is a routing loop so the router will not install this route in its BGP table.

Local preference is an indication to the AS about which path has preference to exit the AS in order to reach a certain network. A path with a higher local preference is preferred more. The default value for local preference is 100.Unlike the weight attribute, which is only relevant to the local router, local preference is an attribute that routers exchange in the same AS. The local preference is set with the “bgp default local-preference value” command.

MD5 Authentication: You can configure MD5 authentication between two BGP peers, MD5 authentication must be configured with the same password on both BGP peers; otherwise, the connection between them will not be made. If a router has a password configured for a peer, but the other peer does not, a message No MD5 digest from…” will appear on the console while the routers attempt to establish a Multicast Source Discovery Protocol (MSDP) session between them. Similarly, if the two routers have different passwords configured, a message “Invalid MD5 digest from…” will appear on the screen.

Aggregate-Address command: When the aggregate-address command is used within BGP routing, the aggregated address is advertised, along with the more specific routes. The exception to this rule is through the use of the summary-only command. The “summary-only” keyword suppresses the more specific routes and announces only the summarized route.

The weight attribute is a special Cisco attribute that is used in the path selection process when there is more than one route to the same destination. The higher the weight value, the better the path. The default weight is 0.The weight attribute is local to the router and not propagated to other routers.


Below is the list of BGP states in order, from startup to peering:

1 – Idle: the initial state of a BGP connection. In this state, the BGP speaker is waiting for a BGP start event, generally either the establishment of a TCP connection or the re-establishment of a previous connection. Once the connection is established, BGP moves to the next state.

2 – Connect: In this state, BGP is waiting for the TCP connection to be formed. If the TCP connection completes, BGP will move to the OpenSent stage; if the connection cannot complete, BGP goes to Active

3 – Active: In the Active state, the BGP speaker is attempting to initiate a TCP session with the BGP speaker it wants to peer with. If this can be done, the BGP state goes to OpenSent state.

4 – OpenSent: the BGP speaker is waiting to receive an OPEN message from the remote BGP speaker

5 – OpenConfirm: Once the BGP speaker receives the OPEN message and no error is detected, the BGP speaker sends a KEEPALIVE message to the remote BGP speaker

6 – Established: All of the neighbor negotiations are complete. You will see a number (2 in this case), which tells us the number of prefixes the router has received from a neighbor or peer group. 

Memorizing the BGP decision process steps is very useful and you should remember them. The table below lists the complete path selection process:

1. Weight (Bigger is better)
2. Local preference (Bigger is better)
3. Self originated (Locally injected is better than iBGP/eBGP learned)
4. AS-Path (Smaller is better)
5. Origin
6. MED (Smaller is better)
7. External (Prefer eBGP over iBGP)
8. IGP cost (Smaller is better)
9. EBGP Peering (Older is better)
10. Router- ID

There are 4 BGP attribute types:

Well-known Mandatory: recognized by all implementations of BGP and must appear in a BGP update message. If missing, a notification error will be generated.
Well-Known Discretionary: recognized by all implementations of BGP but may not be sent in the BGP update message (include LOCAL_PREF, ATOMIC_AGGREGATOR).
Optional Transitive: may or may not be recognized by all BGP implementations. Because the attribute is transitive, BGP accepts and advertises the attribute even if it is not recognized (include Community attribte).
Optional Nontransitive: may or may not be recognized by all BGP implementations. Whether or not the receiving BGP router recognizes the attribute, it is nontransitive and is not passed along to other BGP peers (include MED). 

Which two conditions can cause BGP neighbor establishment to fail?
·        There is an access list blocking all TCP traffic between the two BGP neighbors.
·        The BGP neighbor is referencing an incorrect autonomous system number in its neighbor statement.

Use of Static Route in BGP: When two EBGP neighbors want to establish neighbor relationship without using the directly connected interfaces (for example, use loopback interface), they must tell each other how to reach their interfaces. A static route is the most simple way to do this, especially when they are in different ASs.

In BGP, “Connections established” is the number of times a TCP and BGP connection have been successfully established while “dropped” is the number of times that a valid session has failed or been taken down.
Read More...

Basic notes on BGP (border gateway protocol)

BGP

RIP, OSPF and EIGRP are all different but they have one thing in common…they want to find
the shortest path to the destination. But when coming to Internet being able to manipulate traffic paths is far more important than finding the shortest path. There is only one routing protocol we currently use on the Internet which is BGP.

Within an autonomous system we use an IGP like OSPF or EIGRP. For routing between the different autonomous systems we use an EGP (external gateway protocol). The only EGP we use nowadays is BGP. We can say internet as a bunch of autonomous system that are connected to each other.We need to register AS number for BGP  just like public IP address.Autonomous system numbers are 16-bit which means we have AS from 1 up to 65535. There’s also a private range (64512 – 65535) which we can use for non-internet usage

There are two types of BGP
External BGP: Used for routing between autonomous systems
Internal BGP: Used for routing within the autonomous system.

Points to Remember

  • BGP is the routing protocol we use to route between autonomous systems:
  • BGP guarantees loop-free routing information.
  • BGP is completely different than IGPs.
  • BGP avoids loops by using path vector routing protocol [BGP saves path when they enter inside a AS]
  • BGP doesn't use metrics but a rich set of BGP attributes.
  • BGP uses TCP port 179
  • Administrative distance of EBGP is 20
  • Administrative distance of IBGP is 200
  • Authentication used in BGP is MD5
  • Currently using BGP v4
  • BGP saves paths to all destination in a table called forwarding table.Best path from forwarding table is saved in routing table
  • Routers running BGP is termed as BGP speakers
  • BGP neighbors are called Peers.Peers must be configured statically
  • BGP was built for reliability and Control but not for speed.
  • Once BGP peers form a neighbor relationship, they share their full routing table. Afterwards, only changes to the routing table are forwarded to peers.

Cisco recommendation on BGP

Use BGP 
-when AS is multi-homed
-when AS is a transit AS

Do not use BGP
-In a single homed AS
-with a router that does not have sufficent resourses to handle it
-With a staff who does not have a good understanding of BGP path selection and manipulation

Neighbor States


  • Idle ·                   : Neighbor is not responding
  • Active ·               : Attempting to connect
  • Connect ·            : TCP session established
  • Open Sent ·        : Open message sent
  • Open Confirm ·  : Response received
  • Established ·      : Adjacency established

Packet Types:

  • Open : After a neighbour is confirmed manually,BGP sends a open message to establish peering with that neighbour
  • Update : Used to transfer routing information between peers
  • Keep Alive : BGP peers exchange keep-alive messages in every 60 seconds by default.It keeps the peering session alive
  • Notification : Notification is a warning message send before closing connection with a BGP Peer.

Did You Enjoy this Article ?

If yes, Then enter your email below to get

more articles on CCNA and CCNP in your inbox

For FREE !

Read More...