Border Gateway Protocol (BGP) is a standardized exterior gateway protocol designed to exchange routing and reachability information among autonomous systems (AS) on the Internet.
Troubleshooting Guide
Neighbor formation
The neighbor IP address must be pingable.
If using loopback for peering we need to configure the “update source” command.
If peering to a router that is more than a hop away we need to configure “ebgp multi-hop”.
MTU Mismatch
Next-hop-self
Route-reflector
Network Advertisement
Before advertising network into BGP make sure that the route is already injected in the global routing table and it has the exact IP address and subnets mask.
Rib Failure means that the advertising network is already advertised by Static, any Internal Protocols or it is a directly connected network.
Metric and Path Selection
BGP Traffic Engineering
Manipulating Outbound traffic
Scenario: Both ISP1 & 2 advertised the network 100.0.0.0/24 to our Enterprise router R1. We will hardcode configure for all traffic from R1 going to any network given to go over ISP2 which has higher bandwidth.
R1
Router(config)# route-map RM-LOCAL-PREF Router(config-route-map)# set local-preference 110 Router(config-route-map)# router bgp 100 Router(config-router)# neighbor 60.0.0.1 route-map RM-LOCAL-PREF in
Manipulating Inbound traffic
This time traffic from network 100.0.0.0/24 going to our R1, we want it to go over ISP2. We can’t configure the ISP routers what we can do is to make ISP1 think that his BGP route through interface e0/0 is longer than going over the e0/1 interface.
Manipulating specific networks. Bind Route-maps with Prefix-list
Let say we need to manipulate traffic from R1 going to network 10.0.0.0/24. We can do this by making a Prefix list that will serve as a container of networks we want to manipulate.
Create a Prefix-list for 10.0.0.0/24 networks
R1 #ip prefix-list TEN seq 10 permit 10.0.0.0/24
#route-map MAPTOTEN permit 10 #match ip address prefix-list TEN #set local-preference 120 / or set as-path prepend
#route-map MAPTOTEN deny 20
#router bgp 56 #neighbor 60.0.0.1 route-map MAPTOTEN in
#clear ip bgp * soft
Note: Can we manipulate network traffic inside our Domain(R1) using this method?
BGP Route Filtering
Example: Permit network 100.0.0.0/24 and deny all. #ip prefix-list PREFIX seq 10 permit 100.0.0.0/24 #ip prefix-list PREFIX seq 20 deny 0.0.0.0/0 le 32 #neighbour x.x.x.x prefix-list PREFIX in
Internal BGP
Characteristic:
) Not advertising the route that learned via iBGP. Need “ROUTE-REFLECTOR-CLIENT”
) Not advertising its local interface as next-hop. Need “NEXT-HOP-SELF” -Next hop is not updated -Next hop is still the source interface
Base on the given topology we can iBGP peer with each router and it will look like this. It’s seems very complicated by the look at it, right?
We can simplify our configuration by putting R1, R2, and R3 in a Peer-group then make it a Route-reflector client. We can reduce the overhead configuration with this method.
Peer-groups
In peer-group we can configure commands like Route-reflector, Next-hop-self, Prefix-list and others in a single configuration instead of doing it in each routers.