Configuring multi-area OSPF with EIGRP

I extended the single-area OSPF topology I configured previously in this post with two additional areas and I added an EIGRP network to the topology. In this post I’ll describe how to configure a multi-area network and how to redistribute different dynamic routing protocols on the Autonomous System Border Router (ASBR).

Extended network: multi area OSPF + EIGRP
Extended network: multi area OSPF + EIGRP

First I created the area 1, I needed to modify R4’s configuration: R4 is an area border router (ABR): it has interfaces both in area 1 and in the backbone area. Whenever we create new areas they have to connect to area 0:

R4(config)#interface gi0/2
R4(config-if)#ip address 10.0.45.2 255.255.255.252
R4(config-if)#no shutdown

R4(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up

R4(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up

R4(config)#router ospf 1
R4(config-router)#network 10.0.45.2 0.0.0.0 area 1
R4(config-router)#exit
R4(config)#
00:18:42: %OSPF-5-ADJCHG: Process 1, Nbr 10.0.45.1 on GigabitEthernet0/2 from LOADING to FULL, Loading Done

I put R5’s loopback interface and Gi0/0 into area 1, I issued these commands first, as you can see above: the neighbor relationship has been formed right after I configured R4. Let’s see R5’s configuration:

Router>en
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R5
R5(config)#interface Gi0/0
R5(config-if)#ip address 10.0.45.1 255.255.255.252
R5(config-if)#no shutdown

R5(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

R5(config-if)#exit
R5(config)#interface loopback0

R5(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R5(config-if)#ip address 192.168.1.55 255.255.255.255
R5(config-if)#exit
R5(config)#router ospf 1
R5(config-router)#network 192.168.1.55 0.0.0.0 area 1
R5(config-router)#passive-interface loopback0
R5(config-router)#network 10.0.45.1 0.0.0.0 area 1

I created area 2 the same way as area 1: R1 is the ABR, it has interfaces in both areas, here is the configuration of the new interface:

R1>en
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface gi0/2
R1(config-if)#ip address 10.0.16.1 255.255.255.252
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up

R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 10.0.16.1 0.0.0.0 area 2

I configured the OSPF interfaces first on R6:

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R6
R6(config)#interface loopback0

R6(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R6(config-if)#ip address 192.168.1.66 255.255.255.255
R6(config-if)#exit
R6(config)#interface gi0/0
R6(config-if)#ip address 10.0.16.2 255.255.255.252
R6(config-if)#no shutdown

R6(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

R6(config-if)#exit
R6(config)#router ospf 1
R6(config-router)#network 192.168.1.66 0.0.0.0 area 2
R6(config-router)#passive-interface loopback0
R6(config-router)#network 10.0.16.2 0.0.0.0 area 2
R6(config-router)#
00:20:52: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.11 on GigabitEthernet0/0 from LOADING to FULL, Loading Done

The neighbor relationship has been formed successfully as the last line says. The EIGRP configuration is similar to the OSPF: I configured the IP addresses with /32 mask (just like the OSPF networks), and disabled the auto-summary.

R6(config)#interface gi0/1
R6(config-if)#ip address 10.0.67.2 255.255.255.252
R6(config-if)#no shutdown

R6(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
	
R6(config-if)#exit
R6(config)#router eigrp ?
  <1-65535>  Autonomous system number
R6(config)#router eigrp 101
R6(config-router)#network ?
  A.B.C.D  Network number
R6(config-router)#network 10.0.67.2 ?
  A.B.C.D  EIGRP wild card bits
  <cr>
R6(config-router)#network 10.0.67.2 0.0.0.0 ?
  <cr>
R6(config-router)#network 10.0.67.2 0.0.0.0 
R6(config-router)#no auto-summary

R7 (I forgot to change the hostname):

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface loopback0

Router(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

Router(config-if)#ip address 192.168.1.77 255.255.255.255
Router(config-if)#interface gi0/0
Router(config-if)#ip address 10.0.67.1 255.255.255.252
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#router eigrp 101
Router(config-router)#network 192.168.1.77 0.0.0.0
Router(config-router)#passive-interface loopback0
Router(config-router)#network 10.0.67.1 0.0.0.0
Router(config-router)#
%DUAL-5-NBRCHANGE: IP-EIGRP 101: Neighbor 10.0.67.2 (GigabitEthernet0/0) is up: new adjacency

Router(config-router)#no auto-summary
Router(config-router)#exit

Now that both networks have been configured, we need to redistribute the networks in order to forward traffic into AS 101. R6 acts as an ASBR: with the help of R6 we can “translate” the networks with the redistribute command. I put a ‘?’ in the place of each parameter, so we can see which parameters need to be set:

R6#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R6(config)#router ospf 1
R6(config-router)#redistribute eigrp 101 subnets
R6(config-router)#exit
R6(config)#router eigrp 101
R6(config-router)#redistribute ospf 1 metric ?
  <1-4294967295>  Bandwidth metric in Kbits per second
R6(config-router)#redistribute ospf 1 metric 10000 ?
  <0-4294967295>  EIGRP delay metric, in 10 microsecond units
R6(config-router)#redistribute ospf 1 metric 10000 1000 ?
  <0-255>  EIGRP reliability metric where 255 is 100% reliable
R6(config-router)#redistribute ospf 1 metric 10000 1000 255 ?
  <1-255>  EIGRP Effective bandwidth metric (Loading) where 255 is 100% loaded
R6(config-router)#redistribute ospf 1 metric 10000 1000 255 1 ?
  <1-65535>  EIGRP MTU of the path
R6(config-router)#redistribute ospf 1 metric 10000 1000 255 1 1500

Now let’s check R2’s routing table for instance: we can see different types of routes: inter-area (‘O IA’), intra-area (‘O’), and external routes (‘O E2’), now R2 can ping R7.

R2#show 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, E - EGP
       i - IS-IS, 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

Gateway of last resort is 10.0.12.1 to network 0.0.0.0

     10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
C       10.0.12.0/30 is directly connected, GigabitEthernet0/0
L       10.0.12.2/32 is directly connected, GigabitEthernet0/0
O       10.0.13.0/30 [110/20] via 10.0.12.1, 00:38:48, GigabitEthernet0/0
O IA    10.0.16.0/30 [110/20] via 10.0.12.1, 00:16:24, GigabitEthernet0/0
C       10.0.24.0/30 is directly connected, GigabitEthernet0/1
L       10.0.24.1/32 is directly connected, GigabitEthernet0/1
O       10.0.34.0/30 [110/20] via 10.0.24.2, 00:38:58, GigabitEthernet0/1
O IA    10.0.45.0/30 [110/20] via 10.0.24.2, 00:21:03, GigabitEthernet0/1
O E2    10.0.67.0/30 [110/20] via 10.0.12.1, 00:06:24, GigabitEthernet0/0
     192.168.1.0/32 is subnetted, 7 subnets
O       192.168.1.11/32 [110/11] via 10.0.12.1, 00:38:58, GigabitEthernet0/0
C       192.168.1.22/32 is directly connected, Loopback0
O       192.168.1.33/32 [110/21] via 10.0.12.1, 00:38:48, GigabitEthernet0/0
                        [110/21] via 10.0.24.2, 00:38:48, GigabitEthernet0/1
O       192.168.1.44/32 [110/11] via 10.0.24.2, 00:38:58, GigabitEthernet0/1
O IA    192.168.1.55/32 [110/21] via 10.0.24.2, 00:20:51, GigabitEthernet0/1
O IA    192.168.1.66/32 [110/21] via 10.0.12.1, 00:15:29, GigabitEthernet0/0
O E2    192.168.1.77/32 [110/20] via 10.0.12.1, 00:06:24, GigabitEthernet0/0
     192.168.100.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.100.0/24 is directly connected, GigabitEthernet0/2
L       192.168.100.254/32 is directly connected, GigabitEthernet0/2
O*E2 0.0.0.0/0 [110/1] via 10.0.12.1, 00:38:48, GigabitEthernet0/0
               [110/1] via 10.0.24.2, 00:38:48, GigabitEthernet0/1

R2#ping 192.168.1.77

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.77, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms

Let’s check R7’s routing table: we have external routes here as well (‘D EX’) to the OSPF network:

R7#show 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, E - EGP
       i - IS-IS, 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

Gateway of last resort is 10.0.67.2 to network 0.0.0.0

     10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
D EX    10.0.12.0/30 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    10.0.13.0/30 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    10.0.16.0/30 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    10.0.24.0/30 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    10.0.34.0/30 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    10.0.45.0/30 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
C       10.0.67.0/30 is directly connected, GigabitEthernet0/0
L       10.0.67.1/32 is directly connected, GigabitEthernet0/0
     192.168.1.0/32 is subnetted, 7 subnets
D EX    192.168.1.11/32 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    192.168.1.22/32 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    192.168.1.33/32 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    192.168.1.44/32 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    192.168.1.55/32 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D EX    192.168.1.66/32 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
C       192.168.1.77/32 is directly connected, Loopback0
D EX 192.168.100.0/24 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0
D*EX 0.0.0.0/0 [170/512256] via 10.0.67.2, 01:48:10, GigabitEthernet0/0