Network Command on CISCO Router/Switch

Command

Network

Use

Specifies which interfaces will participate in the OSPF process.

Syntax

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

Options

<network address> Any interface with this network address will be added into OSPF.
<wildcard masks> Sets how specific the network statement is: 192.168.1.0 0.0.0.255 would match any address starting with 192.168.1.

Example

Network Command on CISCO Router/Switch 1

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

R2(config)#router ospf 1
R2(config-router)#network 0.0.0.0 255.255.255.255 area 0

*Mar 1 01:13:48.083: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
*Mar 1 01:13:48.083: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on FastEthernet0/0 from LOADING to FULL, Loading Done

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

R2(config-router)#do show ip route ospf
1.0.0.0/32 is subnetted, 3 subnets
O 1.1.1.1 [110/2] via 10.1.1.1, 00:04:16, FastEthernet0/0
O 1.3.3.3 [110/2] via 10.1.1.1, 00:04:16, FastEthernet0/0
O 1.2.2.2 [110/2] via 10.1.1.1, 00:04:16, FastEthernet0/0
192.168.13.0/30 is subnetted, 1 subnets
O 192.168.13.0 [110/65] via 10.2.2.3, 00:04:16, FastEthernet1/0
[110/65] via 10.1.1.1, 00:04:16, FastEthernet0/0
33.0.0.0/32 is subnetted, 1 subnets
O 33.33.33.33 [110/2] via 10.2.2.3, 00:04:16, FastEthernet1/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 10.2.2.3, 00:04:16, FastEthernet1/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/2] via 10.1.1.1, 00:04:16, FastEthernet0/0
10.0.0.0/24 is subnetted, 3 subnets
O 10.4.4.0 [110/65] via 10.2.2.3, 00:04:16, FastEthernet1/0
[110/65] via 10.1.1.1, 00:04:16, FastEthernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/2] via 10.1.1.1, 00:04:16, FastEthernet0/0
133.133.0.0/32 is subnetted, 1 subnets
O 133.133.133.133 [110/2] via 10.2.2.3, 00:04:16, FastEthernet1/0
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x