2

I know there are 3 ways for Router ID to be selected in OSPF but my question is specific to the auto-select of ID on basis of highest IP address (loopback or non-loopback). Why is the highest IP address taken, is there a reason behind it or it is just something the IETF/CISCO decided on because they had to choose something? Why isn't the smallest IP address taken?

I know it seems a silly question but it has been bugging me recently for no reason.

1 Answer 1

2

"Why is the highest IP address taken, is there a reason behind it or it is just something the IETF/CISCO decided on because they had to choose something? Why isn't the smallest IP address taken?"

It is up to the router vendor to decide on how to configure the OSPF Router ID. Nothing says there must be an automated method, and a vendor could require manual configuration. Just because Cisco has decided on on particular method to automatically configure the OSPF Router ID does not mean a different vendor could not have a different or no method.

The IETF via RFC 2328, OSPF Version 2 suggests a method for choosing the OSPF Router ID using the smallest IP address:

Router ID

A 32-bit number that uniquely identifies this router in the AS. One possible implementation strategy would be to use the smallest IP interface address belonging to the router. If a router's OSPF Router ID is changed, the router's OSPF software should be restarted before the new Router ID takes effect. In this case the router should flush its self-originated LSAs from the routing domain (see Section 14.1) before restarting, or they will persist for up to MaxAge minutes.

The OSPF router ID is simply a 32-bit number, not an IPv4 address, although some vendors let you write it like an IPv4 address. This has caused much confusion. For example, there are people who insist it is an IPv4 address, and the believe that even on an IPv6-only router, you must have at least one IPv4 interface for OSPF to get a router ID. That is not true. An OSPF router ID is simply a 32-bit number (the same size as an IPv4 address). and it can be written as an integer or like an IPv4 address, but it is not an IPv4 address.

The RFC for OSPFv3 RFC 5340, OSPF for IPv6 clarifies the Router ID:

OSPF Router IDs, Area IDs, and LSA Link State IDs remain at the IPv4 size of 32 bits. They can no longer be assigned as (IPv6) addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.