- left-float table of contents

BGP summarized

• Designed to exchange routing and reachability information among autonomous systems (AS)
• Path vector protocol
• TCP port 179
• RFC 4271
• BGP-4 is used for both IPv4 and IPv6.
• BGP-4 (MP-BGP), RFC 4760

BGP is which type of Routing Protocol?
BGP is a Path Vector Routing Protocol. It falls under the category of EGP (Exterior Gateway Protocol)

Which algorithm is used by BGP for best path selection?
BGP uses Composite Metric for best path selection and install the best routes into the routing table

BGP states:

Idle state: Initiates a TCP connection with its configured BGP peer. If it fails to establish connection, these could be the reasons.

  • TCP port 179 is not open.
  • A random TCP port over 1023 is not open.
  • Peer address configured incorrectly on either router.
  • AS number configured incorrectly on either router.

What is the purpose of each type of BGP packet?

1. Open Message: Set up and establish BGP adjacency
2. Update Message: Advertise, update & withdraw routes
3. Keepalive Message: Ensure that BGP neighbors are still alive
4. Notification Message: Error Condition notification

BGP AS path regular expression examples:

• originated from my AS: ^$
• originated from AS 100: ^100 .*
• AS 100 anywhere in the path: _100_
• AS 100 is the last AS in the path: _100$
• match any: .*
• originated in AS100: ^100$


By default BGP speakers does not advertise iBGP-learned prefixes to iBGP peers - this is done to maintain loop prevention. The route reflection feature which removes the need of full mesh between iBGP speakers. When route reflector reflects a prefix, it creates/modifies an optional non-transitive attribute called CLUSTER_LIST by adding its own cluster ID to it. This attribute is used for loop prevention: when router receives update which CLUSTER_LIST contains router's own cluster ID, this update is discarded.
When you configure a route reflector you have to tell the router whether the other IBGP router is a client or non-client. A client is an IBGP router that the route reflector will “reflect” routes to, the non-client is just a regular IBGP neighbor.
When a route reflector forwards a route, there are a couple of rules:

  1. A route learned from an EBGP neighbor can be forwarded to another EBGP neighbor, a client and non-client.
  2. A route learned from a client can be forwarded to another EBGP neighbor, client and non-client.
  3. A route learned from a non-client can be forwarded to another EBGP neighbor and client, but not to a non-client.


The command tells the internal peer to use that router as the next hop to get to the external source.


The local-AS feature allows a router to appear to be a member of a second autonomous system (AS), in addition to its real AS.

BGP Path Selection Attributes

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License