BGP Crib Notes

These are my ‘crib notes’ that I’ve made to serve as a last minute refresher. Please forgive the grammer / spelling as I did not develop these notes with publishing in mind.



  • Must specify neighbour & do soft reset when making BGP changes
  • About: Used between internet and ISP. It is an EGP. Supports CIDR, VLSM, SUMMARISATION. It is a PATH VECTOR protocol.  BGP sends attributes in their updates
  • Uses TCP port 179 and does not need to be directly connected or same subnet / AS. Only one instance of BGP on a router
  • i-BGP – peer in same AS. E-BGP – peer in different AS. eBGP should be directly connected. Ibgp does not need to be.
  • When to use? If connecting to more than 1 ISP (multihoming) & concern on link for sending & receiving. If you are an ISP & if your policy is different from your ISP
  • Best Practice: Do no auto & no synchronisation under BGP process(see syn rule below) .Use loopback interface to establish relationships. Must use ebgp multi-hop and update source command so router knows how to get to loopback address. Also create static route so router know how to route to remote loopback address if no IGP running
  • BGP FAILING – Check AS number is correct > check ebgp multihop > open TCP port 179
  • Transitive AS – AS 500 talks to AS 200 via AS 100. AS 100 is a transitive AS
  • Network command – unlike IGP, where network command enables interface with that address to advertise. BGP uses network command to purely advertise networks
  • Next Hop Self command –Also needed for loopback interfaces. Needed because some routes may be inaccessible e.g. R3 connects to LAN A. R3 advertises this to R2 (Ebgp). R2 advertise this to R1 with the next hop address of R3 (Ibgp). R1 doesn’t have R3 as next hop. This is solved by next hop self, so R2 advertise itself as next hop to R1 in order to get to R3 then LAN A. Put this command on R2
  • Third Party Next Hop – BGP Speak is allowed to advertise the IP address of an internal peer as the next hop address IF the external peer is receiving the route has a subnet in common with the internal peer
  • iBGP rules: Ibgp routers does not send updates to every single iBGP neighbour. When an IBGP speaker learns a router for Ibgp peer, it will only advertise this to eBGP neighbour/ Because iBGP routers do not advertise routes from one internal router to another internal router. This means every AS needs to be fully meshed in order for full advertisements However full meshed is sometimes not possible so use rule of synchronisation.
  • Synchronisation: if AS is a transit area and also non bgp speaks in transit area. If AS500 talks to AS200 via AS100, then AS100 is a transit AS. R2 and R4 are iBGP neighbours but are connected to R3 which is not a BGP router. R2 speaks to R4 via R3. R4 will advertise AS200 to AS500 but problem is that if AS500 sends to AS200, R3 in AS100 will drop it as it has no route. Rule of Synchronisation states do not advertise a route unless all neighbours in that transit AS (AS100) knows how to route, therefore R4 won’t advertise AS200 to AS500 unless R2, R4 and R3 all know how to get to these AS’s. TURN this off if fully meshed. Rule of Sync is not ideal.
    • Turn off Synchronisation if 1) all routers in the AS are running BGP 2) If there a full mesh 3) If the AS is not a transit AS
    • BGP Split Horizon: 1 iBGP peer can’t lean about a path from 1 iBGP peer & then advertise it to another iBGP peer. Therefore BGP speaker requires full mesh which is not practical as it too much administration, tcp session, too much bandwidth etc. To get round this use Route Reflectors
    • Route Reflectors: advertise from one iBGP peer to another iBGP peer (contrary to split horizon). IBGP peer that sends route to route reflectors are known as route reflector clients. Client sends to route reflector. Route reflector reflects the advertisement to another Ibgp peer. It like a partial mesh . also RR routers sends an originator-ID, that way if it sees it own ID it disgard the packet to avoid loops & is how it bypass split horizon
      • RR sends updates to all clients and non client peers if the updates was learnt from  a RR CLIENT
      • RR sends updates to all clients and non client peers if the update was learnt from a Ebgp peer
      • RR sends updates to all clients in the cluster if the update was learnt from a non-client peer
      • Clusters: are a combination of route reflectors & clients. Must strategically place RR and consider resources and position.
      • BGP Peer Groups: Reduces resource & config needed for neighbour relationships. Name is locally significant & not passed to other routers
      • BGP Confederations: One step further than peer groups. It a logical grouping of AS. Confederation 321 could represent AS 123, 7,99. AS 6 will see this as 321. & would use this as the remote-as command. Done under BGP process
      • Route Map – use for setting MED or weight and preferring one route to a destination etc. Use with IP Access Lists
      • Prefix list: Used as a better alternative to controlling in/out updates in BGP. Apply to neighbour command
      • Route loops – AS PATH, if router sees it own AS in update, it will discard it
      • Private AS numbers – 64512 – 65535 (not advertised to external networks )
      • Route Table
        • Origin codes (?) = from redistribute
        • * = valid route
        • > = best route
        • *> = valid and best route – this would be the best route cause it valid and best
        • BGP States
          • Idle – Initial state. It waiting for a start event, waiting for TCP connection
          • Connect – Waiting for TCP connection response
          • Active – like eigrp, this is not good. TCP connection response not received & no relationship
          • Opensent – TCP connection response received and determined BGP state (i or ebgp)
          • Openconfirmed – waiting for keepalive
          • Established – relationship complete and updates are sent
          • BGP Message types
            • Open – holdtime & RID. Sent between peers once connection is established
            • Keepalive – Keeps neighbour relationship alive
            • Update – BGP path & attributes. Sent when attributes changed or routes are lost
            • Notfication – sent when error detected & termination of peer
            • Route refresh  – request routing information
            • Attributes: Weight (cisco propierity & locally significant to the router & not advertised) > Local Pref (100 by default if not shown & local to routers in that AS – IBGP peers) > Self Originated > AS Path > Origin Code > lowest MED > eBGP over iBGP
              • Well Known mandatory: AS PATH, origin, Next Hop (in all updates)
              • Well known discretionary: Local pref, atomic  aggregate
              • Optional transitive aggregator, community
              • Optional non-transitive (this attribute stays local AS & connected remote AS, will not be sent in update to other non connected remote AS): lowest MED (tries to influence better links). MED can be done via Route Map


Show ip bgp neighbours

  • Show neighbours, remote AS, BGP peer type, State Active (acti ve is not good), show if route reflector client, show last reset & why

Show ip bgp summary

  • About the local router. Shows neighbours, AS number, sent/received msgs, shows how long the link has been up

Show ip bgp x.x.x.x

  • Really good to see issues with route table e.g. inaccessible

Show IP BGP destination address x.x.x.x

  • Good to see if route metric does not make sense in the attribute list. Sometimes show as inaccessible (no ip connectivity) use BGP next hop self command

Aggregate-address x.x.x.x. x.x.x.x summary-only

  • Under BGP process, route summarisation. Without summary only, it will send the summary and specific routes#

Clear ip bgp * soft

  • Soft reset

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: