BGP NLRI Advertisements
LAB Preparation
Lab Preparation
AS 100
Router 1
conf t
no router eigrp 100
router ospf 1
passive-interface Serial1/0.1
passive-interface Serial1/1
network 150.1.1.1 0.0.0.0 area 0
network 155.1.146.1 0.0.0.0 area 0
router bgp 100
bgp log-neighbor-changes
network 150.1.4.0 mask 255.255.255.0
network 150.1.6.0 mask 255.255.255.0
neighbor 150.1.4.4 remote-as 100
neighbor 150.1.4.4 update-source Loopback0
neighbor 150.1.6.6 remote-as 100
neighbor 150.1.6.6 update-source Loopback0
neighbor 155.1.0.5 remote-as 400
neighbor 155.1.0.5 update-source Serial1/0.1
neighbor 155.1.13.3 remote-as 300
neighbor 155.1.13.3 update-source Serial1/1
Router 4
conf t
no router eigrp 100
router ospf 1
passive-interface Ethernet0/0
network 150.1.4.4 0.0.0.0 area 0
network 155.1.146.4 0.0.0.0 area 0
network 204.12.1.0 0.0.0.255 area 0
router bgp 100
bgp log-neighbor-changes
neighbor 150.1.1.1 remote-as 100
neighbor 150.1.1.1 update-source Loopback0
neighbor 150.1.6.6 remote-as 100
neighbor 150.1.6.6 update-source Loopback0
neighbor 155.1.45.5 remote-as 400
neighbor 155.1.45.5 update-source Serial1/1
neighbor 204.12.1.254 remote-as 54
neighbor 204.12.1.254 update-source Ethernet0/0
Router 6
conf t
no router eigrp 100
router ospf 1
passive-interface Serial1/0
network 54.1.1.0 0.0.0.255 area 0
network 150.1.6.6 0.0.0.0 area 0
network 155.1.146.6 0.0.0.0 area 0
router bgp 100
bgp log-neighbor-changes
neighbor 54.1.1.254 remote-as 54
neighbor 54.1.1.254 update-source Serial1/0
neighbor 150.1.1.1 remote-as 100
neighbor 150.1.1.1 update-source Loopback0
neighbor 150.1.4.4 remote-as 100
neighbor 150.1.4.4 update-source Loopback0
AS 300
Router 3
Rack1R3#ssre
router eigrp 100
network 150.1.0.0
network 155.1.0.0
passive-interface Serial1/2
passive-interface Serial1/3
Router bgp 100
neighbor 150.1.7.7 remote-as 300
neighbor 150.1.7.7 update-source Loopback0
neighbor 150.1.9.9 remote-as 300
neighbor 150.1.9.9 update-source Loopback0
neighbor 155.1.0.5 remote-as 400
neighbor 155.1.0.5 update-source Serial1/0.1
neighbor 155.1.13.1 remote-as 100
neighbor 155.1.13.1 update-source Serial1/2
neighbor 155.1.23.2 remote-as 200
neighbor 155.1.23.2 update-source Serial1/3
Switch1
router eigrp 100
network 150.1.0.0
network 155.1.0.0
router bgp 300
bgp log-neighbor-changes
neighbor 150.1.3.3 remote-as 300
neighbor 150.1.3.3 update-source Loopback0
neighbor 150.1.9.9 remote-as 300
neighbor 150.1.9.9 update-source Loopback0
no auto-summary
Switch 3
router eigrp 100
network 150.1.0.0
network 155.1.0.0
router bgp 300
bgp log-neighbor-changes
neighbor 150.1.3.3 remote-as 300
neighbor 150.1.3.3 update-source Loopback0
neighbor 150.1.7.7 remote-as 300
neighbor 150.1.7.7 update-source Loopback0
AS 400
R5
Router eigrp 100
network 150.1.0.0
network 155.1.0.0
passive-interface Serial1/0
passive-interface Serial1/1
router bgp 400
neighbor 150.1.8.8 remote-as 400
neighbor 150.1.8.8 update-source Loopback0
neighbor 150.1.10.10 remote-as 400
neighbor 150.1.10.10 update-source Loopback0
neighbor 155.1.0.1 remote-as 100
neighbor 155.1.0.1 update-source Serial1/0
neighbor 155.1.0.2 remote-as 200
neighbor 155.1.0.2 update-source Serial1/0
neighbor 155.1.0.3 remote-as 300
neighbor 155.1.0.3 update-source Serial1/0
neighbor 155.1.45.4 remote-as 100
SW2
router eigrp 100
network 150.1.0.0
network 155.1.0.0
router bgp 400
bgp log-neighbor-changes
neighbor 150.1.5.5 remote-as 400
neighbor 150.1.5.5 update-source Loopback0
SW4
router bgp 400
bgp log-neighbor-changes
neighbor 150.1.5.5 remote-as 400
neighbor 150.1.5.5 update-source Loopback0
no auto-summary
router eigrp 100
network 150.1.0.0
network 155.1.0.0
AS 200
R2
Conf t
no router eigrp 100
router bgp 200
bgp log-neighbor-changes
neighbor 155.1.0.5 remote-as 400
neighbor 155.1.0.5 update-source Serial1/0.1
neighbor 155.1.23.3 remote-as 300
neighbor 155.1.23.3 update-source Serial1/1
neighbor 192.10.1.254 remote-as 254
neighbor 192.10.1.254 password CISCO
neighbor 192.10.1.254 update-source Ethernet0/0
LAB Testings
R1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
150.1.4.4 4 100 126 126 88 0 0 01:48:46 13
150.1.6.6 4 100 125 126 88 0 0 01:48:19 10
155.1.0.5 4 400 50 44 88 0 0 00:33:36 3
155.1.13.3 4 300 49 46 88 0 0 00:35:55 3
R2
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
155.1.0.5 4 400 55 58 85 0 0 00:43:27 12
155.1.23.3 4 300 56 55 85 0 0 00:40:01 12
192.10.1.254 4 254 245 251 85 0 0 03:40:06 3
R3
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
150.1.7.7 4 300 238 247 86 0 0 03:31:59 0
150.1.9.9 4 300 237 245 86 0 0 03:31:03 0
155.1.13.1 4 100 46 49 86 0 0 00:35:55 12
155.1.23.2 4 200 55 56 86 0 0 00:40:01 3
R4
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
150.1.1.1 4 100 126 126 24 0 0 01:48:46 4
150.1.6.6 4 100 127 126 24 0 0 01:48:19 10
155.1.45.5 4 400 40 42 24 0 0 00:27:20 3
204.12.1.254 4 54 260 262 24 0 0 03:50:01 10
R5
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
150.1.8.8 4 400 230 243 116 0 0 03:25:56 0
150.1.10.10 4 400 229 245 116 0 0 03:26:02 0
155.1.0.1 4 100 44 50 116 0 0 00:33:36 15
155.1.0.2 4 200 58 55 116 0 0 00:43:27 15
155.1.45.4 4 100 42 40 116 0 0 00:27:20 11
R6
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
54.1.1.254 4 54 254 249 24 0 0 03:45:11 10
150.1.1.1 4 100 126 125 24 0 0 01:48:19 4
150.1.4.4 4 100 126 127 24 0 0 01:48:19 13
SW1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
150.1.3.3 4 300 247 238 86 0 0 03:31:59 15
150.1.9.9 4 300 236 236 86 0 0 03:31:07 0
SW2
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
150.1.5.5 4 400 243 230 132 0 0 03:25:56 15
SW3
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
150.1.3.3 4 300 245 237 86 0 0 03:31:03 15
150.1.7.7 4 300 236 236 86 0 0 03:31:07 0
SW4
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
150.1.5.5 4 400 245 229 132 0 0 03:26:02 15
So the LAB is ready for Testing
network statement
Requires exact match in the routing table first
redistribution statement
Wont include OSPF External by default
aggregate-address statement
Requires one sub-net in BGP table first
bgp inject-map statement
Opposite of aggregation
Originates prefixes with ORIGIN of IGP (i)
Dose not have to be connected prefix, can be learned via IGP
Without mask keyword assumes classless mask
Task 1
Using network command advertise lo 0 address of R4 and R6 into R1 BGP process.
Change the setting so R1 sees the correct loop back address for R4 and R6 subnet in the routing tabal.
Solution - Task 1
R1
router bgp 100
bgp log-neighbor-changes
network 150.1.4.0 mask 255.255.255.0
network 150.1.6.0 mask 255.255.255.0
network 150.1.1.0 mask 255.255.255.0
R4
interface Loopback0
ip ospf network point-to-point
R6
interface Loopback0
ip ospf network point-to-point
show ip bgp reg ^$
*> 150.1.1.0/24 0.0.0.0 0 32768 i
*> 150.1.4.0/24 155.1.146.4 11 32768 i
*> 150.1.6.0/24 155.1.146.6 11 32768 i
Verify
Go to R2 and do show ip bgp and check for the above routes and its matrix.
-Points to remember
BGP inherit the metric value from BGP
BGP removes the MED value as it travels from one AS to other AS
Originate prefix with ORIGIN of INCOMPLETE (?)
Originate classful summery is auto-summery is enabled.
Automatically copy the IGP metric to BGP MED
Will not include the OSPF external routes by default
redistribute ospf [pid] match internal external
pre-configuration test
Ping any external routes from internal router in AS400 as fallows
Ping 222.22.2.1 source loop-back 0
ping 222.22.2.1
Rack1SW4#ping 222.22.2.1 source loopback 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 222.22.2.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
.....
Success rate is 0 percent (0/5)
Rack1SW4#ping 222.22.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 222.22.2.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Task 1
On R5 redistribute EIGRP process into BGP.
Advertise only the Looopback of R5 and Sw2 and SW 10 into BGP process.
Solution 1
router bgp 400
redistribute eigrp 100
show ip bgp reg ^$
Network Next Hop Metric LocPrf Weight Path
*> 150.1.5.0/24 0.0.0.0 0 32768 ?
*> 150.1.8.0/24 155.1.58.8 409600 32768 ?
*> 150.1.10.0/24 155.1.58.8 435200 32768 ?
*> 155.1.8.0/24 155.1.58.8 281856 32768 ?
*> 155.1.10.0/24 155.1.58.8 307456 32768 ?
*> 155.1.108.0/24 155.1.58.8 307200 32768 ?
Solution 2
R5
create frefix-list matching the routs needs to be advertised into BGP process
ip prefix-list EIGRP_TO_BGP_PRFIXLIST seq 5 permit 150.1.5.0/24
ip prefix-list EIGRP_TO_BGP_PRFIXLIST seq 10 permit 150.1.8.0/24
ip prefix-list EIGRP_TO_BGP_PRFIXLIST seq 15 permit 150.1.10.0/24
create a route-map matching the prefix-list
route-map EIGRP_TO_BGP, permit, sequence 10
Match clauses:
ip address prefix-lists: EIGRP_TO_BGP_PRFIXLIST
Set clauses:
Policy routing matches: 0 packets, 0 bytes
Redistribute it into BGP process
router bgp 400
redistribute eigrp 100 route-map EIGRP_TO_BGP
SHow ip bgp reg ^$
Network Next Hop Metric LocPrf Weight Path
*> 150.1.5.0/24 0.0.0.0 0 32768 ?
*> 150.1.8.0/24 155.1.58.8 409600 32768 ?
*> 150.1.10.0/24 155.1.58.8 435200 32768 ?
Verify
Rack1SW4#ping 222.22.2.1 source loopback 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 222.22.2.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/18/20 ms
Rack1SW4#ping 222.22.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 222.22.2.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Note
SW4 is not able ping because the external router does not have the route for the link between SW4 and SW2
End result
R3
show i bgp
Rack1R3#show ip bgp 150.1.8.0
BGP routing table entry for 150.1.8.0/24, version 71
Paths: (3 available, best #1, table default)
Advertised to update-groups:
1 2
Refresh Epoch 2
400
155.1.0.5 from 155.1.0.5 (150.1.5.5)
Origin incomplete, metric 409600, localpref 100, valid, external, best
Refresh Epoch 1
200 400
155.1.23.2 from 155.1.23.2 (150.1.2.2)
Origin incomplete, localpref 100, valid, external
Refresh Epoch 1
100 400
155.1.13.1 from 155.1.13.1 (150.1.1.1)
Origin incomplete, localpref 100, valid, external
-