Interfacing Interior and Exterior Gateway Protocols
2 Two classes of routing protocols Exterior Gateway Protocol (e.g., BGP) –Used to exchange routes between different domains (autonomous systems) Interior Gateway Protocol (e.g., IS-IS, OSPF, RIP, IGRP) –Used to establish routing tables within a domain
Redistribution of OSPF routes into BGP 3 hostname RTB ! interface Ethernet0/0 ip address ! interface Serial1/0 ip address ! router ospf 1 network area 1 ! router bgp 100 redistribute ospf 1 match internal external 1 external 2 neighbor remote-as 200 ! End
Redistribution of OSPF routes into BGP 4 RTB# show ip route /24 is subnetted, 1 subnets C is directly connected, Ethernet0/0 C /8 is directly connected, Serial1/0 O E /24 [110/20] via , 00:16:17, Ethernet0/0 O E /24 [110/104] via , 00:00:41, Ethernet0/ /24 is subnetted, 2 subnets O [110/74] via , 00:16:17, Ethernet0/0 O IA [110/84] via , 00:16:17, Ethernet0/0 Codes: C – connected O – OSPF E1 – OSPF external type 1 E2 – OSPF external type 2 IA – Inter-area
Redistribution of OSPF routes into BGP 5 RTB# show ip bgp BGP table version is 30, local router ID is NetworkNext HopMetric LocPrfWeightPath *> / ? *> / ? *> / ? *> ? *> ? Key: * - valid > - best route
Redistribution of OSPF routes into BGP 6 RTC# sh ip route /24 is subnetted, 1 subnets B [20/0] via , 00:01:24 C /8 is directly connected, Serial0/0 B /24 [20/20] via , 00:01:24 B /24 [20/104] via , 00:01: /24 is subnetted, 2 subnets B [20/74] via , 00:01:24 B [20/84] via , 00:01:24
Redistribution of BGP routes into OSPF Router R1 interface Loopback0 ip address ! interface Loopback1 ip address ! interface Serial1/0 ip address serial restart-delay 0 ! router bgp 100 no synchronization bgp router-id bgp log-neighbor-changes network mask network neighbor remote-as 100 no auto-summary Router R2 interface Loopback0 ip address ! interface Serial1/0 ip address serial restart-delay 0 ! interface FastEthernet2/0 ip address duplex auto speed auto ! router ospf 1 router-id log-adjacency-changes redistribute bgp 100 metric 100 metric-type 1 subnets route-map BGP-To_OSPF network area 0 ! router bgp 100 no synchronization bgp router-id bgp log-neighbor-changes bgp redistribute-internal neighbor remote-as 100 no auto-summary ! ip prefix-list B2O seq 5 permit /16 ! route-map BGP-To_OSPF permit 10 match ip address prefix-list B2O Router R3 interface FastEthernet1/0 ip address duplex auto speed auto ! router ospf 1 log-adjacency-changes network area 0 (iBGP)
Redistribution of BGP routes into OSPF R1#sh ip bgp sum BGP router identifier , local AS number 100 BGP table version is 3, main routing table version 3 2 network entries using 240 bytes of memory 2 path entries using 104 bytes of memory 1/1 BGP path/bestpath attribute entries using 124 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 468 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 :43:47 0
Redistribution of BGP routes into OSPF R3#sh ip route Codes: L - local, 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, + - replicated route Gateway of last resort is not set O E /16 [110/101] via , 00:57:55, FastEthernet1/ /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, FastEthernet1/0 L /32 is directly connected, FastEthernet1/0