cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
535
Views
2
Helpful
2
Replies

OSPF Query.

RobotAjay
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

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:

 

 
router ospf 1
redistribute connected subnets

This command will redistribute connected routes, including the loopback interface, into OSPF.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

2 Replies 2

balaji.bandi
Hall of Fame
Hall of Fame

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

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

M02@rt37
VIP
VIP

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:

 

 
router ospf 1
redistribute connected subnets

This command will redistribute connected routes, including the loopback interface, into OSPF.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.