Rick Graziani Cabrillo College graziani@cabrillo.edu
Last Updated: Fall 2009 2 Highly Recommended This presentation is based on the approach from Wendell Odoms book, BSCI Exam Certification Guide (Cisco Press). For anyone wishing to take this exam and/or get additional information, this book is highly recommended. 3 IGP Redistribution Part 1 Redistribution Concepts Configuring Redistribution Redistribution into EIGRP Redistribution into OSPF More on OSPF and External Routes Redistributing External Type 2 Routes Redistributing External Type 1 Routes Redistribution Concepts 5 Route Redistribution Cisco routers support up to 30 dynamic routing processes. RIPv2, RIPng, OSPFv2, OSPFv3, EIGRP, IS-IS, BGP and other protocols simultaneously. Most of these routing protocols allow an administrator to configure multiple processes of the same routing algorithm RIP is a notable exception. Multiple OSPF processes router ospf 10 router ospf 15 6 Multiple Routing Processes RTA#show running-config
router ospf 24 network 10.2.0.0 0.0.255.255 area 0 ! router ospf 46 network 192.168.2.0 0.0.0.255 area 2 ! router eigrp 53 network 172.16.0.0 network 172.17.0.0 ! router eigrp 141 network 10.0.0.0 network 192.168.3.0 Not usually recommended Not usually recommended 7 Route redistribution - The process of exchanging routing information between routing protocols. For example, routes learned from a RIP process may need to be imported into an EIGRP process. Route Redistribution EIGRP Routes 8 Route Redistribution One-way route redistribution - one protocol receives the routes from another) Two-way route redistribution - both protocols receive routes from each other. Boundary routers: Routers that perform redistribution Border two or more ASs or routing domains. Note: The term boundary router is also sometimes used to describe a router running a classful routing protocol (like RIP) that has interfaces in more than one classful network. 9 Why configure redistribution? Company mergers and different IGPs are used Company mergers and the same IGP is used Entropy Weve always done it that way Company has different divisions with the network under separate control for business or political reasons Company has connections between business partners To allow multivendor interoperability (OSPF on non-Cisco, EIGRP on Cisco, for instance) Route Redistribution 10 Configuring Redistribution The redistribution command Available for all IP routing protocols, Independent of any one protocol Various complexities depending on the routing protocols and the options. This can be a matrix of what ifs, but we will keep the complexity to a minimum, concentrating on the basics. EIGRP Routes 11 Route redistribution can be complicated and have several disadvantages as shown in the following: Routing loops Depending on how redistribution is used, routers can send routing information received from one AS back into the AS. Incompatible routing information Each routing protocol uses different metrics. Metrics cannot be translated exactly into a different protocol Path selection may not be optimal. Inconsistent convergence time Different routing protocols converge at different rates. Might result in temporary loss of networks. Configuring Redistribution My best path to 192.100.10.0 is this way. My best path to 192.100.10.0 is this way. 12 These potential trouble spots can be avoided with careful planning and implementation. Guidelines from Jeff Doyle when configuring route redistribution: Be familiar with the network Do not overlap routing protocols Do not run two different protocols in the same internetwork. Use one-way redistribution with multiple boundary routers To avoid routing loops and convergence problems. Consider using default routes in the domains that do not import external routes. Use two-way redistribution with a single boundary router Reduces the chances of routing loops. A combination of default routes, route filters, and distance modifications can be used to combat routing loops. Configuring Redistribution 13 Redistribution Concepts and Processes Route redistribution requires at least one router to do the following: 1. At least one up/up physical link with each routing domain 2. A working configured routing protocol for each routing domain 3. Redistribution configured for each routing protocol, (redistribute command), Tells the routing protocol to take the routes learned by another source of routing information and then advertise those routes
Router(config-router)# redistribute protocol [process-id] Note: Other parameters may be required and will be discussed. Redistribution into EIGRP 15 Our Topology R2-E-O is running: EIGRP for 172.30.0.0 network OSPF for 172.6.0.0 network Not currently including 192.168.1.0 or 10.0.0.0 in either routing protocol EIGRP 1 OSPF 1 16 Redistribution into EIGRP The syntax differs slightly depending on the routing protocol into which routes will be redistributed redistribute protocol [process-id | as-number] [metric bw delay reliability load mtu ] [match {internal | nssa-external | external 1 | external 2}] [tag tag- value] [route-map name] 17 Redistribution into EIGRP protocol - The source of routing information. Includes RIP, OSPF, EIGRP, IS-IS, BGP, connected, and static. process-id, as-number - If redistributing a routing protocol that uses a process-id or ASN on the router global config command, use this parameter to refer to that process or ASN value. metric - A keyword after which follows the four metric components (bandwidth, delay, reliability, link load), plus the MTU associated with the route. match - If redistributing from OSPF, this keyword lets you match internal OSPF routes, external (by type), and NSSA external routes, essentially filtering which routes are redistributed. tag - Assigns a unitless integer value to the route, which can be later matched by other routers using a route-map. route-map - Apply the logic in the referenced route-map to filter routes, set metrics, and set route tags. redistribute protocol [process-id | as-number] [metric bw delay reliability load mtu ] [match {internal | nssa-external | external 1 | external 2}] [tag tag- value] [route-map name] 18 Redistribution into EIGRP Current configurations R1-E router eigrp 1 network 172.30.0.0 network 172.31.0.0 auto-summary R2-E-O router eigrp 1 network 172.30.0.0 auto-summary
router ospf 1 network 172.16.0.0 0.0.0.3 area 0 R3-O router ospf 1 network 172.16.0.0 0.0.255.255 area 0 R4-O router ospf 1 network 172.16.0.0 0.0.255.255 area 0 network 172.17.0.0 0.0.255.255 area 0 19 Redistribution into EIGRP R1-E# show ip route
C 172.31.0.0/16 is directly connected, Loopback31 172.30.0.0/16 is variably subnetted, 6 subnets, 3 masks C 172.30.2.0/24 is directly connected, FastEthernet0/1 C 172.30.3.0/24 is directly connected, Loopback0 C 172.30.0.0/30 is directly connected, Serial0/0 D 172.30.0.0/16 is a summary, 00:02:41, Null0 C 172.30.1.0/24 is directly connected, FastEthernet0/0 C 172.30.4.0/24 is directly connected, Loopback1 R1-E#
What do you expect to see? All EIGRP networks 20 Redistribution into EIGRP R2-E-O# show ip route
O 172.17.0.0/16 [110/846] via 172.16.0.1, 00:02:32, Serial0/1 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks O 172.16.0.4/30 [110/845] via 172.16.0.1, 00:02:32, Serial0/1 C 172.16.0.0/30 is directly connected, Serial0/1 O 172.16.1.0/24 [110/782] via 172.16.0.1, 00:02:32, Serial0/1 O 172.16.2.0/24 [110/846] via 172.16.0.1, 00:02:32, Serial0/1 D 172.31.0.0/16 [90/20640000] via 172.30.0.1, 00:03:46, Serial0/0 172.30.0.0/16 is variably subnetted, 5 subnets, 2 masks D 172.30.2.0/24 [90/20514560] via 172.30.0.1, 01:22:36, Serial0/0 D 172.30.3.0/24 [90/20640000] via 172.30.0.1, 01:22:36, Serial0/0 C 172.30.0.0/30 is directly connected, Serial0/0 D 172.30.1.0/24 [90/20514560] via 172.30.0.1, 01:22:36, Serial0/0 D 172.30.4.0/24 [90/20640000] via 172.30.0.1, 01:22:36, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, FastEthernet0/1 C 192.168.1.0/24 is directly connected, FastEthernet0/0 R2-E-O# What do you expect to see? All networks 21 Redistribution into EIGRP R3-O# show ip route
O 172.17.0.0/16 [110/65] via 172.16.0.6, 00:09:06, Serial0/2 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.16.0.4/30 is directly connected, Serial0/2 C 172.16.0.0/30 is directly connected, Serial0/1 C 172.16.1.0/24 is directly connected, FastEthernet0/0 O 172.16.2.0/24 [110/65] via 172.16.0.6, 00:09:06, Serial0/2 R3-O# What do you expect to see? All OSPF networks 22 Redistribution into EIGRP R4-O# show ip route
C 172.17.0.0/16 is directly connected, FastEthernet0/1 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.16.0.4/30 is directly connected, Serial0/0 O 172.16.0.0/30 [110/128] via 172.16.0.5, 00:09:52, Serial0/0 O 172.16.1.0/24 [110/65] via 172.16.0.5, 00:09:52, Serial0/0 C 172.16.2.0/24 is directly connected, FastEthernet0/0 R4-0#
What do you expect to see? All OSPF networks 23 Redistribution into EIGRP Do we expect R1s routing to change? Yes, but no change! Lets see what happened (or didnt happen) R2-E-O(config)# router eigrp 1 R2-E-O(config-router)# redistribute ospf 1 R1-E# show ip route
C 172.31.0.0/16 is directly connected, Loopback31 172.30.0.0/16 is variably subnetted, 6 subnets, 3 masks C 172.30.2.0/24 is directly connected, FastEthernet0/1 C 172.30.3.0/24 is directly connected, Loopback0 C 172.30.0.0/30 is directly connected, Serial0/0 D 172.30.0.0/16 is a summary, 00:02:41, Null0 C 172.30.1.0/24 is directly connected, FastEthernet0/0 C 172.30.4.0/24 is directly connected, Loopback1 R1-E#
24 Redistribution into EIGRP R2-E-O# show ip route
O 172.17.0.0/16 [110/846] via 172.16.0.1, 00:02:32, Serial0/1 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks O 172.16.0.4/30 [110/845] via 172.16.0.1, 00:02:32, Serial0/1 C 172.16.0.0/30 is directly connected, Serial0/1 O 172.16.1.0/24 [110/782] via 172.16.0.1, 00:02:32, Serial0/1 O 172.16.2.0/24 [110/846] via 172.16.0.1, 00:02:32, Serial0/1 D 172.31.0.0/16 [90/20640000] via 172.30.0.1, 00:03:46, Serial0/0 172.30.0.0/16 is variably subnetted, 5 subnets, 2 masks D 172.30.2.0/24 [90/20514560] via 172.30.0.1, 01:22:36, Serial0/0 D 172.30.3.0/24 [90/20640000] via 172.30.0.1, 01:22:36, Serial0/0 C 172.30.0.0/30 is directly connected, Serial0/0 D 172.30.1.0/24 [90/20514560] via 172.30.0.1, 01:22:36, Serial0/0 D 172.30.4.0/24 [90/20640000] via 172.30.0.1, 01:22:36, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, FastEthernet0/1 C 192.168.1.0/24 is directly connected, FastEthernet0/0 R2-E-O# Should R2s routing table change? No 25 Redistribution into EIGRP R2-E-O(config)# router eigrp 1 R2-E-O(config-router)# redistribute ospf 1 R2-E-O# show ip eigrp top IP-EIGRP Topology Table for AS(1)/ID(192.168.1.1) P 172.30.2.0/24, 1 successors, FD is 20514560 via 172.30.0.1 (20514560/28160), Serial0/0 P 172.30.3.0/24, 1 successors, FD is 20640000 via 172.30.0.1 (20640000/128256), Serial0/0 P 172.30.0.0/30, 1 successors, FD is 20512000 via Connected, Serial0/0 P 172.31.0.0/16, 1 successors, FD is 20640000 via 172.30.0.1 (20640000/128256), Serial0/0 P 172.30.1.0/24, 1 successors, FD is 20514560 via 172.30.0.1 (20514560/28160), Serial0/0 P 172.30.4.0/24, 1 successors, FD is 20640000 via 172.30.0.1 (20640000/128256), Serial0/0 For now notice that there are no OSPF networks in R2s topology table. They are still in the routing table because R2 also runs OSPF, but this is an EIGRP command. 26 Redistribution into EIGRP When redistributing into EIGRP you must convert other routing protocols metric (OSPFs cost, bandwidth) into EIGRPs metric. Three methods: Metric parameter with redistribute command Sets the default for all redistribute commands Default-metric command Sets the default for all redistribute commands Route-map Sets different metrics for routes learned from a single source redistribute protocol [process-id | as-number] [metric bw delay reliability load mtu ] default-metric bw delay reliability load mtu ] 27 Redistribution into EIGRP router eigrp 1 network 172.20.0.0 redistribute ospf 1 redistribute eigrp 2 redistribute rip metric 50000 500 255 1 1500 default-metric 10000 100 255 1 1500
default-metric command is used where the metric command is not being applied in the redistribute command. metric keyword takes precedence over the default-metric command Note: This is the case for redistributing between any routing protocols EIGRP 1 EIGRP 2 OSPF 1 RIP 28 Redistribution into EIGRP Note: MTU is NOT included because it is one of the EIGRP metrics (never has been, never will be) MTU is included because it is tracked through the path to find the smallest MTU. R2-E-O(config)# router eigrp 1 R2-E-O(config-router)# default-metric 1000 33 255 1 1500 bw delay reliability load mtu 29 Redistribution into EIGRP New Entries R2-E-O# show ip eigrp top IP-EIGRP Topology Table for AS(1)/ID(192.168.1.1)
P 172.16.0.4/30, 1 successors, FD is 2568448 via Redistributed (2568448/0) P 172.16.0.0/30, 1 successors, FD is 2568448 via Redistributed (2568448/0) P 172.16.1.0/24, 1 successors, FD is 2568448 via Redistributed (2568448/0) P 172.17.0.0/16, 1 successors, FD is 2568448 via Redistributed (2568448/0) P 172.16.2.0/24, 1 successors, FD is 2568448 via Redistributed (2568448/0) All the redistributed routes have the same feasible distance (FD) calculation (2568448), because all use the same component metrics per the configured default-metric command EIGRP topology table lists the outgoing interface as "via redistributed"
30 Redistribution into EIGRP R2-E-O# show ip eigrp top 172.16.0.0/30 IP-EIGRP (AS 1): Topology entry for 172.16.0.0/30 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2568448 Routing Descriptor Blocks: 0.0.0.0, from Redistributed, Send flag is 0x0 Composite metric is (2568448/0), Route is External Vector metric: Minimum bandwidth is 1000 Kbit Total delay is 330 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 0 External data: Originating router is 192.168.1.1 (this system) AS number of route is 1 External protocol is OSPF, external metric is 0 Administrator tag is 0 (0x00000000) From default-metric command "(this system)", meaning that the router on which the command was issued (R2 in this case) redistributed the route. 31 Redistribution into EIGRP R2 redistributed into EIGRP the routes learned via OSPF and its own directly connected network 172.16.0.0/30. But not 192.168.1.0/24 and 10.0.0.0/8 This is because 172.16.0.0/30 is an OSPF enabled interface (network statement) Redistribute command, redistributes the following: All routes in the routing table learned by that routing protocol All connected routes of interfaces on which that routing protocol is enabled Otherwise must be redistributed another way (connected or static) comint R2-E-O# show ip eigrp top
P 172.16.0.0/30, 1 successors, FD is 2568448 via Redistributed (2568448/0) 32 Redistribution into EIGRP R1-E# show ip route
D EX 172.17.0.0/16 [170/3080448] via 172.30.0.2, 00:01:50, Serial0/0 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks D EX 172.16.0.4/30 [170/3080448] via 172.30.0.2, 00:01:50, Serial0/0 D EX 172.16.0.0/30 [170/3080448] via 172.30.0.2, 00:01:50, Serial0/0 D EX 172.16.1.0/24 [170/3080448] via 172.30.0.2, 00:01:50, Serial0/0 D EX 172.16.2.0/24 [170/3080448] via 172.30.0.2, 00:01:50, Serial0/0 C 172.31.0.0/16 is directly connected, Loopback31 172.30.0.0/16 is variably subnetted, 6 subnets, 3 masks C 172.30.2.0/24 is directly connected, FastEthernet0/1 C 172.30.3.0/24 is directly connected, Loopback0 C 172.30.0.0/30 is directly connected, Serial0/0 D 172.30.0.0/16 is a summary, 00:12:08, Null0 C 172.30.1.0/24 is directly connected, FastEthernet0/0 C 172.30.4.0/24 is directly connected, Loopback1 EX: External Route 170: Administrative distance (90 for EIGRP internal routes) FD: Same for all external networks 33 Redistribution into EIGRP Two ways to redistribute 10.0.0.0/24 network. Redistribute Connected Add OSPF network command Also propagates 10.0.0.0/24 throughout OSPF domain R2-E-O(config)# router ospf 1 R2-E-O(config-router)# network 10.0.0.0 0.0.0.255 area 0
R2-E-O# show ip eigrp top P 10.0.0.0/24, 1 successors, FD is 2568448 via Redistributed (2568448/0)
R2-E-O#show ip route 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, FastEthernet0/1 Added to topology table No change to routing table 34 Redistribution into EIGRP Redistributes 10.0.0.0/24 network with rest of OSPF networks throughout EIGRP Also propagates 10.0.0.0/24 throughout OSPF domain R1-E# show ip route
D EX 10.0.0.0 [170/3080448] via 172.30.0.2, 00:01:33, Serial0/0
R4-0# show ip route
O 10.0.0.0 [110/129] via 172.16.0.5, 00:04:02, Serial0/0
35 Redistribution into EIGRP Redistributes 192.168.1.0/24 network as a connected network. 192.168.1.0/24 is NOT propagated throughout OSPF domain R2-E-O(config)# router eigrp 1 R2-E-O(config-router)# redistribute connected
R2-E-O#show ip eigrp top
P 10.0.0.0/24, 1 successors, FD is 28160 via Rconnected (28160/0) P 192.168.1.0/24, 1 successors, FD is 28160 via Rconnected (28160/0) 36 Redistribution into EIGRP Redistributes 192.168.1.0/24 network throughout EIGRP. Same default-metric R2-E-O(config-router)# default-metric 1000 33 255 1 1500 R1-E# show ip route 10.0.0.0/24 is subnetted, 1 subnets D EX 10.0.0.0 [170/2172416] via 172.30.0.2, 00:01:57, Serial0/0 D EX 192.168.1.0/24 [170/2172416] via 172.30.0.2, 00:01:57, Serial0/0 R1-E# 37 Redistribution into EIGRP EIGRP redistribute connected does not propagate 192.168.1.0/24 throughout OSPF. R4-0#show ip route
C 172.17.0.0/16 is directly connected, FastEthernet0/1 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.16.0.4/30 is directly connected, Serial0/0 O 172.16.0.0/30 [110/128] via 172.16.0.5, 00:02:35, Serial0/0 O 172.16.1.0/24 [110/65] via 172.16.0.5, 00:02:35, Serial0/0 C 172.16.2.0/24 is directly connected, FastEthernet0/0 10.0.0.0/24 is subnetted, 1 subnets O 10.0.0.0 [110/129] via 172.16.0.5, 00:02:35, Serial0/0 R4-0#
Redistribution into OSPF 39 Redistribution into OSPF Several similarities and differences to redistributing into EIGRP. EIGRP flags routes redistributed into EIGRP as External OSPF creates LSAs to represent each external route redistribute protocol [process-id | as-number] [metric {metric-value | transparent}] [metric-type type- value] [match {internal | external 1 | external 2 | nssa-external}] [tag tag-value] [route-map map-tag] [subnets] 40 Redistribution into OSPF Metric - Defines the cost metric assigned to the route in the Type 5 (or Type 7 if NSSA) LSA. metric transparent when taking from another OSPF process, pass through the metric with the route. metric-type {1 | 2} - Defines the external metric type of 1 (E1 routes) or 2 (E2 routes). Match - If redistributing from OSPF, this keyword lets you match internal OSPF routes, external (by type), and NSSA external routes, essentially filtering which routes are redistributed. Tag - Assigns a unitless integer value to the route, which can be later matched by other routers using a route-map. route-map - Apply the logic in the referenced route-map to filter routes, set metrics, and set route tags. Subnets - Redistribute subnets of classful networks. Without this parameter, only routes for classful networks are redistributed. (This behavior is particular to the OSPF redistribute command.) redistribute protocol [process-id | as-number] [metric {metric-value | transparent}] [metric-type type-value] [match {internal | external 1 | external 2 | nssa- external}] [tag tag-value] [route-map map-tag] [subnets] 41 Redistribution into OSPF Defaults when redistributing into OSPF: When redistributing networks from BGP the default metric is 1 When redistributing networks from all other sources the default metric is 20. Creates a Type 5 LSA for each redistributed route (external) if not inside an NSSA area; create a Type 7 LSA if inside an NSSA area. External metric type 2 (metric does not change throughout OSPF routing domain) Only redistributes routes of classful (Class A, B, and C) networks, and not for subnets redistribute protocol [process-id | as-number] [metric {metric-value | transparent}] [metric-type type-value] [match {internal | external 1 | external 2 | nssa- external}] [tag tag-value] [route-map map-tag] [subnets] 42 Redistribution into OSPF Where we left off R2: Currently router eigrp 1 redistribute connected redistribute ospf 1 network 172.30.0.0 default-metric 1000 33 255 1 1500 auto-summary ! router ospf 1 network 10.0.0.0 0.0.0.255 area 0 network 172.16.0.0 0.0.0.3 area 0
43 Redistribution into OSPF R2-E-O# show ip route
O 172.17.0.0/16 [110/846] via 172.16.0.1, 00:03:56, Serial0/1 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks O 172.16.0.4/30 [110/845] via 172.16.0.1, 00:03:56, Serial0/1 C 172.16.0.0/30 is directly connected, Serial0/1 O 172.16.1.0/24 [110/782] via 172.16.0.1, 00:03:56, Serial0/1 O 172.16.2.0/24 [110/846] via 172.16.0.1, 00:03:56, Serial0/1 D 172.31.0.0/16 [90/20640000] via 172.30.0.1, 00:18:29, Serial0/0 172.30.0.0/16 is variably subnetted, 5 subnets, 2 masks D 172.30.2.0/24 [90/20514560] via 172.30.0.1, 01:37:19, Serial0/0 D 172.30.3.0/24 [90/20640000] via 172.30.0.1, 01:37:19, Serial0/0 C 172.30.0.0/30 is directly connected, Serial0/0 D 172.30.1.0/24 [90/20514560] via 172.30.0.1, 01:37:19, Serial0/0 D 172.30.4.0/24 [90/20640000] via 172.30.0.1, 01:37:19, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, FastEthernet0/1 C 192.168.1.0/24 is directly connected, FastEthernet0/0 44 Redistribution into OSPF No External Type 5 LSAs No EIGRP networks being redistributed into OSPF R2-E-O# show ip ospf data
OSPF Router with ID (192.168.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count 172.16.1.1 172.16.1.1 85 0x80000005 0x006220 5 172.30.0.6 172.30.0.6 2000 0x80000006 0x006BB4 4 192.168.1.1 192.168.1.1 1117 0x80000003 0x009742 3 R2-E-O# 45 Redistribution into OSPF By default, only classful networks will be redistributed from EIGRP into OSPF R2-E-O(config)# router ospf 1 R2-E-O(config-router)# redistribute eigrp 1 % Only classful networks will be redistributed R2-E-O(config-router)#
R2-E-O# show ip ospf data <Router Link States omitted> Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 172.31.0.0 192.168.1.1 9 0x80000001 0x0094D4 0 R2-E-O# 46 Redistribution into OSPF R2-E-O# show ip route
O 172.17.0.0/16 [110/846] via 172.16.0.1, 00:03:56, Serial0/1 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks O 172.16.0.4/30 [110/845] via 172.16.0.1, 00:03:56, Serial0/1 C 172.16.0.0/30 is directly connected, Serial0/1 O 172.16.1.0/24 [110/782] via 172.16.0.1, 00:03:56, Serial0/1 O 172.16.2.0/24 [110/846] via 172.16.0.1, 00:03:56, Serial0/1 D 172.31.0.0/16 [90/20640000] via 172.30.0.1, 00:18:29, Serial0/0 172.30.0.0/16 is variably subnetted, 5 subnets, 2 masks D 172.30.2.0/24 [90/20514560] via 172.30.0.1, 01:37:19, Serial0/0 D 172.30.3.0/24 [90/20640000] via 172.30.0.1, 01:37:19, Serial0/0 C 172.30.0.0/30 is directly connected, Serial0/0 D 172.30.1.0/24 [90/20514560] via 172.30.0.1, 01:37:19, Serial0/0 D 172.30.4.0/24 [90/20640000] via 172.30.0.1, 01:37:19, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, FastEthernet0/1 C 192.168.1.0/24 is directly connected, FastEthernet0/0 47 Redistribution into OSPF Only the class B network 172.31.0.0/16 is redistributed into OSPF R3-O#show ip route
O 172.17.0.0/16 [110/65] via 172.16.0.6, 00:01:16, Serial0/2 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.16.0.4/30 is directly connected, Serial0/2 C 172.16.0.0/30 is directly connected, Serial0/1 C 172.16.1.0/24 is directly connected, FastEthernet0/0 O 172.16.2.0/24 [110/65] via 172.16.0.6, 00:01:16, Serial0/2 O E2 172.31.0.0/16 [110/20] via 172.16.0.2, 00:01:16, Serial0/1 10.0.0.0/24 is subnetted, 1 subnets O 10.0.0.0 [110/65] via 172.16.0.2, 00:01:17, Serial0/1 R3-O# 48 Redistribution into OSPF External Type 5 LSA R3-O# show ip ospf data <Router Link States omitted> Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 172.31.0.0 192.168.1.1 88 0x80000001 0x0094D4 0 R3-O#
49 Redistribution into OSPF Subnets - Redistribute subnets of classful networks. R2-E-O(config)# router ospf 1 R2-E-O(config-router)# redistribute eigrp 1 subnets No warning message Only classful networks will be redistributed 50 Redistribution into OSPF R2 now includes Type 5 LSAs for subnets R2-E-O# show ip ospf data Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 172.30.0.0 192.168.1.1 79 0x80000001 0x008EDE 0 172.30.1.0 192.168.1.1 79 0x80000001 0x0095D3 0 172.30.2.0 192.168.1.1 79 0x80000001 0x008ADD 0 172.30.3.0 192.168.1.1 79 0x80000001 0x007FE7 0 172.30.4.0 192.168.1.1 79 0x80000001 0x0074F1 0 172.31.0.0 192.168.1.1 220 0x80000001 0x0094D4 0 R2-E-O# 51 Redistribution into OSPF R4-0# show ip route C 172.17.0.0/16 is directly connected, FastEthernet0/1 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.16.0.4/30 is directly connected, Serial0/0 O 172.16.0.0/30 [110/128] via 172.16.0.5, 00:04:02, Serial0/0 O 172.16.1.0/24 [110/65] via 172.16.0.5, 00:04:02, Serial0/0 C 172.16.2.0/24 is directly connected, FastEthernet0/0 O E2 172.31.0.0/16 [110/20] via 172.16.0.5, 00:04:02, Serial0/0 172.30.0.0/16 is variably subnetted, 5 subnets, 2 masks O E2 172.30.2.0/24 [110/20] via 172.16.0.5, 00:01:46, Serial0/0 O E2 172.30.3.0/24 [110/20] via 172.16.0.5, 00:01:46, Serial0/0 O E2 172.30.0.0/30 [110/20] via 172.16.0.5, 00:01:46, Serial0/0 O E2 172.30.1.0/24 [110/20] via 172.16.0.5, 00:01:46, Serial0/0 O E2 172.30.4.0/24 [110/20] via 172.16.0.5, 00:01:46, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets O 10.0.0.0 [110/129] via 172.16.0.5, 00:04:04, Serial0/0 52 Redistribution into OSPF R4 now includes Type 5 LSAs for subnets
R4-0# show ip ospf data Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 172.30.0.0 192.168.1.1 113 0x80000001 0x008EDE 0 172.30.1.0 192.168.1.1 113 0x80000001 0x0095D3 0 172.30.2.0 192.168.1.1 113 0x80000001 0x008ADD 0 172.30.3.0 192.168.1.1 113 0x80000001 0x007FE7 0 172.30.4.0 192.168.1.1 113 0x80000001 0x0074F1 0 172.31.0.0 192.168.1.1 254 0x80000001 0x0094D4 0 R4-0# 53 Redistribution into OSPF Lets redistribute the 192.168.1.0/24 network into OSPF as a connected network. R2-E-O(config)#router ospf 1 R2-E-O(config-router)#redistribute connected ? metric Metric for redistributed routes metric-type OSPF/IS-IS exterior metric type for redistributed routes route-map Route map reference subnets Consider subnets for redistribution into OSPF tag Set tag for routes redistributed into OSPF <cr>
R2-E-O(config-router)#redistribute connected % Only classful networks will be redistributed R2-E-O(config-router)#end 54 Redistribution into OSPF 192.168.1.0/24 redistributed into OSPF. R2-E-O# show ip ospf data
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 172.30.1.0 192.168.1.1 326 0x80000001 0x0095D3 0 172.30.2.0 192.168.1.1 326 0x80000001 0x008ADD 0 172.30.3.0 192.168.1.1 326 0x80000001 0x007FE7 0 172.30.4.0 192.168.1.1 326 0x80000001 0x0074F1 0 172.31.0.0 192.168.1.1 468 0x80000001 0x0094D4 0 192.168.1.0 192.168.1.1 90 0x80000001 0x0012B8 0 R2-E-O# 55 Redistribution into OSPF R4-0# show ip route
O E2 192.168.1.0/24 [110/20] via 172.16.0.5, 00:03:08, Serial0/0
R4-0#show ip ospf data
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag <omitted> 192.168.1.0 192.168.1.1 193 0x80000001 0x0012B8 0 R4-0# 56 Redistribution into OSPF So far R2 summary: router eigrp 1 redistribute connected redistribute ospf 1 network 172.30.0.0 default-metric 1000 33 255 1 1500 auto-summary ! router ospf 1 redistribute connected redistribute eigrp 1 subnets network 10.0.0.0 0.0.0.255 area 0 network 172.16.0.0 0.0.0.3 area 0 57 Redistribution into OSPF E2 R3-O#show ip route
O 172.17.0.0/16 [110/65] via 172.16.0.6, 00:13:41, Serial0/2 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.16.0.4/30 is directly connected, Serial0/2 C 172.16.0.0/30 is directly connected, Serial0/1 C 172.16.1.0/24 is directly connected, FastEthernet0/0 O 172.16.2.0/24 [110/65] via 172.16.0.6, 00:13:41, Serial0/2 O E2 172.31.0.0/16 [110/20] via 172.16.0.2, 00:13:41, Serial0/1 172.30.0.0/24 is subnetted, 4 subnets O E2 172.30.2.0 [110/20] via 172.16.0.2, 00:11:25, Serial0/1 O E2 172.30.3.0 [110/20] via 172.16.0.2, 00:11:25, Serial0/1 O E2 172.30.1.0 [110/20] via 172.16.0.2, 00:11:25, Serial0/1 O E2 172.30.4.0 [110/20] via 172.16.0.2, 00:11:25, Serial0/1 10.0.0.0/24 is subnetted, 1 subnets O 10.0.0.0 [110/65] via 172.16.0.2, 00:13:43, Serial0/1 O E2 192.168.1.0/24 [110/20] via 172.16.0.2, 00:07:30, Serial0/1 External OSPF routes are E2 with a default cost of 20. metric-type 2 - The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. 58 Redistribution into OSPF E2 R4-0#show ip route
C 172.17.0.0/16 is directly connected, FastEthernet0/1 172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.16.0.4/30 is directly connected, Serial0/0 O 172.16.0.0/30 [110/128] via 172.16.0.5, 00:14:05, Serial0/0 O 172.16.1.0/24 [110/65] via 172.16.0.5, 00:14:05, Serial0/0 C 172.16.2.0/24 is directly connected, FastEthernet0/0 O E2 172.31.0.0/16 [110/20] via 172.16.0.5, 00:14:05, Serial0/0 172.30.0.0/24 is subnetted, 4 subnets O E2 172.30.2.0 [110/20] via 172.16.0.5, 00:11:49, Serial0/0 O E2 172.30.3.0 [110/20] via 172.16.0.5, 00:11:49, Serial0/0 O E2 172.30.1.0 [110/20] via 172.16.0.5, 00:11:49, Serial0/0 O E2 172.30.4.0 [110/20] via 172.16.0.5, 00:11:49, Serial0/0 10.0.0.0/24 is subnetted, 1 subnets O 10.0.0.0 [110/129] via 172.16.0.5, 00:14:07, Serial0/0 O E2 192.168.1.0/24 [110/20] via 172.16.0.5, 00:07:54, Serial0/0 External OSPF routes are E2 with a default cost of 20 59 Redistribution into OSPF 192.168.1.0/24 still has a cost of 20. Why? It was redistributed with the redistribute connected command without the metric 100 parameter. <redistribute connected metric 100> R2-E-O(config)#router ospf 1 R2-E-O(config-router)#redistribute eigrp 1 subnets metric 100 R2-E-O(config-router)#redistribute connected R4-0#show ip route <external route>
O E2 172.31.0.0/16 [110/100] via 172.16.0.5, 00:00:04, Serial0/0 172.30.0.0/24 is subnetted, 4 subnets O E2 172.30.2.0 [110/100] via 172.16.0.5, 00:00:05, Serial0/0 O E2 172.30.3.0 [110/100] via 172.16.0.5, 00:00:05, Serial0/0 O E2 172.30.1.0 [110/100] via 172.16.0.5, 00:00:05, Serial0/0 O E2 172.30.4.0 [110/100] via 172.16.0.5, 00:00:05, Serial0/0 O E2 192.168.1.0/24 [110/20] via 172.16.0.5, 00:12:36, Serial0/0
60 Redistribution into OSPF E1 metric-type {1 | 2} - Defines the external metric type of 1 (E1 routes) or 2 (E2 routes). metric-type 1 - A type 1 cost is the addition of the external cost and the internal cost used to reach that route. metric-type 2 - The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. R2-E-O(config)# router ospf 1 R2-E-O(config-router)# redistribute eigrp 1 subnets metric-type 1
Notice that the previous metric 100 parameter is still included! 61 Redistribution into OSPF E1 routes, seed metric of 100 plus internal cost. 192.168.1.0/24 still has a cost of 20. It was redistributed with the redistribute connected command without the metric-type 2 parameter. <redistribute connected metric 100 metric-type 2> R3-O#show ip route O E1 172.31.0.0/16 [110/164] via 172.16.0.2, 00:00:23, Serial0/1 172.30.0.0/24 is subnetted, 4 subnets O E1 172.30.2.0 [110/164] via 172.16.0.2, 00:00:24, Serial0/1 O E1 172.30.3.0 [110/164] via 172.16.0.2, 00:00:24, Serial0/1 O E1 172.30.1.0 [110/164] via 172.16.0.2, 00:00:24, Serial0/1 O E1 172.30.4.0 [110/164] via 172.16.0.2, 00:00:24, Serial0/1 10.0.0.0/24 is subnetted, 1 subnets O 10.0.0.0 [110/65] via 172.16.0.2, 00:21:45, Serial0/1 O E2 192.168.1.0/24 [110/20] via 172.16.0.2, 00:15:32, Serial0/1 More on OSPF and External Routes 63 Redistribution into OSPF New Topology EIGRP OSPF Area 0 Area 1 64 Redistribution into OSPF Default if no metric configuration exists Cost 1 for routes learned from BGP Cost 20 for all other route sources default-metric cost OSPF subcommand Setting the default for all redistribute commands metric cost parameters on the redistribute command Setting the metric for one route source Metric transparent parameters on the redistribute command When taking routes from another OSPF process, using the metrics used by that route source Use the route-map parameter on the redistribute command Setting different metrics for routes learned from a single source redistribute protocol [process-id | as-number] [metric {metric-value | transparent}] [metric-type type-value] [match {internal | external 1 | external 2 | nssa- external}] [tag tag-value] [route-map map-tag] [subnets] 65 Redistribution into OSPF Router that performs redistribution becomes ASBR (Autonomous System Border Router). Injects external routes into OSPF creating a Type 5 LSA for each network/subnet . Type 5 LSA includes: LSID: the subnet number Mask: The subnet mask Advertising router: The RID of the ASBR injecting the route Metric: The metric as set by the ASBR External Metric Type: The external metric type, either 1 or 2 66 Redistribution into OSPF ASBR floods Type 5 LSAs throughout area. If ABR is: Normal (non-stubby) areas: Flood Type 5 LSAs into area Stub and Totally Stubby areas: No Type 5 LSAs flooded Default route injected by ABR LSA 5 Redistributing External Type 2 Routes 68 Redistribution into OSPF E2 routes metric is simply the metric in the Type 5 LSA. Default = 20 metric parameter R4 has two routes to 172.30.26.0/23: Via R1 Via R8 To avoid loops, OSPF routers use two tiebreaker systems to allow a router to choose a best external route. Router in question resides in the same area as the ASBR (intra-area) Router in question resides in a different area (interarea) than the ASBR LSA 5 172.30.26.0/23 Metric = 20 Metric = 20 69 Determining the Next-hop for Type 2 External Routes - Intra-area Router has multiple routes for same E2 destination network: Selects the best route based on the lowest cost to reach any ASBR(s) that advertised the lowest E2 metric. R4: Both routes use metric 20 in this case, so the routes tie. Tiebreaker: 1. Find the advertising ASBR(s) as listed in the Type 5 LSA(s) 2. Using the intra-area LSDB topology calculate the best route to reach the ASBR(s). (This is the route that will be entered into the routing table.) 3. This determines the outgoing interface and next hop based address to to reach the ASBR 4. The route's metric is unchanged in the routing table as listed in theType 5 LSA LSA 5 172.30.26.0/23 Metric = 20 Metric = 20 70 Determining the Next-hop for Type 2 External Routes - Intra-area 1. R4 looks in the Type 5 LSA, and sees RID 1.1.1.1 (R1) is the advertising ASBR. 2. R4 then looks at its area 0 LSDB entries, including the Type 1 LSA for RID 1.1.1.1, and calculates all possible area 0 routes to reach 1.1.1.1. 3. R4's best route to reach RID 1.1.1.1 happens to be through its S0/0/0 interface, to next-hop RD1 (172.16.14.1), so R4's route to 172.16.26.0/23 uses these details. 4. The route lists metric 20, as listed in the Type 5 LSA. LSA 5 172.30.26.0/23 Metric = 20 Metric = 20 Best path 71 Determining the Next-hop for Type 2 External Routes - Interarea When router is in a different area same issues remain. Different tiebreaker to reach ASBR. Calculation requires more information that previous Intra-area example. To calculate their best route to reach the ASBR, a router in another area: Adds the cost to reach an ABR between the areas Plus that ABR's cost to reach the ASBR
LSA 5 172.30.26.0/23 Metric = 20 Metric = 20 Best path 72 Determining the Next-hop for Type 2 External Routes - Interarea R5 has two possible routes to reach ASBR: Via R3 Via R4 Although the metric is 20, R5 will use the cost to the ABR PLUS the ABRs cost to the ASBR to determine the best path. Via R3: 64 + 1 = 65 Via R4: 64 + 64 = 128 R5 chooses the route via R3 because it is a better path (65). The routers process for doing this is: 1. Calculate the cost to reach the ABR, based on the area's topology database 2. Add the cost from the ABR to the ASBR, as listed in a Type 4 LSA Lets talk about that Type 4 LSA! 172.30.26.0/23 Best path 1 64 64 64 Best path 73 Determining the Next-hop for Type 2 External Routes - Interarea Type 4 Summary ASBR LSA: RID of the ASBR RID of the ABR that created and flooded the LSA 4 ABR's cost to reach the ASBR ABRs create Type 4 LSAs after receiving an external Type 5 LSA from an ASBR. ABR forwards a Type 5 LSA into an area ABR looks at the RID of the ASBR that created the Type 5 LSA.. ABR creates a Type 4 LSA listing that ASBR, and the cost to reach that ASBR, flooding that LSA into the neighboring areas. LSA 4 172.30.26.0/23 LSA 4: I am ABR R4, I can reach ASBR R1 and my cost to the ASBR is 64. LSA 4: I am ABR R3, I can reach ASBR R1 and my cost to the ASBR is 1. 74 Determining the Next-hop for Type 2 External Routes - Interarea ABR R3 creates and floods Type 4 Summary ASBR LSA into area 1. ASBR 1.1.1.1 (R1), ABR 3.3.3.3 (R3), and cost 1 (R3's cost to reach ASBR). ABR R4 creates and floods Type 4 Summary ASBR LSA into area 1. ASBR 1.1.1.1 (R1), ABR 4.4.4.4 (R4), and lists cost 64 (R4's cost to reach ASBR). When R5 finds two routes for subnet 172.30.26.0/23, and finds both have a metric of 20 Break the tie. For each route: Add intra-area cost to reach the ABR PLUS the ABR's cost to reach the ASBR (as listed in the Type 4 LSA). R5 determines best route is through R3 has the lower cost (65). LSA 4 172.30.26.0/23 LSA 4: I am ABR R4, I can reach ASBR R1 and my cost to the ASBR is 64. LSA 4: I am ABR R3, I can reach ASBR R1 and my cost to the ASBR is 1. Best path 75 Determining the Next-hop for Type 2 External Routes - Interarea 172.30.26.0/23 LSA 4: I am ABR R4, I can reach ASBR R1 and my cost to the ASBR is 64. LSA 4: I am ABR R3, I can reach ASBR R1 and my cost to the ASBR is 1. Best path R5# show ip route
O E2 172.30.26.0/23 [110/20] via 172.16.35.3, 05:48:42, Serial0/0 Redistributing External Type 1 Routes 77 Redistribution into OSPF E2 routes ignore the internal OSPF cost (except when breaking ties for best route). E1 routes allow the engineer to influence the choice of routes based on the combination of the external and internal OSPF cost. R1(config)# router ospf 1 R1(config-router)# redistribute eigrp 1 subnets metric-type 1 78 Redistribution into OSPF Note that for routers in different a different area than the ASBR, the calculation of metric follows the same general logic used when breaking ties for E2 routes. R1(config)# router ospf 1 R1(config-router)# redistribute eigrp 1 subnets metric-type 1 Best path 79 Comparing E1 and E2 The benefits of the different external route types apply mostly to when multiple ASBRs advertise the same subnet. Two ASBRs, ASBR1 and ASBR2, between OSPF and another routing domain. Goal is to always send traffic through ASBR1. Configuration: Use E2 routes Set the metric for ASBR1's redistributed routes to a lower metric than ASBR2. Routers ignore the internal metrics when calculating the E2 metrics, so every router will choose ASBR1 as the better ASBR. OSPF EIGRP ASBR1 ASBR2 E2 metric=10 E2 metric=20 80 Comparing E1 and E2 Goal is to: Balance the traffic Make each router pick the closest ASBR Configuration: Use E1 routes Routers closer to each ASBR choosing best routes based on the lower OSPF costs.
OSPF EIGRP ASBR1 ASBR2 E1 E1 81 Comparing E1 and E2 Note: OSPF routers will always prefers E1 routes over E2 routes for the same networks. OSPF EIGRP ASBR1 ASBR2 E1 E2 IGP Redistribution Part 1 CIS 185 Advanced Routing Rick Graziani Cabrillo College graziani@cabrillo.edu