Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a linux box that I use to simulate a WAN link between two nodes. This linux box has two subinterfaces on eth1 (eth1:11 and eth1:12). I'm successfully using netem / htb to simulate delay and bandwidth limits. However, it seems that the commands are applied globally to the eth1 interface, not to the subinterface. Is it possible to apply qdisc commands only to a specific sub interface?

For reference, here are the tc commands I am using:

tc qdisc add dev eth1:11 root handle 1:0 htb default 10
tc class add dev eth1:11 parent 1:0 classid 1:10 htb rate 1544kbit 
tc qdisc add dev eth1:11 parent 1:10 handle 10:0 netem delay 10ms 2ms 25% distribution normal
share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

After much searching, I found out that this isn't possible with subinterfaces. It is, however, possible with a vlan interface. So - you can effectively achieve the same sort of setup if you have access to the port between your linux box and a switch, and your switch supports vlan tagging. Change the port on the switch to a trunk port and then create your vlan interfaces off of ethX. From there you can use tc to control the flow on a per vlan intereface.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.