This command specifies prefixes to be imported into BGP.
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. |
BGP Router Configuration.
The network command is used to specify prefixes that should be imported into BGP.
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.
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