You could actually use any of the two examples to enable OSPF on a given interface.
The first example would enable OSPF on the interface configured with the specific /32 but would advertise whatever subnet mask configured on the interface.
The second example would enable OSPF on any interface with an IP address in the /24 ranges (192.168.0.0/24 and 192.168.1.0/24) and would also advertise the subnets configured on the different interfaces.
Hope this helps,
Harold Ritter Sr. Technical Leader CCIE 4168 (R&S, SP) firstname.lastname@example.org México móvil: +52 1 55 8312 4915 Cisco México Paseo de la Reforma 222 Piso 19 Cuauhtémoc, Juárez Ciudad de México, 06600 México
Both options will work if 192.168.0.1 & 192.168.1.1 are IP addresses of interfaces on the router. The inverse mask is there to limit (or expand) the interfaces OSPF runs on and what gets advertised. For example if you had the following:
interface 1 192.168.0.1/26
interface 2 192.168.0.65/26
interface 3 192.168.0.129/26
interface 4 192.168.0.193/26
Then you could control individually ospf on each interface with the commands:
router ospf 1
network 192.168.0.1 0.0.0.0 area 0
network 192.168.0.66 0.0.0.0 area 0
network 192.168.0.129 0.0.0.0 area 0
network 192.168.0.193 0.0.0.0 area 0
(You could also make the interfaces be in different areas by changing the 'area')
If you didn't need the flexibility and just wanted all the interfaces to be in area 0 then configuring the following will accomplish this as the inverse mask covers all the interface addresses:
router ospf 1
network 192.168.0.0 0.0.0.255 area 0
I generally try to add interface addresses individually (with 0.0.0.0 inverse masks). On Distribution switches though where you are terminating a lot of access vlans/subnets it is good practise to make these subnets contiguous and use a wildcard in the inverse mask. That way the configuration is kept simpler (smaller).
Whatever the inverse mask of the network command is there is no difference in how OSPF advertises the networks though; i.e. if an interface has a /30 mask the network LSA will be /30 (unless of course you are summarising with network range commands).
OK.. the network statement in OSFP configuration is to tell router which interface to participate in OSPF routing. It has nothing to do with the route advertisement. That is.
The first config with 0.0.0.0 mask tell your router the exact interface to run OSPF.
The second config with 0.0.0.255 mask tell your router any interfaces that match the mask to run OSPF.
Normally, network 192.168.0.1 0.0.0.255 area 0, config should look like this network 192.168.0.0 0.0.0.255 area 0, after you entered into your router. the router would change the .1 to .0 and any interface within this mask .0 - .255 will run OSPF.
The same rule apply to this statement network 0.0.0.0 255.255.255.255 area 0 this rule tells the router that any interface with a ip address would participate in OSPF routing.
The basic difference lies in the wildcard mask concept.In a wildcard mask which ever bits are zero are considered significant(exactly opposite to what u have in a subnet mask !! ).
Here in the first case since all bits of the WC Mask are zero, ospf will add 192.168.0.1 and 192.168.1.1 ONLY to the table(since an exact match had to be made).But in the second case since first 24 bits are zero,only those 24 bits are matched ..which means that the network(192.168.0.0 and 192.168.1.0) will be added as such.....
Hi everyone, I would like to thank you in advance for any help you can provide a newcomer like myself!
Im studying the 100-105 book by Odom and am currently on the topic of Port security. I purchased a used 2960 and I'm trying to follow a...
While deploying a number of 18xx/2802/3802 model access points (APs), which run AP-COS as their operating platform. It can be observed on some occasions that while many of their access points were able to join the fabric WLC withou...
I am going to design and build an LAN network under a tunnel underground with long distance between the switches.
I will have 2 Catalyst switches and 8 Industrial IE3000, and they will be connected with fiber.
For now I am planning on use Layer-2 s...