链路有效性概述
链路有效机制往往部署在低速的广域网链路,以增加吞度量,降低延时和抖动。
Cisco IOS link efficiency mechanisms include:
L2 payload compression (Stacker, Predictor, MPPC) 帧中继、PPP
Header compression (TCP, RTP, class-based TCP, and class-based RTP)
Link Fragmentation and Interleaving
1.2层的载荷压缩
2.头部压缩
3.链路分片与交互式转发
compression压缩
载荷压缩减小了有效载荷的大小;
报头压缩降低了头部开销;
压缩增加吞度量,降低延时
L2 payload compression
L2载荷压缩降低了帧的有效载荷的大小;
软件压缩由于复杂性,将增加延时;
硬件压缩降低了压缩延时;
串行化延迟降低,整体延时可能减小。
压缩结果:
中间链路的延时就是串行化延时
配置:
R1(config)#interface serial 1/1
R1(config-if)#frame-relay payload-compression ?
FRF9 FRF9 encapsulation
data-stream cisco proprietary encapsulation
packet-by-packet cisco proprietary encapsulation
R1(config)#interface serial 1/2
R1(config-if)#encapsulation ppp
R1(config-if)#compress ?
lzs lzs compression type
mppc MPPC compression type
predictor predictor compression type
stac stac compression algorithm
R1(config)#interface serial 2/1
R1(config-if)#encapsulation hdlc
R1(config-if)#compress ?
stac stac compression algorithm
header compression
报头压缩减小了数据包报头的大小;
有效载荷大小不被改变;
比如基于类的TCP和基于类的RTP头部压缩
压缩结果:
报头压缩增加延时并降低串行化的延时。
header compression overview
TCP报头压缩和基于类的TCP报头压缩:
压缩IP,TCP报头
用来降低TCP对报文段的开销;
对传输小型有效载荷和许多TCP会话连接非常有效。
RTP报头压缩和基于类的RTP头部压缩:
压缩IP,UDP,RTP报头
用于RTP,减小延迟并提高吞度量;
提高语音质量,最有效的慢速链接。
TCP头部压缩
大多数Internet应用程序使用TCP作为传输协议。
IP (20 bytes) and TCP (20 bytes) use 40 bytes.
TCP报头压缩可以压缩到3~5个字节。
-基于类的TCP报头压缩允许基于流量分类来压缩
基于类的TCP报头压缩是通过MQC配置。
实例:
RTP头部压缩
语音会话使用RTP。
RTP使用UDP进行传输。
消息头(IP、UDP和RTP)中的大多数信息在整个会话期间都是固定的。
IP(20字节)、UDP(8字节)和RTP(12字节)使用40字节。
RTP报头压缩可以将这三个报头压缩成2或4个字节。
基于类的RTP标头压缩允许对流量类进行压缩。
基于类的RTP头压缩是通过MQC配置的。
配置头部压缩
为特定的流量类启用RTP或TCP IP标头压缩。
如果没有指定rtp或tcp选项,则同时配置rtp和tcp报头压缩。
class-map interactive
match protocol telnet
!
policy-map cust1
class interactive
bandwidth 64
***compression header ip tcp***
!
<output omitted>
!
int s0/0
service-policy output cust1
<output omitted>
——————————————————————————————————
class-map voip
match protocol rtp
!
policy-map cust1
!class voip
priority 384
compression header ip rtp
!
<output omitted>
!
int s0/0
service-policy output cust1
<output omitted>