How the Cisco “Network” Command Works

by Tony DeSimone

You’ve probably wondered what the Cisco network command does?

EIGRP(config-router)# network 172.16.0.0

Or this one?

OSPF(config-router)# network 10.0.0.0  0.255.255.255 area 0

Many of my students, some new to routing and some who have been configuring routers for years, have a little bit of a problem fully understanding these Cisco network commands. Here are some highlights that might help you understand it better:

Enabling a Routing Protocol

When enabling a routing protocol on a Cisco router, the network command serves two purposes. (1) To determine which interface will participate and thus will exchange routes through. (2) To determine which directly connected networks to advertise to the other routers. For example, the first command states (1) this router will exchange EIGRP routes through any interface which has an address in the 172.16.0.0 network and (2) any interface which does have an ip address in the 172.16.0.0 network, take the corresponding network on that interface and advertise it out the other interfaces participating in EIGRP.

Defining The Network Number

The format of the network number defined in the network statement generally does not affect the format of the network being advertised. The routing protocol acting as classful vs classless determines if summarization occurs. Using the second command as an example, if an OSPF router had directly connected subnets of 10.1.0.0/16 and 10.2.0.0/16 the router would not advertise the routes out any of its interfaces as 10.0.0.0.  Being a classless routing protocol, OSPF will advertise both subnets, each with its /16 mask.

Fine Tuning

There are several ways of fine tuning which interfaces will exchange routes. Using the first command as an example, if an EIGRP router had directly connected networks of 172.16.1.0/24 on interface fa0/0 and 172.16.2.0/24 on interface fa1/1, I could get the 172.16.1.0/24 to be advertised, but stop EIGRP from exchanging routes on fa0/0, by making fa0/0 a passive interface. Using the second command as an example, I can use the wildcard bit mask as a means to get specific on which interfaces routes will be exchanged.

There are many more aspects of enabling routing protocols on a Cisco router, more than what can be discussed here, but hopefully you have a better insight on the “network” command.

Related Training:
Implementing and Operating Cisco Enterprise Network Core Technologies (ENCOR)
Enterprise Networking

Related Posts

Leave a Comment

Close Bitnami banner
Bitnami