12-22-2023 06:27 AM - edited 12-22-2023 06:29 AM
Hi, I have a small query.
1.1.1.1(loopback)>>Router1>>> Router2 >>>2.2.2.2(loopback).
On router 1 when I try to advertise 1.1.1.1 using the below command I don't see any hello packet going out but as soon as I advertise the physical interface(ip) it sends a hello packet, may I know what is the reason, can someone please explain?
router ospf 1
network 1.1.1.0 0.0.0.255 area 0
Solved! Go to Solution.
12-22-2023 06:40 AM - edited 12-22-2023 06:50 AM
Hello @RobotAjay
In OSPF, the network command is indeed used to enable OSPF on interfaces, and it is not a route advertisement mechanism like redistribution. The network command's purpose is to identify the interfaces participating in OSPF, and OSPF will then send hello packets on those interfaces to form adjacencies.
If you are not seeing OSPF hello packets when using the network command for the loopback interface, it might be due to the fact that OSPF requires a physical interface to be up and operational before it will form an adjacency. That's it, the subnet between R1 and R2. Loopback interfaces, being virtual interfaces, might not trigger OSPF adjacency formation on their own.
If you want to advertise the loopback interface using OSPF, and you are not concerned about forming OSPF adjacencies over the loopback, you can use the redistribute command instead. For example:
This command will redistribute connected routes, including the loopback interface, into OSPF.
12-22-2023 06:32 AM
You need to have OSPF interface and P2P address in area 0.
and you need to have OSPF peering for the network to exchange each other.
Understand the OSPF :
https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/7039-1.html
12-22-2023 06:40 AM - edited 12-22-2023 06:50 AM
Hello @RobotAjay
In OSPF, the network command is indeed used to enable OSPF on interfaces, and it is not a route advertisement mechanism like redistribution. The network command's purpose is to identify the interfaces participating in OSPF, and OSPF will then send hello packets on those interfaces to form adjacencies.
If you are not seeing OSPF hello packets when using the network command for the loopback interface, it might be due to the fact that OSPF requires a physical interface to be up and operational before it will form an adjacency. That's it, the subnet between R1 and R2. Loopback interfaces, being virtual interfaces, might not trigger OSPF adjacency formation on their own.
If you want to advertise the loopback interface using OSPF, and you are not concerned about forming OSPF adjacencies over the loopback, you can use the redistribute command instead. For example:
This command will redistribute connected routes, including the loopback interface, into OSPF.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide