cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6017
Views
6
Helpful
13
Replies

OSPF Adjacency with secondary address?

Farhan Jaffer
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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

HTH

Rick

View solution in original post

13 Replies 13

satish_zanjurne
Level 4
Level 4

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.

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

Any idea?

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.

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?

Hi,

OSPF adjancies are formed only on primary networks , not o nsecondary.So you need to use primary network in OSPF process.

Refer following link.

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094050.shtml

HTH..

rate it if ur query is clear..

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
Level 1
Level 1

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

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.

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

HTH

Rick

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.

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

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

HTH

Rick

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

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco