11 bgp accounting examples, Bgp accounting examples -43 – Riverstone Networks WICT1-12 User Manual

Page 301

Advertising
background image

Riverstone Networks RS Switch Router User Guide Release 8.0 16-43

BGP Configuration Guide

BGP Configuration Examples

Router R8 has the following CLI configuration:

On R8, the

bgp show routes

command for the network interface 15.4.0.0/16 shows the following output:

Note the community list for this network (1:1), as set with the

route-map

command on R2.

16.3.11

BGP Accounting Examples

BGP accounting allows you to collect statistics on specified IP routes. To use BGP accounting, routes must be learned
through BGP and be selected routes. In other words, the routes must appear in the routing tables (displayed with the

ip show route

command) and BGP must be the routing protocol for the routes.

Then use the

route-map

command to define route-maps and set up the buckets for collecting the BGP traffic

information. (If you are matching communities in the route-map definition, you will need to create the community
lists.) Then apply the route-map to the BGP group or peer. Enable BGP accounting on the interface with the

ip

enable bgp-actg-on

command, then start accounting with the

ip bgp-accounting start

command.

EBGP Accounting Example

The

set-traffic-index

option of the

route-map

command allows buckets to be set up in which BGP traffic

information is collected. In the configuration for R8 shown in

Figure 16-12

, the routing updates that match the

route-map configurations are set to traffic indexes 1, and 2.

ip-router global set autonomous-system 65100
ip-router policy create community-list 11 "1:1"
ip-router policy create community-list 12 "1:2"
route-map 11 permit 1 match-community-list 11 set-traffic-index 1
route-map 11 permit 2 match-community-list 12 set-traffic-index 2
bgp create peer-group ebgp autonomous-system 2 type external
bgp add peer-host 15.2.1.1 group ebgp
bgp set preference 9
bgp set peer-group ebgp route-map-in 11
bgp start

BGP routing table entry for 15.4/16
Path: Best
Source: 15.2.1.1
Advertised to(Tasks):
None:
Local AS: 65100 Peer AS: 2 Age: 1:18:20
NextHop: 15.2.1.1 MED: -1 Local Preference: -1
AS Path: (65100) 2 IGP (Id 38)
Community: 1:1

Advertising