QOS and NAT

Could somebody please tell me this probably obvious answer, when using a VOIP phone or anything for that matter that can mark the packet with a DSCP QOS value such as 46 for VOIP, when that packet is then NATted and heads out onto the Internet or wherever, is the DSCP value retained in the NATted packet header ?

We are doing some testing at the moment and the phones we are using can set the TOS or DSCP value themselves for RTP and SIP, but in our core network we are doing QOS but are not seeing any packets matching DSCP value of 46 in our mangle rule.

Should this work ??

Regards
Paul

src and dst nat should only change src and dst IP address, nothing else. mangle can change other fields.

I agree, but, the source or dest IP is changed by encapsulating the packet from what I understand, so does that mean it loses other properties of the original packet such as the DSCP value ?

Regards
Paul

the packet is not encapsulated or rewrapped or anything. it simply changes src and dst address/port fields in the layer 3 headers. all the other headers should stay the same (ip helper services might change something else). you can confirm this in 2 minutes by running packet sniffer on interface=all and examining with wireshark. if you use interface=all then wireshark will see tons of problems because of duplicate packets, but ignore that and just look for the 2 packets you are interested in; one from inside and immediately afterwards the one going to the outside.

I see, so that means I should be seeing the packet as DSCP 46 as I am tagging it in the postrouting chain, something strange going on then…

Regards
Paul