Community discussions

MikroTik App
 
User avatar
SoundGuyFYI
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Wed Jun 05, 2013 12:43 am

OSPF Router ID

Thu Feb 20, 2014 6:43 pm

I can't seem to find any documentation on the Router ID properties. What does it affect within a OSPF link? what is its purposed? Does that IP get involved with the routing information? How is it different from the Address that the neighbor shows?

Any description would be helpful. Thanks!
 
onnoossendrijver
Member
Member
Posts: 488
Joined: Mon Jul 14, 2008 11:10 am
Location: The Netherlands

Re: OSPF Router ID

Thu Feb 20, 2014 8:48 pm

See http://en.wikipedia.org/wiki/Open_Shortest_Path_First
The router ID is a unique number that identifies the router. Although it can look like an IP address it is NOT. It is just a number.
The router ID is used in identifying the Designated Router.
Snippet from Wikipedia:
DR's exist for the purpose of reducing network traffic by providing a source for routing updates. The DR maintains a complete topology table of the network and sends the updates to the other routers via multicast. All routers in a multi-access network segment will form a slave/master relationship with the DR. They will form adjacencies with the DR and BDR only.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: OSPF Router ID

Thu Feb 20, 2014 10:50 pm

The Router ID appears in all link state advertisements (LSAs) and allows routers to determine who originated the LSAs. A Router ID will be determined automatically if you don't set one but setting one manually gives you complete control and stops the Router ID changing. One common practice is to make the Router ID a distinct /32 IP number which is also attached to a loopback/bridge interface and then include that /32 address in the OSPF networks. An advantage of that approach is that the Router ID provides an IP which you can connect to.
 
User avatar
Deantwo
Member
Member
Posts: 332
Joined: Tue Sep 30, 2014 4:07 pm

Re: OSPF Router ID

Fri Aug 03, 2018 11:01 am

The https://wiki.mikrotik.com/wiki/Manual:OSPF-examples page suggests making a loopback interface and giving it the router-id as an IP-address.
Does the router-id have to exist as an IP-address on the router? If not then why can we configure the router-id at all?
I assume that if you define a value for the router-id it is used even if the IP-address doesn't exist on the router.

Setting a loopback interface is a very Cisco way of doing it, so I assume is it just if you want to leave the router-id property as "0.0.0.0" and control it as an IP-address like Cisco does it.

Would love it if that example guide was updated a little to say this.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7188
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: OSPF Router ID

Fri Aug 03, 2018 11:40 am

Router id is just an administrative value. It can be anything and should not necessary be equal to any of IP addresses configured on the router. But keep in mind that it MUST be unique on every device in the network.
It is recommended to let OSPF to choose router id automatically (eliminate human error of not providing unique id) or use loopbacks for easier management.
 
JimmyNyholm
Member Candidate
Member Candidate
Posts: 248
Joined: Mon Apr 25, 2016 2:16 am
Location: Sweden

Re: OSPF Router ID

Sat Aug 04, 2018 9:21 am

The Question have been answered but one could put it this way. Say this "number" is just a number. Sure it looks like an IP'adress. BUT for analogy think of it as a Color value. When routers have only few links this is what think and call SIMPLE OSPF network. the reson for this ID is not obvious. But When the network grows and you have multiple paths between Router RED and router BLUE then the reason gets more clear.

Hello I'm Red
Ohhh I see Blue on link 1
And I see Blue on link 2
And I see Blue on link 3

Higher up in the layer cake there is other protocols that need stable loopback. And if you dedicated some of your IPSpace for Loopback why not have that as your Router ID in all essence it is how you expect to talk, manage and reach the unit at all times independent on what links are currently active, and it makes documentation and problem solving easier.

Original Question, FOR OSPF It is just a number that looks like an IP Address Yes! Case Closed. But Depending on all things considered this could be a real IP on the Loopback and give you the stable peering on other protocol (Say BGP) when ospf is converging due to links failing or other reason.

This is ALL up to you and what you think on how fast things will grow.
 
sri2007
Member Candidate
Member Candidate
Posts: 209
Joined: Wed May 20, 2015 10:14 pm
Location: Lake Grove, NY

Re: OSPF Router ID

Fri Aug 10, 2018 4:58 pm

The Question have been answered but one could put it this way. Say this "number" is just a number. Sure it looks like an IP'adress. BUT for analogy think of it as a Color value. When routers have only few links this is what think and call SIMPLE OSPF network. the reson for this ID is not obvious. But When the network grows and you have multiple paths between Router RED and router BLUE then the reason gets more clear.

Hello I'm Red
Ohhh I see Blue on link 1
And I see Blue on link 2
And I see Blue on link 3

Higher up in the layer cake there is other protocols that need stable loopback. And if you dedicated some of your IPSpace for Loopback why not have that as your Router ID in all essence it is how you expect to talk, manage and reach the unit at all times independent on what links are currently active, and it makes documentation and problem solving easier.

Original Question, FOR OSPF It is just a number that looks like an IP Address Yes! Case Closed. But Depending on all things considered this could be a real IP on the Loopback and give you the stable peering on other protocol (Say BGP) when ospf is converging due to links failing or other reason.

This is ALL up to you and what you think on how fast things will grow.
haha, yes that's true!

btw, for me the best way of setting this is by manually configuring some loopback address, just for management because it will allow me to understand easily the router who is sending the update, if you didn't do that and allow an automatic election for the router id, then it will choose the highest IP address configured at the loopback interface, and if there is no loopbacks, then the router will choose the highest IP address configured at any interface.

Who is online

Users browsing this forum: No registered users and 9 guests