From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Furniss Date: Tue, 31 May 2016 15:40:25 +0000 Subject: Re: reroute icmp traffic from one interface to another Message-Id: <574DB069.5060803@gmail.com> List-Id: References: <20160531171329.Horde.SLfG6i6j_hmWsfb5FjpBZwP@ermis.noc.duth.gr> In-Reply-To: <20160531171329.Horde.SLfG6i6j_hmWsfb5FjpBZwP@ermis.noc.duth.gr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: lartc@vger.kernel.org Ηλια Χατζηστυλη wrote: > > Hello, I have an openwrt firmware installed in my router and I want > to configure a Home and a Guest interface. So I have two internal > interfaces(home,guest) and the external(eth1). First I have to send > all traffic from the two internal interfaces(wlan0,wlan0-1) to > external(eth1). With my project I have to measure latency so I use > nping. However when I use the command "sudo nping -c 3200 > --data-length 1460 x.x.x.x" with network seted to upload bandiwidth > 2Mbps and with data length 1460 B (1460*8740) we expect minimum > delay 11740/2000000=5.8ms . Nonetheless, the avg ping time is about > 0.8-3 ms which means that my iptables commands doesn't work properly > for the ping traffic (icmp type). Do you know how I can route this > traffic with the tcp one? I'm pretty sure that icmp traffic is > enqueued because when the home user is uploading a file nping command > takes out the proper delay. Easier to look at iptables counters to see what's hitting rules. You don't say how you limit to 2mbit. Linux QOS doesn't emulate bitrate latency so your test is not valid for seeing where packets go. netem rate option does try to limit according to packet size subject to timer granularity (see man tc-netem). FWIW your calculation for rth should probably be more like (1460+8+20+14)*8.