Shaping high lag problem.

Linux Advanced Routing and Traffic Control

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

 



Hi folks,

I have this problem. I have LAN at home and i use tcng + htb + sfq to shape
it's traffic. When shaping is enabled and some guy plays Counter Strike on his PC
he gets big lags sometimes when traffic requirements go up speedy. I tried to ping
that host at same time and i've got this:

Reply from 193.219.67.253: bytes=32 time=27ms TTL=58
Reply from 193.219.67.253: bytes=32 time=211ms TTL=58
Reply from 193.219.67.253: bytes=32 time=245ms TTL=58
Reply from 193.219.67.253: bytes=32 time=28ms TTL=58
Reply from 193.219.67.253: bytes=32 time=50ms TTL=58
Reply from 193.219.67.253: bytes=32 time=302ms TTL=58
Reply from 193.219.67.253: bytes=32 time=27ms TTL=58

Well I think you have got the idea. Lag jumps up to 1000 sometimes and stays there
for 3-4 ping packets.
Any ideas how to fix that?

TCNG config:
#include "fields.tc"
#include "ports.tc"

#define IFLAN eth0
#define IFPAR eth1
#define IFINET ppp0

#define LAN_IP 192.168.0.1
#define LAN 192.168.0.0

#define P1 213.226.146.0
#define P2 213.226.161.0
#define P3 213.226.147.0
#define P4 213.226.172.0
#define P5 213.252.224.0

#define CSPORT 27015

warn "constpfx", "exppostopt", "unused";
dev IFLAN {
    egress {
	class ( <$parabole> ) \
	    if ip_src/24 == P1 || ip_src/24 == P2 || \
	    ip_src/24 == P3 || ip_src/24 == P4 || ip_src/24 == P5;
	class ( <$network> ) \
	    if ip_src == LAN_IP && ip_dst/24 == LAN;
	class ( <$cs> ) \
	    if udp_sport == CSPORT;
	class ( <$inet> ) if 1;
	
	htb {
	    class ( rate 100Mbps ) {
		$cs = class ( prio 1, rate 48kbps, ceil 96kbps ) { sfq; } ;
		$inet = class ( prio 2, rate 48kbps, ceil 256kbps ) { sfq; } ;
		$parabole = class ( prio 3, rate 100kbps, ceil 10Mbps ) { sfq; } ;
		$network = class ( prio 4, rate 10Mbps, ceil 100Mbps ) { sfq; } ;
	    }
	}
    }
}
dev IFPAR {
    egress {
	class ( <$cs> ) if ip_dst == host "cs.parabole.lt";
	class ( <$fm> ) if ip_dst == host "fm.parabole.lt";
	class ( <$main> ) if 1;
	
	prio {
	    $cs = class (1);
	    $fm = class (2);
	    $main = class (3);
	}
    }
}
dev IFINET {
    egress {
	class ( <$ssh> ) if tcp_dport == PORT_SSH || tcp_sport == PORT_SSH;
	class ( <$cs> ) if udp_dport == CSPORT;
	class ( <$main> ) if 1;
	
	prio {
	    $ssh = class (1);
	    $cs = class (2);
	    $main = class (3);
	}
    }
}
--
pagarbiai,
ArtÅras Ålajus

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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