Using the Network Command

With the network command, the user explicitly specifies the Network IP prefix to be injected into BGP. The route will be injected into BGP for advertisement to BGP peers as long as the local router has a route to the prefix with a reachable next-hop. The network command supports the injection of the default route (0.0.0.0/0) into BGP, if the route is present in the routing table.

Use the network command, specifying the network prefix and length and optionally specifying the route-map, AS-path limit, origin, MED, and local preference attributes for the route, to inject a route into BGP.

The following example imports the network 10.1.0.0 with a mask of 255.255.255.0 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