Chapter 16. EIGRP and OSPF Redistribution

Edited by Anthony Bruno

This case study addresses the issue of integrating Enhanced Interior Gateway Routing Protocol (EIGRP) networks with Open Shortest Path First (OSPF) networks. Cisco supports both the EIGRP and OSPF protocols and provides a way to exchange routing information between EIGRP and OSPF networks. Both are classless protocols that support VLSM and route summarization. This case study provides examples of how to redistribute information between EIGRP and OSPF networks, including the following topics:

  • Setting Up EIGRP and OSPF Mutual Redistribution

  • Verifying the Redistribution of Routes

  • Adding a Route to the Redistribution List

Setting Up EIGRP and OSPF Mutual Redistribution

It is sometimes necessary to accommodate complex network topologies such as independent EIGRP and OSPF clouds that must perform mutual redistribution. For example, when a company acquires another company, one of them may be running OSPF while the other is running EIGRP. Also, the physical topology of a network may not support the two-layer hierarchy of OSPF, requiring redistribution from another routing protocol such as EIGRP. Redistribution is also required when migrating from one routing protocol to another. In this scenario, it is critically important to prevent potential routing loops by filtering routes. Figure 16-1 shows an EIGRP cloud connecting to an OSPF cloud. Router A is in the EIGRP cloud. Router B is running both OSPF and EIGRP; it functions as an OSPF Autonomous System Border (ASBR) between these two network clouds. Router C is an Area Border Router (ABR) in the OSPF cloud. Router C also provides an ASBR function to the external network 170.10.0.0.

Mutual Redistribution Between EIGRP And OSPF Networks

Figure 16-1. Mutual Redistribution Between EIGRP And OSPF Networks

In Figure 16-1, there are no secondary or redundant routers directly connecting the EIGRP and OSPF clouds. In typical networks, however, these paths, or back doors, frequently exist, allowing the potential for feedback loops. You can use route maps and access lists to configure the routes that are advertised and accepted by each router, and thus prevent potential routing loops. With the following commands, OSPF routes will be redistributed into EIGRP:

  !
  router eigrp 100
  default-metric 10000 1000 255 1 1500
  network 160.10.0.0
  redistribute ospf 109 route-map OSPFtoEIGRP
  !
  route-map OSPFtoEIGRP permit 10
   match ip address 11
  !
  access-list 11 permit 130.10.0.0 0.0.255.255
  !

You must use the default-metric command to set the metrics of the redistributed route in EIGRP updates. All routes redistributed into EIGRP will have the following default metric:

  default-metric bandwidth delay reliability loading mtu

Each field value's ranges are listed in Table 16-1.

Table 16-1. Field Value Ranges for the default-metric Command

Bandwidth (in kbps) 14294967295
Delay metric (in 10 microsecond units) 04294967295
Reliability metric (where 255 is 100% reliable) 0255
Effective bandwidth metric, or loading (where 255 is 100% loaded) 0255
Maximum Transmission Unit (MTU) metric of the path 14294967295

Access list 11 in the configuration for Router B allows the redistribution of network 130.10.0.0 into EIGRP. Notice that in this example the OSPF external network 170.10.0.0 is not redistributed into EIGRP. You will see later in the chapter how to add this network to the redistribution list.

Configuration File Examples

This section contains the configurations of Routers A, B, and C in Figure 16-1. The configurations demonstrate how redistribution can be accomplished using route maps on Router B. Access lists are used with the route maps to configure which networks will be redistributed. Router A is configured with EIGRP, and Router C is configured with OSPF.

The configuration for Router A is as follows:

  !
  hostname routerA
  !
  interface Ethernet0
  ipaddress 160.10.7.1 255.255.255.0
  !
  interface Serial1
   ip address 160.10.8.2 255.255.255.252
  !
  router eigrp 100
   network 160.10.0.0
  !

Router A has a simple configuration that defines two interfaces and the EIGRP process 100. Because no redistribution occurs on Router A, no route maps and redistribution commands are used. Router B will be Router A's EIGRP neighbor.

The configuration for Router B is as follows:

  !
  hostname routerB
  !
  interface Ethernet0
   ip address 130.10.9.1 255.255.255.0
  !
  interface Serial1
   ip address 160.10.8.1 255.255.255.252
  !
  router eigrp 100
   redistribute ospf 109 route-map OSPFtoEIGRP
   network 160.10.0.0
   default-metric 10000 1000 255 1 1500
  !
  router ospf 109
   redistribute eigrp 100 subnets route-map EIGRPtoOSPF
   network 130.10.9.0 0.0.0.255 area 0
  !
  access-list 10 permit 160.10.0.0 0.0.255.255
  access-list 10 deny   any
  access-list 11 permit 130.10.0.0 0.0.255.255
  access-list 11 deny   any
  !
  route-map OSPFtoEIGRP permit 10
   match ip address 11
  !
  route-map EIGRPtoOSPF permit 10
   match ip address 10
  !

The Router B configuration uses route-map OSPF to EIGRP with access list 11 to control which networks get redistributed into EIGRP. The default-metric command sets the EIGRP metrics of the redistributed routes to 10,000 for bandwidth, 1000 for delay, 255 for reliability, 1 for load, and 1500 bytes for the MTU. In this example, all subnets of network 130.10.0.0 get redistributed into EIGRP. Using route-map EIGRP to OSPF with access list 10 controls which networks get redistributed into OSPF. Redistributed routes appear as external type 2 routes in OSPF by default. In this example, all subnets of network 160.10.0.0 get redistributed into OSPF.

Note

When redistributing into OSPF, use the subnets keyword. It tells OSPF to redistribute all subnet routes. Without the subnets keyword, only networks not subnetted will be redistributed by OSPF.

The configuration for Router C is as follows:

  !
  hostname routerC
  !
  interface Ethernet0
   ip address 130.10.9.2 255.255.255.0
  !
  interface Ethernet1
   ip address 130.10.62.1 255.255.255.240
  !
  interface Ethernet2
   ip address 130.10.63.1 255.255.255.240
  !
  router ospf 109
   redistribute static metric 1000
   network 130.10.9.0 0.0.0.255 area 0
   network 130.10.62.0 0.0.0.255 area 1
   network 130.10.63.0 0.0.0.255 area 1
   area 1 range 130.10.62.0 255.255.255.0
   area 1 range 130.10.63.0 255.255.255.0
  !
  ip classless
  ip route 170.10.0.0 255.255.0.0 Serial0
  !

As you can see from Router C's configuration, this router is an OSPF ABR for Area 0 and Area 1. The area range command is used to summarize the network subnets from a particular area on an ABR. The area 1 range 130.10.62.0 255.255.255.0 summarizes the 16 following subnets (assuming that a 255.255.255.240 mask is used on 130.10.62.0) to one route entry. The 130.10.63.0 network is also summarized to 24 bits with the area 1 range 130.10.63.0 255.255.255.0 command. If Router C had other OSPF neighbor routers with these subnets, they would be summarized at this router before the route is passed along to Area 0.

Router C is also an OSPF ASBR to network 170.10.0.0. Using the redistribute static metric 1000 command, the static route will be entered into the OSPF database as an external type 2 route with a metric (cost) of 1000.

Verifying the Redistribution of Routes

Take a look at the following routing table for Router A. It shows the two connected networks: 160.10.7.0/24 and 160.10.8.0/30. Notice the EIGRP external (D EX) routes coming from Router B; these are the routes that were redistributed from OSPF. The numbers in brackets are the Administrative distance (170) and the calculated EIGRP metric. By default, all EIGRP external routes have an administrative distance of 170:

  routerA#show ip ro
  Codes: C - connected, S - static, I - IGRP, 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, E - EGP
         i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
         U - per-user static route, o - ODR
         T - traffic engineered route

  Gateway of last resort is not set

       160.10.0.0/16 is variably subnetted, 2 subnets, 2 masks
  C       160.10.8.0/30 is directly connected, Serial1
  C       160.10.7.0/24 is directly connected, Ethernet0
       130.10.0.0/16 is variably subnetted, 3 subnets, 2 masks
  D EX    130.10.9.0/24 [170/2425856] via 160.10.8.1, 00:02:01, Serial1
  D EX    130.10.63.0/24 [170/2425856] via 160.10.8.1, 00:02:01, Serial1
  D EX    130.10.62.0/24 [170/2425856] via 160.10.8.1, 00:02:01, Serial1
  routerA#

Now look at the routing table for Router B. An OSPF external type 2 route (O E2) is coming from Router C; this is the static route that was redistributed into OSPF in Router C. The router also sees OSPF interarea routes (O IA) from Router C. The only EIGRP route present is for 160.10.7.0/24 because 160.10.8.0/30 is directly connected. (The routing table does not show whether the redistribution commands worked; to verify that, you need to look at the EIGRP topology table and the OSPF database.)

  routerB#show ip ro
  Codes: C - connected, S - static, I - IGRP, 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, E - EGP
         i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
         U - per-user static route, o - ODR
         T - traffic engineered route

  Gateway of last resort is not set

  O E2 170.10.0.0/16 [110/1000] via 130.10.9.2, 00:08:36, Ethernet0
       160.10.0.0/16 is variably subnetted, 2 subnets, 2 masks
  C       160.10.8.0/30 is directly connected, Serial1
  D       160.10.7.0/24 [90/2297856] via 160.10.8.2, 00:08:37, Serial1
       130.10.0.0/16 is variably subnetted, 3 subnets, 2 masks
  C       130.10.9.0/24 is directly connected, Ethernet0
  O IA    130.10.63.0/24 [110/11] via 130.10.9.2, 00:08:37, Ethernet0
  O IA    130.10.62.0/24 [110/11] via 130.10.9.2, 00:08:37, Ethernet0
  routerB#

The EIGRP topology table shows the redistributed OSPF routes. These routes will be propagated in the EIGRP cloud. Notice that the OSPF external 170.10.0.0 route does not show in this table:

  routerB#show ip eigrp topology

  IP-EIGRP Topology Table for process 100

  Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
         r - Reply status

  P 130.10.9.0/24, 1 successors, FD is 512000
           via Redistributed (512000/0)
  P 160.10.8.0/30, 1 successors, FD is 2169856
           via Connected, Serial1
  P 160.10.7.0/24, 1 successors, FD is 2297856
           via 160.10.8.2 (2297856/128256), Serial1
  P 130.10.63.0/24, 1 successors, FD is 512000
           via Redistributed (512000/0)
  P 130.10.62.0/24, 1 successors, FD is 512000
           via Redistributed (512000/0)
  routerB#

The show ip ospf database command shows all the link states in the OSPF database for all link-state types. There are two OSPF routers; hence, two router link states. There is one broadcast network (Ethernet) in Area 0; hence, one Net Link State. The two Summary Net Link States come from ABR Router C. There are two externals coming from the local redistribution on Router B (160.10.8.1) and one external from Router C (130.10.63.1):

  routerB#show ip ospf data

         OSPF Router with ID (160.10.8.1) (Process ID 109)

                  Router Link States (Area 0)

  Link ID         ADV Router      Age         Seq#       Checksum Link count
  130.10.63.1     130.10.63.1     1627        0x80000009 0xF164   1
  160.10.8.1      160.10.8.1      1852        0x80000002 0x3A57   1

                  Net Link States (Area 0)

  Link ID         ADV Router      Age         Seq#       Checksum
  130.10.9.2      130.10.63.1     47          0x80000002 0x60F3

                  Summary Net Link States (Area 0)

  Link ID         ADV Router      Age         Seq#       Checksum
  130.10.62.0     130.10.63.1     47          0x80000004 0x168A
  130.10.63.0     130.10.63.1     47          0x80000004 0xB94

                  Type-5 AS External Link States

  Link ID         ADV Router      Age         Seq#       Checksum Tag
  160.10.7.0      160.10.8.1      506         0x80000001 0xC575   0
  160.10.8.0      160.10.8.1      527         0x80000001 0xA894   0
  170.10.0.0      130.10.63.1     1647        0x80000001 0x88BE   0
  routerB#

Now look at the routing table in Router C. There is one static entry for 170.10.0.0. The routes coming from the EIGRP cloud show up as OSPF externals (E2). The other networks are directly connected:

  routerC#show ip ro
  Codes: C - connected, S - static, I - IGRP, 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, E - EGP
         i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
         U - per-user static route, o - ODR
         T - traffic engineered route

  Gateway of last resort is not set

  S    170.10.0.0/16 is directly connected, Serial0
       160.10.0.0/16 is variably subnetted, 2 subnets, 2 masks
  O E2    160.10.8.0/30 [110/20] via 130.10.9.1, 00:11:03, Ethernet0
  O E2    160.10.7.0/24 [110/20] via 130.10.9.1, 00:11:03, Ethernet0
       130.10.0.0/24 is subnetted, 3 subnets
  C       130.10.9.0 is directly connected, Ethernet0
  C       130.10.62.0 is directly connected, Ethernet1
  C       130.10.63.0 is directly connected, Ethernet2
  routerC#

Notice in the preceding output that there are two subnets from the 160.10.0.0 network. You can use the OSPF summary-address command on Router B to further summarize this network. The summary-address command is used to summarize external routers on ASBRs; it is not used to summarize interarea routes on ABRs:

  routerB(config)#router ospf 109
  routerB(config-router)# summary-address 160.10.0.0 255.255.0.0

Now Router C sees only one network:

  routerC>show ip ro
  Codes: C - connected, S - static, I - IGRP, 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, E - EGP
         i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
         U - per-user static route, o - ODR
         T - traffic engineered route

  Gateway of last resort is not set

  S    170.10.0.0/16 is directly connected, Null0
  O E2 160.10.0.0/16 [110/20] via 130.10.9.1, 00:03:04, Ethernet0
       130.10.0.0/24 is subnetted, 3 subnets
  C       130.10.9.0 is directly connected, Ethernet0
  C       130.10.62.0 is directly connected, Loopback0
  C       130.10.63.0 is directly connected, Loopback1
  routerC>

Adding a Route to the Redistribution List

The 170.10.0.0 network was an external route in OSPF. This network was not redistributed into EIGRP on Router B (see route-map OSPF to EIGRP andaccess-list 11 in the configuration of Router B in the earlier Configuration File Examples section). Now suppose you want to permit users in the EIGRP cloud to reach the 170.10.0.0 network (see Figure 16-2). This can be accomplished by adding network 170.10.0.0 to access list 11 to permit this route to show up in the EIGRP topology table. The access list should now appear as follows:

  access-list 11 permit 130.10.0.0 0.0.255.255
  access-list 11 permit 170.10.0.0 0.0.255.255
  access-list 11 deny any
Network 170.10.0.0—External Route to EIGRP

Figure 16-2. Network 170.10.0.0—External Route to EIGRP

The EIGRP topology table on Router B now shows the new network:

  routerB#show ip eigrp top
  IP-EIGRP Topology Table for process 100

  Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
         r - Reply status

  P 130.10.9.0/24, 1 successors, FD is 512000
           via Redistributed (512000/0)
  P 170.10.0.0/16, 1 successors, FD is 512000
          via Redistributed (512000/0)
  P 160.10.8.0/30, 1 successors, FD is 2169856
           via Connected, Serial1
  P 160.10.7.0/24, 1 successors, FD is 2297856
           via 160.10.8.2 (2297856/128256), Serial1
  P 130.10.63.0/24, 1 successors, FD is 512000
           via Redistributed (512000/0)
  P 130.10.62.0/24, 1 successors, FD is 512000
           via Redistributed (512000/0)

Now that Router B shows the route in the topology table, you can look at Router A's route table, which now shows the new network:

  routerA>show ip route
  Codes: C - connected, S - static, I - IGRP, 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, E - EGP
         i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
         U - per-user static route, o - ODR
         T - traffic engineered route

  Gateway of last resort is not set

 D EX 170.10.0.0/16 [170/2425856] via 160.10.8.1, 00:01:11, Serial1
       160.10.0.0/16 is variably subnetted, 2 subnets, 2 masks
  C       160.10.8.0/30 is directly connected, Serial1
  C       160.10.7.0/24 is directly connected, Loopback0
       130.10.0.0/16 is variably subnetted, 3 subnets, 2 masks
  D EX    130.10.9.0/24 [170/2425856] via 160.10.8.1, 00:20:47, Serial1
  D EX    130.10.63.0/24 [170/2425856] via 160.10.8.1, 00:01:12, Serial1
  D EX    130.10.62.0/24 [170/2425856] via 160.10.8.1, 00:01:12, Serial1
  routerA>

Now that the route is present in the EIGRP cloud, this case study is finished. Route maps and access lists have been used to control the networks to be redistributed between EIGRP and OSPF, and area-range and summary-address commands have been used to summarize routes in OSPF.

Summary

Because it is possible to find OSPF and EIGRP used together, it is important to use the practices described here to provide functionality for both protocols on an internetwork. You can configure Autonomous System Boundary Routers that run both EIGRP and OSPF and redistribute EIGRP routes into the OSPF and vice versa. Use the summary command in OSPF to further summarize redistributed networks. Use route maps and access lists to control the networks to be redistributed. You can also create OSPF areas using Area Border Routers that provide route summarizations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.3.111