IFB setup was no subject
Quoted 42 lines · Leigh Sharpe
Hi all,
I'm having a hell of a time getting my IFB to work. I know I've done
this before, so I'm missing something stupid. Can anybody tell me what it might be?
Configs as follows:--------
#!/bin/sh
modprobe ifb numifbs00
modprobeact_mirred
modprobe 8021qbrctl addbr br0
brctl setfd br0 0
brctl stp br0 off
brctl addif br0 eth1
brctl addif br0 eth2
ifconfig eth1 up
ifconfig eth2 up
ifconfig br0 uptc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8
tc qdisc add dev eth2 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8ifconfig ifb0 up
tc qdisc add dev ifb0 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8
tc class add dev ifb0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 100Kbit weight 10Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded isolated
tc qdisc add dev eth1 ingress
tc qdisc add dev eth2 ingress
tc filter add dev eth1 parent ffff: protocol ip prio 10 u32 match u32 0 0 action mirred egress redirect dev ifb0
tc filter add dev eth2 parent ffff: protocol ip prio 10 u32 match u32 0 0 action mirred egress redirect dev ifb0
Quoted 8 lines
tc filter add dev ifb0 parent 1:0 protocol ip prio 1 u32 match u32 0 0 flowid 1:1
--------------By my reckoning, this should redirect all packets passing through eth2 and eth1 through the IFB, and put a rate limit on the IFB of 100Kbits/sec.
What have I missed?
Subject changed as the no subject thread I see is quite long and diverse :-)
It will only get ingress ethertype ip traffic on eth 1/2 (I don't know whether bridging complicates it - still havent fixed my own bridge yet)
You need two more ... action mirred egress redirect ... to get egress eth1/2 traffic aswell. You need something classfull on the roots for it to work - you have CBQ already if you didn't prio would have done.
If you have a qdisc on the real interface and redirect egress traffic to ifb then you can't classify again, though classification done before the
redirect will be reinstated after the packets come back from ifb.
Generally - I never used CBQ so don't know it's limitations/behavior. Accepting this may just be a test, but if you did it like this for real ie. sending in/out traffic to one slow buffer it will make for a truly horrible user experience - you should at least seperate the directions into seperate classes and make the classes share the bandwidth.
I wonder if using policers and shared meters would be a nicer alternative - not that I have any examples to hand.
If the nics are gig/ you use xen turn off * segmentation offload with ethtool -k
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 2 lines
Subject changed as the no subject thread I see is quite long and diverse :-)
Yeah, sorry about that. Minor brain fade.
Seems that the example I gave actually works, but not the way I'm using it.
I am bridging VLAN tagged packets, but for some reason they are not being subjected to the rate limit. If I pass normal, untagged packets through this setup, it behaves as expected. However, once I put tagged packets through the bridge, it fails to shape traffic.
I don't want to have to use VLAN sub-interfaces, because the VLAN code strips the 802.1q tag from packets before they can be examined, which causes me problems in other areas.
Regards,
Leigh
Leigh Sharpe
Network Systems Engineer
Pacific Wireless
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email [email protected]
web www.pacificwireless.com.au
-----Original Message-----
From: Andy Furniss [mailto:[email protected]]
Sent: Thursday, March 29, 2007 2:59 AM
To: Leigh Sharpe
Cc: lartc
Subject: Re: IFB setup was no subject
Quoted 42 lines · Leigh Sharpe
Hi all,
I'm having a hell of a time getting my IFB to work. I know I've done
this before, so I'm missing something stupid. Can anybody tell me what it might be?
Configs as follows:--------
#!/bin/sh
modprobe ifb numifbs00
modprobeact_mirred
modprobe 8021qbrctl addbr br0
brctl setfd br0 0
brctl stp br0 off
brctl addif br0 eth1
brctl addif br0 eth2
ifconfig eth1 up
ifconfig eth2 up
ifconfig br0 uptc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8
tc qdisc add dev eth2 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8ifconfig ifb0 up
tc qdisc add dev ifb0 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8
tc class add dev ifb0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 100Kbit weight 10Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded isolated
tc qdisc add dev eth1 ingress
tc qdisc add dev eth2 ingress
tc filter add dev eth1 parent ffff: protocol ip prio 10 u32 match u32 0 0 action mirred egress redirect dev ifb0
tc filter add dev eth2 parent ffff: protocol ip prio 10 u32 match u32 0 0 action mirred egress redirect dev ifb0
Quoted 8 lines
tc filter add dev ifb0 parent 1:0 protocol ip prio 1 u32 match u32 0 0 flowid 1:1
--------------By my reckoning, this should redirect all packets passing through eth2 and eth1 through the IFB, and put a rate limit on the IFB of 100Kbits/sec.
What have I missed?
Subject changed as the no subject thread I see is quite long and diverse :-)
It will only get ingress ethertype ip traffic on eth 1/2 (I don't know whether bridging complicates it - still havent fixed my own bridge yet)
You need two more ... action mirred egress redirect ... to get egress eth1/2 traffic aswell. You need something classfull on the roots for it to work - you have CBQ already if you didn't prio would have done.
If you have a qdisc on the real interface and redirect egress traffic to ifb then you can't classify again, though classification done before the
redirect will be reinstated after the packets come back from ifb.
Generally - I never used CBQ so don't know it's limitations/behavior. Accepting this may just be a test, but if you did it like this for real ie. sending in/out traffic to one slow buffer it will make for a truly horrible user experience - you should at least seperate the directions into seperate classes and make the classes share the bandwidth.
I wonder if using policers and shared meters would be a nicer alternative - not that I have any examples to hand.
If the nics are gig/ you use xen turn off * segmentation offload with ethtool -k
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 2 lines · Leigh Sharpe
Seems that the example I gave actually works, but not the way I'm using it. I am bridging VLAN tagged packets,
Try protocol 8021q or whatever its number is - if there are other protocol filters you will need a different prio or you will get an error.
but for some reason they are not being subjected to the rate limit. If I pass normal, untagged packets through this setup, it behaves as expected. However, once I put tagged packets through the bridge, it fails to shape traffic.
Quoted 1 line
I don't want to have to use VLAN sub-interfaces, because the VLAN code strips the 802.1q tag from packets before they can be examined, which causes me problems in other areas.
Are these wireless customers?
I've never shaped wireless - do you get alot of extra loss from link layer, what's the bandwidth, single duplex or is it round robin type?
I wonder if htb tweaked/untweaked/hfsc/policers could be better than cbq
- you may be able to get things better for link latyer, tcpdumps will show you how bursty things are for users.
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 2 lines
Try protocol 8021q or whatever its number is - if there are other protocol filters you will need a different prio or you will get an error.
I'll try that. I hav just seem some older stuff on the VLAN mailing list which might do what I want. I'm still investigating.
Quoted 1 line
Are these wireless customers?
Nup. Well, not directly. This is going on our backbone, so I'm not taking traffic straight off the wireless. Ultimately, it will be delivered to a customer over a wireless link, but there's lots of ethernet between the QOS box and the wireless. By the way, wireless != 802.11, there's plenty of other flavours which all taste just like ethernet.
Quoted 1 line
I wonder if htb tweaked/untweaked/hfsc/policers could be better than cbq
At this point I'm not locked into any particular discipline, but cbq looked like it would do what I wanted. I'll look a little further into the other possibilities.
Regards,
Leigh
Leigh Sharpe
Network Systems Engineer
Pacific Wireless
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email [email protected]
web www.pacificwireless.com.au
-----Original Message-----
From: Andy Furniss [mailto:[email protected]]
Sent: Thursday, March 29, 2007 12:33 PM
To: Leigh Sharpe
Cc: lartc
Subject: Re: [LARTC] RE: IFB setup was no subject
Quoted 2 lines · Leigh Sharpe
Seems that the example I gave actually works, but not the way I'm using it. I am bridging VLAN tagged packets,
Try protocol 8021q or whatever its number is - if there are other protocol filters you will need a different prio or you will get an error.
but for some reason they are not being subjected to the rate limit. If I pass normal, untagged packets through this setup, it behaves as expected. However, once I put tagged packets through the bridge, it fails to shape traffic.
Quoted 1 line
I don't want to have to use VLAN sub-interfaces, because the VLAN code strips the 802.1q tag from packets before they can be examined, which causes me problems in other areas.
Are these wireless customers?
I've never shaped wireless - do you get alot of extra loss from link layer, what's the bandwidth, single duplex or is it round robin type?
I wonder if htb tweaked/untweaked/hfsc/policers could be better than cbq
- you may be able to get things better for link latyer, tcpdumps will show you how bursty things are for users.
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 2 lines · Leigh Sharpe
Nup. Well, not directly. This is going on our backbone, so I'm not taking traffic straight off the wireless. Ultimately, it will be delivered to a customer over a wireless link, but there's lots of ethernet between the QOS box and the wireless. By the way, wireless != 802.11, there's plenty of other flavours which all taste just like ethernet.
It was the numifbs 1000 and your sig that made me think wireless customers.
I just saw a patch go in for ifb that fixes a potential crash.
http://www.spinics.net/lists/netdev/msg28168.html
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc