OSPF Adjacency with secondary address?

Answered Question
Aug 19th, 2008

Hi,

Why is it necessary to create adjacency of OSPF neighbors on primary IPs only?

I have a ptp network type of OSPF & adjacencies cannot build on using secondary IPs. Is there any way around?

Thanks.

I have this problem too.
0 votes
Correct Answer by Richard Burts about 8 years 5 months ago

Farhan

I am a bit puzzled why you would configure a secondary address on a serial link and then want to form the OSPF adjacency on the secondary and not the primary. But that is a side issue to your primary question.

You ask a valid question and it deserves an answer about why OSPF will only form adjacency on the primary address. And the answer is that the router always uses the primary address as the source address in the hello packets. So if your router sends a hello packet with source address of the primary in subnet 10.0.0.0 to a router that wants to use the secondary in 10.0.0.4 then they are not in the same subnet and will not form adjacency.

HTH

Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
satish_zanjurne Tue, 08/19/2008 - 21:07

Hi ,

Try using loopback interface / IP address for forming the neigbor.

You can advertise same , so that you would be able to ping the loopback for reachability.

Farhan Jaffer Tue, 08/19/2008 - 21:11

Did this, but no help. Connectivity should be on primary IPs b/w routers, i read.

Any idea?

satish_zanjurne Tue, 08/19/2008 - 21:39

1.You define the loopback interfaces on both routers.

2.Assign IP addressses like 10.0.0.1 & 10.0.0.2

3.In ospf process these will become the router ID's.

4.Or you can use "router-id" command like

router-id 10.0.0.1

5.Advertise these loopback interface in ospf process

network 10.0.0.1 0.0.0.0 area 0

6.in "show ip ospf neigbors" you should find loopback ip addresses as neigbor, if your connectivity between 2 routers is OK.

Farhan Jaffer Tue, 08/19/2008 - 22:16

Yes i did the same, but no luck. See the config & output:

R1

interface Loopback0

ip address 11.0.0.1 255.255.255.255

interface Serial1/0

ip address 10.0.0.5 255.255.255.252 secondary

ip address 10.0.0.1 255.255.255.252

ip ospf network point-to-point

router ospf 1

log-adjacency-changes

router-id 11.0.0.1

network 10.0.0.4 0.0.0.3 area 0

network 11.0.0.1 0.0.0.0 area 0

R2

interface Loopback0

ip address 11.0.0.2 255.255.255.255

interface Serial1/0

ip address 10.0.0.6 255.255.255.252

ip ospf network point-to-point

router ospf 1

router-id 11.0.0.2

log-adjacency-changes

network 10.0.0.4 0.0.0.3 area 0

network 11.0.0.2 0.0.0.0 area 0

On R1

sh ip ospf interface ser1/0

%OSPF: OSPF not enabled on Serial1/0

On R2

R2#sh ip ospf interface ser1/0

Serial1/0 is up, line protocol is up

Internet Address 10.0.0.6/30, Area 0

Process ID 1, Router ID 11.0.0.2, Network Type POINT_TO_POINT, Cost: 64

Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40

Hello due in 00:00:03

Index 1/1, 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)

If i change the ip R2 ser1/0 to 10.0.0.2 (i.e. connection with primary ip) then it works, else not. Why it is?

Farhan Jaffer Tue, 08/19/2008 - 22:47

Yes Satish, I read this already & then come to discussion :)

The original question is y this is the behavior? even the reachability is there then what's the real theory.

Thanks anyway!

csco10716389 Tue, 08/19/2008 - 23:04

DADA......please advertise the secondry IP in the OSPF Network command then u can form the adjnecies.......

Farhan Jaffer Tue, 08/19/2008 - 23:25

Dear!

secondary n/w is in the statement but not the primary one. And i don't want it to advertise (as there is no concern with the next router). There should be a theory behind this lack of feature, i want to know that.

Correct Answer
Richard Burts Wed, 08/20/2008 - 04:05

Farhan

I am a bit puzzled why you would configure a secondary address on a serial link and then want to form the OSPF adjacency on the secondary and not the primary. But that is a side issue to your primary question.

You ask a valid question and it deserves an answer about why OSPF will only form adjacency on the primary address. And the answer is that the router always uses the primary address as the source address in the hello packets. So if your router sends a hello packet with source address of the primary in subnet 10.0.0.0 to a router that wants to use the secondary in 10.0.0.4 then they are not in the same subnet and will not form adjacency.

HTH

Rick

Farhan Jaffer Wed, 08/20/2008 - 19:58

ahan, sounds good. Thanks dear.

Well, this was a scenario i built last week somewhere & got stuck while establishing an adjacency. I have a one port only for multiple purposes & .... a longggg issue.

This behavior surprised me but it is very simple & straight forward, but for me it was a new.

Thanks again.

tomy.nurhadi Thu, 08/21/2008 - 06:38

Hi,

It's because OSPF will see the secondary networks as a stub networks. Hence, there will be no Hello sent on the second network. No Hello means no adjancencies can occur.

Regards,

Tomy

Richard Burts Thu, 08/21/2008 - 09:28

Farhan

Some people generalize from this issue and believe that OSPF does not work with secondary addresses. This is not the case. OSPF does not have a problem with secondary addresses, other than the fact that it will not establish adjacency on secondary addresses. If OSPF does establish adjacency and if there is a network statement for the secondary subnet(s) then OSPF will advertise them just fine and route to them just fine.

I am glad that my response did resolve your question. Thank you for using the rating system to indicate that your question was resolved (and thanks for the rating). It makes the forum more useful when people can read an issue and can know that there was a response which did resolve the issue.

The forum is an excellent place to learn about Cisco networking. I encourage you to continue your participation in the forum.

HTH

Rick

Farhan Jaffer Thu, 08/21/2008 - 22:17

Thanks Rick. I am being part of many tech forums (Cisco, Juniper especially) as a query generator, but not participate in answering unfortunately.

Your active participation is highly appreciable. Keep it up. I'll try to be a part.

FJ

Actions

This Discussion