cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3979
Views
0
Helpful
10
Replies

Ospf Neighbors

Dear All,

  i couldnt get the same list in sh ip ospf neighbors

  as that of in  sh cdp neighbors

what could be the reason behind this

10 Replies 10

Tharak Abraham
Level 3
Level 3

Anand,

How do you expect cdp to work like ospf ?

Please post what you did/trying to achieve ?

Ganesh Hariharan
VIP Alumni
VIP Alumni

Dear All,

  i couldnt get the same list in sh ip ospf neighbors

  as that of in  sh cdp neighbors

what could be the reason behind this

Hi,

The show ip ospf neighbors command will work where the adjency with the neighbour is formed and the interface data structure stores information from a network to which it is connected. Using this information, an Open Shortest Path First (OSPF) router builds hello packets. These hello packets are exchanged between directly-connected neighbors to learn more about each other. You can use the show ip ospf neighbor command to observe the neighbor data structure. This command displays OSPF-related neighbor information.

Router2# show ip ospf neighbor

Neighbor ID     Pri    State      Dead Time    Address     Interface
192.168.45.1    1      FULL/DR    00:00:36     10.0.0.1    Ethernet0

Above information will be shown in show ip ospf neighbor and show cdp neighbors you will come to know the details of the neighbor devices what model and all as listed in the below example.

DCMGTSW01>sh cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID        Local Intrfce     Holdtme    Capability   Platform        Port ID
MGTSW02        Gig 0/50          138              R S I         WS-C3560G  Gig 0/50
MGTSW02        Gig 0/49          126              R S I         WS-C3560G  Gig 0/49

Hope to Help !!

Remember to rate the helpful post

Ganesh.H

In sh ip ospf database- Routers own loopback
is there nothing else in the network

& in the sh ip ospf interface the
adjacent router isnt been advertised

Could you please post your "sh ip ospf neigh" output here ?

ROUTER#sh ip ospf neigh

Neighbor ID     Pri   State           Dead Time   Address         Interface

10.99.0.180       0   FULL/  -        00:00:38    10.99.56.14     Serial2/1/6:0

10.99.0.179       0   FULL/  -        00:00:39    10.99.56.10     Serial2/1/5:0

10.99.0.178       0   FULL/  -        00:00:33    10.99.56.6      Serial2/1/4:0

10.99.0.177       0   FULL/  -        00:00:37    10.99.56.2      Serial2/1/3:0

10.99.0.181       0   FULL/  -        00:00:35    10.99.56.18     Serial2/1/2:0

Voila..we have neighbors...

sh ip os dat and sh ip os interface doesnt look meaningful enough ?

but i could not get the ospf neighbors at 2/1/0:0

2/1/7:0    & 2/1/1:0 interface

Hello Anandkumar,

post

sh ip ospf interface ser2/1/0:0

sh ip ospf interface ser2/1/7:0

sh ip ospf interface ser2/1/1:0

if possible take the same show on the other side of each link

This should provide information to explain why these OSPF adjacencies are not built

Among more common causes:

missing network area command covering the IP subnets on these links under router OSPF

passive-interface for these on one side under router OSPF process

an MTU mismatch

an OSPF authentication mismatch

an area id mismatch (different area number)

an area type mismatch (stub vs. normal area)

OSPF timers mismatch (this can be caused by an OSPF network type mismatch)

all these informations can be seen in sh ip ospf interface.

you can also do the following

you can shut a serial interface for example ser2/1/0:0

you can enable terminal monitor

debug ip ospf adjacency

then you re-enable the interface and you see what happens

Hope to help

Giuseppe

below is the output which you have asked/ also the debug output
& the subnetnetworks advertised are the same below for all ospfRouters

ROUTER#sh ip ospf int s2/1/0:0
Serial2/1/0:0 is up, line protocol is up
  Internet Address 10.99.56.25/30, Area 0
  Process ID 100, Router ID 10.99.0.189, Network Type POINT_TO_POINT, Cost: 5040
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           5040      no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
    Hello due in 00:00:02
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
ROUTER#sh ip ospf int s2/1/1:0
Serial2/1/1:0 is up, line protocol is up
  Internet Address 10.99.56.21/30, Area 0
  Process ID 100, Router ID 10.99.0.189, Network Type POINT_TO_POINT, Cost: 5040
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           5040      no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
    Hello due in 00:00:00
  Index 3/3, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
ROUTER#sh ip ospf int s2/1/7:0
Serial2/1/7:0 is up, line protocol is up
  Internet Address 10.99.56.65/30, Area 0
  Process ID 100, Router ID 10.99.0.189, Network Type POINT_TO_POINT, Cost: 5040
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           5040      no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
    Hello due in 00:00:03
  Index 9/9, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)

000696: *Mar 24 16:20:18.089 GMT: OSPF: Rcv pkt from 10.99.56.26, Serial2/1/1:0,
area 0.0.0.0 : src not on the same network
000697: *Mar 24 16:20:19.245 GMT: OSPF: Rcv pkt from 10.99.57.14, Serial2/1/7:0,
area 0.0.0.0 : src not on the same network
000698: *Mar 24 16:20:24.749 GMT: OSPF: Rcv pkt from 10.99.56.22, Serial2/1/0:0,
area 0.0.0.0 : src not on the same network
000699: *Mar 24 16:20:28.089 GMT: OSPF: Rcv pkt from 10.99.56.26, Serial2/1/1:0,
area 0.0.0.0 : src not on the same network
000700: *Mar 24 16:20:29.245 GMT: OSPF: Rcv pkt from 10.99.57.14, Serial2/1/7:0,
area 0.0.0.0 : src not on the same network
000701: *Mar 24 16:20:34.753 GMT: OSPF: Rcv pkt from 10.99.56.22, Serial2/1/0:0,
area 0.0.0.0 : src not on the same network
000702: *Mar 24 16:20:38.089 GMT: OSPF: Rcv pkt from 10.99.56.26, Serial2/1/1:0,
area 0.0.0.0 : src not on the same network
000703: *Mar 24 16:20:39.245 GMT: OSPF: Rcv pkt from 10.99.57.14, Serial2/1/7:0,
area 0.0.0.0 : src not on the same network
000704: *Mar 24 16:20:44.753 GMT: OSPF: Rcv pkt from 10.99.56.22, Serial2/1/0:0,
area 0.0.0.0 : src not on the same network
000705: *Mar 24 16:20:48.089 GMT: OSPF: Rcv pkt from 10.99.56.26, Serial2/1/1:0,

Hello Anandkumar,

>> src not on the same network

check the IP subnet you have configured on both sides, I didn't list but the two OSPF neighbors need to be in the same IP subnet

you can check the ip address on the other side with

sh cdp n s2/1/0:0 det

sh cdp n s2/1/1:0 det

sh cdp n s2/1/7:0 det

for example for s2/1/0:0 the only valid ip address for the neighbor is 10.99.56.26 given the /30 mask

Hope to help

Giuseppe

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card