Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos Platform] Facts about OSPF router ID

0

0

Article ID: KB27383 KB Last Updated: 10 Oct 2013Version: 1.0
Summary:

This article can be used as a reference for some facts about Open Shortest Path First (OSPF) router ID. All the facts described are expected behaviors.

Symptoms:

Cause:

Solution:

The following setup is used to explain the facts about OSPF router ID


R1(ge-1/0/8)---------(ge-0/3/1)R2

R1 - router-id 1.1.1.1
R2 - router-id 2.2.2.2


[edit]
lab@R1# run show ospf neighbor
Address Interface State ID Pri Dead
19.19.19.2 ge-1/0/8.0 Full 2.2.2.2 128 34

[edit]
lab@R1#

[edit]
lab@R2# run show ospf neighbor
Address Interface State ID Pri Dead
19.19.19.1 ge-0/3/1.0 Full 1.1.1.1 128 35

[edit]
lab@R2#


1. When there is a router ID change, the LSAs that were advertised by the old router ID will still be in the OSPF database until the Max LSA age out. The Max LSA age out time in Junos OS is 60 minutes and can be verified using the following command:

[edit]
lab@R2# run show ospf database external extensive
OSPF AS SCOPE link state database
Type ID Adv Rtr Seq Age Opt Cksum Len
Extern 44.44.44.44 1.1.1.1 0x80000001 71 0x22 0xf20b 36
mask 255.255.255.255
Topology default (ID 0)
Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
Aging timer 00:58:48
Installed 00:00:29 ago, expires in 00:58:49
Last changed 00:00:29 ago, Change count: 1
Extern 55.55.55.55 1.1.1.1 0x80000001 71 0x22 0xf6da 36
mask 255.255.255.255
Topology default (ID 0)
Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
Aging timer 00:58:48
Installed 00:00:29 ago, expires in 00:58:49
Last changed 00:00:29 ago, Change count: 1


There is a change in the OSPF router-id on R1.

[edit]
lab@R1# show | compare rollback 1
[edit routing-options]
- router-id 1.1.1.1;
+ router-id 11.11.11.11;

[edit]
lab@R1#


[edit]
lab@R2# run show ospf database external extensive
OSPF AS SCOPE link state database
Type ID Adv Rtr Seq Age Opt Cksum Len
Extern 44.44.44.44 1.1.1.1 0x80000001 215 0x22 0xf20b 36
mask 255.255.255.255
Topology default (ID 0)
Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
Aging timer 00:56:24
Installed 00:02:53 ago, expires in 00:56:25, sent 00:00:29 ago
Last changed 00:02:53 ago, Change count: 1
Extern 44.44.44.44 11.11.11.11 0x80000001 30 0x22 0xc510 36
mask 255.255.255.255
Topology default (ID 0)
Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
Aging timer 00:59:30
Installed 00:00:29 ago, expires in 00:59:30
Last changed 00:00:29 ago, Change count: 1
Extern 55.55.55.55 1.1.1.1 0x80000001 215 0x22 0xf6da 36
mask 255.255.255.255
Topology default (ID 0)
Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
Aging timer 00:56:24
Installed 00:02:53 ago, expires in 00:56:25, sent 00:00:29 ago
Last changed 00:02:53 ago, Change count: 1
Extern 55.55.55.55 11.11.11.11 0x80000001 30 0x22 0xc9df 36
mask 255.255.255.255
Topology default (ID 0)
Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
Aging timer 00:59:30
Installed 00:00:29 ago, expires in 00:59:30
Last changed 00:00:29 ago, Change count: 1


From the above it can be seen that the old entries still exist and will not be flushed out until the timer expires. Clearing OSPF neighbors will also not help this situation. A complete deactivation and activation of OSPF is required.

2. By default, Junos OS chooses the lowest IP address as router ID. If loopback address is present, then it will take lowest configured loopback address, if there are no loopbacks, Junos OS will use lowest configured physical IP  address.


[edit]
lab@R1# show interfaces lo0
May 03 12:44:24
unit 0 {
family inet {
address 5.5.5.5/32;
address 2.2.2.2/32;
}
}

[edit]
lab@R1#

[edit]
lab@R2# run show ospf neighbor
May 03 12:44:46
Address Interface State ID Pri Dead
19.19.19.1 ge-0/3/1.0 Full 2.2.2.2 128 35

[edit]
lab@R2#

[edit]
lab@R1# show | compare rollback 1
May 03 12:45:30
[edit interfaces lo0 unit 0 family inet]
address 5.5.5.5/32 { ... }
+ address 6.6.6.6/32;
- address 2.2.2.2/32;

[edit]
lab@R1#



[edit]
lab@R2# run show ospf neighbor
May 03 12:45:45
Address Interface State ID Pri Dead
19.19.19.1 ge-0/3/1.0 Full 5.5.5.5 128 32

[edit]
lab@R2#

3. When there is a router-id change, the established OSPF adjacency will flap. It is always recommended that the router-id is hard coded under the "edit routing options" hierarchy to avoid problems like this.


[edit]
lab@R2# run show ospf neighbor
May 03 12:47:20
Address Interface State ID Pri Dead
19.19.19.1 ge-0/3/1.0 Full 5.5.5.5 128 34

[edit]
lab@R2# run show ospf neighbor detail
May 03 12:47:23
Address Interface State ID Pri Dead
19.19.19.1 ge-0/3/1.0 Full 5.5.5.5 128 31
Area 0.0.0.0, opt 0x52, DR 19.19.19.2, BDR 19.19.19.1
Up 00:02:02, adjacent 00:02:02                                             -  up for over 2 minutes


[edit]
lab@R1# show | compare rollback 1                                          -  change of router id
May 03 12:48:06
[edit interfaces lo0 unit 0 family inet]
address 5.5.5.5/32 { ... }
+ address 2.2.2.2/32;
- address 6.6.6.6/32;

[edit]
lab@R1#


[edit]
lab@R2# run show ospf neighbor
May 03 12:48:16
Address Interface State ID Pri Dead
19.19.19.1 ge-0/3/1.0 Full 2.2.2.2 128 34

[edit]
lab@R2# run show ospf neighbor detail
May 03 12:48:17
Address Interface State ID Pri Dead
19.19.19.1 ge-0/3/1.0 Full 2.2.2.2 128 33
Area 0.0.0.0, opt 0x52, DR 19.19.19.2, BDR 19.19.19.1
Up 00:00:15, adjacent 00:00:15                                             - adjacency has reset




Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search