The network command as used in IOS to configure routers and routing tables, particularly in the context of Dynamic routing protocols. It’s basic usage is:
R1(config-router)#network 10.0.0.0 (0.0.255.255) -- optional argument in brackets
This means the following:
- Look for interfaces with an IP address that fall within this range
- Enable the Interior gateway protocols (IGPs) on those interfaces - send out and listen for hello messages, and peer with IGP adjacencies routers
- Advertise the network and mask which is configured on those interfaces
Important
In the scenario above, all the networks that fall within the
10.0.0.0/8range will be advertised, but10.0.0.0/8itself will not be.
A different example is one where we use the following command:
R1(config-router)#network 10.0.0.0 0.0.255.255
In this scenario, all the networks that start with 10.0 will be advertised. For example, 10.0.1.0/24 and 10.0.2.0/24 would be advertised, but 10.1.0.0/24 and 10.0.0.0/16 are not.