December 19, 2013

Lab 11: BGP Distribute-list

Configure OSPF between R1 and R2 and redistribute OSPF into BGP on R2. This will be your routing table on R3:

R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/30 is subnetted, 1 subnets
C       20.0.0.0 is directly connected, Serial0/1
     10.0.0.0/30 is subnetted, 1 subnets
B       10.0.0.0 [20/0] via 20.0.0.1, 00:11:01
     192.168.0.0/32 is subnetted, 3 subnets
B       192.168.0.1 [20/20] via 20.0.0.1, 00:05:50
B       192.168.0.2 [20/20] via 20.0.0.1, 00:05:50
B       192.168.0.3 [20/20] via 20.0.0.1, 00:05:50

Let's configure a distribute-list to block 192.168.0.1/32:

access-list 10 deny   192.168.0.1
access-list 10 permit any

router bgp 1000
 neighbor 20.0.0.2 distribute-list 10 out

As a result, 192.168.0.1/32 is not observed on R3 anymore:

R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     20.0.0.0/30 is subnetted, 1 subnets
C       20.0.0.0 is directly connected, Serial0/1
     10.0.0.0/30 is subnetted, 1 subnets
B       10.0.0.0 [20/0] via 20.0.0.1, 02:53:09
     192.168.0.0/32 is subnetted, 2 subnets
B       192.168.0.2 [20/20] via 20.0.0.1, 00:09:04
B       192.168.0.3 [20/20] via 20.0.0.1, 00:09:04

# DOWNLOAD LAB 11 GNS3 FILE