You are on page 1of 11

AS 300 AS 100

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

10.1.12.0 /24 10.1.23.0 /24 10.1.34.0 /24

R1
F0/0
R2
F0/1
R3 F0/0
R4

Rules:

DO NOT enable BGP Synchronization.


DO NOT configure another OSPF process.
DO NOT configure another static route to accomplish this task.

Task 1
Configure OSPF on the following routers/interfaces:

Router Interface / IP Address Area Router-id


R2 F0/1 = 10.1.23.2 /24 Area 0 0.0.0.2
R3 F0/1 = 10.1.23.3/24 Area 0 0.0.0.3
F0/0 = 10.1.34.3/24
R4 F0/1 = 10.1.34.4/24 Area 0 0.0.0.4

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

To verify the configuration:

On R2
R2#Show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


0.0.0.3 1 FULL/DR 00:00:39 10.1.23.3 FastEthernet0/1

R2#Show ip route ospf | I O

O 10.1.34.0 [110/2] via 10.1.23.3, 00:00:33, FastEthernet0/1

On R3
R3#Show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


0.0.0.4 1 FULL/DR 00:00:49 10.1.34.4 FastEthernet0/0
0.0.0.2 1 FULL/DR 00:00:49 10.1.23.2 FastEthernet0/1

On R4
R4#Show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


0.0.0.3 1 FULL/DR 00:00:59 10.1.34.3 FastEthernet0/0
Task 2
Configure BGP AS 100 on R1 and configure this router to advertise its loopback 0 interface in this AS.
This router should be configured to establish an EBGP session with R2 in AS 234. R2 should be
configured with a BGP router-id of 2.2.2.2. These routers should establish an EBGP session using the IP
Address of their link. The BGP Synchronization MUST be enabled on all routers.

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

To verify the configuration:

On R2
R2#Show ip bgp | B Network

Network Next Hop Metric LocPrf Weight Path


*> 1.0.0.0 10.1.12.1 0 0 100 i

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

To verify the configuration:

On R2
R2#Show ip bgp | B Network

Network Next Hop Metric LocPrf Weight Path


*> 1.0.0.0 10.1.12.1 0 0 100 i

R2#Show ip bgp summary | B Neighbor

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


10.1.12.1 4 100 12 11 2 0 0 00:08:59 1
10.1.23.3 4 234 6 7 2 0 0 00:02:04 0
10.1.34.4 4 234 4 5 2 0 0 00:00:43 0

On R3
R3#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

R3#Show ip bgp summary | B Neighbor

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


10.1.23.2 4 234 7 6 1 0 0 00:02:04 1
10.1.34.4 4 234 4 4 1 0 0 00:00:50 0

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

R4#Show ip bgp summary | B Neighbor

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


10.1.23.2 4 234 5 4 1 0 0 00:00:43 1
10.1.34.3 4 234 4 4 1 0 0 00:00:50 0

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

To verify the configuration:

On R4
R4#Show ip bgp summary | B Neighbor

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


10.1.23.2 4 234 10 9 1 0 0 00:05:09 1
10.1.34.3 4 234 9 9 1 0 0 00:05:16 0
10.1.45.5 4 500 4 4 1 0 0 00:00:37 0

On R5
R5#Show ip bgp summary | B Neighbor

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


10.1.45.4 4 234 5 5 1 0 0 00:01:09 0
Task 5
Configure R2 such that all the other routers can see and have reachability to network 1.0.0.0/8
advertised by R1 in AS 100. DO NOT disable BGP Synchronization, or configure a static route.

On R2
R2(config)#Router ospf 1
R2(config-router)#redistribute bgp 234 subnets

To verify the configuration:

On R3
R3#Show ip route ospf | I O

O E2 1.0.0.0/8 [110/1] via 10.1.23.2, 00:00:43, FastEthernet0/1

R3#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

On R4
R4#Show ip route ospf | I O

O E2 1.0.0.0/8 [110/1] via 10.1.34.3, 00:01:10, FastEthernet0/0


O 10.1.23.0 [110/2] via 10.1.34.3, 00:50:09, FastEthernet0/0

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

R4#Ping 10.1.23.2

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 10.1.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

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

BGP routing table entry for 1.0.0.0/8, version 0


Paths: (1 available, no best path)
Not advertised to any peer
100
10.1.23.2 (metric 2) from 10.1.23.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, internal, not synchronized

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.

Let’s check the router-ids of BGP and OSPF on R2:

On R2
R2#Show ip ospf | Inc ID
Routing Process "ospf 1" with ID 0.0.0.2

R2#Show ip bgp | Inc ID


BGP table version is 2, local router ID is 2.2.2.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 *

Rx#Clear ip ospf proc


Reset ALL OSPF processes? [no]: Y
Let’s verify the configuration:

On R2
R2#Show ip route | B Gate
Gateway of last resort is not set

B 1.0.0.0/8 [20/0] via 10.1.12.1, 00:04:48


10.0.0.0/24 is subnetted, 3 subnets
C 10.1.12.0 is directly connected, FastEthernet0/0
C 10.1.23.0 is directly connected, FastEthernet0/1
O 10.1.34.0 [110/2] via 10.1.23.3, 00:01:05, FastEthernet0/1

R2#Show ip bgp | B Network

Network Next Hop Metric LocPrf Weight Path


*> 1.0.0.0 10.1.12.1 0 0 100 i

On R3
R3#Show ip route ospf | I O

O E2 1.0.0.0/8 [110/1] via 10.1.23.2, 00:01:40, FastEthernet0/1

R3#Show ip bgp | B Network

Network Next Hop Metric LocPrf Weight Path


r>i1.0.0.0 10.1.23.2 0 100 0 100 i

We can see that 1.0.0.0 prefix has a rib failure, let’s see why?

R3#Show ip bgp rib-failure | B Network

Network Next Hop RIB-failure RIB-NH Matches


1.0.0.0 10.1.23.2 Higher admin distance n/a

On R4

R4#Show ip route ospf | I O

O E2 1.0.0.0/8 [110/1] via 10.1.34.3, 00:04:46, FastEthernet0/0


O 10.1.23.0 [110/2] via 10.1.34.3, 00:05:29, FastEthernet0/0

R4#Show ip bgp | B Network

Network Next Hop Metric LocPrf Weight Path


r>i1.0.0.0 10.1.23.2 0 100 0 100 i
Let’s see if this network is advertised to R5 in AS 500:

On R5
R5#Show ip bgp | B Network

Network Next Hop Metric LocPrf Weight Path


*> 1.0.0.0 10.1.45.4 0 234 100 i

R5#Show ip route bgp | Inc 1.0.0.0

B 1.0.0.0/8 [20/0] via 10.1.45.4, 00:06:47

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

To verify the configuration:

On R1
R1#Show ip route bgp

B* 0.0.0.0/0 [20/0] via 10.1.12.2, 00:01:44


On R2
R2#Show ip route ospf | I O
O 10.1.45.0 [110/3] via 10.1.23.3, 00:02:08, FastEthernet0/1
O 10.1.34.0 [110/2] via 10.1.23.3, 00:23:50, FastEthernet0/1

To test the configuration:

On R5
R5#Ping 1.1.1.1

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Ticket 6
Erase the startup configuration and the “vlan.dat” and reload the devices before proceeding to the next
scenario.

You might also like