`

路由器DSCP target

 
阅读更多

This is a target that changes the DSCP (Differentiated Services Field) marks inside a packet. The DSCP target is able to set any DSCP value inside a TCP packet, which is a way of telling routers the priority of the packet in question. For more information about DSCP, look at the RFC 2474 - Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers RFC document.

这个target用于改变数据包里面DSCP(不同服务域)标记。DSCP target用来设置IP数据包里面的DSCP标记值,通过这种方式来告知路由器未决包的优先级。

Basically, DSCP is a way of differentiating different services into separate categories, and based on this, give them different priority through the routers. This way, you can give interactive TCP sessions (such as telnet, SSH, POP3) a very high fast connection, that may not be very suitable for large bulk transfers. If on the other hand the connection is one of low importance (SMTP, or whatever you classify as low priority), you could send it over a large bulky network with worse latency than the other network, that is cheaper to utilize than the faster and lower latency connections.

基本上,DSCP将不同的网络服务划分成不同的类别,在此基础之上,通过路由器给服务设置不同的优先级。最终,诸如telnet,SSH,POP3等交互性强的TCP会话将会得到高度快速的连接,这些服务是不适合传输大量数据负荷的;另外一方面,诸如SMTP等不重要的服务,这些服务可以传输大量数据,并且有大的延迟 。对于这些服务,设置更低的DSCP优先级。

Table 11-3. DSCP target options

DSCP目标参数选项

Option

--set-dscp

Example

iptables -t mangle -A FORWARD -p tcp --dport 80 -j DSCP --set-dscp 1

Explanation

This sets the DSCP value to the specified value. The values can be set either via class, see below, or with the --set-dscp, which takes either an integer value, or a hex value.

Option

--set-dscp-class

Example

iptables -t mangle -A FORWARD -p tcp --dport 80 -j DSCP --set-dscp-class EF

Explanation

This sets the DSCP field according to a predefined DiffServ class. Some of the possible values are EF, BE and the CSxx and AFxx values available. You can find more information at Implementing Quality of Service Policies with DSCP site. Do note that the --set-dscp-class and --set-dscp commands are mutually exclusive, which means you can not use both of them in the same command!

差分服务代码点 (DSCP) 概述

差分服务代码点 (DSCP) IP 数据包中的一个字段,它能将不同级别的服务指派到网络通讯中。这是通过用 DSCP 代码对网络上的每个数据包作标记并向其分配相应级别的服务来实现的。

DSCP “IP 优先服务类型字段的组合。为了利用只支持“IP 优先的旧路由器,会使用 DSCP 值,因为 DSCP 值与“IP 优先字段兼容。详细信息,请参阅 RFC 编辑器网站上的 RFC 2474

DSCP 工作原理

已启用服务质量 (QoS) 的程序会通过常规 QoS (GQoS) 应用程序编程接口 (API) 为通讯流请求特定的服务类型。可用的服务类型有:

  • 有保证的服务

    有保证的服务提供具有有限(保证最短的)延迟的高质量、可定量保证。
  • 受控加载服务

    受控加载服务提供没有有限延迟的高质量、可定量保证。

DSCP 是一个六位字段,包含有一些默认值,如下表所示。相同的“IP 优先 IEEE 802.1p 值在不同的列中显示。

服务类型

DSCP

IP 优先

IEEE 802.1p

网络控制

30

6

7

保证

28

5

5

受控加载

18

3

3

所有其他通讯

0

0

0

注意

  • 不能通过 GQoS API 请求网络控制服务。但可通过使用通讯控制 (TC) API 的网络管理应用程序请求该服务。
  • 默认 DSCP 值可以使用组策略进行远程编辑。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics