Upload problem with traffic shaping though a Linux router.


 
Thread Tools Search this Thread
Special Forums IP Networking Upload problem with traffic shaping though a Linux router.
# 1  
Old 04-11-2013
Upload problem with traffic shaping though a Linux router.

So I want to limit the download and upload speed of a specific ip adress in a local network. To do this I are using a bach script running in a linux OS (Ubuntu 11.04). The issue here is that the upload shaper does not work. I have tried an alternate solution aswell though that does not work as intended

# Remove old shaping
tc qdisc del dev eth1 root 2> /dev/null > /dev/null
tc qdisc del dev eth1 ingress 2> /dev/null > /dev/null

# Create qdisc
tc qdisc add dev eth1 root handle 1: htb default 30

# Download shaper (works as intended)
tc class add dev eth1 parent 1:1 classid 1:4 htb rate 30000kbt
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.101/32 flowid 1:4

# Upload shaper (does not seam to do anything)
tc class add dev eth1 parent 1:1 classid 1:3 htb rate 3000kbit
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip src 192.168.0.101/32 flowid 1:3


### Version 2 of the upload shaper:
# Need eth0 aswell to do this
tc qdisc add dev eth0 root handle 1: htb default 30

# Upload shaper (limits the entire network and not just the one IP)
# The reason for 192.168.0.101/0 is because the src is 10.0.0.166. 10.0.0.166 is the WAN IP adress. I dont get why this is.
# I dont know why i need to change it to eth0 either. It does nothing if i dont.
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 3000kbit
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 192.168.0.101/0 flowid 1:3


Any help at all would be MUCH appreciated!
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. IP Networking

How does a router directs the internet traffic to a specific host in the private network?

how does a router directs the internet traffic to a specific host in the private network? Example: My PC has ip 192.168.134.100 Router has ip 192.168.134.200 My company's ip 202.52.150.33 When i try to access internet, say google, it traverses from... (1 Reply)
Discussion started by: Arun_Linux
1 Replies

2. IP Networking

Traffic shaping with iptables

hello, I have a postfix & a local dns running on a single server. this server is connected to internet via a low bandwidth line(with fixed ip). we also have another high speed adsl (dynamic ip). i want to divert all dns request from the local dns & postfix from the server to the adsl... (0 Replies)
Discussion started by: coolatt
0 Replies

3. Cybersecurity

Monitoring network traffic on wireless router

Hi all, How can I monitor packet traffic on my wireless router? Some info - my wireless router is netgear wgr614 - everyone can connect it i.e. no password required - I would like to see where they connect, how they are using the internet connection I installed wireshark and captured... (3 Replies)
Discussion started by: SaTYR
3 Replies

4. IP Networking

Mac OS X IP traffic shaping question

Not sure if this considered traffic shaping or not, so I'll appreciate the enlightenment... Setup- Mac Pro, Mac OS X 10.5.6, Crashplan Pro Backup server. the Mac Pro has 2 E-net ports, en0, en1. Both E-net ports are connected to the same network, different IP's. Problem- We are planning to... (1 Reply)
Discussion started by: pbenware
1 Replies

5. IP Networking

egress and ingress traffic shaping.

What exactly is the difference between ingress and egress in traffic shaping, what does it mean when we say that imq provies ingress shaping using egress qdisks? (3 Replies)
Discussion started by: Maksim
3 Replies

6. IP Networking

Configure router to allow smtp traffic

Hello all, I have installed ubuntu hardy and for some testing I have configured sendmail on it. I have a router facing the internet and I am having hard time configuring the router to allow traffic on port 25 to my server. I have a BCM96338 ADSL Router. I have set iptable rules to allow the... (0 Replies)
Discussion started by: h3llh0l3
0 Replies

7. UNIX for Advanced & Expert Users

Traffic Shaping

I'm using FreeBSD because I like how easy the system can be set up, how software can be installed/removed and ... many other reasons:-) But there is a thing I don't know how to deal with: I have few connections behind a machine and I want to give to the machines behind a minimum guaranteed... (2 Replies)
Discussion started by: eNTer
2 Replies
Login or Register to Ask a Question