Why does this script noet work (bandwidth, tc en u32)

Linux Advanced Routing and Traffic Control

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

 



Hi,

Can anyone point me out where the script below is wrong? 

All I want is that host 172.31.1.1 can only use 10 megabit. If I run
this script on the in-between router nothing happens (the host uses
still the full 100 mbit, tested with iperf) , so i assume that something
must be wrong....


#!/bin/sh

# LAN1 NIC
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb
tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit 

# my machine
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 1mbit ceil 10mbit

# filter 
tc filter add dev eth0 parent 1:1 protocol ip prio 1 u32 match ip dst 172.31.1.1 flowid 1:2

# LAN2 NIC 
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb
tc class add dev eth1 parent 1: classid 1:1 htb rate 100mbit 

# my machine
tc class add dev eth1 parent 1:1 classid 1:2 htb rate 1mbit ceil 10mbit

# filter 
tc filter add dev eth1 parent 1:1 protocol ip prio 1 u32 match ip src 172.31.1.1 flowid 1:2


TIA

-- 
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl
_______________________________________________
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