PDA

View Full Version : Nhờ các cao thủ chuyên về QoS



hollowdang
07-06-2008, 12:48 AM
:-S
Hi, em có config qos cho 2 router ảo 7200 dùng dynamip.
Em config qos trên mạng MPLS. Mạng bao gồm 3 lưu lượng chính FTP, HTTP, video.
Em cho lưu lượng video lớn nhất, sao chạy nó không đúng với lưu lượng áp vào.
Nhờ các anh chỉ dùm. Thank nhiều.

Bài config:




S1/0 trên router MPLS1 : 10.0.0.1 /8 clock rate 504000
F1/0 trên router MPLS2 : 172.168.1.1 /16

S2/0 trên router MPLS2 : 10.0.0.2 /8 clock rate 504000
F1/0 trên router MPLS2 : 192.168.1.1 /24

MPLS bắt đầu từ interface S1/0 của router MPLS1 đến interface S2/0 của router MPLS2.
PC client chạy hđh winXP
Hai máy server 1 và 2 chạy hđh win2003 có các ứng dụng: WEB, FTP, ….

Cấu hình QoS trên MPLS2:
//dùng access-list chia ra ba loại lưu lượng
MPLS2(config)#access-list 100 permit tcp any any eq 80
MPLS2(config)#access-list 100 permit tcp any any eq 8080
MPLS2(config)#access-list 101 permit tcp any any eq 20
MPLS2(config)#access-list 101 permit tcp any any eq 21
MPLS2(config)#access-list 102 permit icmp any any

//Phân loại từng lớp lưu lượng đi vào.
MPLS2(config)#class-map match-all ftp-in
MPLS2(config-cmap)#match access-group 101
MPLS2(config-cmap)#exit
MPLS2(config)#class-map match-all http-in
MPLS2(config-cmap)#match access-group 100
MPLS2(config-cmap)#
MPLS2(config-cmap)#exit
MPLS2(config)#class-map match-all video-in
MPLS2(config-cmap)#match not access-group 102
MPLS2(config-cmap)#match not class ftp-in
MPLS2(config-cmap)#match not class http-in

//khai báo tên chính sách IN
MPLS2(config)#policy-map IN
MPLS2(config-pmap)#class ftp-in
MPLS2(config-pmap-c)#set ip dscp af31
MPLS2(config-pmap-c)#set qos-group 3
MPLS2(config-pmap-c)#exit
MPLS2(config-pmap)#class http-in
MPLS2(config-pmap-c)#set ip dscp af21
MPLS2(config-pmap-c)#set qos-group 2
MPLS2(config-pmap-c)#exit
MPLS2(config-pmap)#class video-in
MPLS2(config-pmap-c)#set ip dscp cs4
MPLS2(config-pmap-c)#set qos-group 5
MPLS2(config-pmap-c)#exit

//Phân loại lưu lượng đi ra (vào mạng MPLS)
MPLS2(config)#class-map match-all mpls-ftp-in
MPLS2(config-cmap)#match mpls experimental topmost 3
MPLS2(config-cmap)#exit
MPLS2(config)#class-map match-all mpls-http-in
MPLS2(config-cmap)#match mpls experimental topmost 2
MPLS2(config-cmap)#exit
MPLS2(config)#class-map match-all mpls-video-in
MPLS2(config-cmap)#match mpls experimental topmost 5
MPLS2(config-cmap)#exit




//Tên chính sách OUT
MPLS2(config)#policy-map OUT
MPLS2(config-pmap)#class mpls-ftp-in
MPLS2(config-pmap-c)#bandwidth 8
MPLS2(config-pmap-c)#exit
MPLS2(config-pmap)#class mpls-http-in
MPLS2(config-pmap-c)#bandwidth 8
MPLS2(config-pmap-c)#exit
MPLS2(config-pmap)#class mpls-video-in
MPLS2(config-pmap-c)#priority 400
MPLS2(config-pmap-c)#exit
MPLS2(config-pmap)#class class-default
MPLS2(config-pmap-c)#fair-queue
MPLS2(config-pmap-c)#exit

//Áp vào interface
MPLS2(config)#int f1/0
MPLS2(config-if)#service-policy input IN
MPLS2(config-if)#exit

MPLS2(config)#int S1/0
MPLS2(config-if)#service-policy output OUT
MPLS2(config-if)#exit

Cấu hình QoS trên MPLS1:
//classification
MPLS1(config)#class-map match-all mpls-ftp-out
MPLS1(config-cmap)#match mpls experimental topmost 3
MPLS1(config-cmap)#exit
MPLS1(config)#class-map match-all mpls-http-out
MPLS1(config-cmap)#match mpls experimental topmost 2
MPLS1(config-cmap)#exit
MPLS1(config)#class-map match-all mpls-video-out
MPLS1(config-cmap)#match mpls experimental 5
MPLS1(config-cmap)#

//policy IN
MPLS1(config-pmap)#class mpls-ftp-out
MPLS1(config-pmap-c)#set qos-group 3
MPLS1(config-pmap-c)#exit
MPLS1(config-pmap)#class mpls-http-out
MPLS1(config-pmap-c)#set qos-group 2
MPLS1(config-pmap-c)#exit
MPLS1(config-pmap)#class mpls-video-out
MPLS1(config-pmap-c)#set qos-group 5
MPLS1(config-pmap-c)#exit

//classification ip
MPLS1(config)#class-map match-all ftp-out
MPLS1(config-cmap)#match qos-group 3
MPLS1(config-cmap)#exit
MPLS1(config)#class-map match-all http-out
MPLS1(config-cmap)#match qos-group 2
MPLS1(config-cmap)#exit
MPLS1(config)#class-map match-all video-out
MPLS1(config-cmap)#match qos-group 5
MPLS1(config-cmap)#exit

//policy OUT
MPLS1(config)#policy-map OUT
MPLS1(config-pmap)#class ftp-out
MPLS1(config-pmap-c)#bandwidth 8
MPLS1(config-pmap-c)#class http-out
MPLS1(config-pmap-c)#bandwidth 8
MPLS1(config-pmap-c)#class video-out
MPLS1(config-pmap-c)#priority 400
MPLS1(config-pmap-c)#exit

//apply interface
MPLS1(config)#int S2/0
MPLS1(config-if)#service-policy input IN
MPLS1(config)#int f1/0
MPLS1(config-if)#service-policy output OUT