Network Command on CISCO Router/Switch

Command

Network

Use

Specifies which interfaces will participate in the EIGRP process.

Syntax

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

Example

In this example, we will configure EIGRP 100 on all routers in the topology.

R1(config)#router eigrp 100
R1(config-router)#no auto
R1(config-router)#network 10.4.4.4
R1(config-router)#network 1.1.1.1

R1(config-router)#do sh run | sec eigrp
router eigrp 100
network 1.0.0.0
network 10.0.0.0
no auto-summary

Notice that EIGRP also stripes the network statements back to its classful network boundary.

3(config)#router eigrp 100
R3(config-router)#no auto
R3(config-router)#network 3.3.3.3
R3(config-router)#network 10.4.4.4
R3(config-router)#do sh run | sec eigrp
router eigrp 100
network 3.0.0.0
network 10.0.0.0
no auto-summary

If we configure the network statement with a wildcard, we can control what interfaces are put into EIGRP.

R2(config)#router eigrp 100
R2(config-router)#no auto
R2(config-router)#network 2.2.2.2 0.0.0.0
R2(config-router)#network 10.1.1.2 0.0.0.0
R2(config-router)#network 10.2.2.2 0.0.0.0

*Mar 1 00:31:25.231: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 10.1.1.1 (FastEthernet0/0) is up: new adjacency

*Mar 1 00:35:35.423: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 10.2.2.3 (FastEthernet1/0) is up: new adjacency

R2(config-router)#do sh run | sec eigrp
router eigrp 100
network 2.2.2.2 0.0.0.0
network 10.1.1.2 0.0.0.0
network 10.2.2.2 0.0.0.0
no auto-summary

Notice that we have all of R1’s loopbacks in R2’s routing table.

R2(config-router)#do show ip route eigrp
1.0.0.0/32 is subnetted, 3 subnets
D 1.1.1.1 [90/156160] via 10.1.1.1, 00:15:40, FastEthernet0/0
D 1.3.3.3 [90/156160] via 10.1.1.1, 00:15:40, FastEthernet0/0
D 1.2.2.2 [90/156160] via 10.1.1.1, 00:15:40, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
D 3.3.3.3 [90/156160] via 10.2.2.3, 00:11:33, FastEthernet1/0

Here, the running config is shown for R2. Note that the router strips the ip to the classful boundary.

R2(config)#do show run | sec router
router rip
version 2
network 2.0.0.0
network 10.0.0.0
no auto-summary

Related Articles

Leave a Reply

avatar