Home | Mirror | Search

5. 流量控制

5.1. 基于介面

cir 它必須是64的倍數

qos lr outbound cir 64 64Kbps

qos lr outbound cir 1024 1Mbps

[H3C-GigabitEthernet1/0/18]di this
#
interface GigabitEthernet1/0/18
 port access vlan 9
 qos lr outbound cir 64 cbs 4000
 qos apply policy 20 inbound
 dhcp-snooping trust
#
return
			

察看狀態

display qos lr interface GigabitEthernet 1/0/18
			

5.2. 基于 ACL

acl number 3009
rule 0 permit ip source 192.168.9.0 0.0.0.255

traffic classifier traffic-limit
if-match acl 3009

traffic behavior traffic-limit
car cir 1024

qos policy traffic-limit
classifier traffic-limit behavior traffic-limit

interface GigabitEthernet1/0/18
qos apply policy traffic-limit inbound
			
[H3C]acl number 3009
[H3C-acl-adv-3009]rule 0 permit ip source 192.168.9.0 0.0.0.255
[H3C-acl-adv-3009]
[H3C-acl-adv-3009]traffic classifier traffic-limit
[H3C-classifier-traffic-limit]if-match acl 3009
[H3C-classifier-traffic-limit]
[H3C-classifier-traffic-limit]traffic behavior traffic-limit
[H3C-behavior-traffic-limit]car cir 1024
Warning: CBS is smaller than (100/16)CIR, and this maybe effect network traffic burst.
[H3C-behavior-traffic-limit]
[H3C-behavior-traffic-limit]qos policy traffic-limit
[H3C-qospolicy-traffic-limit]classifier traffic-limit behavior traffic-limit
[H3C-qospolicy-traffic-limit]
[H3C-qospolicy-traffic-limit]interface GigabitEthernet1/0/18
[H3C-GigabitEthernet1/0/18]qos apply policy traffic-limit inbound

			
display traffic behavior user-defined traffic-limit

[H3C-GigabitEthernet1/0/18]display traffic behavior user-defined traffic-limit
  User Defined Behavior Information:
    Behavior: traffic-limit
      Committed Access Rate:
        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)
        Green Action: pass
        Red Action: discard
        Yellow Action: pass


[H3C-GigabitEthernet1/0/18]display traffic behavior user-defined
  User Defined Behavior Information:
    Behavior: traffic-limit
      Committed Access Rate:
        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)
        Green Action: pass
        Red Action: discard
        Yellow Action: pass
    Behavior: 3
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.30.254
    Behavior: 2
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.20.1
    Behavior: 1
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.40.254
			
[H3C-GigabitEthernet1/0/18]display qos policy user-defined

  User Defined QoS Policy Information:

  Policy: 20
   Classifier: 20
     Behavior: 2
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.20.1

  Policy: traffic-limit
   Classifier: traffic-limit
     Behavior: traffic-limit
      Committed Access Rate:
        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)
        Green Action: pass
        Red Action: discard
        Yellow Action: pass

  Policy: 2
   Classifier: 2
     Behavior: 1
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.40.254

  Policy: 1
   Classifier: 1
     Behavior: 1
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.40.254

[H3C-GigabitEthernet1/0/18]display qos policy user-defined traffic-limit

  User Defined QoS Policy Information:

  Policy: traffic-limit
   Classifier: traffic-limit
     Behavior: traffic-limit
      Committed Access Rate:
        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)
        Green Action: pass
        Red Action: discard
        Yellow Action: pass
			
[H3C-GigabitEthernet1/0/18]display qos policy interface

  Interface: GigabitEthernet1/0/3

  Direction: Inbound

  Policy: 2
   Classifier: 2
     Operator: OR
     Rule(s) : If-match acl 3000
     Behavior: 1
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.40.254

  Interface: GigabitEthernet1/0/12

  Direction: Inbound

  Policy: 1
   Classifier: 1
     Operator: AND
     Rule(s) : If-match acl 3001
     Behavior: 1
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.40.254

  Interface: GigabitEthernet1/0/17

  Direction: Inbound

  Policy: 20
   Classifier: 20
     Operator: OR
     Rule(s) : If-match acl 3020
     Behavior: 2
      Redirect enable:
        Redirect type: next-hop
        Redirect destination:
          192.168.20.1

  Interface: GigabitEthernet1/0/18

  Direction: Inbound

  Policy: traffic-limit
   Classifier: traffic-limit
     Operator: AND
     Rule(s) : If-match acl 3009
     Behavior: traffic-limit
      Committed Access Rate:
        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)
        Green Action: pass
        Red Action: discard
        Yellow Action: pass
        Green : 230(Packets)
[H3C-GigabitEthernet1/0/18]display qos policy interface GigabitEthernet1/0/18

  Interface: GigabitEthernet1/0/18

  Direction: Inbound

  Policy: traffic-limit
   Classifier: traffic-limit
     Operator: AND
     Rule(s) : If-match acl 3009
     Behavior: traffic-limit
      Committed Access Rate:
        CIR 1024 (kbps), CBS 4000 (byte), EBS 4000 (byte)
        Green Action: pass
        Red Action: discard
        Yellow Action: pass
        Green : 236(Packets)
			
comments powered by Disqus