why OSPF has to configure a loopback interface?

in CCNA & CCENT
If it's for router id, isn't enough to use physical interface's ip address.
I understand that physical interface's IP may change, but it's always UNIQUE.
I understand that physical interface's IP may change, but it's always UNIQUE.
Comments
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□
You don't have to; it's just convenient. Physical interfaces may go down, which might change things. If your loopback goes down (without you explicitly shutting down), your router probably just blew up. -
tech-airman Member Posts: 953
johnifanx98 wrote: »If it's for router id, isn't enough to use physical interface's ip address.
I understand that physical interface's IP may change, but it's always UNIQUE.
johnifanx98,
What is the heirarchy for OSPF router ID for an OSPF router? -
johnifanx98 Member Posts: 329
Thats actually a good fundamental question that I wont give away the answer to
Maybe. But i could not see any relation with my question... -
KPWright Member Posts: 44 ■■□□□□□□□□
johnifanx98 wrote: »Maybe. But i could not see any relation with my question...
I think there actually is a relationship to your original post. You wanted to know why you should configure a loopback when the interfaces would generate an id for the router just as well.
The problem is if you allow ospf to select the highest interface address and that interface goes down (or you take it down) the router will then choose another id. Since it now has a new id, it will have to re-advertise and negotiate all of it's routes with it's neighbors using the new id. When the other interface comes back up, this will all happen again. All of this needless chatter just puts traffic on the network and possible delay in communications. If you configure one or more loopback addresses, ospf will take the highest of these as the id regardless of the interfaces. This won't change unless you re-configure the loopback or the router itself goes down.
So your answer is you configure the loopback to limit the amount of router generated traffic on your network. -
networker050184 Mod Posts: 11,962 Mod
I think there actually is a relationship to your original post. You wanted to know why you should configure a loopback when the interfaces would generate an id for the router just as well.
The problem is if you allow ospf to select the highest interface address and that interface goes down (or you take it down) the router will then choose another id. Since it now has a new id, it will have to re-advertise and negotiate all of it's routes with it's neighbors using the new id. When the other interface comes back up, this will all happen again. All of this needless chatter just puts traffic on the network and possible delay in communications. If you configure one or more loopback addresses, ospf will take the highest of these as the id regardless of the interfaces. This won't change unless you re-configure the loopback or the router itself goes down.
So your answer is you configure the loopback to limit the amount of router generated traffic on your network.
That is not true. Even if you shutdown the interface or remove the IP address OSPF will keep the same router id. The only way to have the router change its router id is to maunually set it and clear the process or reload the router.An expert is a man who has made all the mistakes which can be made. -
johnifanx98 Member Posts: 329
networker050184 wrote: »That is not true. Even if you shutdown the interface or remove the IP address OSPF will keep the same router id. The only way to have the router change its router id is to maunually set it and clear the process or reload the router.
By comparing loopback addr of a computer, I saw this interesting thing. A computer's loopback is always 127.0.0.1, which is reserved. However, seems like an OSPF's loopback address is in the space of a real network ip addresses. It does not make much sense to allocate real IP addresses to some virtual interfaces...
Also, this leaves a question open: how to avoid IP addresses confliction within a certain space, say, area. Just by manual check? -
networker050184 Mod Posts: 11,962 Mod
johnifanx98 wrote: »By comparing loopback addr of a computer, I saw this interesting thing. A computer's loopback is always 127.0.0.1, which is reserved. However, seems like an OSPF's loopback address is in the space of a real network ip addresses. It does not make much sense to allocate real IP addresses to some virtual interfaces...
Also, this leaves a question open: how to avoid IP addresses confliction within a certain space, say, area. Just by manual check?
Why wouldn't it make sense to allocate an address? It gives you a testing point and a consistent address for your other services like SSH, SNMP trap source, syslog source, next hop for BGP etc. that won't change even if you re IP your interfaces.
You would avoid address overlap the same way you would with any other interface address. Some people use a spreadsheet or anyone of the paid IP tracking systems available out there to track IP assignments.An expert is a man who has made all the mistakes which can be made. -
KPWright Member Posts: 44 ■■□□□□□□□□
networker050184 wrote: »That is not true. Even if you shutdown the interface or remove the IP address OSPF will keep the same router id. The only way to have the router change its router id is to maunually set it and clear the process or reload the router.
Sorry for the error.I just went back and re-read. Looks like the interface doesn't even need to be active to be selected.
-
shednik Member Posts: 2,005
networker050184 wrote: »Why wouldn't it make sense to allocate an address? It gives you a testing point and a consistent address for your other services like SSH, SNMP trap source, syslog source, next hop for BGP etc. that won't change even if you re IP your interfaces.
You would avoid address overlap the same way you would with any other interface address. Some people use a spreadsheet or anyone of the paid IP tracking systems available out there to track IP assignments.
These are the reasons right here, once you work in a large enterprise network it will all make sense. Networker summed it up well. -
tech-airman Member Posts: 953
johnifanx98 wrote: »By comparing loopback addr of a computer, I saw this interesting thing. A computer's loopback is always 127.0.0.1, which is reserved. However, seems like an OSPF's loopback address is in the space of a real network ip addresses. It does not make much sense to allocate real IP addresses to some virtual interfaces...
Also, this leaves a question open: how to avoid IP addresses confliction within a certain space, say, area. Just by manual check?
johnifanx98,
Can network traffic leave the computer if the NIC is inoperable?