QoS Policy Propagation via BGP(QPPB)的应用

 
R1属于AS10,R2属于AS20,R3属于AS30
R1的L0(1.1.1.1/24),发布到BGP中
在R2上使用QPPB来给BGP中学到的路由设置QOS属性,使得从R3发到1.1.1.0/24网段的流量被CAR限速
R1
conf t
int l 0
ip ad 1.1.1.1 255.255.255.0
int f 0/0
ip ad 10.1.1.1 255.255.255.0
no shut
router rip
ver 2
no au
net 10.0.0.0
router bgp 10
no au
no sy
nei 10.1.1.2 remote-as 20
net 1.1.1.0 mask 255.255.255.0
end
 
 
R2
conf t
int f 0/0
ip ad 10.1.1.2 255.255.255.0
no shut
int s 2/0
ip ad 10.1.2.2 255.255.255.0
clock rate 64000
no shut
router rip
ver 2
net 10.0.0.0
router bgp 20
no au
no sy
nei 10.1.1.1 remote-as 10
nei 10.1.2.3 remote-as 30
exit
access-list 1 permit 1.1.1.0
route-map QPPB permit 10
match ip ad 1
set ip qos-group 2
exit
router bgp 20
table-map QPPB
int s2/0
bgp-policy destination ip-qos-map
rate-limit input qos-group 2 5000000 4000 8000 conform-action transmit exceed-action drop
end
 
 
R3
conf t
int s2/0
ip ad 10.1.2.3 255.255.255.0
no shut
router rip
ver 2
no au
net 10.0.0.0
router bgp 30
no au
no sy
nei 10.1.2.2 remote-as 20
end
 
 
校验
R2#sh int s2/0 rate-limit
Serial2/0
  Input
    matches: qos-group 2
       params:  5000000 bps, 4000 limit, 8000 extended limit
      conformed 0 packets, 0 bytes; action: transmit
      exceeded 0 packets, 0 bytes; action: drop
      last packet: 2379508ms ago, current burst: 0 bytes
      last cleared 00:00:24 ago, conformed 0 bps, exceeded 0 bps
 
R2#sh ip int s 2/0
Serial2/0 is up, line protocol is up
  。。。。。。。。。。。。。。  
  BGP Policy Mapping is enabled (output ip-qos-map)
 
QPPB的配置步骤参考
1,基于community list的配置
conf t
route-map <name> [ permit | deny [seq]]
match community-list <num>
set ip precedence [<num> | <name>]
router bgp <as>
table-map <route-map-name>
exit
ip community-list <num> { permit | deny} <community number>
int <id>
bgp-policy {soutce | destination} ip-prec-map
 
2,基于AS path的配置
conf t
route-map <name> [permit | deny [seq] ]
match as-path <path-list-number>
set ip precedence <num>
router bgp <as>
table-map <route-map-name>
exit
ip as-path access-list <num> {permit | deny} <as-regular-expression>
int <id>
bgp-policy {source | destination} ip-prec-map
 
3,基于ACL的配置
conf t
route-map <name> [ permit | deny [<seq>] ]
match ip address <acl>
set ip precedence <num>
router bgp <as>
table-map <route-map-name>
exit
access-list <num> {permit | deny} <source-ip>
int <id>
bgp-policy {source | destination} ip-prec-map

本文出自 “穿过地狱去看海” 博客,谢绝转载!

你可能感兴趣的:(职场,路由,休闲,BGP)