Home  >  Article  >  What does router id mean?

What does router id mean?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2020-01-07 09:45:4922818browse

What does router id mean?

router-ID usually takes the maximum IP address of the router's loopback interface. If there is no loopback, it takes the maximum IP address of the active interface.

So what are the specific uses of router-ID?

is used as the unique identifier of the router;

can be used for DR and BDR election.

What is the RouterID of OSPF? The format it displays is x.x.x.x, which is the same format as an IP address, but in fact it is not an IP address, to be precise, it should be a name. The name given to the router that has the OSPF protocol enabled. Although the format is in the form of an IP address, it can be set arbitrarily within 255.255.255.255, such as: 0.0.0.1; 255.255.255.255. These cannot be configured in the IP address, but they can be set successfully here.

Let’s use an experimental example to illustrate:

What does router id mean?

# It’s a very simple topology. I won’t go into setting up the environment. I’ll just configure the IP address and test it. After the connection is OK, configure OSPF and set the RouterID.

A(config)#router ospf 100
A(config-router)#router-id 0.0.0.1
A(config-router)#network 10.1.1.1 0.0.0.0 area 0
B(config)#router ospf 100
B(config-router)#network 10.1.1.2 0.0.0.0 area 0
B(config-router)#network 192.168.1.2 0.0.0.0 area 0
C(config)#router ospf 100
C(config-router)#router-id 255.255.255.255
C(config-router)#network 192.168.1.3 0.0.0.0 area 0

Not much to say about the OSPF configuration. On A, we set the RouterID to 0.0.0.1; on B, we do not set the RouterID; on C, we set the RouterID to 255.255.255.255. After the OSPF neighbor is established, you can use the command #show ip ospf neighbor to view the OSPF neighbor table.

A#show ip os neighbor 
Neighbor ID     Pri   State           Dead Time   Address        Interface
192.168.1.2      0   FULL/  -         00:00:36    10.1.1.2       Serial1/0
B#show ip ospf neighbor 
Neighbor ID          Pri   State     Dead Time   Address        Interface
255.255.255.255   0   FULL/  -        00:00:37    192.168.1.3     Serial1/1
0.0.0.1         0   FULL/  -        00:00:30    10.1.1.1       Serial1/0

You can see on B that the name of neighbor A is 0.0.0.1, and the name of neighbor C is 255.255.255.255; you can also see on A that the name of neighbor B without RouterID configuration is 192.168. 1.2, using an interface address on B. This is why the name is formatted as an IP address. In order to ensure that some lazy people don't give him a name, he can also find a suitable name by himself, haha.

Without specifying the RouterID, the router will automatically conduct an election. The election rules are as follows:

1. On an OSPF router with multiple loopback ports, use the largest loopback port address as the Router- id.

2. On an OSPF router with only one loopback port, select the loopback port address as Router-id.

3. For OSPF routers without loopback ports, select the largest IP address on the physical interface as Router-id.

For more FAQ, please visit the PHP Chinese website.

The above is the detailed content of What does router id mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn