05-01-2007 12:44 PM - edited 03-03-2019 04:46 PM
Hi Sir,
I have the following OSPF config:
!
int loopback 0
ip addr 172.16.1.1 255.255.255.0
!
router ospf 1
netw 172.16.1.1 0.0.0.0 area 0
!
OSPF advertises the loopback as 172.16.1.1/32. To advertise the subnet (i.e. 172.16.1.0/24), I'd configure:
!
int lo0
ip addr 172.16.1.1 255.255.255.0
ip ospf netw point-to-point
!
Are there any other methods, besides the above, to accomplish the same task?
Please advise.
Thank you.
B.Rgds,
Lim TS
05-01-2007 01:02 PM
Redistributing the connected networks into OSPF would cause the loopback to be advertised with the configured mask.
HTH
Sundar
05-01-2007 02:21 PM
Hi,
I believe that in the first configuration the loopback subnet shall be advertised as /24 not /32. (according to the subnet mask under the interface)
The ip-address and wildcard-mask arguments together allow you to define one or multiple interfaces to be associated with a specific OSPF area using a single command. Using the wildcard-mask argument allows you to define one or multiple interfaces to be associated with a specific OSPF area using a single command, the network command doesn't control how the subnet is advertised.
HTH, please rate if it does help,
Mohammed Mahmoud.
05-01-2007 02:40 PM
Mohammed,
Not exactly. OSPF considers loopbacks as host routes and advertises them as /32.
Here's the quote from RFC2328:
"The interface may be looped back in hardware
or software. The interface will be unavailable for regular
data traffic. However, it may still be desirable to gain
information on the quality of this interface, either through
sending ICMP pings to the interface or through something
like a bit error test. For this reason, IP packets may
still be addressed to an interface in Loopback state. To
facilitate this, such interfaces are advertised in router-
LSAs as single host routes, whose destination is the IP
interface address.[4]"
http://www.faqs.org/rfcs/rfc2328.html
HTH
Sundar
05-01-2007 02:50 PM
Sundar,
Thanks for the Tip, in this case i'd agree with you, redistributing the connected networks into OSPF would cause the loopback to be advertised with the configured mask.
BR,
Mohammed Mahmoud.
05-01-2007 04:34 PM
Hi Sundar,
Thanks for the tip too.
If this router is in the backbone or a normal area, "redistribute connected" is possible and OSPF will advertise 172.16.1.0/24 as E2 route (default).
In the case of the router being in a stub or totally stubby area, "redis conn" is not feasible as ASBR is not allowed in a stub area. So, what other config option do we have, besides configuring "ip ospf netw point-to-point"?
Thank you.
B.Rgds,
Lim TS
05-01-2007 07:38 PM
Lim TS
The other option is under the loopback interface ip ospf network point-to-point. Or accept it being advertised as a /32. Is there a reason why it is problematic to advertise it as a /32?
HTH
Rick
05-02-2007 06:12 PM
I'm in a situation where the /32 is being advertised in OSPF and subsequently redistributed into BGP. The folks on the other side of the BGP connection get crazy when they see such small networks coming across. I know this can be filtered with a route map, but I don't control the BGP router and would rather handle it locally. That being said, would simply adding the "ip ospf network point-to-point" statement fix this even though I have the loopback0 IP with quad 0's as a network statement under OSPF? Thanks.
Joe
05-02-2007 06:35 PM
Joe
I am not sure that I 100% understand your question. But it seems that you assume that the netmask used in the OSPF network statement controls that OSPF advertises. That is NOT the case. The network statement (and its netmask) are used to identify which interfaces are included into the OSPF process. Once the interface is included into the OSPF process then the advertisement in OSPF is based on the subnet mask of the interface and not on the mask of the network statement.
Based on this I believe that the ip ospf network point-to-point should solve your issue.
I hope that solves your issue. If not then perhaps you can clarify a bit what is your issue.
HTH
Rick
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