Professional Documents
Culture Documents
BGP Syn PDF
BGP Syn PDF
1.0.0.0/8
R1 R2 R3
AS 600
R4 R5 R6
R1 is advertising network 1.0.0.0/8 in BGP to R2, the goal is to advertise this network to AS 600.
The administrator of AS 100 decided to establish an IBGP session between R2 and R5, so when R2
receives the route, it gives it to R5 and R5 can advertise it to R6 in AS 600.
R1 advertises network 1.0.0.0/8 to R2, R2 advertises the network to R5, and R5 advertises this network
to R6, and R6 can see the network in its BGP table. Let’s assume that next-hop reachability is handled
somehow.
NOW….R6 needs to connect to network 1.0.0.0/8. The traffic goes to R5, and R5 has no choice but to go
through R3 or R4, no matter which path it takes the traffic is dropped, because neither R3 nor R4 know
about this network. So you can see the problem, and for this reason they came up with the
“Synchronization” rule, and this rule has two sections/parts.
The synchronization rule says that if I receive a route from an IBGP peer, I have to check my routing
table, and if that same route is in my routing table, I will validate the route, if NOT I will NOT validate the
route. If the route is NOT validated, it is NOT advertised to any peer.
The big question is how will I see the route in my routing table to begin with? I will see the route in my
routing table if the border router, in this case R2 redistributes the route/s into the IGP that I am running
in my AS.
But when the number of routes reached 10,000 to 20,000, they realized that NONE of the IGPs out there
can handle that many routes, especially, when the number of routes kept on growing.
So they decided to run BGP on all routers, and they established an IBGP sessions between R2 and R3, R2
and R4, and R3 and R4 established an IBGP session with R5.
So they were thinking that when R2 receives the route, it gives it to R3 and R4 and these routers will
advertise the route to R5 and R5 will advertise it out to AS 600. But they realized that they are running
into a routing loop, because once R2 advertises the route to R3, R3 can advertise the route to R5, and R5
can advertise it to R4 and R6, and R4 can advertise it to R2 and the cycle can repeat itself forming a
routing loop.
Therefore, they came up with another rule, and they called it Split Horizon, meaning that when an IBGP
router receives a route from another IBGP peer, it will NOT advertise it to another IBGP peer, this fixed
the loop and caused all IBGP routers to have a full IBGP mesh neighbor adjacency.
Without going on and on, let’s look at the second Synchronization rule:
AS 500
R5
AS 234
10.1.45.0 /24
AS 100 F0/1
1.1.1.1 /8
R1
F0/0
R2
F0/1
R3 F0/0
R4
Rules:
Task 1
Configure OSPF on the following routers/interfaces:
On R2
R2(config)#Router ospf 1
R2(config-router)#router-id 0.0.0.2
R2(config-router)#Network 10.1.23.2 0.0.0.0 area 0
On R3
R3(config)#Router ospf 1
R3(config-router)#router-id 0.0.0.3
R3(config-router)#Network 10.1.23.3 0.0.0.0 area 0
R3(config-router)#Network 10.1.34.3 0.0.0.0 area 0
On R4
R4(config)#Router ospf 1
R4(config-router)#router-id 0.0.0.4
R4(config-router)#Network 10.1.34.4 0.0.0.0 area 0
On R2
R2#Show ip ospf neighbor
On R3
R3#Show ip ospf neighbor
On R4
R4#Show ip ospf neighbor
On R1
R1(config)#Router bgp 100
R1(config-router)#Synchronization
R1(config-router)#Neighbor 10.1.12.2 remote-as 234
R1(config-router)#Network 1.0.0.0
On R2
R2(config)#Router bgp 234
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#Synchronization
R2(config-router)#Neighbor 10.1.12.1 remote-as 100
On R2
R2#Show ip bgp | B Network
Task 3
Configure a full mesh IBGP sessions between routers R2, R3 and R4 using the IP address of their links.
These routers should all be configured in AS 234. The BGP Synchronization MUST be enabled on all
routers.
On R2
R2(config)#Router bgp 234
R2(config-router)#Neighbor 10.1.23.3 remote-as 234
R2(config-router)#Neighbor 10.1.23.3 next-hop-self
R2(config-router)#Neighbor 10.1.34.4 remote-as 234
R2(config-router)#Neighbor 10.1.34.4 next-hop-self
On R3
R3(config)#Router bgp 234
R3(config-router)#Synchronization
R3(config-router)#Neighbor 10.1.23.2 remote-as 234
R3(config-router)#Neighbor 10.1.34.4 remote-as 234
On R4
R4(config)#Router bgp 234
R4(config-router)#Synchronization
R4(config-router)#Neighbor 10.1.23.2 remote-as 234
R4(config-router)#Neighbor 10.1.34.3 remote-as 234
On R2
R2#Show ip bgp | B Network
On R3
R3#Show ip bgp | B Network
On R4
R4#Show ip bgp | B Network
Network Next Hop Metric LocPrf Weight Path
* i1.0.0.0 10.1.23.2 0 100 0 100 i
Task 4
Configure an EBGP session between R4 in AS 234 and R5 in AS 500. The BGP Synchronization MUST be
enabled on all routers.
On R4
R4(config)#Router bgp 234
R4(config-router)#Neighbor 10.1.45.5 remote-as 500
On R5
R5(config)#Router bgp 500
R5(config-router)#Synchronization
R5(config-router)#Neighbor 10.1.45.4 remote-as 234
On R4
R4#Show ip bgp summary | B Neighbor
On R5
R5#Show ip bgp summary | B Neighbor
On R2
R2(config)#Router ospf 1
R2(config-router)#redistribute bgp 234 subnets
On R3
R3#Show ip route ospf | I O
On R4
R4#Show ip route ospf | I O
R4#Ping 10.1.23.2
We have reachability to the next hop IP address, but BGP does not have a best route so therefore, the greater than
sign is not present (This is the “>” to the left of the network):
R4#Show ip bgp 1.0.0.0
On R5
R5#Show ip bgp
R5#
When redistributing between OSPF and BGP, we should review BGP’s synchronization rule which states:
An IBGP learned prefix will not be advertised to another BGP speaker unless that same prefix resides in the IBGP
speaker’s local IGP table.
Basically this rule was set to stop blackholing routes. This rule is well defined in RFC 1745 and it possesses another
requirement, and that’s when OSPF is the IGP used within the AS. This rule does not apply if the IGP is NOT OSPF.
This RFC states that if OSPF is used as the IGP in the AS, the router ids of OSPF and BGP on the border router, which
is the router that performs the redistribution of BGP into OSPF must be the same.
On R2
R2#Show ip ospf | Inc ID
Routing Process "ospf 1" with ID 0.0.0.2
We can see that the router ids do not match. Let’s change the router id of OSPF process on R2 to be 2.2.2.2:
On R2
R2(config)#Router ospf 1
R2(config-router)#router-id 2.2.2.2
On All routers:
Rx#Clear ip bgp *
On R2
R2#Show ip route | B Gate
Gateway of last resort is not set
On R3
R3#Show ip route ospf | I O
We can see that 1.0.0.0 prefix has a rib failure, let’s see why?
On R4
On R5
R5#Show ip bgp | B Network
To test reachability:
Since R1 does NOT have a route back to 10.1.45.0 /24 network, R2 is configured to advertise a default route to R1;
for reachability to network 10.1.45.0 /24 in AS 234, R4 is configured to advertise network 10.1.45.0 /24 in OSPF; R4
is also configured with a passive-interface so the routers in AS 500 do not see AS 234’s internal routes.
On R2
R2(config)#Router bgp 234
R2(config-router)#Neighbor 10.1.12.1 default-originate
On R4
R4(config)#router ospf 1
R4(config-router)#Network 10.1.45.4 0.0.0.0 area 0
R4(config-router)#Passive-interface F0/1
On R1
R1#Show ip route bgp
On R5
R5#Ping 1.1.1.1
Ticket 6
Erase the startup configuration and the “vlan.dat” and reload the devices before proceeding to the next
scenario.