OSPF with IP unnumbered

 I have come around a challenge that two routers connected directly to each other but use different IP subnets. For the purpose of adjacency to form, OSPF has constraint devices connected interfaces to be in same subnet. 

So, after a search I found followed method. 


change the opsf network type of the router to point-to-point

assign the ip unnumbered to the directly connecting interfaces

create new loopback and assign the ip address which previously on directly connected interface

advertise networks with ospf network command. 


General idea here is, in point to point link, ip address is does not matter as packet leaving the sender and will receive only by one receiver as only two participants in the Point-to-Point link.   Not like multi access networks, where it is required to ensure the intended recipient has to receive the sender's packet among multiple receivers. 


Let's dig into detail with followed diagram


Diagram details:


R1 and R3 connected with Gig0/1 and Gig0/3 respectively with each other. 

R1 Gig 0/1 IP address is 10.22.1.1 255.255.255.0

R3  Gig0/3 IP address is 172.16.1.1 255.255.255.0





How to configure:

R1(config)# int g0/1

R1(config-if)# ip unnumbered lo1

R1(config-if)# ip ospf network point-to-point

R1(config-if)# exit

R1(config)# int lo1

R1(config-if)# ip add 10.22.1.1 255.255.255.0

R1(config-if)#exit

R1(config)#router ospf 1

R1(config-router)#network 10.22.1.1 0.0.0.0 area 0

R1(config-router)#exit




R2(config)# int g0/1

R2(config-if)# ip unnumbered lo1

R2(config-if)# ip ospf network point-to-point

R2(config-if)# exit

R2(config)# int lo1

R2(config-if)# ip add 172.16.1.1 255.255.255.0

R2(config-if)#exit

R2(config)#router ospf 2

R2(config-router)#network 172.16.1.1 0.0.0.0 area 0

R2(config-router)#exit



use show ip ospf  neighbor command to verify the adjacency  state



Comments

Popular posts from this blog

MRTG configurations

ADSL configuration on Cisco router