Migration from EIGRP to OSPF

Migration from EIGRP to OSPF

This example points out the steps required to be carried out for migrating from EIGRP routing protocol to OSPF routing protocol.

Sample EIGRP network:

All routers are configured for EIGRP with the similar configuration given below-

EIGRP Configuration

router eigrp 1
 network 0.0.0.0
 no auto-summary
 passive-interface fastethernet 0/1    ! Clients connected to this interface
!

The following output shows EIGRP neighbors of router R4.

EIGRP neighbors of R4

R4# show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold   Uptime   SRTT     RTO   Q      Seq
                                                (sec)    (ms)           Cnt    Num
0   192.168.1.2             Fa0/0             10    00:00:27  318    1908    0    25
1   172.16.1.1              Se1/0             11    00:00:31  200    1200    0    42

The following output is taken from Router R4. It shows the EIGRP routes learnt by router R4.

EIGRP routes learnt by R4

R4# show ip route eigrp
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/2297856] via 172.16.1.1, 00:02:35, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/2300416] via 192.168.1.2, 00:02:36, FastEthernet0/0
                [90/2300416] via 172.16.1.1, 00:02:36, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
D       3.3.3.3 [90/156160] via 192.168.1.2, 00:02:35, FastEthernet0/0
     172.16.0.0/30 is subnetted, 2 subnets
D       172.16.4.0 [90/2172416] via 192.168.1.2, 00:02:36, FastEthernet0/0
     10.0.0.0/24 is subnetted, 5 subnets
D       10.1.3.0 [90/2174976] via 192.168.1.2, 00:02:36, FastEthernet0/0
                 [90/2174976] via 172.16.1.1, 00:02:36, Serial1/0
D       10.1.2.0 [90/2172416] via 172.16.1.1, 00:02:35, Serial1/0
D       10.0.0.0 [90/2172416] via 172.16.1.1, 00:02:36, Serial1/0
D       10.2.5.0 [90/30720] via 192.168.1.2, 00:02:35, FastEthernet0/0

OSPF deployment:

Now, through proper planning, the flat EIGRP network is converted to multi-area OSPF network as below-

Here, OSPF is enabled on a per-interface basis. Also, the administrative-distance of OSPF is made higher to 200 or above. The reason being the administrative-distance of EIGRP internal routes is 90, but the AD of EIGRP external routes is 170.

The following is the sample configuration on router R4-

OSPF configuration on R4

interface Loopback 0
 ip address 4.4.4.4 255.255.255.255
 ip ospf 1 area 0
!
interface fastethernet 0/0
 ip address 192.168.1.1 255.255.255.0
 ip ospf 1 area 0
!
interface serial 1/0
 ip address 172.16.1.2 255.255.255.252
 ip ospf 1 area 0
!
interface fastethernet 0/1
 ip address 10.1.5.1 255.255.255.0
 ip ospf 1 area 44
!
router ospf 1
 passive-interface fastethernet 0/1
 distance ospf intra-area 200 inter-area 200 external 210
!

Since the AD of OSPF is changed to high values, at this stage, OSPF will not replace EIGRP. However, OSPF speakers will start to form neighbor relationships.

The following outputs are taken from router R4 which shows the neighbors it has formed relationship with. Also, notice that there are no OSPF routes in the routing table.

OSPF outputs from R4 and comparison with EIGRP

R4# show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold         Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)        Cnt Num
0   192.168.1.2             Fa0/0             10         00:00:27  318    1908  0   25
1   172.16.1.1              Se1/0             11         00:00:31  200    1200  0   42
R4# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           0   FULL/  -        00:00:38    172.16.1.1      Serial1/0
3.3.3.3           1   FULL/BDR        00:00:37    192.168.1.2    FastEthernet0/0
R4# show ip route ospf
R4#

Now, slowly EIGRP configuration is removed from all routers subsequently.

Removing EIGRP configuration

R1(config)# no router eigrp 1
R2(config)# no router eigrp 1
R3(config)# no router eigrp 1
R4(config)# no router eigrp 1

Once EIGRP configuration is removed from all routers, OSPF routes are installed in the routing table with high AD.

OSPF routes on R4

R4# show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [200/65] via 172.16.1.1, 00:00:13, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [200/66] via 192.168.1.2, 00:00:13, FastEthernet0/0
                [200/66] via 172.16.1.1, 00:00:13, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [200/2] via 192.168.1.2, 00:00:13, FastEthernet0/0
     172.16.0.0/30 is subnetted, 2 subnets
O       172.16.4.0 [200/65] via 192.168.1.2, 00:00:13, FastEthernet0/0
     10.0.0.0/24 is subnetted, 5 subnets
O IA    10.1.3.0 [200/66] via 192.168.1.2, 00:00:13, FastEthernet0/0
                 [200/66] via 172.16.1.1, 00:00:13, Serial1/0
O IA    10.1.2.0 [200/65] via 172.16.1.1, 00:00:13, Serial1/0
O       10.0.0.0 [200/65] via 172.16.1.1, 00:00:13, Serial1/0
O IA    10.2.5.0 [200/2] via 192.168.1.2, 00:00:13, FastEthernet0/0

After comparing with EIGRP routes and making sure all routes are installed in the routing table using OSPF, it would be safe to change the AD of OSPF to default.

Changing OSPF AD to default

R1(config)# router ospf 1
R1(config-router)# no distance ospf intra-area 200 inter-area 200 external 210
R2(config)# router ospf 1
R2(config-router)# no distance ospf intra-area 200 inter-area 200 external 210
R3(config)# router ospf 1
R3(config-router)# no distance ospf intra-area 200 inter-area 200 external 210
R4(config)# router ospf 1
R4(config-router)# no distance ospf intra-area 200 inter-area 200 external 210

After changing the AD of OSPF to default, the OSPF routes are installed in the routing table with default OSPF AD 110.

OSPF routes with default AD on R4

R4# show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 172.16.1.1, 00:00:10, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/66] via 192.168.1.2, 00:00:10, FastEthernet0/0
                [110/66] via 172.16.1.1, 00:00:10, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/2] via 192.168.1.2, 00:00:10, FastEthernet0/0
     172.16.0.0/30 is subnetted, 2 subnets
O       172.16.4.0 [110/65] via 192.168.1.2, 00:00:10, FastEthernet0/0
     10.0.0.0/24 is subnetted, 5 subnets
O IA    10.1.3.0 [110/66] via 192.168.1.2, 00:00:10, FastEthernet0/0
                 [110/66] via 172.16.1.1, 00:00:10, Serial1/0
O IA    10.1.2.0 [110/65] via 172.16.1.1, 00:00:10, Serial1/0
O       10.0.0.0 [110/65] via 172.16.1.1, 00:00:10, Serial1/0
O IA    10.2.5.0 [110/2] via 192.168.1.2, 00:00:10, FastEthernet0/0

The complete migration is seamless and no outage is noticed by the clients. http://www.nil.com/ipcorner/ChangingRoutingProtocol/