BGP

From the BGP perspective an autonomous system(AS) is a group of router under another organization’s control using one or more GP and metrics within that AS. RFC 4893 expended the byte field to allow for 4,294,967,295 unique ASN. There are 2 blocks of rivet ASN’s that can be used 64,512-65,535 and 4,200,000,000-4,294,967,294(this range is only for RFC 4893). IANA is reasonable for assigning all public ASN’s you will have to prove the following • Publicly allocated range
• Multiple internet connections
• Unique routing policy from providers

you must use ASN’s that are assigned by IANA or your service provider or a private ASN using another organizations ASN could cause havoc.

Path Attributes

BGP uses path attributes these provide control of routing policies within BGP. There are 4 types • Well-known Mandatory
• Well-known discretionary
• Optional transitive
• Optional non-transitive

Well known attributes must be used by all BGP implementations. well known mandatory must be included in every prefix advertisement.

Loop Prevention

BGP is a path vector protocol and does not maintain a complete topology of the network. AS_Path is a well known attribute that includes a complete list of all the ASNs that a prefix advertisement has traveled from its source.

Inter-routing communication

BGP does not discover neighbors dynamically. It was designed to be a protocol that doesn’t see many frequent changes and are coordinated. BGP uses TCP port 179. BGP uses the ARP table for locally connected peers and the routing table for multi-hop BGP a static route can be used for multi-hop BGP.

There are 2 sessions types iBGP and eBGP. iBGP is used for routers with the same AS. eBGP is used for routers with different AS

There are 4 BGP packet types
• Open; setup BGP peering
• Update; updates routes
• Notification; error with neighbor
• Keepalive; makes sure neighbors are alive

There are 6 states
• Idle; no communication
• Connect; tcp session is started
• Active; three way hand shake is preformed • OpenSent; check for bgp version, ip addresses, AS number, security and RID
• OpenConfrim; wait for keepalive of notification
• Established; the BGP session is established and working

Example BGP config with EIGRP redistribution.

router eigrp 50
 network 10.81.0.0 0.0.255.255
 network 10.81.225.0 0.0.0.255
 redistribute bgp 65105 metric 100000 500 255 1 1500
!
router bgp 65105
 bgp log-neighbor-changes
 neighbor 192.168.32.9 remote-as 65980
 !
 address-family ipv4
  network 10.81.0.0 mask 255.255.255.0
  network 10.81.225.0 mask 255.255.255.0
  network 192.168.32.8 mask 255.255.255.252
  redistribute eigrp 50
  neighbor 192.168.32.9 activate
 exit-address-family
!

prefix advertisement

BGP network statement identify specified networks. After setting the network statement the BGP process will search in the global routing table to find the exact network match(e.g. connected vs static/dynamic route).

Route summarization

Route summarization can increase stability by hiding down steam route flaps as the route table may not need to be recomputed.

Router bgp 61500
 Aggregate-address 172.16.0.0 255.255.0.0

The above code would would tell the router to advertise all 172.16.0.0 network as a single /20 instead of many /24. The atomic aggregate attribute indicates that a loss of loop prevention has occurred. When a route is summarized it does not advertise the AS from before the aggregation. The atomic aggregate attribute indicates that a loss of loop prevention has occurred. When a route is summarized it does not advertise the AS from before the aggregation.

With IPV6 the bgp router-id must be statically defined in order for a neighbor relationship to form. Using link local addressing creates rick as hardware failure or moving cables will cause the session to fail. If doing ipv6 only ipv4 must be turned off as it is on by default.

No bgp ipv4-unicast