BGP LAB

Configuring Interfaces IP address for IGP and BGP

ISP

interface FastEthernet0/0
 ip address 121.121.121.1 255.255.255.252
 
interface FastEthernet0/1
 ip address 122.122.122.1 255.255.255.252

A1

interface Loopback1
 ip address 100.100.100.1 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.100.1 255.255.255.0
 
interface FastEthernet0/1
 ip address 121.121.121.2 255.255.255.252
 

A2

interface Loopback1
 ip address 100.100.100.2 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.100.2 255.255.255.0
 

B1

interface Loopback1
 ip address 200.200.200.1 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.200.1 255.255.255.0
 
interface FastEthernet0/1
 ip address 122.122.122.2 255.255.255.252

B2

interface Loopback1
 ip address 200.200.200.2 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.200.2 255.255.255.0
 

B3

interface Loopback1
 ip address 200.200.200.3 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.200.3 255.255.255.0

Configuring IGP in AS 100 and AS 200 and verify peers/routes

AS100 (EIGRP)

A1(config)#router eigrp 100
A1(config-router)#network 100.100.100.1 0.0.0.0
A1(config-router)#network 192.168.100.1 0.0.0.0
A1(config-router)#no auto-summary
 
A2(config)#router eigrp 100
A2(config-router)#network 100.100.100.2 0.0.0.0
A2(config-router)#network 192.168.100.2 0.0.0.0
A2(config-router)#no auto-summary
 


A1#sh ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   192.168.100.2           Fa0/0             13 00:01:38   20   200  0  9
 
A1#sh ip route eigrp
     100.0.0.0/32 is subnetted, 2 subnets
D       100.100.100.2 [90/409600] via 192.168.100.2, 00:00:15, FastEthernet0/0
 
A2#sh ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                           
                                            (sec)         (ms)       Cnt Num
0   192.168.100.1           Fa0/0             14 00:02:00  432  2592  0  10
 
A2#sh ip route eigrp
     100.0.0.0/32 is subnetted, 2 subnets
D       100.100.100.1 [90/409600] via 192.168.100.1, 00:00:56, FastEthernet0/0

AS200 (OSPF)

 
B1(config)#router ospf 1
B1(config-router)#router-id 200.200.200.1
B1(config-router)#network 200.200.200.1 0.0.0.0 are 0
B1(config-router)#network 192.168.200.1 0.0.0.0 are 0
B2(config)#router ospf 1
B2(config-router)#router-id 200.200.200.2
B2(config-router)#network 200.200.200.2 0.0.0.0 are 0
B2(config-router)#network 192.168.200.2 0.0.0.0 are 0
 
B3(config)#router ospf 1
B3(config-router)#router-id 200.200.200.3
B3(config-router)#network 200.200.200.3 0.0.0.0 are 0
B3(config-router)#network 192.168.200.3 0.0.0.0 are 0
 
B1#sh ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
200.200.200.2     1   FULL/BDR        00:00:34    192.168.200.2   FastEthernet0/0
200.200.200.3     1   FULL/DROTHER    00:00:37    192.168.200.3   FastEthernet0/0
 
B1#sh ip route ospf
     200.200.200.0/32 is subnetted, 3 subnets
O       200.200.200.2 [110/11] via 192.168.200.2, 00:01:46, FastEthernet0/0
O       200.200.200.3 [110/11] via 192.168.200.3, 00:01:06, FastEthernet0/0
 
B2#sh ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
200.200.200.1     1   FULL/DR         00:00:38    192.168.200.1   FastEthernet0/0
200.200.200.3     1   FULL/DROTHER    00:00:30    192.168.200.3   FastEthernet0/0
 
B2#sh ip route ospf
     200.200.200.0/32 is subnetted, 3 subnets
O       200.200.200.1 [110/11] via 192.168.200.1, 00:01:59, FastEthernet0/0
O       200.200.200.3 [110/11] via 192.168.200.3, 00:01:19, FastEthernet0/0


 
B3#sh ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
200.200.200.1     1   FULL/DR         00:00:35    192.168.200.1   FastEthernet0/0
200.200.200.2     1   FULL/BDR        00:00:34    192.168.200.2   FastEthernet0/0
 
B3#sh ip route ospf
     200.200.200.0/32 is subnetted, 3 subnets
O       200.200.200.1 [110/11] via 192.168.200.1, 00:01:51, FastEthernet0/0
O       200.200.200.2 [110/11] via 192.168.200.2, 00:01:51, FastEthernet0/0

Configuring EBGP between ISP and AS 100, AS 200 

 
ISP(config)#int l1
ISP(config-if)#ip add 120.120.120.120 255.255.255.255
 
ISP(config)#router bgp 120
ISP(config-router)#bgp router-id 120.120.120.120
ISP(config-router)#neighbor 121.121.121.2 remote-as 100
ISP(config-router)#neighbor 122.122.122.2 remote-as 200
ISP(config-router)#network 120.120.120.120 mask 255.255.255.255
 
A1(config)#router bgp 100
A1(config-router)#bgp router-id 100.100.100.1
A1(config-router)#neighbor 121.121.121.1 remote-as 120
 
B1(config)#router bgp 200
B1(config-router)#bgp router-id 200.200.200.1
B1(config-router)#neighbor 122.122.122.1 remote-as 120
 
ISP#sh ip bgp summary | B Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
121.121.121.2   4   100      14      16        2    0    0 00:02:46        0
122.122.122.2   4   200       5       6        2    0    0 00:01:05        0
 
A1#sh ip bgp su | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
121.121.121.1   4   120      17      15        2    0    0 00:03:10        1
 
B1#sh ip bgp su | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
122.122.122.1   4   120       6       5        2    0    0 00:01:49        1

Configuring iBGP in AS 100 and AS 200 

 
A1(config)#router bgp 100
A1(config-router)#neighbor 192.168.100.2 remote-as 100
A1(config-router)#neighbor 192.168.100.2 next-hop-self
 
A2(config)#router bgp 100
A2(config-router)#bgp router-id 100.100.100.2
A2(config-router)#neighbor 192.168.100.1 remote-as 100
A2(config-router)#neighbor 192.168.100.1 next-hop-self
 
A1#sh ip bgp summary | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
121.121.121.1   4   120      69      67        2    0    0 00:55:21        1
192.168.100.2   4   100       4       5        2    0    0 00:00:45        0
 
A2#sh ip bgp summary | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.100.1   4   100       5       4        2    0    0 00:00:50        1
 
B1(config)#router bgp 200
B1(config-router)#neighbor 192.168.200.2 remote-as 200
B1(config-router)#neighbor 192.168.200.2 next-hop-self
B1(config-router)#neighbor 192.168.200.2 route-reflector-client
B1(config-router)#
B1(config-router)#neighbor 192.168.200.3 remote-as 200
B1(config-router)#neighbor 192.168.200.3 next-hop-self
B1(config-router)#neighbor 192.168.200.3 route-reflector-client
 
B2(config)#router bgp 200
B2(config-router)#bgp router-id 200.200.200.2
B2(config-router)#neighbor 192.168.200.1 remote-as 200
B2(config-router)#neighbor 192.168.200.1 next-hop-self
 
B3(config)#router bgp 200
B3(config-router)#bgp router-id 200.200.200.3
B3(config-router)#neighbor 192.168.200.1 remote-as 200
B3(config-router)#neighbor 192.168.200.1 next-hop-self
 
B1#sh ip bgp su | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
122.122.122.1   4   120      62      61        2    0    0 00:57:34        1
192.168.200.2   4   200       5       6        2    0    0 00:01:29        0
192.168.200.3   4   200       4       5        2    0    0 00:00:33        0
 
B3#sh ip bgp summary | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.200.1   4   200       5       4        2    0    0 00:00:51        1
 
B2#sh ip bgp summary | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.200.1   4   200       7       6        2    0    0 00:02:04        1

Advertise Public IP range to ISP and verify routing test between AS100 and 200

 
A1(config)#router bgp 100
A1(config-router)#network 100.100.100.0 mask 255.255.255.0
A1(config-router)#exit
A1(config)#
A1(config)#ip route 100.100.100.0 255.255.255.0 null 0
 
B1(config)#router bgp 200
B1(config-router)#network 200.200.200.0 mask 255.255.255.0
B1(config-router)#exit
B1(config)#
B1(config)#ip route 200.200.200.0 255.255.255.0 null 0
 
ISP#sh ip bgp su | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
121.121.121.2   4   100      75      78        4    0    0 01:02:50        1
122.122.122.2   4   200      66      68        4    0    0 01:01:10        1
 
ISP#sh ip bgp
BGP table version is 4, local
router ID is 120.120.120.120
Status codes: s suppressed, d
damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*> 100.100.100.0/24 121.121.121.2            0             0 100 i
*> 120.120.120.120/32
                    0.0.0.0                  0         32768 i
*> 200.200.200.0    122.122.122.2            0             0 200 i
 
A2#sh ip bgp
BGP table version is 4, local
router ID is 100.100.100.2
Status codes: s suppressed, d
damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP,? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*>i100.100.100.0/24 192.168.100.1            0    100      0 i
*>i120.120.120.120/32
                    192.168.100.1            0   100      0 120 i
*>i200.200.200.0    192.168.100.1            0   100      0 120 200 i
 
B3#sh ip bgp
BGP table version is 4, local
router ID is 200.200.200.3
Status codes: s suppressed, d
damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP,? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*>i100.100.100.0/24 192.168.200.1            0    100      0 120 100 i
*>i120.120.120.120/32
                    192.168.200.1            0   100      0 120 i
*>i200.200.200.0    192.168.200.1            0   100      0 i
 
A2#ping 200.200.200.3 source
100.100.100.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echosto 200.200.200.3, timeout is 2 seconds:
Packet sent with a sourceaddress of 100.100.100.2
!!!!!
Success rate is 100 percent
(5/5), round-trip min/avg/max = 40/49/56 ms
 
B3#ping 100.100.100.2 source 200.200.200.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.2, timeout is 2 seconds:
Packet sent with a source address of 200.200.200.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/56/68 ms

Leave a Reply

Your email address will not be published.

DigitalOcean Referral Badge