Tail Drop

Weighted Random Early Detection (WRED)

WRED—Explicit Congestion Notification

Frame Relay Discard Dligible (DE)

在网络发生拥塞的时候,默认的是尾丢弃,我们不希望这样,我们总是希望先丢弃优先级低的数据包,而保证优先级高的数据包的发送,WRED是基于weight的随机早侦测,工作思想和WFQ有相同之处,因为WFQ在工作时,是依靠流量的优先级来分配相应带宽的,而WRED却是依靠流量的优先级来分配相应的丢弃几率的。当网络中有多种数据时,在发生拥塞之后,人们总是希望先将优先级较低的相对不重要的数据丢弃,而优先保证重要数据的传递。WRED正是迎合了人们的这种期望,在网络发生拥塞之后,总是先保证高优先级的重要数据的传递,而先丢弃普通的数据。 WRED在网络发生拥塞之后,可根据数据包的DSCP或IP优先级来丢弃数据包,低优先级的数据总是比高优先级的数据先丢,从而保证重要数据的传递。在默认情况下,是根据数据包的IP优先级来决定如何丢弃的。

WRED在应用时,只能应用于接口下,或者和WFQ与CBWFQ一起使用,之所以不能和PQ一样的队列同时使用,是因为PQ或LLQ都有自己的保护和丢弃机制,WRED对数据的操作没有太多意义。

R1(config)#int s1/0
R1(config-if)#ra
R1(config-if)#ra
R1(config-if)#radm
R1(config-if)#rand
R1(config-if)#random-detect
R1(config-if)#random-detect ?
  dscp                            parameters for each dscp value
  dscp-based                      Enable dscp based WRED on an inteface
  exponential-weighting-constant  weight for mean queue depth calculation
  flow                            enable flow based WRED
  prec-based                      Enable prec based WRED on an interface
  precedence                      parameters for each precedence value

R1#show queueing random-detect
Current random-detect configuration:
  Serial1/0
    Queueing strategy: random early detection (WRED)
    Random-detect not active on the dialer
    Exp-weight-constant: 9 (1/512)
    Mean queue depth: 0

   dscp          Random drop      Tail drop    Minimum Maximum  Mark
                  pkts/bytes       pkts/bytes    thresh  thresh  prob
   af11      0/0              0/0           33      40  1/10
   af12      0/0              0/0           28      40  1/10
   af13      0/0              0/0           24      40  1/10
   af21      0/0              0/0           33      40  1/10
   af22      0/0              0/0           28      40  1/10
   af23      0/0              0/0           24      40  1/10
   af31      0/0              0/0           33      40  1/10
   af32      0/0              0/0           28      40  1/10
   af33      0/0              0/0           24      40  1/10
   af41      0/0              0/0           33      40  1/10
   af42      0/0              0/0           28      40  1/10
   af43      0/0              0/0           24      40  1/10
    cs1      0/0              0/0           22      40  1/10
    cs2      0/0              0/0           24      40  1/10
    cs3      0/0              0/0           26      40  1/10
    cs4      0/0              0/0           28      40  1/10
    cs5      0/0              0/0           31      40  1/10
    cs6      0/0              0/0           33      40  1/10
    cs7      0/0              0/0           35      40  1/10
     ef      0/0              0/0           37      40  1/10
   rsvp      0/0              0/0           37      40  1/10
default       0/0              0/0           20      40  1/10

在CBWFQ下的运用

Router(config)#policy-map WWW

Router(config-pmap)#class class-default

Router(config-pmap-c)#bandwidth 1000000

 Router(config-pmap-c)#random-detect

WRED—Explicit Congestion Notification

引起网络拥塞的原因就是数据源发送了过量的数据包,而ECN(明确拥塞通告)就是通过发送警告,让数据源知道网络已经发生拥塞,从而可以降低自己发送数据包的速度。但是如果数据源不支持ECN,那么所发送的流量照丢不误。 配置ECN时,必须开启WRED,并且需要配合WFQ或CBWFQ使用。

Router(config)#policy-map CBWFQ

Router(config-pmap)#class class-default

Router(config-pmap-c)#bandwidth percent 75

Router(config-pmap-c)#random-detect

Router(config-pmap-c)#random-detect ecn

Frame Relay Discard Dligible (DE)

在Frame Relay网络中,数据包中标有Discard Dligible (DE)字段,该字段告诉设备数据包的重要性,如果为1,表示该数据包并不重要,在网络发生拥塞时可以优先被丢弃,如果为0,则表示在将为1的数据包全部丢光的情况下,才可被丢弃,所有数据包的DE字段默认为0。 可以将特定数据包的DE字段设置为1。

r1(config)#access-list 100 permit ip any 10.1.1.0 0.0.0.255

r1(config)#frame-relay de-list 1 protocol ip list 100

r1(config)#int s0/0 r1(config-if)#frame-relay de-group 1 102