BGP OSPF and EIGRP redistribution including some - TopicsExpress



          

BGP OSPF and EIGRP redistribution including some features: Basic configuration of all routers: R1: interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 no shutdown ! interface FastEthernet0/1 ip address 192.168.1.1 255.255.255.0 no shutdown ! interface Serial1/1 ip address 10.0.12.1 255.255.255.252 no shutdown R2: interface FastEthernet0/0 ip address 10.2.2.2 255.255.255.0 no shutdown ! interface Serial1/1 ip address 10.0.12.2 255.255.255.252 no shutdown ! interface Serial1/0 ip address 10.0.23.1 255.255.255.252 no shutdown R3: interface FastEthernet0/0 ip address 10.3.3.3 255.255.255.0 no shutdown ! interface Serial1/1 ip address 10.0.23.2 255.255.255.252 no shutdown ! interface Serial1/2 ip address 10.0.34.1 255.255.255.252 no shutdown R2: interface FastEthernet0/0 ip address 10.4.4.4 255.255.255.0 no shutdown ! interface Serial1/1 ip address 10.0.34.2 255.255.255.252 no shutdown Configuration of OSPF between R1 and R2: R1 should advertise the prefix 10.1.1.0/24 as inter-area route using the network 10.1.1.1 0.0.0.0 area 1 command and the prefix 192.168.1.0/24 is advertised as an external route using the redistribute connected subnets command: R1: router ospf 1 router-id 1.1.1.1 network 10.0.12.1 0.0.0.0 area 0 network 10.1.1.1 0.0.0.0 area 1 redistribute connected subnets On R2, we should activate OSPF only on the serial 1/1 interface to form adjacencies with R1: R2: router ospf 1 router-id 2.2.2.2 network 10.0.12.2 0.0.0.0 area 0 Lets verify the routing table of R2: As expected R2 receives an inter-area route for the prefix 10.1.1.0/24 and an external route for the prefix 192.168.1.0/24: R2#show ip route ospf | begin Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 7 subnets, 3 masks O IA 10.1.1.0/24 [110/65] via 10.0.12.1, 00:06:45, Serial1/1 O E2 192.168.1.0/24 [110/20] via 10.0.12.1, 00:03:49, Serial1/1 R2# Now lets go to configure EIGRP between R3 and R4 using AS number 34: Because R4 does not have any router connected therefore we should ensure so that R4 will advertise only its connected subnets and it should not accept any queries from R3 using the eigrp stub connected command: R3: router eigrp 34 network 10.0.34.1 0.0.0.0 no auto-summary R4: router eigrp 34 network 10.0.34.2 0.0.0.0 network 10.4.4.4 0.0.0.0 eigrp stub connected no auto-summary Lets verify the routing table of R3: R3#show ip route eigrp | begin Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 7 subnets, 3 masks D 10.4.4.0/24 [90/2172416] via 10.0.34.2, 00:00:06, Serial1/2 R3# We can verify that R4 is configured as stub router and advertises only a connected subnets using the show eigrp protocols command: R4#show eigrp protocols EIGRP-IPv4 Protocol for AS(34) Metric weight K1=1, K2=0, K3=1, K4=0, K5=0 NSF-aware route hold timer is 240 Router-ID: 10.4.4.4 Stub, connected Topology : 0 (base) Active Timer: 3 min Distance: internal 90 external 170 Maximum path: 4 Maximum hopcount 100 Maximum metric variance 1 R4# Now lets configure BGP between R2 and R3 using the AS number 23: Ensure so that R2 and R3 will advertise their LAN subnet 10.2.2.0/24 and 10.3.3.0/24 respectively using the network command on router BGP configuration mode: R2: router bgp 23 network 10.2.2.0 mask 255.255.255.0 neighbor 10.0.23.2 remote-as 23 no auto-summary R3: router bgp 23 bgp router-id 3.3.3.3 network 10.3.3.0 mask 255.255.255.0 neighbor 10.0.23.1 remote-as 23 no auto-summary Lets verify the BGP neighbor relationship: R2#show ip bgp summary BGP router identifier 10.2.2.2, local AS number 23 BGP table version is 3, main routing table version 3 2 network entries using 288 bytes of memory 2 path entries using 160 bytes of memory 2/2 BGP path/bestpath attribute entries using 272 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 720 total bytes of memory BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.23.2 4 23 5 5 3 0 0 00:00:39 1 R2# R3#show ip bgp summary BGP router identifier 3.3.3.3, local AS number 23 BGP table version is 3, main routing table version 3 2 network entries using 288 bytes of memory 2 path entries using 160 bytes of memory 2/2 BGP path/bestpath attribute entries using 272 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 720 total bytes of memory BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.23.1 4 23 6 6 3 0 0 00:01:09 1 R3# The purpose is to ensure the end-to-end connectivity by doing a redistribution between the routing protocols: Lets start with the redistribution between OSPF and BGP: R2: router ospf 1 redistribute bgp 23 subnets ! router bgp 23 redistribute ospf 1 Lets do the redistribution between EIGRP and BGP: R3: router eigrp 34 redistribute bgp 23 default-metric 1544 10000 255 1 1500 ! router bgp 23 redistribute eigrp 34 Lets verify the routing table of R1 and R3: R1 does not receive the route to the LAN subnet of R3 10.3.3.0/24 because by default R2 does not advertise the IBGP routes learned from another IBGP peer (R3) into OSPF therefore we need to add the bgp redistribute-internal command on R2. R1#show ip route ospf | begin Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks O E2 10.2.2.0/24 [110/1] via 10.0.12.2, 00:12:22, Serial1/1 R1# R2: router bgp 23 bgp redistribute-internal Now R1 installs successfully an external route toward 10.3.3.0/24: R1#show ip route ospf | beg Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks O E2 10.2.2.0/24 [110/1] via 10.0.12.2, 00:32:25, Serial1/1 O E2 10.3.3.0/24 [110/1] via 10.0.12.2, 00:00:30, Serial1/1 R1# Another issue is that the LAN subnet of R4 10.4.4.0/24 is missing in the routing table of R1. The reason is : when R3 redistributes between EIGRP and BGP,it does not change by default the next-hop of the route to 10.4.4.0/24 as a result R2 receives this route with the next-hop R4 : 10.0.34.2 and because R2 does not have any IGP route toward the next-hop 10.0.34.2 therefore it put the route as inaccessible in its BGP table RIB and fails to install the route in its routing table as shown by the show ip bgp and show ip route commands respectively on R2: R2#show ip bgp 10.4.4.0 BGP routing table entry for 10.4.4.0/24, version 0 Paths: (1 available, no best path) Not advertised to any peer Refresh Epoch 1 Local 10.0.34.2 (inaccessible) from 10.0.23.2 (3.3.3.3) Origin incomplete, metric 2172416, localpref 100, valid, internal rx pathid: 0, tx pathid: 0 R2# R2#show ip route 10.4.4.0 % Subnet not in table R2# To solve this issue, we need to tell to R3 to change the next-hop field for the redistributed EIGRP routes toward R2 using the neighbor 10.0.23.1 next-hop-self command: R3: router bgp 23 neighbor 10.0.23.1 next-hop-self Now R2 receives the BGP route to the 10.4.4.0/24 prefix with the next-hop R3 10.0.23.2 and installs successfully the BGP route in its routing table as shown by the show ip bgp 10.4.4.0 and the show ip route 10.4.4.0 command respectively: R2#show ip bgp 10.4.4.0 BGP routing table entry for 10.4.4.0/24, version 7 Paths: (1 available, best #1, table default) Not advertised to any peer Refresh Epoch 1 Local 10.0.23.2 from 10.0.23.2 (3.3.3.3) Origin incomplete, metric 2172416, localpref 100, valid, internal, best rx pathid: 0, tx pathid: 0x0 R2# R2#show ip route 10.4.4.0 Routing entry for 10.4.4.0/24 Known via bgp 23, distance 200, metric 2172416, type internal Redistributing via ospf 1 Advertised by ospf 1 subnets Last update from 10.0.23.2 00:00:20 ago Routing Descriptor Blocks: * 10.0.23.2, from 10.0.23.2, 00:00:20 ago Route metric is 2172416, traffic share count is 1 AS Hops 0 MPLS label: none R2# Normally R2 can now redistribute the prefix 10.4.4.0/24 because it has a valid route toward this prefix. Lets verify the routing table of R1 once again: Now R1 installs successfully the external route toward 10.4.4.0/24: R1#show ip route ospf | beg Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 7 subnets, 3 masks O E2 10.2.2.0/24 [110/1] via 10.0.12.2, 01:05:29, Serial1/1 O E2 10.3.3.0/24 [110/1] via 10.0.12.2, 00:33:34, Serial1/1 O E2 10.4.4.0/24 [110/1] via 10.0.12.2, 00:05:47, Serial1/1 R1# Another issue is that the routing table of R3 shown that the prefix 192.168.1.0/24 is missing because simply this prefix is redistributed by R1 into OSPF and R2 is receiving this prefix as an external route ,so when redistributing into IBGP R2 does not include by default the OSPF external routes therefore we need to add the redistribute ospf 1 match internal external 2 command ,in other word the match internal external 2 keyword means that all internal OSPF and external OSPF routes are imported (redistributed) into BGP: R3#show ip route | begin Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 10 subnets, 3 masks B 10.0.12.0/30 [200/0] via 10.0.23.1, 00:22:15 C 10.0.23.0/30 is directly connected, Serial1/1 L 10.0.23.2/32 is directly connected, Serial1/1 C 10.0.34.0/30 is directly connected, Serial1/2 L 10.0.34.1/32 is directly connected, Serial1/2 B 10.1.1.0/24 [200/65] via 10.0.12.1, 00:22:10 B 10.2.2.0/24 [200/0] via 10.0.23.1, 00:26:34 C 10.3.3.0/24 is directly connected, FastEthernet0/0 L 10.3.3.3/32 is directly connected, FastEthernet0/0 D 10.4.4.0/24 [90/2172416] via 10.0.34.2, 00:26:56, Serial1/2 R3# R2: router bgp 23 redistribute ospf 1 match internal external 2 Lets verify once again the routing table of R3: Now the external OSPF route to 192.168.1.0/24 is redistributed into BGP because the matching keyword configured on R2 and R3 installs successfully this route: R3# show ip route | begin Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 10 subnets, 3 masks B 10.0.12.0/30 [200/0] via 10.0.23.1, 00:46:20 C 10.0.23.0/30 is directly connected, Serial1/1 L 10.0.23.2/32 is directly connected, Serial1/1 C 10.0.34.0/30 is directly connected, Serial1/2 L 10.0.34.1/32 is directly connected, Serial1/2 B 10.1.1.0/24 [200/65] via 10.0.12.1, 00:46:15 B 10.2.2.0/24 [200/0] via 10.0.23.1, 00:50:39 C 10.3.3.0/24 is directly connected, FastEthernet0/0 L 10.3.3.3/32 is directly connected, FastEthernet0/0 D 10.4.4.0/24 [90/2172416] via 10.0.34.2, 00:51:01, Serial1/2 B 192.168.1.0/24 [200/20] via 10.0.12.1, 00:00:17 R3# Now lets analyze the routing table of R4: The LANs subnets 10.1.1.0/24,10.2.2.0/24 and the subnet 192.168.1.0/24 are missing because as we said about R2 previously,by default R3 does not advertise the IBGP routes learned from another IBGP peer (R2) into EIGRP therefore we need to add the bgp redistribute-internal command on R3: R4#show ip route eigrp | begin Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks D EX 10.3.3.0/24 [170/4729856] via 10.0.34.1, 00:06:35, Serial1/1 R4# R3: router bgp 23 bgp redistribute-internal Now R4 receives the prefixes 10.1.1.0/24, 10.2.2.0/24 and 192.168.1.0/24 successfully: R4#show ip route eigrp | begin Gate Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 8 subnets, 3 masks D EX 10.0.12.0/30 [170/4729856] via 10.0.34.1, 00:00:07, Serial1/1 D EX 10.1.1.0/24 [170/4729856] via 10.0.34.1, 00:00:07, Serial1/1 D EX 10.2.2.0/24 [170/4729856] via 10.0.34.1, 00:00:07, Serial1/1 D EX 10.3.3.0/24 [170/4729856] via 10.0.34.1, 01:04:51, Serial1/1 D EX 192.168.1.0/24 [170/4729856] via 10.0.34.1, 00:00:07, Serial1/1 R4# Lets verify the end-to-end connectivity: R1#ping 10.2.2.2 source fastEthernet 0/0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds: Packet sent with a source address of 10.1.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/42/56 ms R1# R1#ping 10.2.2.2 source fastEthernet 0/1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds: Packet sent with a source address of 192.168.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/45/60 ms R1# R1#ping 10.3.3.3 source fastEthernet 0/0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.3.3.3, timeout is 2 seconds: Packet sent with a source address of 10.1.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 36/56/80 ms R1# R1#ping 10.3.3.3 source fastEthernet 0/1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.3.3.3, timeout is 2 seconds: Packet sent with a source address of 192.168.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 56/65/76 ms R1# R1#ping 10.4.4.4 source fastEthernet 0/0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.4.4.4, timeout is 2 seconds: Packet sent with a source address of 10.1.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 76/88/96 ms R1# R1#ping 10.4.4.4 source fastEthernet 0/1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.4.4.4, timeout is 2 seconds: Packet sent with a source address of 192.168.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 80/84/88 ms R1# R4#ping 10.1.1.1 source fa0/0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: Packet sent with a source address of 10.4.4.4 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 80/106/120 ms R4# R4#ping 192.168.1.1 source fa0/0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: Packet sent with a source address of 10.4.4.4 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 68/77/92 ms R4# R4#ping 10.2.2.2 source fa0/0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds: Packet sent with a source address of 10.4.4.4 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 56/69/92 ms R4# R4#ping 10.3.3.3 source fa0/0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.3.3.3, timeout is 2 seconds: Packet sent with a source address of 10.4.4.4 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 32/44/52 ms R4#
Posted on: Sat, 15 Nov 2014 14:18:00 +0000

Trending Topics




© 2015