Skip to contentSkip to conversation

Shaping high lag problem.

LARTC Artūras Šlajus 1 participant 1 message Nov 29, 2003

lore
Share & tools
lore
#0 lore raw

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: bytes2 time'ms TTLX
Reply from 193.219.67.253: bytes2 time!1ms TTLX
Reply from 193.219.67.253: bytes2 time$5ms TTLX
Reply from 193.219.67.253: bytes2 time(ms TTLX
Reply from 193.219.67.253: bytes2 timePms TTLX
Reply from 193.219.67.253: bytes2 time02ms TTLX
Reply from 193.219.67.253: bytes2 time'ms TTLX

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);
	}
     }
}
Signature · 6 lines
pagarbiai,
Artūras Šlajus

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/