实验要求
在 R2上基于PVC来分配带宽,PVC201可以分得20%的带宽,PVC203分得55%的带宽
R1
conf t
int s2/0
ip ad 10.1.1.1 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.1.2 102 b
frame map ip 10.1.1.3 102 b
no shut
end
 
 
R2
conf t
int s 2/0
ip ad 10.1.1.2 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.1.1 201 b
frame map ip 10.1.1.3 203 b
no shut
exit
class-map match-all PVC201                     步骤1   建立一个class map来表示网络流量
match fr-dlci 201                                                          指定DLCI号作为匹配标准
class-map match-all PVC203
match fr-dlci 203
exit
policy-map PVC                                              步骤2  创建一个policy map
class PVC201                                                              应用class map到policy map中
bandwidth percent 20                                               设定带宽的百分比
class PVC203
bandwidth percent 55
int s2/0
service-policy output PVC                           步骤3  把policy map绑定到接口的出方向
end
 
 
R3
conf t
int s 2/0
ip ad 10.1.1.3 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.1.1 302 b
frame map ip 10.1.1.2 302 b
no shut
end
 
 
校验
R2#ping 10.1.1.1        
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/39/108 ms

R2#ping 10.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/51/176 ms
 
 

R2#sh policy-map int s2/0
 Serial2/0
  Service-policy output: PVC
    Class-map: PVC201 (match-all)
      10 packets, 1040 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: fr-dlci 201
      Queueing
        Output Queue: Conversation 265
        Bandwidth 20 (%)
        Bandwidth 231 (kbps) Max Threshold 64 (packets)
        (pkts matched/bytes matched) 10/1040
        (depth/total drops/no-buffer drops) 0/0/0
    Class-map: PVC203 (match-all)
      10 packets, 1040 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: fr-dlci 203
      Queueing
        Output Queue: Conversation 266
        Bandwidth 55 (%)
        Bandwidth 849 (kbps) Max Threshold 64 (packets)
        (pkts matched/bytes matched) 10/1040
        (depth/total drops/no-buffer drops) 0/0/0