Cisco 3550連接埠限速例子

來源:互聯網
上載者:User

一、網路說明

PC1接在Cisco3550 F0/1上,速率為1M;
PC1接在Cisco3550 F0/2上,速率為2M;
Cisco3550的G0/1為出口。

二、詳細配置過程
註:每個介面每個方向只支援一個策略;一個策略可以用於多個介面。因此所有PC的下載速率的限制都應該定義在同一個策略(在本例子當中
為policy-map user-down),而PC不同速率的區分是在Class-map分別定義。

1、在交換器上啟動QOS
Switch(config)#mls qos //在交換器上啟動QOS

2、分別定義PC1(10.10.1.1)和PC2(10.10.2.1)存取控制清單
Switch(config)#access-list 10 permit 10.10.1.0 0.0.0.255 //控制pc1上行流量
Switch(config)#access-list 100 permit any 10.10.1.0 0.0.0.255 //控制pc1下行流量
Switch(config)#access-list 11 permit 10.10.2.0 0.0.0.255 //控制pc2上行流量
Switch(config)#access-list 111 permit any 10.10.2.0 0.0.0.255 //控制pc2下行流量

3、定義類,並和上面定義的存取控制清單綁定
Switch(config)# class-map user1-up //定義PC1上行的類,並綁定訪問列表10
Switch(config-cmap)# match access-group 10
Switch(config-cmap)# exit
Switch(config)# class-map user2-up
Switch(config-cmap)# match access-group 11 //定義PC2上行的類,並綁定訪問列表10
Switch(config-cmap)# exit
Switch(config)# class-map user1-down
Switch(config-cmap)# match access-group 100 //定義PC1下行的類,並綁定訪問列表100
Switch(config-cmap)# exit
Switch(config)# class-map user2-down
Switch(config-cmap)# match access-group 111 //定義PC2下行的類,並綁定訪問列表111
Switch(config-cmap)# exit

4、定義策略,把上面定義的類綁定到該策略
Switch(config)# policy-map user1-up //定義PC1上行的速率為1M
Switch(config-pmap)# class user1-up
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 1024000 1024000 exceed-action drop
Switch(config)# policy-map user2-up //定義PC2上行的速率為2M
Switch(config-pmap)# class user2-up
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 2048000 1024000 exceed-action drop
Switch(config)# policy-map user-down
Switch(config-pmap)# class user1-down
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 1024000 1024000 exceed-action drop
Switch(config-pmap-c)# exit
Switch(config-pmap)# class user2-down
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 2048000 1024000 exceed-action drop
Switch(config-pmap-c)# exit

5、在介面上運用策略
Switch(config)# interface f0/1
Switch(config-if)# service-policy input user1-up
Switch(config)# interface f0/2
Switch(config-if)# service-policy input user2-up
Switch(config)# interface g0/1
Switch(config-if)# service-policy input user-down 文章錄入:csh 責任編輯:csh

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.