1. Trang chủ
  2. » Công Nghệ Thông Tin

bài viết qos

22 326 1
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Bài Viết QoS Tác giả Lê Văn Cương QoS: CoS,CAR - CBWFQ. Giới thiệu về CoS. Đối vơi các Switch L2 thì nó chỉ truyền frame theo phương thức best-effort delivery. Tuy nhiên khi có kết nối trunk giữa hai switch thì có thể sử dụng CoS để ứng dụng QoS để phẩn phối các gói theo Priority Đối với đường trunk sử dụng dot1q thì mỗi trong trường User có 12 bit trong dó có 3 bit đựoc sử dụng để chỉ giá trị CoS. Giá trị này từ 0-7, với priority càng cao càng tốt. Tương tự đối với ISL thì 3 bit trong 4 bit ở trường User sẻ sử dụng làm CoS Giới thiệu về DSCP: L3 Trong gói IP luôn có một trường gọi là ToS. Trong đố 3 bit được sử dụng là IP Precedence và 4 bit sử dụng là ToS. Trong mô hình DiffServ thì cũng là byte ToS đựoc sử dung một cách tối ưu hơn: 6 bit DS được sử dụng như là DSCP( Diferentiated Service Code Point) CAR: ta gới hạn băng thông và một số yếu tố khác không cho nó vượt quá một số yêu cầu đã đề ra. nếu chấp nhận thì áp đặt một chính sách mới cho gói đó, nếu vượt qúa thì cũng áp đặt một chính sách mới khác cho gói đó nữa Giới thiệu về CBWFQ Ta tạo ra nhiều class và mỗi class đại diện cho một loại traffic nào đó, bằng cách match một access-list hay một giá trị DSCP chẳng han. v.v Sau đó ta tạo chính sách cho mỗi class: áp đặt băng thông bằng lệnh bandwith, hoặc priority Các lệnh cấu hình cơ bản Cấu hình CoS Trust CoS cho các thiết bị đầu cuối có khả năng set CoS được ví dụ như IP phone nó tạo ra một đưòng trunk với Switch nối với nó do đó nó có có khả năng set CoS của nó và giá trị default của nó là 5. ta sử dụng lệnh sau Router(config)#mls qos trust cos Set default cho gía trị CoS. Do vấn đề bảo mật do đó có một số đầu cuối có khả năng tự tạo ra trunk và có thể set CoS do đó mà ta sẽ reset tất cả các gói có đặt CoS sử dụng lệnh: Router(config)#mls qos cos override Ta cũng có thể set cos cho các gói đến từ các cổng nào đó sử dụng lệnh Router(config)#mls qos cos number Cấu hình CAR:Ta sử dụng lệnh sau Router(config-if)#rate-limit {input | output } [dscp dscp value}{access-group acl-index} bps bust-normal bust-max conform-action action exceed-action acton Ta giải thích lệnh như sau: đối ta sử dụng lệnh này trên cỗng giao tiếp nào đó có thể là theo chiều input hoặc là theo chiều ouput. DSCP hoặc access-group là hai điều kiện để match một packet: bắt nó thêo một số đểu kiện như trên Conform-action: tức thỏa các điều kện thì sẻ thực hiện một action Exceed-acction: Quá mức điều kện đề ra thì thực hiện một action khác Cấu hình cho CBWFQ Định nghĩa class: Router(config)#class-map class-name {match-all | match-any} Match-all: tức nó phải thỏa tất cả các match(điều kiện thì một gói mới thuộc class) Match-any: nó chỉ cần thỏa một trong các điều kiện là đủ Định nghĩa Policy: Router(config)#policy-map policy-name : tạo policy Router(config-pmap)#class class-name : Xác định class Router(config-pmap-c)#set ip dscp dscp-value Router(config-pmap-c)#set ip precdence ip-precedence-value Router(config-pmap-c)#trust {cos | dscp | ip-precedence} Áp dụng policy vào cho một interface Router(config-if)#service-policy {input | output} policy-name Cấu hình cho sơ đồ thực tế sau giải thích sơ bộ về sơ đồ trên Đối vơi sơ đồ này thì ta thấy Access Switch sẻ nối đến các user trong mạng và nó nối theo đường trunk lên core, và các gói trên đường trunk được ta mark cos để phân phối giứa Access-Switch và Core-Switch Giữa R1 và R2 ta sủ dụng CAR Show run R1#sh run Building configuration . Current configuration : 1320 bytes ! version 12.2 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! enable password cisco ! memory-size iomem 10 ip subnet-zero no ip domain lookup voice call carrier capacity active mta receive maximum-recipients 0 interface Loopback1 ip address 11.1.1.1 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.1.1 255.255.255.0 rate-limit input access-group 101 8000 1500 2000 conform-action set-dscp-transmit 20 exceed-action set- dscp-transmit 0 half-duplex ! interface Serial0/0 no ip address encapsulation frame-relay no fair-queue clockrate 64000 ! interface Serial0/0.122 point-to-point ip address 172.16.1.1 255.255.255.0 rate-limit output dscp 0 8000 1500 2000 conform-action transmit exceed-action drop frame-relay interface-dlci 122 ! interface Serial0/1 no ip address shutdown ! router ospf 1 log-adjacency-changes network 172.16.1.0 0.0.0.255 area 0 network 192.168.1.0 0.0.0.255 area 0 ! ip classless ip http server ! access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255 ! call rsvp-sync ! voice-port 1/1/0 ! voice-port 1/1/1 mgcp profile default ! dial-peer cor custom ! line con 0 logging synchronous line aux 0 line vty 0 4 no login end R2#show run Building configuration . Current configuration : 1051 bytes ! version 12.2 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname R2 memory-size iomem 10 ip subnet-zero no ip domain-lookup ! call rsvp-sync ! interface Ethernet0/0 ip address 172.16.3.1 255.255.255.0 rate-limit input access-group 101 8000 1500 2000 conform-action set-dscp-transmit 8 exceed-action set- dscp-transmit 0 half-duplex ! interface Serial0/0 no ip address encapsulation frame-relay frame-relay lmi-type cisco ! interface Serial0/0.221 point-to-point ip address 172.16.1.2 255.255.255.0 rate-limit output dscp 0 8000 1500 2000 conform-action transmit exceed-action drop frame-relay interface-dlci 221 ! router ospf 1 log-adjacency-changes network 172.16.1.0 0.0.0.255 area 0 network 172.16.3.0 0.0.0.255 area 0 ! ip classless ip http server ip pim bidir-enable ! access-list 101 permit ip 172.16.2.0 0.0.0.255 192.168.1.0 0.0.0.255 dial-peer cor custom line con 0 logging synchronous line aux 0 line vty 0 4 ! no scheduler allocate end Core# show run Building configuration . Current configuration : 3029 bytes version 12.1 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption hostname Core enable password cisco ip subnet-zero ip routing no ip domain-lookup mls qos class-map match-all cuong match access-group name cuong class-map match-all van policy-map cuong class cuong set ip dscp 40 class class-default trust cos spanning-tree mode pvst spanning-tree extend system-id ! mac access-list extended cuong permit host 000d.87fa.716b any ! interface Port-channel1 switchport trunk encapsulation dot1q switchport mode trunk no ip address ! interface FastEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk no ip address duplex full speed 100 channel-group 1 mode auto channel-protocol pagp ! interface FastEthernet0/2 switchport trunk encapsulation dot1q switchport mode trunk no ip address duplex full speed 100 channel-group 1 mode auto channel-protocol pagp ! interface FastEthernet0/3 switchport trunk encapsulation dot1q switchport mode trunk no ip address duplex full speed 100 channel-group 1 mode auto channel-protocol pagp ! interface FastEthernet0/4 switchport trunk encapsulation dot1q switchport mode trunk no ip address duplex full speed 100 channel-group 1 mode auto channel-protocol pagp ! . Bài Viết QoS Tác giả Lê Văn Cương QoS: CoS,CAR - CBWFQ. Giới thiệu về CoS. Đối vơi các Switch. switchport mode access mls qos cos 5 mls qos cos override ! interface FastEthernet0/6 mls qos cos override ! interface FastEthernet0/7 mls qos cos 3 ! interface

Ngày đăng: 07/09/2013, 15:00

Xem thêm

TỪ KHÓA LIÊN QUAN

w