Network Command on CISCO Router/Switch

Other Cisco Other Cisco Material Original source

Command

Network

Use

Specifies which interfaces will participate in the OSPF process.

Syntax

Router(config-router)#network area

Options

Any interface with this network address will be added into OSPF.
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

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

Copy

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.

Copy

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
← All Other Cisco articles Home