0% found this document useful (0 votes)
224 views70 pages

Basic BGP Lab for Networking Students

The document describes a basic BGP lab setup with Autonomous Systems 100, 200, and 300 connected via EBGP. RIPv2 is running within AS200 to distribute routes internally. The first scenario shows that with only EBGP and RIPv2 configured, the border routers in AS200 can ping their peer ISP networks but not networks on the opposite ISPs, and the ISPs can only ping their directly connected networks.

Uploaded by

malikanna70
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
224 views70 pages

Basic BGP Lab for Networking Students

The document describes a basic BGP lab setup with Autonomous Systems 100, 200, and 300 connected via EBGP. RIPv2 is running within AS200 to distribute routes internally. The first scenario shows that with only EBGP and RIPv2 configured, the border routers in AS200 can ping their peer ISP networks but not networks on the opposite ISPs, and the ISPs can only ping their directly connected networks.

Uploaded by

malikanna70
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Cabrillo College

Basic BGP Lab Examples


Rick Graziani, Instructor
November 15, 2001

1
Objective
• These lab examples are not meant to
demonstrate proper or realistic BGP
configurations, nor does it include all the
necessary commands to ensure proper
routing operation.
• The objective of these examples are to
show some of the basic BGP
configuration commands and their affect
on a network, the good, the bad, and the
ugly.
2
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP

S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

3
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

Setup
 RIPv2 running within AS200
 [Link]/24 is between SanJose1 and ISP1’s [Link]/24 networks,
both of which are part of [Link]/8 classful network.
 RIPv2 was chosen because this will create a different situation than
with the two different Class B networks between SanJose2 and ISP2.
4
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

Scenario A: Step #1 – EBGP and IGP (RIPv2)


 EBGP is configured between ISP routers and AS200 boundary routers.
 RIPv2 is running within AS200
 RIP network statements only include those networks in AS200
 No IBGP has been configured.
 There are no static routes.
5
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

Successful ISP1
.1
ISP2
.1
pings
[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300
Results:
 AS 200 Boundary routers can ping peer ISP networks
 AS 200 Boundary routers can NOT ping opposite ISP networks
 ISP routers can ping remote peer’s attached networks only, NOT
SanJose3 networks

6
ISP1 SanJose1
router bgp 100 router rip
network [Link] mask [Link] version 2
neighbor [Link] remote-as 200 network [Link]
!
ISP2 router bgp 200
router bgp 300 network [Link]
network [Link] neighbor [Link] remote-as 100
neighbor [Link] remote-as 200

SanJose3 SanJose2
router rip router rip
version 2 version 2
network [Link] network [Link]
!
router bgp 200
network [Link]
neighbor [Link] remote-as 300

7
ISP1#show ip route

[Link]/24 is subnetted, 2 subnets


C [Link] is directly connected, Loopback0
C [Link] is directly connected, Serial0
B [Link]/24 [20/0] via [Link], [Link]

ISP1#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 32768 i
*> [Link] [Link] 0 0 200 i
------------------------------------------------------------------------
ISP2#show ip route
 
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Loopback0
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/0
B [Link]/24 [20/0] via [Link], [Link]

ISP2#show ip bgp

Network Next Hop Metric LocPrf Weight Path


*> [Link] [Link] 0 32768 i
*> [Link] [Link] 0 0 200 i
8
SanJose1#show ip route
 
[Link]/24 is subnetted, 2 subnets
B [Link] [20/0] via [Link], [Link]
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0

SanJose1#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 0 100 i
*> [Link] [Link] 0 32768 i

9
SanJose2#show ip route
 
B [Link]/16 [20/0] via [Link], [Link]
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0

SanJose2#show ip bgp

Network Next Hop Metric LocPrf Weight Path


*> [Link] [Link] 0 0 300 i
*> [Link] [Link] 0 32768 i

10
SanJose3#show ip route

[Link]/24 is variably subnetted, 5 subnets, 2 masks


R [Link]/27 [120/1] via [Link], [Link], Serial0/1
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
C [Link]/30 is directly connected, Serial0/0
C [Link]/30 is directly connected, Serial0/1

11
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

Step #2 – EBGP, IBGP and IGP (RIPv2)


 EBGP is configured between ISP routers and AS200 boundary routers.
 RIPv2 is running within AS200
 IBGP is configured between SanJose1 and SanJose3.
 There are no static routes.

12
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

Results:
 AS 200 Boundary routers can ping peer ISP networks
 AS 200 Boundary routers can NOT ping opposite ISP networks
 ISP routers can ping remote peer’s attached networks only, NOT SanJose3 networks
 Synchronization is on, “The BGP synchronization rule states that if an AS provides
transit service to another AS, BGP should not advertise a route until all of the routers
within the AS have learned about the route via an IGP.” The boundary routers do not
send the “opposite” ISP routes because the other routers in the AS do not know
about it.
13
ISP1 SanJose1
router bgp 100 router rip
network [Link] mask [Link] version 2
neighbor [Link] remote-as 200 network [Link]
!
ISP2 router bgp 200
router bgp 300 network [Link]
network [Link] neighbor [Link] remote-as 100
neighbor [Link] remote-as 200 neighbor [Link] remote-as 200

SanJose3
router rip SanJose2
version 2 router rip
network [Link] version 2
network [Link]
!
router bgp 200
network [Link]
neighbor [Link] remote-as 300
neighbor [Link] remote-as 200

14
SanJose1#show ip route

[Link]/24 is subnetted, 2 subnets


B [Link] [20/0] via [Link], [Link]
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0

SanJose1#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 0 100 i
* i172.16.0.0 [Link] 0 100 0 300 i
*> [Link] [Link] 0 32768 i
* i [Link] 0 100 0 i

• Even though [Link] network is in bgp table it is not in routing table because
there is no route to the next hop of [Link]

15
SanJose2#show ip route
 
B [Link]/16 [20/0] via [Link], [Link]
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0

SanJose2#show ip bgp
Network Next Hop Metric LocPrf Weight Path
* i10.2.0.0/24 [Link] 0 100 0 100 i
*> [Link] [Link] 0 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i

• Even though [Link] network is in bgp table it is not in routing table because there
is no route to the next hop of [Link]

16
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

Step #3 – Adding SanJose3 as a IBGP peer


 EBGP is configured between ISP routers and AS200 boundary routers.
 RIPv2 is running within AS200
 IBGP is configured between SanJose1, SanJose2 and SanJose3,
full-mesh.
 No synchronization has been configured on all IBGP routers.
 There are no static routes.
17
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

Results:
 By itself, this will not change the reachability issues.
 We will make another change in a moment.
 Later, we might see that creating a full-mesh IBGP domain might not be
the best configuration.

18
ISP1 SanJose1
router bgp 100 router rip
network [Link] mask [Link] version 2
network [Link]
neighbor [Link] remote-as 200
!
router bgp 200
ISP2
no synchronization
router bgp 300 network [Link]
network [Link] neighbor [Link] remote-as 100
neighbor [Link] remote-as 200 neighbor [Link] remote-as 200
neighbor [Link] remote-as 200
SanJose3 !
router rip
version 2
network [Link] SanJose2
router rip
!
version 2
router bgp 200
network [Link]
no synchronization
!
neighbor [Link] remote-as 200 router bgp 200
neighbor [Link] remote-as 200 no synchronization
network [Link]
neighbor [Link] remote-as 300
neighbor [Link] remote-as 200
neighbor [Link] remote-as 200

19
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Complete Lo0 Lo0
reachability AS100 AS300

Step #4 – Adding the networks between the boundary routers and the ISP
routers to the RIP routing domain.
 EBGP is configured between ISP routers and AS200 boundary routers.
 RIPv2 is running within AS200, including the [Link] and [Link] network
statements and passive interfaces.
 IBGP is configured between SanJose1, SanJose2 and SanJose3, full-mesh.
 No synchronization has been configured on all IBGP routers.
 There are no static routes.
20
ISP1 SanJose1
router bgp 100 router rip
network [Link] mask [Link] version 2
passive-interface Serial0/1
neighbor [Link] remote-as 200
network [Link]
network [Link]
ISP2 !
router bgp 300 router bgp 200
network [Link] no synchronization
neighbor [Link] remote-as 200 network [Link]
neighbor [Link] remote-as 100
SanJose3 neighbor [Link] remote-as 200
router rip neighbor [Link] remote-as 200
version 2
SanJose2
network [Link]
router rip
!
version 2
router bgp 200 passive-interface Serial0/1
no synchronization network [Link]
neighbor [Link] remote-as 200 network [Link]
neighbor [Link] remote-as 200 !
router bgp 200
no synchronization
network [Link]
neighbor [Link] remote-as 300
neighbor [Link] remote-as 200
21 200
neighbor [Link] remote-as
SanJose1#show ip route
 
B [Link]/16 [200/0] via [Link], [Link]
R [Link]/16 [120/2] via [Link], [Link], Serial0/0
[Link]/24 is subnetted, 2 subnets
B [Link] [20/0] via [Link], [Link]
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0

SanJose1#show ip bgp 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 0 100 i
*>i172.16.0.0 [Link] 0 100 0 300 i
*> [Link] [Link] 0 32768 i
* i [Link] 0 100 0 i
• Now that the networks between the ISPs and the boundary routers are being
propagated by RIP, they now have a route to the BGP next hops.
• Because of this the BGP routes to the “opposite” ISP network is reachable and in
the routing table. 22
SanJose2#show ip route 
B [Link]/16 [20/0] via [Link], [Link]
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/1
[Link]/8 is variably subnetted, 2 subnets, 2 masks
B [Link]/24 [200/0] via [Link], [Link]
R [Link]/8 [120/2] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 2 masks
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0

SanJose2#show ip bgp 
Network Next Hop Metric LocPrf Weight Path
*>i10.2.0.0/24 [Link] 0 100 0 100 i
*> [Link] [Link] 0 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i
• Not only is the [Link] network reachable, but the [Link]/8 classful
network, which includes [Link]/24. This will come into play in a moment.
• The BGP route to the “opposite” ISP network is reachable and in the
routing table. 23
SanJose3#show ip route
 
B [Link]/16 [200/0] via [Link], [Link]
R [Link]/16 [120/1] via [Link], [Link], Serial0/1
[Link]/8 is variably subnetted, 2 subnets, 2 masks
B [Link]/24 [200/0] via [Link], [Link]
R [Link]/8 [120/1] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 6 subnets, 3 masks
R [Link]/27 [120/1] via [Link], [Link], Serial0/1
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
B [Link]/24 [200/0] via [Link], [Link]
C [Link]/30 is directly connected, Serial0/0
C [Link]/30 is directly connected, Serial0/1

SanJose3#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*>i10.2.0.0/24 [Link] 0 100 0 100 i
*>i172.16.0.0 [Link] 0 100 0 300 i
*>i192.168.1.0 [Link] 0 100 0 i
* i [Link] 0 100 0 i

24
ISP1#show ip route
 
B [Link]/16 [20/0] via [Link], [Link]
[Link]/24 is subnetted, 2 subnets
C [Link] is directly connected, Loopback0
C [Link] is directly connected, Serial0
B [Link]/24 [20/0] via [Link], [Link]

ISP1#show ip bgp

Network Next Hop Metric LocPrf Weight Path


*> [Link]/24 [Link] 0 32768 i
*> [Link] [Link] 0 200 300 i
*> [Link] [Link] 0 0 200 i

• The [Link] network is now propagated from SanJose1 to ISP1.

25
ISP2#show ip route
 
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Loopback0
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/0
[Link]/24 is subnetted, 1 subnets
B [Link] [20/0] via [Link], [Link]
B [Link]/24 [20/0] via [Link], [Link]

ISP2#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 200 100 i
*> [Link] [Link] 0 32768 i
*> [Link] [Link] 0 0 200 i

The [Link] network (and the [Link] network) is now propagated from
SanJose1 to ISP1.

26
SanJose1#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/84/84 ms
SanJose1#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms
-------------------------------------
SanJose3#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms
SanJose3#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/60 ms
---------------------------------------
SanJose2#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms
SanJose2#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/84/84 ms 27
ISP2#ping [Link]
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

• I thought you said all routers could reach all networks?


• What happened???

• ISP2 can reach [Link]


• What do you think the problem is?

28
ISP2#ping
Protocol [ip]:
Target IP address: [Link]
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: [Link]
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 108/112/116 ms

• ISP2 does have a route to [Link] and ISP1 has a route to [Link]
• The ping uses a source IP address of [Link] and ISP1 does NOT have
a route back to this destination address. (This also applies to pings from
ISP1.)
• Extended pings with a reachable source IP address will work!
29
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP


S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

Scenario B: Step #1 – IBGP between SanJose1 and SanJose2 only


 EBGP is configured between ISP routers and AS200 boundary routers.
 RIPv2 is running within AS200, including the [Link] and [Link]
network statements and passive interfaces.
 IBGP is configured only between SanJose1, SanJose2.
 No synchronization has been configured on all IBGP routers.
 There are no static routes.
30
ISP1 SanJose1
router bgp 100 router rip
network [Link] mask [Link] version 2
passive-interface Serial0/1
neighbor [Link] remote-as 200
network [Link]
network [Link]
ISP2
!
router bgp 300 router bgp 200
network [Link] no synchronization
neighbor [Link] remote-as 200 network [Link]
neighbor [Link] remote-as 100
SanJose3 neighbor [Link] remote-as 200
router rip
version 2
network [Link] SanJose2
router rip
!
version 2
no router bgp 200
passive-interface Serial0/1
network [Link]
network [Link]
!
router bgp 200
no synchronization
network [Link]
neighbor [Link] remote-as 300
neighbor [Link] remote-as 200
31
• SanJose3 does NOT have a route to [Link] on ISP2.
• SanJose3 does have a route to [Link] on ISP1 only
because SanJose1 is propagating its [Link]/24 subnet, so
it has a route to the classful [Link] network. 
• SanJose3 does NOT have the specific ISP networks in its
routing table so it may drop packets as it is passed through
between SanJose1 and SanJose2.
– SanJose1 and SanJose2 can NOT reach the opposite ISP2’s
[Link] because SanJose3 does not have a route to [Link]
on ISP1.
– However, SanJose1, SanJose2 and SanJose3 can reach ISP1’s
[Link] because RIP is sending the [Link] classful route which
includes the serial link between SJ1 and ISP1.
• ISPs – They will NOT be able to ping each other, because
SJ3 has a route for the [Link] network but NOT for the
[Link] network, thus pings from ISP2 to ISP1 will get to
ISP2 but the replies will get dropped by SJ3 as it does not
have a route for [Link].
32
ISP1#show ip route
 
This looks fine
B [Link]/16 [20/0] via [Link], [Link]
[Link]/24 is subnetted, 2 subnets for ISP1, but
C [Link] is directly connected, Loopback0 lets look at the
C [Link] is directly connected, Serial0 AS200 routers.
B [Link]/24 [20/0] via [Link], [Link]

ISP1#show ip bgp

Network Next Hop Metric LocPrf Weight Path


*> [Link]/24 [Link] 0 32768 i
*> [Link] [Link] 0 200 300 i
*> [Link] [Link] 0 0 200 i

ISP1#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/60 ms

ISP1#ping [Link] MAKE THIS AN EXTENDED PING


Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
U.U.U
33
Success rate is 0 percent (0/5)
SanJose1#show ip route
B [Link]/16 [200/0] via [Link], [Link] This looks fine
R [Link]/16 [120/2] via [Link], [Link], Serial0/0 for SJ1, but
[Link]/24 is subnetted, 2 subnets
B [Link] [20/0] via [Link], [Link]
lets look at
C [Link] is directly connected, Serial0/1 SJ3.
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0

SanJose1#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 0 100 i
*>i172.16.0.0 [Link] 0 100 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i

SanJose1#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms

SanJose1#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5) 34
SanJose3#show ip route
R [Link]/16 [120/1] via [Link], [Link], Serial0/1
R [Link]/8 [120/1] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/1] via [Link], [Link], Serial0/1
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
C [Link]/30 is directly connected, Serial0/0 Where’s
C [Link]/30 is directly connected, Serial0/1 [Link]?
SanJose3#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/60 ms

SanJose3#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

• Notice that SanJose3 does NOT have a route for [Link].


[Link]
• When a packet with a destination address for this network reaches
SanJose3 it drops it.
• Remember, we removed SanJose3 as an IBGP peer.
35
SanJose2#show ip route
B [Link]/16 [20/0] via [Link], [Link] Again,this
[Link]/24 is subnetted, 1 subnets looks fine for
C [Link] is directly connected, Serial0/1
[Link]/8 is variably subnetted, 2 subnets, 2 masks
SJ2, but
B [Link]/24 [200/0] via [Link], [Link] [Link] does
R [Link]/8 [120/2] via [Link], [Link], Serial0/0
NOT exist on
[Link]/24 is variably subnetted, 5 subnets, 2 masks
C [Link]/27 is directly connected, Loopback0 SJ3.
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0

SanJose2#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*>i10.2.0.0/24 [Link] 0 100 0 100 i
*> [Link] [Link] 0 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i

SanJose2#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/84/84 ms

SanJose2#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!! 36
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
ISP2#show ip route This also looks
[Link]/24 is subnetted, 1 subnets fine for ISP1, but
C [Link] is directly connected, Loopback0 remember the
[Link]/24 is subnetted, 1 subnets packets can’t
C [Link] is directly connected, Serial0/0 return to ISP2
[Link]/24 is subnetted, 1 subnets
because SJ3 does
B [Link] [20/0] via [Link], [Link]
B [Link]/24 [20/0] via [Link], [Link] not have a route
for [Link].
ISP2#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 200 100 i
*> [Link] [Link] 0 32768 i
*> [Link] [Link] 0 0 200 i

ISP2#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

ISP2#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/84/88 ms

37
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP

S0 .1 .1 S0

ISP1 ISP2
.1 .1

Complete [Link]/24 [Link]/24


Lo0 Lo0
reachability
AS100 AS300

Step 2 -  The Solution, Redistributing BGP routes into RIP


 EBGP is configured between ISP routers and AS200 boundary routers.
 RIPv2 is running within AS200, including the [Link] and [Link] network
statements and passive interfaces.
 IBGP is configured only between SanJose1, SanJose2.
 No synchronization has been configured on all IBGP routers.
 [Link] BGP routes are redistributed into AS200 via RIP
 There are no static routes.
38
SanJose1
ISP1 router rip
router bgp 100 version 2
network [Link] mask [Link] passive-interface Serial0/1
neighbor [Link] remote-as 200 network [Link]
network [Link]
!
ISP2
router bgp 200
router bgp 300
no synchronization
network [Link] network [Link]
neighbor [Link] remote-as 200 neighbor [Link] remote-as 100
neighbor [Link] remote-as 200
SanJose3
router rip SanJose2
version 2 router rip
network [Link] version 2
redistribute bgp 200 metric 2
passive-interface Serial0/1
network [Link]
network [Link]
!
router bgp 200
no synchronization
network [Link]
neighbor [Link] remote-as 300
neighbor [Link] remote-as 200
!
39
SanJose2#show ip route
B [Link]/16 [20/0] via [Link], [Link] As before.
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/1
[Link]/8 is variably subnetted, 2 subnets, 2 masks
B [Link]/24 [200/0] via [Link], [Link]
R [Link]/8 [120/2] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 2 masks
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0

SanJose2#show ip bgp
BGP table version is 4, local router ID is [Link]
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*>i10.2.0.0/24 [Link] 0 100 0 100 i
*> [Link] [Link] 0 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i
SanJose2#
40
ISP2#show ip route
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Loopback0
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/0
[Link]/24 is subnetted, 1 subnets As before.
B [Link] [20/0] via [Link], [Link]
B [Link]/24 [20/0] via [Link], [Link]

ISP2#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 200 100 i
*> [Link] [Link] 0 32768 i
*> [Link] [Link] 0 0 200 i

41
SanJose3#show ip route
 
R [Link]/16 [120/2] via [Link], [Link], Serial0/1
R [Link]/16 [120/1] via [Link], [Link], Serial0/1
R [Link]/8 [120/1] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/1] via [Link], [Link], Serial0/1
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
C [Link]/30 is directly connected, Serial0/0
C [Link]/30 is directly connected, Serial0/1
SanJose3#ping [Link]

• SanJose3 now has a route for [Link] which was


redistributed into RIP by SanJose2.
– This gives us the rest of the connectivity we need.
• [Link] network was already in SanJose2’s routing table
because SanJose1’s has a RIP network [Link] statement.

– Remember [Link] and [Link] belong to this classful


network.
42
SanJose1#show ip route
 
R [Link]/16 [120/3] via [Link], [Link], Serial0/0
R [Link]/16 [120/2] via [Link], [Link], Serial0/0
[Link]/24 is subnetted, 2 subnets
B [Link] [20/0] via [Link], [Link]
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
SanJose1#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 0 100 i
*>i172.16.0.0 [Link] 0 100 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i
• [Link] is now redistributed via RIP which has a lower administrative
distance (120) than IBGP (200; EBGP is 20), which was how this route
was in SanJose1’s routing table prior to redistribution by SanJose2..
43
ISP1#show ip route
 
B [Link]/16 [20/0] via [Link], [Link]
[Link]/24 is subnetted, 2 subnets
C [Link] is directly connected, Loopback0 As before.
C [Link] is directly connected, Serial0
B [Link]/24 [20/0] via [Link], [Link]

ISP1#show ip bgp

Network Next Hop Metric LocPrf Weight Path


*> [Link]/24 [Link] 0 32768 i
*> [Link] [Link] 0 200 300 i
*> [Link] [Link] 0 0 200 i

44
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP

X
S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Lo0 Lo0

AS100 AS300

Scenario C: Another Way – Step #1


 What if we did not want to redistribute the serial networks between the boundary routers and the
ISPs into our rip network.
network What would be the consequences? How could we fix them?
 Eventually, for ISP1 to reach ISP2 we will use next-hop attribute.
 SanJose1 can ping [Link]. We will see that SanJose1 has an IGP route to [Link] as this was
redistributed by SanJose2 from BGP into rip, so it can ping [Link]. However, the [Link] route
in the BGP routing table shows a next hop of [Link], in which SanJose1 does not have a route
for. Because BGP does not have a route for the next hop, it does not include this route in its update
to its EBGP peer, ISP1.
 ISP2 does have a route to ISP1’s [Link]/24 network because RIP is advertising the classful [Link]
network which includes the serial link between ISP1 and SanJose1. However, it can NOT ping it
because the reply can NOT get back as explained in the previous paragraph. 45
SanJose1
ISP1 router rip
router bgp 100 version 2
network [Link] mask [Link] redistribute bgp 200 metric 2
neighbor [Link] remote-as 200 passive-interface Serial0/1
no network [Link]
ISP2 network [Link]
router bgp 300 router bgp 200
network [Link] no synchronization
neighbor [Link] remote-as 200 network [Link]
neighbor [Link] remote-as 100
SanJose3 neighbor [Link] remote-as 200
router rip
version 2 SanJose2
network [Link] router rip
version 2
redistribute bgp 200 metric 2
passive-interface Serial0/1
no network [Link]
network [Link]
router bgp 200
no synchronization
network [Link]
neighbor [Link] remote-as 300
neighbor [Link] remote-as46200
!
ISP1#show ip route

[Link]/24 is subnetted, 2 subnets


C [Link] is directly connected, Loopback0
C [Link] is directly connected, Serial0
B [Link]/24 [20/0] via [Link], [Link]

ISP1#show ip bgp
Notice: No route for [Link]/16 (we’ll see why)
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 32768 i
*> [Link] [Link] 0 0 200 i

ISP1#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/84/84 ms
ISP1#ping
Protocol [ip]:
Target IP address: [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

ISP1#ping [Link] (Note: This is normal behavior and may not be necessary.)

Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:


.....
Success rate is 0 percent (0/5)
47
SanJose1#show ip route
 
R [Link]/16 [120/3] via [Link], [Link], Serial0/0
[Link]/24 is subnetted, 2 subnets
B [Link] [20/0] via [Link], [Link] Known via RIP
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks because is was
R [Link]/27 [120/2] via [Link], [Link], Serial0/0 redistributed from
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
BGP.
C [Link]/30 is directly connected, Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0 NOT sent to ISP1
SanJose1#show ip bgp via EBGP because
 
Network Next Hop Metric LocPrf Weight Path
Next hop is not
*> [Link]/24 [Link] 0 0 100 i reachable.
* i172.16.0.0 [Link] 0 100 0 300 i
*> [Link] [Link] 0 32768 i
* i [Link] 0 100 0 i
SanJose1#ping [Link]
  EBGP routes carried into IBGP use the external
Type escape sequence to abort.
EBGP next hop.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
SanJose1#ping [Link]
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/84/84 ms
48
SanJose1#show ip route
 
R [Link]/16 [120/3] via [Link], [Link], Serial0/0
[Link]/24 is subnetted, 2 subnets
B [Link] [20/0] via [Link], [Link]
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
SanJose1#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 0 100 i
* i172.16.0.0 [Link] 0 100 0 300 i
*> [Link] [Link] 0 32768 i
* i [Link] 0 100 0 i
SanJose1#ping [Link]
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
SanJose1#ping [Link]
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/84/84 ms
49
SanJose3#show ip route
 
R [Link]/16 [120/2] via [Link], [Link], Serial0/1
R [Link]/8 [120/1] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/1] via [Link], [Link], Serial0/1
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
C [Link]/30 is directly connected, Serial0/0
C [Link]/30 is directly connected, Serial0/1
SanJose3#

SanJose3#ping [Link]
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/64 ms
SanJose3#ping [Link]
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms

50
SanJose2#show ip route
 
B [Link]/16 [20/0] via [Link], [Link]
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/1
[Link]/8 is variably subnetted, 2 subnets, 2 masks
B [Link]/24 [200/0] via [Link], [Link]
R [Link]/8 [120/2] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 2 masks
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0 SanJose2 sends
SanJose2#show ip bgp [Link] to ISP2 via
  EBGP because Next
Network Next Hop Metric LocPrf Weight Path
*>i10.2.0.0/24 [Link] 0 100 0 100 i
hop of [Link] is
*> [Link] [Link] 0 0 300 i reachable, as part of
* i192.168.1.0 [Link] 0 100 0 i the [Link]/8 net.
*> [Link] 0 32768 i
SanJose2#ping [Link] RIP redistributed the
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!! entire classful
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/84/84 ms10.0.0.0/8 network.
SanJose2#ping [Link]

Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:


!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
51
ISP2#show ip route

[Link]/24 is subnetted, 1 subnets


C [Link] is directly connected, Loopback0
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/0
[Link]/24 is subnetted, 1 subnets
B [Link] [20/0] via [Link], [Link]
B [Link]/24 [20/0] via [Link], [Link]
Notice: There is a route for [Link]
ISP2#show ip bgp

Network Next Hop Metric LocPrf Weight Path


*> [Link]/24 [Link] 0 200 100 i
*> [Link] [Link] 0 32768 i
*> [Link] [Link] 0 0 200 i
ISP2#ping
Protocol [ip]:
Target IP address: [Link]
.....
Success rate is 0 percent (0/5)

52
Lo0
AS200 RIP
[Link]/27
version 2
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP

S0 .1 .1 S0

ISP1 ISP2
.1 .1

Complete [Link]/24 [Link]/24


Lo0 Lo0
reachability
AS100 AS300

Step #2 -  The Solution – next-hop-self


 EBGP routes carried into IBGP use the external EBGP next hop. SanJose1’s BGP table
has [Link] as the next hop for [Link]/16, but does not have a route to
[Link], so it does not forward this route to ISP1.
 BGP Path Selection: “If the path specifies a next hop that is inaccessible, drop the
update.” (coming)
 Lets change the next hop to be the internal IBGP next hop.
 IBGP peers SanJose1 and SanJose2 will use next-hop self in peering with each other.
This will change to next hops from the EBGP next hop to the internal IBGP next hop.
  All works!!! 53
SanJose1
ISP1 router rip
router bgp 100 version 2
redistribute bgp 200 metric 2
network [Link] mask [Link]
passive-interface Serial0/1
neighbor [Link] remote-as 200 no network [Link] (from before)
network [Link]
ISP2 !
router bgp 300 router bgp 200
no synchronization
network [Link]
network [Link]
neighbor [Link] remote-as 200
neighbor [Link] remote-as 100
neighbor [Link] remote-as 200
SanJose3 neighbor [Link] next-hop-self
router rip SanJose2
version 2 router rip
version 2
network [Link]
redistribute bgp 200 metric 2
passive-interface Serial0/1
no network [Link] (from before)
network [Link]
!
router bgp 200
no synchronization
network [Link]
neighbor [Link] remote-as 300
neighbor [Link] remote-as 200
neighbor [Link] next-hop-self
!
54
ISP1#show ip route
 
B [Link]/16 [20/0] via [Link], [Link] Looks good!
[Link]/24 is subnetted, 2 subnets
C [Link] is directly connected, Loopback0
C [Link] is directly connected, Serial0
B [Link]/24 [20/0] via [Link], [Link]

ISP1#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 32768 i
*> [Link] [Link] 0 200 300 i
*> [Link] [Link] 0 0 200 i

ISP1#ping [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/60 ms

ISP1#ping
Protocol [ip]:
Target IP address: [Link]
Extended commands [n]: y
Source address or interface: [Link]
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 108/111/112 ms
ISP1#

55
SanJose2: neighbor [Link] next-hop-self (->[Link])

SanJose1#show ip route
 
R [Link]/16 [120/3] via [Link], [Link], Serial0/0
[Link]/24 is subnetted, 2 subnets
B [Link] [20/0] via [Link], [Link] Looks good!
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0

SanJose1#show ip bgp Affect of the next-hop-self, was [Link])


 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 0 100 i
*>i172.16.0.0 [Link] 0 100 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i

56
SanJose3#show ip route
 
R [Link]/16 [120/2] via [Link], [Link], Serial0/1
R [Link]/8 [120/1] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 2 masks
R [Link]/27 [120/1] via [Link], [Link], Serial0/1
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
C [Link]/30 is directly connected, Serial0/0
C [Link]/30 is directly connected, Serial0/1

57
SanJose1: neighbor [Link] next-hop-self (->[Link])

SanJose2#show ip route
 
B [Link]/16 [20/0] via [Link], [Link]
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/1
[Link]/8 is variably subnetted, 2 subnets, 2 masks
B [Link]/24 [200/0] via [Link], [Link]
R [Link]/8 [120/2] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 2 masks
C [Link]/27 is directly connected, Loopback0
R [Link]/27 [120/2] via [Link], [Link], Serial0/0
R [Link]/27 [120/1] via [Link], [Link], Serial0/0
R [Link]/30 [120/1] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0

SanJose2#show ip bgp Affect of the next-hop-self, was [Link]


 
Network Next Hop Metric LocPrf Weight Path
*>i10.2.0.0/24 [Link] 0 100 0 100 i
*> [Link] [Link] 0 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i

58
More to come…
• In the near future I will expand this
example network to include many more
examples including the use of attributes.
• For now:
– What if we used a [Link]/24 mask on
ISP2?
– What if we were running OSPF instead of
RIP.
– More later…

59
What if we used a [Link]/24 mask on ISP2?
• [Link]/16 route distributed via RIP and BGP.
ISP2 BEFORE
router bgp 300
network [Link]
neighbor [Link] remote-as 200

SanJose2#show ip route
B [Link]/16 [20/0] via [Link], [Link]

SanJose3#show ip route
R [Link]/16 [120/2] via [Link], [Link], Serial0/1

SanJose1#show ip route
R [Link]/16 [120/3] via [Link], [Link], Serial0/0

ISP1#show ip route
B [Link]/16 [20/0] via [Link], [Link]

60
What if we used a [Link]/24 mask on ISP2?
• [Link]/16 route distributed via RIP and [Link]/24
distributed via BGP.
ISP2 AFTER
router bgp 300
network [Link] mask [Link]
neighbor [Link] remote-as 200

SanJose2#show ip route
B [Link]/24 [20/0] via [Link], [Link]

SanJose3#show ip route
R [Link]/16 [120/2] via [Link], [Link], Serial0/1

SanJose1#show ip route
R [Link]/16 [120/3] via [Link], [Link], Serial0/0
B [Link]/24 [20/0] via [Link], [Link]

ISP1#show ip route
B [Link]/16 [20/0] via [Link], [Link]
61
Lo0
AS200 OSPF
[Link]/27
(area 0)
.33

.194 SanJose3 .198


S0 S1
[Link]/30 [Link]/30

.65 .193 S0 IBGP S0 .197


[Link]/27 .97 [Link]/27
Lo0 SanJose1 SanJose2 Lo0
.2 S1 .2 S1

EBGP [Link]/24 [Link]/24 EBGP

S0 .1 .1 S0

ISP1 ISP2
.1 .1

[Link]/24 [Link]/24
Complete Lo0 Lo0
reachability AS100 AS300

Let’s see how OSPF would work with BGP…


 Notice that the [Link]/24 network is distributed within OSPF
and not the classful [Link]/16 like with RIP. 
 All works!!!

62
SanJose1
ISP1 router ospf 1
router bgp 100 redistribute bgp 200 metric 20 subnets
network [Link] mask [Link] network [Link] [Link] area 0
neighbor [Link] remote-as 200 network [Link] [Link] area 0
!
router bgp 200
ISP2
no synchronization
router bgp 300
network [Link]
network [Link] mask [Link] neighbor [Link] remote-as 100
neighbor [Link] remote-as 200 neighbor [Link] remote-as 200
neighbor [Link] next-hop-self
SanJose3 !
router ospf 1 access-list 1 permit [Link] [Link]
network [Link] [Link] area 0
network [Link] [Link] area 0 SanJose2
network [Link] [Link] area 0 router ospf 1
redistribute bgp 200 metric 20 subnets
network [Link] [Link] area 0
network [Link] [Link] area 0
!
router bgp 200
no synchronization
network [Link]
neighbor [Link] remote-as 300
neighbor [Link] remote-as 200
neighbor [Link] next-hop-self
63
ISP2#show ip route
 
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Loopback0
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/0
[Link]/24 is subnetted, 1 subnets
B [Link] [20/0] via [Link], [Link]
B [Link]/24 [20/0] via [Link], [Link]

ISP2#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 200 100 i
*> [Link]/24 [Link] 0 32768 i
*> [Link] [Link] 0 0 200 i

64
SanJose2#show ip route
 
[Link]/24 is subnetted, 1 subnets
B [Link] [20/0] via [Link], [Link]
[Link]/24 is subnetted, 1 subnets
C [Link] is directly connected, Serial0/1
[Link]/24 is subnetted, 1 subnets
O E2 [Link] [110/20] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 3 masks
C [Link]/27 is directly connected, Loopback0
O [Link]/32 [110/846] via [Link], [Link], Serial0/0
O [Link]/32 [110/782] via [Link], [Link], Serial0/0
O [Link]/30 [110/845] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0

SanJose2#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*>i10.2.0.0/24 [Link] 0 100 0 100 i
*> [Link]/24 [Link] 0 0 300 i
*> [Link] [Link] 0 32768 i
* i [Link] 0 100 0 i

65
SanJose3#show ip route
 
[Link]/24 is subnetted, 1 subnets
O E2 [Link] [110/20] via [Link], [Link], Serial0/1
[Link]/24 is subnetted, 1 subnets
O E2 [Link] [110/20] via [Link], [Link], Serial0/0
[Link]/24 is variably subnetted, 5 subnets, 3 masks
O [Link]/32 [110/65] via [Link], [Link], Serial0/1
O [Link]/32 [110/65] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
C [Link]/30 is directly connected, Serial0/0
C [Link]/30 is directly connected, Serial0/1

66
SanJose1#show ip route
 
[Link]/24 is subnetted, 1 subnets
O E2 [Link] [110/20] via [Link], [Link], Serial0/0
[Link]/24 is subnetted, 2 subnets
B [Link] [20/0] via [Link], [Link]
C [Link] is directly connected, Serial0/1
[Link]/24 is variably subnetted, 5 subnets, 3 masks
O [Link]/32 [110/846] via [Link], [Link], Serial0/0
C [Link]/27 is directly connected, Loopback0
O [Link]/32 [110/782] via [Link], [Link], Serial0/0
C [Link]/30 is directly connected, Serial0/0
O [Link]/30 [110/845] via [Link], [Link], Serial0/0

SanJose1#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 0 100 i
*>i172.16.1.0/24 [Link] 0 100 0 300 i
* i192.168.1.0 [Link] 0 100 0 i
*> [Link] 0 32768 i

67
SanJose1#show ip ospf data
 
OSPF Router with ID ([Link]) (Process ID 1)
 
 
Router Link States (Area 0)
 
Link ID ADV Router Age Seq# Checksum Link count
[Link] [Link] 845 0x80000005 0xAB78 5
[Link] [Link] 921 0x80000004 0x8883 3
[Link] [Link] 801 0x80000004 0xB8EA 3
 
Type-5 AS External Link States
 
Link ID ADV Router Age Seq# Checksum Tag
[Link] [Link] 193 0x80000001 0xC1C2 100
[Link] [Link] 165 0x80000001 0x28C1 300

68
ISP1#show ip route
 
[Link]/24 is subnetted, 1 subnets
B [Link] [20/0] via [Link], [Link]
[Link]/24 is subnetted, 2 subnets
C [Link] is directly connected, Loopback0
C [Link] is directly connected, Serial0
B [Link]/24 [20/0] via [Link], [Link]

ISP1#show ip bgp
 
Network Next Hop Metric LocPrf Weight Path
*> [Link]/24 [Link] 0 32768 i
*> [Link]/24 [Link] 0 200 300 i
*> [Link] [Link] 0 0 200 i

69
To be continued…

70

You might also like