OSPF Network Command
int fa0/0
ip add 192.168.1.1 255.255.255.0
no shut
What is the difference between
router ospf 1
192.168.1.1 0.0.0.255 area 0
AND
router ospf 1
192.168.1.1 0.0.0.0 area 0
They will both advertise the route right?
ip add 192.168.1.1 255.255.255.0
no shut
What is the difference between
router ospf 1
192.168.1.1 0.0.0.255 area 0
AND
router ospf 1
192.168.1.1 0.0.0.0 area 0
They will both advertise the route right?
Comments
-
networker050184 Mod Posts: 11,962 ModThe network statement doesn't tell the router what to advertise. It tells the router which interface to participate in the process. So if an interface IP falls within the range of the network command it participates in that area and advertises the attached network and mask.
So, in your case for the first one any interface with IP 192.168.1.1-255 will take part in the OSPF process. The second one only an interface with the IP 192.168.1.1 exactly will participate in the process. Again, what get advertised depends on the mask on the actual interface.An expert is a man who has made all the mistakes which can be made.