Help Docs

Configuring Cisco NetFlow BGP

Border Gateway Protocol (BGP) is a standardized exterior gateway protocol designed to exchange routing and reachability information among autonomous systems (AS) on the internet. BGP is defined in RFC 1771 and provides loop-free interdomain routing. An autonomous system (AS) is a set of routers that operate under the same administration. BGP is often run among the networks of internet service providers (ISPs).

Enabling BGP routing

Enter the global configuration mode and execute the following commands to enable BGP routing and establish a BGP routing process:

Command Purpose
router bgp as-number Enables the BGP routing process, which places the router in router configuration mode
network network-number [mask network-mask] [route-map route-map-name] Flags a network as local to the autonomous system and enters it to the BGP table

Configuring BGP neighbors

BGP supports two kinds of neighborsinternal and external. Internal neighbors are in the same autonomous system while external neighbors are in different autonomous systems. Normally, external neighbors are adjacent to each other and share a subnet, while internal neighbors may be anywhere in the same autonomous system.

To configure BGP neighbors, execute the following command in router configuration mode:

neighbor {ip-address|peer-group-name} remote-as as-number

Here's an example to show how BGP neighbors are configured on an autonomous system to share information:

router bgp 109
network 131.108.0.0
network 192.31.7.0
neighbor 131.108.200.1 remote-as 167
neighbor 131.108.234.2 remote-as 109
neighbor 150.136.64.19 remote-as 99

Understanding the configuration:

  • A BGP router is assigned to autonomous system 109, and two networks are listed as originating in the autonomous system.
  • Then the addresses of three remote routers (and their autonomous systems) are listed.
  • The router being configured will share information about networks 131.108.0.0 and 192.31.7.0 with the neighboring routers.
  • The first router listed is in a different autonomous system; the second neighbor's remote-asrouter configuration command specifies an internal neighbor (with the same autonomous system number) at address 131.108.234.2 and the third neighbor's remote-as router configuration command specifies a neighbor on a different autonomous system.

Including AS information in NetFlow exports

If you have configured BGP on your network, and want NetFlow to report on autonomous systems, execute the following command on the router in global configuration mode:

Command Purpose
ip flow-export destination{hostname|ip_address}9996 Exports the NetFlow cache entries to the specified IP address. Use the IP address of the Site24x7 On-Premise Poller server and the configured NetFlow listener port. Though the default port is 9996, the port number may vary. Learn how to find the port number of your On-Premise Poller.
ip flow-export {version}[peer-as | origin-as] Exports NetFlow cache entries in the specified version format (5 or 7). If your router uses BGP, you can specify that either the origin or peer ASs are included in exports. You cannot include both.


Was this document helpful?

Shortlink has been copied!