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
IFP(1)							      General Commands Manual							    IFP(1)

NAME
ifp - access iRiver iFP audio devices SYNOPSIS
ifp command [arguments ...] DESCRIPTION
ifp lets you manage your music on an iRiver iFP music player acting in "Manager Mode". If your player is using "UMS Mode", then you don't need this program; it will appear as new drive when you plug it in. This manual page documents the version of ifp included as an example application for the libifp library. The interface is intended to mimic the ifp binary found in the ifp-line binary package. ifp can upload or download files or directories, delete or make directories on the device, format the device, or upgrade your firmware. COMMANDS
ls [directory] List the files and directories on the device. The root directory is /. Directories are preceded with 'd' and other files with 'f'. df Display total and free space on the device. upload localfile remotefile Copy the file named localfile to the iFP device, and name it remotefile. (This is like cp.) upload localfile remotedir Copy the file named localfile to the iFP device, into remotedir. (This is like cp.) upload localdir remotedir Copy the entire directory localdir to the device, into remotedir. This copies into a subdirectory, so upload foo / puts files from the directory foo info /foo on the device. (This is like cp -R.) This uploads the entire directory, not just audio files. put localfile | localdir Upload the file or directory to the device, with the same name it has locally. If a directory is given, it is put in /. download remotefile localfile download remotefile localdir download remotedir localdir Like upload, but copies from the iFP device to your system. Some proprietary file types may not be downloaded. get remotefile | remotedir Like put, but copies files or directories from the device to your current working directory. rm [-r] file Delete (recursively) a file (or directory) on the device. rmdir dir Delete an empty directory on the device. mkdir dir Create a directory on the device. battery Display battery status of the device. typestring Display the model number of the device. firmversion Display the firmware revision currently on the device. format Reformat the device's memory. This will delete all your music. firmupdate FIRMWARE.HEX Upload the file FIRMWARE.HEX as new firmware for the device. This will not delete your music, but may have many other detrimental effects. Don't turn the device off or unplug it while the firmware is updating, and don't attempt to upload new firmware with a low battery. AUTHORS
libifp was written by Geoff Oakham, based on ifp by Yamashiro Jun. This manual page was written for Debian by Joe Wreschnig <piman@debian.org>, but may be used by others. May 30th, 2004 IFP(1)