I have two machines as shown below:
To internet<---->PC_A<----->PC_B
PC_A has two interfaces (one connected to internet and other to PC_B). PC_B has to go through PC_A to connect to the Internet. I run Dummynet on PC_A. PC_A has IP 192.168.1.1 on the interface facing the internet and IP 10.42.0.1 on the interface facing PC_B. PC_B bas 10.42.0.2 configured on its interface.
I have two pipes in Dummynet configured as follows:
ipfw add pipe 1 ip from 192.168.1.1 to any
ipfw add pipe 2 ip from any to 192.168.1.1
ipfw pipe 1 config bw 5000Kb/s
ipfw pipe 2 config bw 5000Kb/s
If I run bandwidth tests on the two machines (say speedtest.net), PC_A's bandwidth is exactly what I specify in Dummynet, while PC_B gets unlimited bandwidth. I do not understand how this is possible, since PC_B's packets have to go through it's gateway, where it will be subject to Dummynet's rules.
Could someone please point me to suggestions.
Thanks.