OcNOS-RON : Layer 3 Guide : Open Shortest Path First Command Reference : OSPFv2 Commands : network
network
Use this command to enable OSPF routing with a specified area ID (and optionally an instance ID) on interfaces with IP addresses that match the specified network address.
OSPF routing is enabled per IPv4 subnet basis. You define the network address using the prefix length or a subnet mask.
Use the no parameter with this command to disable OSPF routing on the interfaces.
Command Syntax
Network address defined using the prefix length:
network A.B.C.D/M area (A.B.C.D|<0-4294967295>) (instance-id <0-255>|)
no network A.B.C.D/M area (A.B.C.D|<0-4294967295>) (instance-id)
Network address defined using subnet mask:
network A.B.C.D A.B.C.D area (A.B.C.D|<0-4294967295>) (instance-id <0-255>|)
no network A.B.C.D A.B.C.D area (A.B.C.D|<0-4294967295>) (instance-id)
Parameters
A.B.C.D/M
IPv4 network address with prefix length.
A.B.C.D
IPv4 network address.
A.B.C.D
Subnet mask where the bits on left side are set to 1 to represent the network part and the bits on the right side are set to 0 to represent the host part.
area
OSPF area ID
A.B.C.D
OSPF area ID in IPv4 address format.
<0-4294967295>
 
OSPF area ID as a decimal value.
instance-id
Instance ID
<0-255>
Instance ID value.
Default
No network area is configured
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The following the use of the network command with OSPF multiple-instance support disabled.
#configure terminal
(config-router)#network 10.0.0.0/8 area 3
(config-router)#network 10.0.0.0/8 area 1.1.1.1
The following shows the use of the network command with OSPF multiple-instance support enabled.
(config)#router ospf 100
(config-router)#network 10.0.0.0/8 area 3 instance-id 4
Last modified date: 08/28/2023