Name
network — router
Synopsis
BGP:
networknetwork-number
[masknetwork-mask
] no networknetwork-number
[masknetwork-mask
]
IGRP/EIGRP/RIP:
networknetwork-address
no networknetwork-address
OSPF:
networknetwork-address wildcard-mask
areaarea-id
no networknetwork-address wildcard-mask
areaarea-id
Configures
The network for which the routing process is responsible
Default
None
Description
The network
command provides a way to tell the routing process what networks it is responsible for. With IGRP, EIGRP, RIP, and, to a degree, BGP, all you need to do is list the network addresses (one per line) for the routing process. To remove a network from the routing process, use the no
form of the command.
In OSPF, the network
command requires three parameters: a network-address
, a wildcard-mask
, and an area-id
. You must include the area ID. The wildcard mask specifies the portion of an IP address that isn’t part of the network address; for example, a 24-bit mask subnet would use the wildcard mask 0.0.0.255. An interface can be attached only to a single OSPF area. If the address ranges (i.e., address/mask combinations) of two network commands overlap, the OSPF process takes the first match and ignores the rest.
For BGP, the network address is specified using a subnet mask, not a wildcard mask; for example, an 8-bit subnet would use the subnet mask 255.255.255.0. The mask is optional. If it is omitted, a mask of 255.255.255.0 is assumed.
Example
The following commands define a network for RIP and EIGRP ...
Get Cisco IOS in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.