network

This command specifies the OSPF enabled interface(s). If the interface has an address

from range 192.168.1.0/24 then the command below enables ospf on this interface so

the router can provide network information to the other ospf routers via this interface.

Syntax

network a.b.c.d/m area a.b.c.d 
network a.b.c.d/m area number
no network a.b.c.d/m area a.b.c.d 
no network a.b.c.d/m area number  

Command

Description

a.b.c.d/M

Defines the OSPF network prefix.

area a.b.c.d

Defines the OSPF area ID in IP address format.

number

Defines the OSPF area ID as a decimal value in the range of 0 – 4294967295.

Default

NA

Command Mode

Privileged User

Example

If the interface has an address from range 192.168.1.0/24, then the command below enables ospf on this interface so that the router can provide network information to the other ospf routers via this interface.

(config-data)# router ospf     
(conf-router) # network 192.168.1.0/24 area 0.0.0.0