Strange pings.

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

The configuration script is at the bottom.

My configuration looks similar to this:
    imq0
     |
    1:1  (12mbit)
     |
    1:2  (10mbit)
     |
    3:0  
     |
    3:1  (256kbit)
    / \
 3:2   3:3
icmp   (rest)

both 3:2 and 3:3 have rate 1kbit ceil 256kbit

Icmp bucklet have priority 1 (better), "rest" bucklet have prio 2 (worse)



I tested the script with heavy download from machine 192.168.1.2 in the background.
While the download was going I pinged 192.168.1.1.

All works fine, except pings...
They should be low, and they almost are :)

Pings are fine (0.4ms) for about 120 seconds, then i got pings similar to this:

64 bytes from 192.168.1.1: icmp_seq=90 ttl=64 time=0.3 ms
64 bytes from 192.168.1.1: icmp_seq=91 ttl=64 time=0.4 ms
64 bytes from 192.168.1.1: icmp_seq=92 ttl=64 time=84.0 ms
64 bytes from 192.168.1.1: icmp_seq=93 ttl=64 time=23.0 ms
64 bytes from 192.168.1.1: icmp_seq=94 ttl=64 time=57.0 ms
64 bytes from 192.168.1.1: icmp_seq=95 ttl=64 time=89.0 ms
64 bytes from 192.168.1.1: icmp_seq=96 ttl=64 time=28.0 ms
64 bytes from 192.168.1.1: icmp_seq=97 ttl=64 time=61.0 ms
64 bytes from 192.168.1.1: icmp_seq=98 ttl=64 time=93.0 ms
64 bytes from 192.168.1.1: icmp_seq=99 ttl=64 time=32.0 ms
64 bytes from 192.168.1.1: icmp_seq=100 ttl=64 time=65.0 ms
64 bytes from 192.168.1.1: icmp_seq=101 ttl=64 time=4.0 ms
64 bytes from 192.168.1.1: icmp_seq=102 ttl=64 time=36.0 ms
64 bytes from 192.168.1.1: icmp_seq=103 ttl=64 time=69.0 ms
64 bytes from 192.168.1.1: icmp_seq=104 ttl=64 time=8.0 ms
64 bytes from 192.168.1.1: icmp_seq=105 ttl=64 time=40.0 ms
64 bytes from 192.168.1.1: icmp_seq=106 ttl=64 time=73.0 ms
64 bytes from 192.168.1.1: icmp_seq=107 ttl=64 time=12.0 ms
64 bytes from 192.168.1.1: icmp_seq=108 ttl=64 time=0.3 ms
64 bytes from 192.168.1.1: icmp_seq=109 ttl=64 time=0.3 ms

Then it is stable (0.4ms) for some time.

The same situation repeats in about 60 second delay.

Maybe someone solved this problem?

Thanks for any advice.

Yours sincerly
      Maciek


PS. Please don't ask me why this configuration is so strange, I have
some reasons to use schemes like this one.

PPS. Is it possible to create a filter that will match all packets?



##### script

iptables -t mangle -F PREROUTING
iptables -t mangle -F POSTROUTING
iptables -t mangle -A PREROUTING -i ! lo  -j IMQ --todev 0
iptables -t mangle -A POSTROUTING -o ! lo  -j IMQ --todev 1

tc qdisc del root dev imq0
tc qdisc del root dev imq1

tc qdisc add dev imq0 root handle 1 htb default 2
tc qdisc add dev imq1 root handle 1 htb default 2
tc class add dev imq0 parent 1:0 classid 1:1 htb rate 12mbit burst 2k prio 1 quantum 2048
tc class add dev imq1 parent 1:0 classid 1:1 htb rate 12mbit burst 2k prio 1 quantum 2048
tc class add dev imq0 parent 1:1 classid 1:2 htb rate 10mbit burst 2k prio 1 quantum 2048
tc class add dev imq1 parent 1:1 classid 1:2 htb rate 10mbit burst 2k prio 1 quantum 2048
tc qdisc add dev imq0 parent 1:2 handle 3 htb default 3
tc qdisc add dev imq1 parent 1:2 handle 3 htb default 3

tc class add dev imq0 parent 3:0 classid 3:1 htb rate 256kbit burst 2k prio 1 quantum 2048
tc class add dev imq1 parent 3:0 classid 3:1 htb rate 64kbit  burst 2k prio 1 quantum 2048

tc class add dev imq0 parent 3:1 classid 3:2 htb rate 1kbit ceil 256kbit burst 2k prio 1 quantum 2048
tc class add dev imq1 parent 3:1 classid 3:2 htb rate 1kbit ceil 64kbit  burst 2k prio 1 quantum 2048
tc class add dev imq0 parent 3:1 classid 3:3 htb rate 1kbit ceil 256kbit burst 2k prio 2 quantum 2048
tc class add dev imq1 parent 3:1 classid 3:3 htb rate 1kbit ceil 64kbit  burst 2k prio 2 quantum 2048

tc qdisc add dev imq0 parent 3:2 handle 12:0 pfifo limit 4
tc qdisc add dev imq1 parent 3:2 handle 12:0 pfifo limit 4
tc qdisc add dev imq0 parent 3:3 handle 13:0 pfifo limit 4
tc qdisc add dev imq1 parent 3:3 handle 13:0 pfifo limit 4

tc filter add dev imq0 protocol ip parent 3:0 prio 1 u32 match ip protocol 1 0xFF flowid 3:2
tc filter add dev imq1 protocol ip parent 3:0 prio 1 u32 match ip protocol 1 0xFF flowid 3:2
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux