10-31-2013 11:06 PM - edited 03-04-2019 09:28 PM
In OSPF v2, when we say net 2.1.1.1 0.0.0.0 ar 0. what this command does? for example on a router, say B, when we advertise this command. what this does?
11-01-2013 12:59 AM
Hi,
the ip-address/wildcard combination work similar to the pattern matching in ACLs; all the matching IP-interfaces of the router will be advertised by OSPF. Neighbor-discovery will start on broadcast-capable interfaces by sending OSPF hello as well (as long as you don't configure them as passive interfaces).
In your example, router B will advertise the network of the IP interface which has the exact IP address 2.1.1.1 in Area 0 (if such an IP interface exist).
HTH
Rolf
11-01-2013 04:59 AM
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
Hi, I just want to re-emphasis what Rolf already described. The OSPF network statement doesn't directly advertise a network, it "looks" for "up" interfaces that have an IP that matches against the network statement (als also mentioned by Rolf, somewhat like an ACL). Once if finds such an interface, that interface will be included in the OSPF. As Rolf also notes (by default) active OSPF interface are what are used to form adjacencies with neighboring OSPF routers.
Also, when it comes to what network's mask is, that is determined by the interface's IP mask.
The area parameter determine which OSPF area the interface will be part of.
Something else to note, the network statements can overlap in matching, allowing most of an address block to be assigned to one OSPF area, while allowing more specific subnets, within the address block, to be assigned to another OSPF area.
Usually, you'll see network statements that match specific IPs or you'll see a single network statement that matches all (or many) interfaces IPs.
e.g.
int x
ip address 192.168.1.1 255.255.255.0
int y
ip address 192.168.2.1 255.255.255.0
router ospf #
network 192.168.1.1 0.0.0.0 area #
network 192.168.2.1 0.0.0.0 area #
or
router ospf #
network 192.168.0.0 0.0.255.255 area #
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