Hello Martin, Thanks a lot for your quick reply. When I say "pass-through" node yes I mean the behavior of a router but in this case my sender(s), pass-through node (i.e. router) and receiver are all in the same subnet. In other words, the pass-through node does not bridge two subnets. I hope you get the picture. Basically what I am trying to do is to stress the pass-through node to test the performance of a Qdisc that I am currently working on. Can I follow the pointers given by you to have a setup like that?. I really appreciate your help as I am kind of stuck with this. Thanks, Danushka On Tue, Dec 1, 2015 at 10:10 AM, Martin A. Brown <martin@xxxxxxxxxxxx> wrote: > > Hello Danushka, > >>I am trying to use a Linux box as a pass-through node using rinetd >>as a port forwarding mechanism. I see that TOS is always zero on >>the egress path so that my receiver does not receive the TOS values >>I set on the sender. > > Do you need the TCP session to be terminated in userspace (and > re-initiated)? That's what's happening with rinetd. You are using > it as a TCP proxy. The Linux box is acting as a (TCP) receiver on > one side, and initiating a brand new TCP connection outbound. > That's why the ToS value is changing. > > Next question: When you say 'pass-through' node, I am not certain > what you mean. Do you want your Linux box to act like a router? > If so, then, that's very easy: > > sysctl -w net.ipv4.ip_forward=1 > > Now, you have a router. Send packets to the ultimate destination > from your sender node. Make sure that you configure your routes > properly (maybe that's already done). > >>Is there a way to solve this issue?. Maybe rinetd does not copy the >>values properly?. > > I do not know rinetd. Perhaps somebody else does. > >>Probably there is a better/smarter way to do port forwarding (getting >>my Linux box to work just as a pass-through node). Please let me know >>if there is any other way to do that. > > How many values are you changing in the packet? Just the > destination port? Also the destination address? > > I'm thinking that iptables NAT may provide you a solution. Assuming > you are just messing with the destination address and port, you > should be able to use iptables DNAT. I'd suggest reading these: > > http://linux-ip.net/html/nat-dnat.html > https://www.frozentux.net/iptables-tutorial/chunkyhtml/x4033.html > > Good luck, > > -Martin > > -- > Martin A. Brown > http://linux-ip.net/ -- To unsubscribe from this list: send the line "unsubscribe lartc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html