Mục tiêu: Đánh dấu packet bằng DSCP Cấu hình class-based TCP Header Compression Cấu hình class-based traffic shaping and policing Create and apply nested service policies 2... VSIC Edu
Trang 11 Mục tiêu:
Đánh dấu packet bằng DSCP
Cấu hình class-based TCP Header Compression
Cấu hình class-based traffic shaping and policing
Create and apply nested service policies
2 Cấu hình:
Step 1: Cấu hình địa chỉ IP như hình vẽ:
R1(config)# interface fastethernet 0/0
R1(config-if)# ip address 172.16.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# interface fastethernet 0/1
R1(config-if)# ip address 172.16.14.1 255.255.255.0
R1(config-if)# no shutdown
R2(config)# interface serial 0/0/1
R2(config-if)# bandwidth 800
R2(config-if)# ip address 172.16.23.2 255.255.255.0
R2(config-if)# clockrate 800000
R2(config-if)# no shutdown
R2(config-if)# interface fastethernet 0/0
R2(config-if)# ip address 172.16.20.2 255.255.255.0
R2(config-if)# no shutdown
R3(config)# interface serial 0/0/1
R3(config-if)# bandwidth 800
R3(config-if)# ip address 172.16.23.3 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# interface serial 0/1/0
R3(config-if)# bandwidth 800
R3(config-if)# ip address 172.16.34.3 255.255.255.0
R3(config-if)# clockrate 800000
R3(config-if)# no shutdown
R4(config)# interface fastethernet 0/1
R4(config-if)# ip address 172.16.14.4 255.255.255.0
R4(config-if)# no shutdown
R4(config-if)# interface serial 0/0/0
R3(config-if)# bandwidth 800
R4(config-if)# ip address 172.16.34.4 255.255.255.0
R4(config-if)# no shutdown
TrafGen# tgn start
Trang 2VSIC Education Corporation Trang 66
Step 2: Cấu hình định tuyến bằng OSPF :
R1(config)# router ospf 1
R1(config-router)# network 172.16.0.0 0.0.255.255 area 0
R2(config)# router ospf 1
R2(config-router)# network 172.16.0.0 0.0.255.255 area 0
R3(config)# router ospf 1
R3(config-router)# network 172.16.0.0 0.0.255.255 area 0
R4(config)# router ospf 1
R4(config-router)# network 172.16.0.0 0.0.255.255 area 0
Step 3: Đánh dấu packet bằng DSCP:
R1(config)# class-map match-any critical
R1(config-cmap)# match protocol ospf
R1(config-cmap)# match protocol ntp
R1(config-cmap)# class-map match-any interactive
R1(config-cmap)# match protocol telnet
R1(config-cmap)# match protocol ssh
R1(config-cmap)# match protocol xwindows
R1(config-cmap)# class-map match-any web
R1(config-cmap)# match protocol http
R1(config-cmap)# match protocol pop3
R1(config-cmap)# match protocol smtp
R1(config)# policy-map markingpolicy
R1(config-pmap)# class critical
R1(config-pmap-c)# set dscp ef
R1(config-pmap-c)# class interactive
R1(config-pmap-c)# set dscp af41
R1(config-pmap-c)# class web
R1(config-pmap-c)# set dscp af32
R1(config-pmap-c)# class class-default
R1(config-pmap-c)# set dscp default
R1(config-pmap-c)# interface fastethernet0/1
Trang 3
Step 4: Caáu hình Class-based Shapping:
R4(config)# policy-map shapingpolicy
R4(config-pmap)# class class-default
R4(config-pmap-c)# shape peak 400000
R4(config-pmap-c)# interface serial0/0/0
R4(config-if)# service-policy output shapingpolicy
Trang 4
VSIC Education Corporation Trang 68
Step 5: Caáu hình Nested Service Policies:
R4(config)# class-map ef
R4(config-cmap)# match dscp ef
R4(config-cmap)# class-map af41
R4(config-cmap)# match dscp af41
R4(config-cmap)# class-map af32
R4(config-cmap)# match dscp af32
R4(config-cmap)# policy-map innerpolicy
R4(config-pmap)# class ef
R4(config-pmap-c)# shape peak 40000
R4(config-pmap-c)# class af41
R4(config-pmap-c)# shape peak 80000
R4(config-pmap-c)# class af32
R4(config-pmap-c)# shape peak 120000
R4(config-pmap-c)# policy-map shapingpolicy
R4(config-pmap)# class class-default
R4(config-pmap-c)# service-policy innerpolicy
Trang 5
Step 6: Caáu hình Traffic Policing:
R3(config)# policy-map policingpolicy
R3(config-pmap)# class class-default
R3(config-pmap-c)# police rate 400000 bps
R3(config-pmap-c-police)# interface serial0/0/1
R3(config-if)# service-policy output policingpolicy
Trang 6VSIC Education Corporation Trang 70
Step 7: Caáu hình Class-based TCP Header Compression
R4(config)# policy-map innerpolicy
R4(config-pmap)# class af32
R4(config-pmap-c)# compression header ip tcp
Final Configurations
R1# show run
!
hostname R1
!
class-map match-any critical
match protocol ospf
match protocol ntp
class-map match-any interactive
match protocol telnet
match protocol ssh
Trang 7class-map match-any web
match protocol http
match protocol pop3
match protocol smtp
!
policy-map markingpolicy
class critical
set dscp ef
class interactive
set dscp af41
class web
set dscp af32
class class-default
set dscp default
!
interface FastEthernet0/0
ip address 172.16.10.1 255.255.255.0
no shutdown
!
interface FastEthernet0/1
ip address 172.16.14.1 255.255.255.0
service-policy output markingpolicy
no shutdown
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
!
end
R2# show run
!
hostname R2
!
interface FastEthernet0/0
ip address 172.16.20.2 255.255.255.0
no shutdown
!
interface Serial0/0/1
ip address 172.16.23.2 255.255.255.0
clock rate 800000
no shutdown
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
!
end
R3# show run
!
hostname R3
!
policy-map policingpolicy
class class-default
police rate 400000 bps
!
interface Serial0/0/1
ip address 172.16.23.3 255.255.255.0
service-policy output policingpolicy
no shutdown
!
interface Serial0/1/0
ip address 172.16.34.3 255.255.255.0
clockrate 800000
no shutdown
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
!
line vty 0 4
password cisco
login
! end
R4# show run
!
hostname R4
!
class-map match-all af41
match dscp af41
Trang 8VSIC Education Corporation Trang 72
class-map match-all ef
match dscp ef
class-map match-all af32
match dscp af32
!
policy-map innerpolicy
class ef
shape average 40000
class af41
shape average 80000
class af32
shape average 120000
compress header ip tcp
policy-map shapingpolicy
class class-default
shape peak 400000
service-policy innerpolicy
!
interface FastEthernet0/1
ip address 172.16.14.4 255.255.255.0
no shutdown
!
interface Serial0/0/0
ip address 172.16.34.4 255.255.255.0
service-policy output shapingpolicy
no shutdown
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
!
end
Trang 9
Lab 4.7 WAN QoS Tools
1 Mục tiêu:
Cấu hình Multilink PPP
Cấu hình Multilink PPP Link Fragmentation và interleaving
Cấu hình Generic traffic shaping
Cấu hình CAR policing
2 Cấu hình:
Step 1: Cấu hình địa chỉ IP như hình vẽ:
R1(config)# interface fastethernet 0/0
R1(config-if)# ip address 172.16.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# interface fastethernet 0/1
R1(config-if)# ip address 172.16.14.1 255.255.255.0
R1(config-if)# no shutdown
R2(config)# interface serial 0/0/1
R2(config-if)# bandwidth 64
R2(config-if)# ip address 172.16.23.2 255.255.255.0
R2(config-if)# clockrate 64000
R2(config-if)# no shutdown
R2(config-if)# interface fastethernet 0/0
R2(config-if)# ip address 172.16.20.2 255.255.255.0
R2(config-if)# no shutdown
R3(config)# interface serial 0/0/1
R3(config-if)# bandwidth 64
R3(config-if)# ip address 172.16.23.3 255.255.255.0
R3(config-if)# no shutdown
R4(config)# interface fastethernet 0/1
R4(config-if)# ip address 172.16.14.4 255.255.255.0
R4(config-if)# no shutdown
R4# tgn start
Step 2: Cấu hình Multilink PPP
R3(config)# interface serial 0/1/0
R3(config-if)# clockrate 64000
R3(config-if)# bandwidth 64
R3(config-if)# encapsulation ppp
R3(config-if)# ppp multilink
R3(config-if)# ppp multilink group 1