Monday, February 11, 2013

OSPF adjacency between different network


On point-to-point links such as High-Level Data Link Control (HDLC) and Point-to-Point Protocol (PPP), Open Shortest Path First (OSPF) runs as a point-to-point network type. This network type is enabled by default. This document shows sample configurations for OSPF over a point-to-point link. The other network types that OSPF supports are Point to Multipoint, Broadcast, and Non-Broadcast. In order to check the network type of an interface that runs OSPF, issue the "show ip ospf interface" command.

All these days you have been told that OSPF can form an adjacency only on a same network, but it is not true!!!

First lets look at OSPF forming adjacency between same network.

OSPF over a Point-to-Point link with IP addresses on serial interfaces

This section presents you with the information you can use to configure routers that run OSPF and are connected through a point-to-point serial link with the use of HDLC encapsulation with IP addresses on the same subnet configured on serial interfaces.


OSPF adjacency on the same network.




Router1
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial0
ip address 1.1.1.2 255.255.255.0
!
router ospf 1
network 1.1.1.0 0.0.0.255 area 0
!

Router2
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial0
ip address 1.1.1.1 255.255.255.0
clockrate 2000000
!
router ospf 1
network 1.1.1.0 0.0.0.255 area 0
!



Now lets look at OSPF forming adjacency between different network.

OSPF over a Point-to-Point Link with Unnumbered Interfaces

This section presents you with the information you can use to configure routers that run OSPF as the routing protocol and are connected through a point-to-point serial link with Unnumbered serial interfaces. Unnumbered serial interfaces are interfaces which do not have their own IP address. These interfaces borrow the IP address from another interface on the router which has an IP address configured. Which means the adjacency  is formed between different network.


OSPF adjacency on the different network.


Router1
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial0
ip unnumbered loopback 0
!
router ospf 1
network 3.3.3.0 0.0.0.255 area 0
!

Router2
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial0
ip unnumbered loopback 0
!
router ospf 1
network 2.2.2.0 0.0.0.255 area 0
!

Verify

Verify the Configuration of OSPF with IP Addresses on Serial Interfaces

This is the show ip ospf neighbor command output issued on Router1.

 Router1#show ip ospf neighbor
   Neighbor ID   Pri   State       Dead Time       Address        Interface
    2.2.2.2      1   FULL/ -       00:00:32       1.1.1.1         Serial 0

This output shows that Router1 has one neighbor with a Router ID of 2.2.2.2, and has formed full adjacency with this neighbor. The address 1.1.1.1 is the IP address of the Serial0 interface on Router2.


Similarly, this example displays the output for the show ip ospf neighbor commands on Router2.

 Router2# show ip ospf neighbor
   Neighbor ID     Pri    State     Dead Time     Address      Interface
    3.3.3.3         1     FULL/ -    00:00:32      1.1.1.2      Serial0


Verify the Configuration of OSPF with Unnumbered Interfaces

The show ip ospf neighbor command on Router1 and Router2 confirms full adjacency.

Router1#show ip ospf neighbor
    Neighbor ID  Pri   State    Dead Time    Address      Interface
    2.2.2.2      1   FULL/ -    00:00:37    2.2.2.2       Serial0
  
  
This example displays the output of the show ip ospf neighbor commands on Router2.

 Router2#show ip ospf neighbor
    Neighbor ID   Pri   State   Dead Time   Address   Interface
    3.3.3.3        1   FULL/ -  00:00:30    3.3.3.3    Serial0


Leave your comment below

No comments:

Post a Comment