[asterisk-users] Setting the TOS using IPtables screws up the DSCP field

Vikas topgun9 at gmail.com
Wed May 7 06:59:02 CDT 2008


Concise summary: When I set the TOS to Minimize-Delay the DSCP field
in the packet changes from "Expedited Forwarding" to "Unknown"

Here are the details:

Scenario 1: IpTables is not used to set the TOS

This is what the packet looks like using wireshark:
Internet Protocol, Src: 59.93.192.xx (59.93.192.xx), Dst:
64.62.134.yyy (64.62.134.yyy)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0xb8 (DSCP 0x2e: Expedited
Forwarding; ECN: 0x00)
        1011 10.. = Differentiated Services Codepoint: Expedited
Forwarding (0x2e)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0


Scenario 2: IpTables is used to set the TOS

Output of $/etc/rc.d/init.d/iptables status
Table: mangle
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination

Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
1    TOS        udp  --  0.0.0.0/0            0.0.0.0/0           udp
dpts:5060:5069 TOS set 0x10
2    TOS        tcp  --  0.0.0.0/0            0.0.0.0/0           tcp
dpts:5060:5069 TOS set 0x10
3    TOS        udp  --  0.0.0.0/0            0.0.0.0/0           udp
dpts:10000:20000 TOS set 0x10

This is what the packet looks like using wireshark:
Internet Protocol, Src: 59.93.192.xx (59.93.192.xx), Dst:
64.62.134.xxx (64.62.134.xxx)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0xb0 (DSCP 0x2c: Unknown DSCP; ECN: 0x00)
        1011 00.. = Differentiated Services Codepoint: Unknown (0x2c)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0


I have no idea what am I doing wrong.

Here is some reference reading I did:
http://www.tucny.com/dscp&tos

Any pointers in the right direction will be very much appreciated.

Thanks for your time,

Sysadmin
http://www.debtconsolidationcare.com
Internets First get out of debt community



More information about the asterisk-users mailing list