cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
422
Views
0
Helpful
4
Replies

OSPF

klaudia
Level 1
Level 1

what is the use of defining a single interface network address in the 'network' configuration command?

4 Replies 4

thisisshanky
Level 11
Level 11

i guess u r asking for an explanation of...network command of the form.

network 10.1.1.1 0.0.0.0 area X

where 10.1.1.1 is the ip address of the interface

and 0.0.0.0 is a host mask...

This type of network commands, help in ease of configuration of OSPF, rather than calculating a wild card mask appropriate for that particular subnet.

For example, assume a interface with ip address 10.1.1.1/30.

To configure OSPF, you can use two methods on this interface.

router ospf 10

network 10.1.1.0 0.0.0.3 area 0

or

router ospf 10

network 10.1.1.1 0.0.0.0 area 0

both the commands would work. In the first case, I had to calculate the wild card mask for the specific network (10.1.1.0/30). In the second case, instead of specifying a network address on the command, i specified the whole ip address, and used a host mask 0.0.0.0 instead. This way, I dont need to calculate the wild card mask.

(An easy way to calculate wild card mask is to subtract the subnet mask of the interface from 255.255.255.255. ....see this example...

10.1.1.1/30

/30 is 255.255.255.252

Subtracting this from 255.255.255.255 -

255.255.255.252

---------------------------------------------------------

0. 0. 0. 3

That is the wild card mask needed to configure OSPF is 0.0.0.3

You could either of the methods..The specific single interface ip address command being the better.

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

What I actually meant ( i'm sorry for making it vague, but still-thank you for your input! ) was: what is the purpose of advertising the IP address of an interface instead of a subnet reachable via this interface? How is this information relevant for routers running OSPF and including such route entry in their routing table? Shouldn't they be more concerned about reachability of actual subnets? Why this host address??

the host could be a loopback address , these are commonly depicted as a hos address

Yes, in order to advertise the loopback address with the 'network' command you wouldn't configure the network the address belongs to, but hte actual host address. That's fine. But if with the 'network' command you specify the ip address of a serial interface, not the subnet it belongs to, I don't see the point. (e.g. you advertise 10.1.1.1 0.0.0.0 instead of 10.1.1.0 0.0.0.255) what is the purpose of such a host address entry in the routing tableof other routers?