network

This command specifies prefixes to be imported into BGP.

Syntax

network prefix/length [route-map name][aspath-limit limit] [origin code] [med value] [local-pref value]
no network prefix/length [route-map name][aspath-limit limit] [origin code] [med value] [local-pref value]

Parameters

prefix/length Sets an IPv4 or IPv6 prefix and length of the network to be imported into BGP.
route-map name (Optional) Specifies a route-map to be applied to this network when importing into BGP.
aspath-limit limit (Optional) Specifies the upper limit on AS-path length. Valid values are 0 - 255. Default value is 1.
origin code (Optional) Specifies the origin process attribute. Valid values are:

0 - IGP
1 - EGP
2 - Incomplete

Default value is 0.

med value (Optional) Specifies the multi-exit discriminator value for this route. Valid values are 0 - 4294967295. Default value is 0.
local-pref value (Optional) Specifies a route selection value for this route when the same prefix is learned from multiple peers. Valid values are 1 - 4294967295 seconds. Default value is 100.

Defaults

  • If a route-map is not specified, no route-map is applied.
  • If an aspath-limit is not specified, the aspath-limit is not included in the update.
  • If an origin code is not specified, the origin is set to the default value of 0 (IGP).
  • If a med is not specified, the MED value is not included in the update and MED is treated as though it were set to 0.
  • If local-pref is not specified, the local-pref is set to the default value of 100.

Mode

BGP Router Configuration.

Usage

The network command is used to specify prefixes that should be imported into BGP.

Note

Note

When configuring an optional network parameter, the configured value is applied to all matching routes. It may be preferable to modify these parameters within a route-map to specify the routes to be matched. For the network command, use a redistribution route-map.

The no network command removes the specified network prefixes.

Examples

The following example imports the network 10.1.0.0 with a prefix length of 24 into BGP. Additionally, this network range will be advertised to other peers.

System(su-config)->router bgp 65151
System(su-config-bgp)->bgp router-id 159.1.1.9
System(su-config-bgp)->network 10.1.0.0/24

The following example imports the prefix 2001::/64 into BGP. This network will be advertised based upon the routes1 route-map contents with origin set to IGP.

System(su-config)->router bgp 65151
System(config-router-bgp)-> bgp router-id 1.2.3.4
System(config-router-bgp)-> network 2001::/64 route-map routes1 origin 0