network

Configures the device to advertise a BGP network.

Syntax

network network/mask [ backdoor | route-map map-name | weight num ]
no network network/mask [ backdoor | route-map map-name | weight num ]

Command Default

No network is advertised.

Parameters

network/mask
Network and mask in CIDR notation.
backdoor
Changes administrative distance of the route to this network from the eBGP administrative distance (the default is 20) to the local BGP weight (the default is 200), tagging the route as a backdoor route.
route-map map-name
Specifies a route map with which to set or change BGP attributes for the network to be advertised. Range is from 1 through 63 ASCII characters.
weightnum
Specifies a weight to be added to routes to this network. Range is 0 through 65535. The default is 0.

Modes

BGP address-family IPv4 unicast configuration mode

BGP address-family IPv6 unicast configuration mode

BGP address-family IPv4 unicast VRF configuration mode

BGP address-family IPv6 unicast VRF configuration mode

Usage Guidelines

Use the no form of the command to restore the defaults.

Examples

This example imports the IP prefix 10.1.1.1/32 into the BGP4 database and specifies a route map called “myroutemap”.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# network 10.1.1.1/32 route-map myroutemap

This example imports the IPv6 prefix 2001:db8::/32 into the BGP4+ database and sets a weight of 300.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv6 unicast
device(config-bgp-ipv6u)# network 2001:db8::/32 weight 300