The Network Command

Share This

The network command has the same function as in all IGP routing protocols. It enables any interface on this router that matches the network address. It enables EIGRP routing on an interface, using the command in router configuration mode and enter the classful network address for each directly connected network. The command syntax is as under

Router(config-router)# network <ipv4-network-address>

The ipv4-network-address is the classful IPv4 network address for this interface. I am using the same topology as already used in the “EIGRP router command” article. The topology is illustrated in figure 1. The configuration of the network is the following:

Network Command

Router R1

R1(config)#router eigrp 1

R1(config-router)# eigrp router-id 1.1.1.1

R1(config-router)# network 10.0.0.0

R1(config-router)# 192.168.0.0

Router R2

R2(config)#router eigrp 1

R2(config-router)# eigrp router-id 2.2.2.2

R2(config-router)# network 10.0.0.0

R2(config-router)# 192.168.1.0

Router R3

R3(config)#router eigrp 1

R3(config-router)# eigrp router-id 3.3.3.3

R3(config-router)# network 10.0.0.0

R3(config-router)# 192.168.2.0

Figure 2 illustrates the network command used to enable EIGRP on R1’s interfaces for subnets 10.0.0.0. When EIGRP is configured on R1’s for network 10.0.0.0, DUAL sends a notification message to the console stating that a neighbour adjacency with another EIGRP router on that interfaces GigabitEthernet 0/0 and GigabitEthernet 0/1 has been established. This new adjacency happens automatically because both R1 and R2 use the same eigrp 1 autonomous system number, and the auto summarization is enabled on EIGRP, so, both routers now can send updates on their interfaces in their network.

The Network Command 7

The Network Command and Wildcard Mask

When we use the network command for IPv4 network address, such as 10.0.0.0, all interfaces on the router that belong to that classful network address are enabled for EIGRP. So, there are possibilities when you do not want to incorporate all interfaces within a network when enabling EIGRP. For example, in Figure 1, assume that you want to enable EIGRP on R2, but only for the subnet 10.10.10.0 255.255.255.252, on the G0/1 interface.

To configure EIGRP to advertise specific subnets only we will use the wild card mask with the network command. The command syntax for using wildcard mask is as under :

Router(config-router)# network <network-address> <wildcard-mask>

Wildcard mask as the opposite of a subnet mask. For example, the inverse of the subnet mask 255.255.255.252 is 0.0.0.3. To calculate the wildcard mask of the subnet mask, deduct the subnet mask from 255.255.255.255 as shown in figure 3:

The Network Command 8

The network <network-address> <wildcard-mask> command particularly enables EIGRP on the particular interfaces. The configurations of the above topology using wildcard mask are as under.

Router R1

R1(config)#router eigrp 1

R1(config-router)# eigrp router-id 1.1.1.1

R1(config-router)# network 10.10.10.0 0.0.0.3

R1(config-router)# network 10.10.10.4 0.0.0.3

R1(config-router)# 192.168.0.0 0.0.0.255

Router R2

R2(config)#router eigrp 1

R2(config-router)# eigrp router-id 2.2.2.2

R2(config-router)# network 10.10.10.4 0.0.0.3

R2(config-router)# network 10.10.10.8 0.0.0.3

R2(config-router)# 192.168.1.0 0.0.0.255

Router R3

R3(config)#router eigrp 1

R3(config-router)# eigrp router-id 3.3.3.3

R3(config-router)# network 10.10.10.8 0.0.0.3

R3(config-router)# network 10.10.10.0 0.0.0.3

R3(config-router)# 192.168.2.0 0.0.0.255

Some versions of the Cisco IOS support the subnet mask instead of a wildcard mask. if the subnet mask is used, the Cisco IOS converts the command to the wildcard-mask format within the configuration. We can verify this using the show running -config command.

(Visited 24 times, 24 visits today)
Share This