Well, I know it”s been a long time since my last post, but I have been hard at studying for the BGP test.
What is BGP?
- BGP stands for Border Gateway Protocol.
- It is an Exterior Routing Protocol (EGP) used for routing between Different Autonomous Systems.
- It is a Path Vector routing protocol. BGP uses a set of attributes to make the right decision on how to route your packets to the destination.
- BGP is currently running on V4 of the protocol
- It does not have its own transport protocol like EIGRP and OSPF; instead, it uses TCP/179 for reliable updates and utilizes all the benefits of TCP.
- Currently runs the internet with a routing table exceeding 300K routes!
There are two applications for BGP:
- iBGP (Internal Border Gateway Protocol): Allows for BGP to be run inside of a single AS as long as another IGP is running (like OSPF or IS-IS)
- eBGP (Exterior Border Gateway Protocol): Allows for different Autonomous Systems to peer with each other
The options with BGP are endless. Being the protocol that runs the internet, you can imagine that you would need the protocol to be highly flexible, which BGP gives you. The only drawback to BGP is that it is prolonged to converge, so it is only used when you need to make complex routing decisions or when connecting to your ISP.
The attributes that are used to decide which route BGP will “prefer” as the best route when there are multiple routes are;
- Exclude routes with an inaccessible next-hop address
- Prefer routes with a higher weight (Cisco only attribute)
- Prefer routes with a higher local-preference
- Prefer routes that the router originated
- Prefer routes with the shorter AS-Path
- Prefer routes with lower origin codes,
- Example IGP (i) over EGP (e) over Incomplete (?)
- Prefer routes with a lower Multi-Exit Discriminator (MED or otherwise known as Metric)
- I prefer eBGP routes over iBGP routes.
- I prefer iBGP paths learned from the closest IGP neighbor
- I prefer eBGP paths prefer the oldest route
- I prefer paths with the lowest RID (Router ID)
To hold everyone over, here is a sample eBGP configuration
R1 Configuration
R1(config)#router bgp 1
R1(config-router)#neighbor 10.10.12.2 remote-as 2
R1(config-router)#network 1.1.1.1 mask 255.255.255.255
R2 Configuration
R2(config)#router bgp 2
R2(config-router)#neighbor 10.10.12.1 remote-as 1
R2(config-router)#network 2.2.2.2 mask 255.255.255.255
R1 Verification
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [20/0] via 10.10.12.2, 00:00:48
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.12.0/30 is directly connected, FastEthernet0/0
R1#
R2 Verification
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [20/0] via 10.10.12.1, 00:01:56
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.12.0/30 is directly connected, FastEthernet0/0