安德CCIE技术文档初识MQC
- 格式:docx
- 大小:26.87 KB
- 文档页数:4
MQC----MQC(Modular QoS Command-Line)。
MQC就是模块化QOS命令行,是配置QOS处理数据的一种非常合乎逻辑的方式。MQC可以配置对特定的数据采取特定的动作,步骤为三步: 定义流量 设置策略 应用策略
实验目标:演示基本的MQC操作。
步骤1、全网可达,即用IGP使得各个网段以及环回口可达,不再赘述
R3#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
33.0.0.0/24 is subnetted, 1 subnets
C 33.1.1.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/0
22.0.0.0/24 is subnetted, 1 subnets D 22.1.1.0 [90/2297856] via 23.1.1.2, 00:10:30, Serial1/0 11.0.0.0/24 is subnetted, 1 subnets
D 11.1.1.0 [90/2300416] via 23.1.1.2, 00:10:28, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
D 12.1.1.0 [90/2172416] via 23.1.1.2, 00:10:30, Serial1/0
R3#ping 11.1.1.1 source lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 33.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/26/60 ms
步骤2、在R2上配置MQC,及定义流量,设置策略,应用策略
用ACL来定义从11.1.1.1到33.1.1.1的IP优先级为4的流量
R2#access-list 100 permit ip host 11.1.1.1 host 33.1.1.1 precedence
flash-override
利用class-map和policy-map来设置策略
class-map match-all Silver
match access-group 100
!
!
policy-map SET-TAG
class Silver
set ip precedence 5
最后在接口下调用
interface Serial2/0
ip address 23.1.1.2 255.255.255.0
serial restart-delay 0
service-policy output SET-TAG
验证:
R1#ping
Protocol [ip]:
Target IP address: 33.1.1.1 Repeat count [5]: 20
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 11.1.1.1
Type of service [0]: 128
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 20, 100-byte ICMP Echos to 33.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 11.1.1.1
!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (20/20), round-trip min/avg/max = 4/13/64 ms
R2上查看包的匹配情况
R2#sh policy-map interface
Serial2/0
Service-policy output: SET-TAG
Class-map: Silver (match-all)
20 packets, 2080 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 100
QoS Set
precedence 5
Packets marked 20
Class-map: class-default (match-any)
438 packets, 28755 bytes
5 minute offered rate 0 bps, drop rate 0 bps Match: any
R2#sh access-l
Extended IP access list 100
10 permit ip host 11.1.1.1 host 33.1.1.1 precedence flash-override (20
matches)
此例为基本的简单实验,希望大家能够初步的认识MQC
欢迎大家继续关注Ender的文档以及更多视频:
/
/ender/