Thursday, March 10, 2011

configuring L2TP TOS byte

stumble into this command:

pseudowire-class t59
encapsulation l2tpv3
ip local interface Loopback0
ip tos value 160

the intention was to set the IP Precedence bit in TOS byte of the IP header carrying the L2TPV3 packet manually. Well sniffing tells otherwise:


traffic from 9.9.0.9 to 9.9.0.7 is carrying ICMP traffic from R1 to R5, although i did not get wireshark to decode the payload properly. But check the IP header, the TOS is still 0.

Checked command reference and notice the following:


Apparently there is another option under IP TOS:

pseudowire-class t59
encapsulation l2tpv3
ip local interface Loopback0
ip tos reflect

And this "reflect" thing actually copy the payload's TOS to the outer IP header. Well it is understandable that if the payload is NOT ip then this "copy" thing will not happen.

Hmm.. i am not using reflect but my payload is NOT IP (ICMP).. could it be...

Ok try again telnet from R1 to R5... ah ha there it is..


we can see the IP precedence is now at 5.

So it seems like even we manually set the TOS byte under pseudo-wire class, if the payload is NOT ip, the TOS byte is not set properly.
Bug? ios version (C7200-K91P-M), Version 12.2(25)S15.