BGP: Path selection lab

The lab is from my friend, Andrey, you can find the lab objective here:

http://eccentric.mae.cornell.edu/~andrey/labs/BGP%20Dual-connected%20AS%20with%20OSPF.pdf

R1: 1841-1

R2: 2651-1

R3: 2651-2

R4: 1841-2

R5: 3825-1

Subnet at segment between R1 and R2: 192.168.1.0/24

Subnet at segment between R2 and R3: 192.168.2.0/24

Subnet at segment between R3 and R4: 192.168.3.0/24

subnet between R1 and R5: 100.10.10.0/24

subnet between R2 and R5: 100.20.20.0/24

R5 has a loopback123: 123.123.123.123 /24

 

R5 configuration

3825-1#sh run | s router bgp
router bgp 1
no synchronization
bgp log-neighbor-changes
network 123.123.123.0 mask 255.255.255.0
network 172.16.1.1 mask 255.255.255.255
neighbor 172.16.1.2 remote-as 2
neighbor 172.16.1.2 ebgp-multihop 2
neighbor 172.16.1.2 update-source Loopback1
neighbor 172.17.1.2 remote-as 2
neighbor 172.17.1.2 ebgp-multihop 2
neighbor 172.17.1.2 update-source Loopback2
no auto-summary

3825-1#sh run | i ip route
ip route 172.16.1.2 255.255.255.255 100.10.10.2
ip route 172.17.1.2 255.255.255.255 100.20.20.2

3825-1#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         100.10.10.1     YES NVRAM  up                    up
GigabitEthernet0/1         100.20.20.1     YES NVRAM  up                    up
Loopback1                  172.16.1.1      YES NVRAM  up                    up
Loopback2                  172.17.1.1      YES NVRAM  up                    up
Loopback123                123.123.123.123 YES manual up                    up

 

R1 Configuration

1841-1#sh run | s router
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
redistribute connected
redistribute static
network 1.1.1.1 0.0.0.0 area 0
network 192.168.1.1 0.0.0.0 area 0
default-information originate always

router bgp 2
no synchronization
bgp log-neighbor-changes
redistribute ospf 1
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback1
neighbor 4.4.4.4 next-hop-self
neighbor 172.16.1.1 remote-as 1
neighbor 172.16.1.1 ebgp-multihop 2
neighbor 172.16.1.1 update-source Loopback0
neighbor 172.16.1.1 route-map local-pref in
no auto-summary

route-map local-pref permit 10
set local-preference 200

1841-1#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            100.10.10.2     YES NVRAM  up                    up
FastEthernet0/1            192.168.1.1     YES NVRAM  up                    up
Loopback0                  172.16.1.2      YES NVRAM  up                    up
Loopback1                  1.1.1.1         YES NVRAM  up                    up
1841-1#

 

R2 configuration

2651-1#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            192.168.2.2     YES NVRAM  up                    up
FastEthernet0/1            192.168.1.2     YES NVRAM  up                    up
Loopback2                  2.2.2.2         YES NVRAM  up                    up

2651-1#sh run | s router
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 192.168.1.2 0.0.0.0 area 0
network 192.168.2.2 0.0.0.0 area 0

 

R3 Configuration

2651-2#sh run | s router
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 192.168.2.3 0.0.0.0 area 0
network 192.168.3.3 0.0.0.0 area 0

2651-2#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            192.168.2.3     YES NVRAM  up                    up
FastEthernet0/1            192.168.3.3     YES NVRAM  up                    up
Loopback3                  3.3.3.3         YES NVRAM  up                    up

 

R4 Configuration

1841-2#sh run | s router
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
redistribute connected
redistribute static
network 4.4.4.4 0.0.0.0 area 0
network 192.168.3.4 0.0.0.0 area 0
default-information originate always metric 10

router bgp 2
no synchronization
bgp log-neighbor-changes
redistribute ospf 1
neighbor 1.1.1.1 remote-as 2
neighbor 1.1.1.1 update-source Loopback4
neighbor 1.1.1.1 next-hop-self
neighbor 172.17.1.1 remote-as 1
neighbor 172.17.1.1 ebgp-multihop 2
neighbor 172.17.1.1 update-source Loopback1
no auto-summary

1841-2#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            192.168.3.4     YES NVRAM  up                    up
FastEthernet0/1            100.20.20.2     YES NVRAM  up                    up
Loopback1                  172.17.1.2      YES NVRAM  up                    up
Loopback4                  4.4.4.4         YES NVRAM  up                    up

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s