Re: Re: vlan interfaces and tc

Linux Advanced Routing and Traffic Control

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

 



On Mon, 11 Jun 2007 22:11:09 +0200
Michal Soltys <nozo@xxxxxxxx> wrote:

> Christian Benvenuti wrote:
> > 
> > This is one important detail you probably missed:
> > 
> >> (Note that in this case the VLAN interface is a L3 interface)
> > 
> > If you assign an IP address to the VLAN interface and you transmit
> > IP traffic on that interface, than the traffic goes through the VLAN
> > qdisc config and classification works (*).
> > 
>  > [config cut]
>  >
> 
> When I was doing testing with some trivial setup, I did pretty much the same 
> thing as in your config (forward note - also checked htb, smaller mtu, vlan 
> if up and down).
> 
> In order:
> 
> #vconfig add eth0 11
> #ip add add 192.168.20.10/24 dev eth0.11 broad +
> #ip li set eth0.11 up
> 
> #tc qdisc add dev eth0.11 root handle 1:0 hfsc default 1
> #tc class add dev eth0.11 parent 1:0 classid 1:1  hfsc sc rate 10mbit
> #tc class add dev eth0.11 parent 1:0 classid 1:21 hfsc sc rate 10mbit
> 
> #tc filter add dev eth0.11 parent 1:0 proto ip prio 10 u32 flowid 1:21 \
> 	match ip dst 192.168.20.1
> 
> #ip add sh dev eth0.11
> 
> 12: eth0.11@eth0: <BROADCAST,MULTICAST,SLAVE,UP,10000> mtu 1500 qdisc hfsc
>      link/ether 00:0c:f1:da:e9:46 brd ff:ff:ff:ff:ff:ff
>      inet 192.168.20.10/24 brd 192.168.20.255 scope global eth0.11
> 
> #tc -d filter sh dev eth0.11
> 
> filter parent 1: protocol ip pref 10 u32
> filter parent 1: protocol ip pref 10 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht 800
>      bkt 0 flowid 1:21 match c0a81401/ffffffff at 16
> 
> #tc -d class sh dev eth0.11
> 
> class hfsc 1: root
> class hfsc 1:1 parent 1: sc m1 0bit d 0ns m2 10000Kbit
> class hfsc 1:21 parent 1: sc m1 0bit d 0ns m2 10000Kbit
> 
> ... then I did
> 
> ping 192.168.20.1
> 
> ... and ended with
> 
> #tc -d -s class sh dev eth0.11
> 
> class hfsc 1: root
>   Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>   rate 0bit 0pps backlog 0b 0p requeues 0
>   period 0 level 1
> 
> class hfsc 1:1 parent 1: sc m1 0bit d 0ns m2 10000Kbit
>   Sent 348 bytes 9 pkt (dropped 0, overlimits 0 requeues 0)
>   rate 0bit 0pps backlog 0b 0p requeues 0
>   period 9 work 348 bytes rtwork 348 bytes level 0
> 
> class hfsc 1:21 parent 1: sc m1 0bit d 0ns m2 10000Kbit
>   Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>   rate 0bit 0pps backlog 0b 0p requeues 0
>   period 0 level 0
> 
> #tc -d -s filter sh dev eth0.11
> 
> filter parent 1: protocol ip pref 10 u32
> filter parent 1: protocol ip pref 10 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht 800 
> bkt 0 flowid 1:21  (rule hit 0 success 0)
>    match c0a81401/ffffffff at 16 (success 0 )
> 
> 
> ... so I'm probably missing / not seeing something simple, or I don't know. 
> This setup works for real interface, as well as for bonding. During testing, 
> real interface is normally working in 192.168.100/24 subnet.
> 
> "Moving" from OBSD I'm checking what I can and cannot do under linux, so my 
> kernel is a bit full atm, with majority of stuff compiled into it.
> 
> I'm using clean & patched gentoo here.

Doing traffic control on vlan's may work as expected because
the vlan pseudo-device does not have any transmit queue.

-- 
Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
_______________________________________________
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