Information Technology Reference
In-Depth Information
Remember that changes to the FIB/RIB tables are updated when the IP RIB is cleared using
clear ip route * , the BGP session is reset, or a router is reloaded. All these actions can be
disruptive to the traffic.
NOTE
On each incoming interface, you can enable policy accounting by using the command bgp-
policy accounting . With this command, using destination IP addresses, traffic matching the
criteria is accounted for in its respective bucket. The show cef interface policy-statistics
command displays the per-interface table of traffic counters. The counters can be cleared
using the clear cef interface policy-statistics command.
Using the topology shown in Figure 4-9, an example of BGP policy accounting is demon-
strated here. For the prefix 172.16.0.0/16, the BGP community is set as before. On R3, a
route map is created to update the FIB traffic-index, as shown in Example 4-37.
Example 4-37 Sample BGP Configuration on R3
router bgp 100
table-map Set-policy
neighbor 192.168.23.2 remote-as 100
neighbor 192.168.34.4 remote-as 300
!
ip community-list 1 permit 100:200
!
route-map Set-policy permit 10
match community 1
set traffic-index 1
The updated FIB for the prefix is shown in Example 4-38. To account for the prefix, policy
accounting is enabled on FastEthernet 10/0. This is the incoming interface for traffic destined
for 172.16.0.0. Note that this interface doesn't account for the return traffic, because
the matching is done on the destination address. To account for the return traffic, policy
accounting must be enabled on GigabitEthernet 6/0, and appropriate criteria must be
set using the addresses of AS 300. Example 4-39 shows the accounting statistics on
FastEthernet 10/0.
Example 4-38 FIB Traffic Index for 172.16.0.0
R3#show ip cef 172.16.0.0
172.16.0.0/16, version 23, cached adjacency 192.168.23.2
0 packets, 0 bytes, traffic_index 1
via 192.168.23.2, 0 dependencies, recursive
next hop 192.168.23.2, GigabitEthernet6/0 via 192.168.23.2/32
valid cached adjacency
traffic_index 1
 
Search WWH ::




Custom Search