BGP

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

  1. The neighbor IP address must be pingable.
  2. If using loopback for peering we need to configure the “update source” command.
  3. If peering to a router that is more than a hop away we need to configure “ebgp multi-hop”.
  4. MTU Mismatch
  5. Next-hop-self
  6. Route-reflector

Network Advertisement

  1. 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.
  2. 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.

R1

Router(config)# route-map RM-ASPATH
Router(config-route-map)# set aspath prepend 100 100 100 100
Router(config-route-map)# router bgp 100
Router(config-router)# neighbor 50.0.0.1 route-map RM-ASPATH out

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:

  1. ) Not advertising the route that learned via iBGP. Need “ROUTE-REFLECTOR-CLIENT”
  2. ) 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.

R6
Router(config)#router bgp 500
Router(config-router)#neighbor BGPGROUP1 peer-group
Router(config-router)#neighbor 20.0.0.1 peer-group BGPGROUP1
Router(config-router)#neighbor 20.0.0.2 peer-group BGPGROUP1
Router(config-router)#neighbor 20.0.0.3 peer-group BGPGROUP1

Route-reflector client

 All the R6 BGP learned routes will reflect to members of BGPGROUP1.

R6
Router(config)#router bgp 500
Router(config-router)#neighbor BGPGROUP1 route-reflector-client

Verify:
Show ip bgp
Look at route next-hop IP address.
We need to correct the next-hop ip address.

Next-hop-self

R6
Router(config)#router bgp 500
Router(config-router)#neighbor BGPGROUP1 next-hop-self all
Router(config-router)#neighbor 30.0.0.2 next-hop-self all

Verify:
Show ip bgp
On R1, R2 & R3 the next hop is now 20.0.0.4
On R4 the next hop is now 30.0.0.1

BGP Route Summary

Summarize the networks  from R1, R2, and R3 in R6  so that  R4 will see it as one summarized network (255.255.252.0 or /22).

R6
Router(config)#router bgp 500
Router(config-router)# aggregate-address 192.168.0.0 255.255.252.0 summary-only

Note:
Private AS (64512 – 65534)
Avoid redistribute Ibgp to Ebgp vice versa

 

SHOW COMMANDS:

sh ip bgp summary
sh ip bgp
sh ip bgp ipv4/6 unicasr nei
sh ip bgp 192.168.0.0/22

Leave a Reply