I''m looking for a way to shape all traffic on a virtual vlan interface, say eth1.100 to a max of 100mbit. The box is a quagga router with eth0 on the inside and vlan interfaces on the eth1 card to our upstream partners. Each partner has his own vlan on eth1. I tried shaping but was only able to shape outbound traffic on the eth1.100 interface. Inbound shaping was also possible, but only on the eth0 interface. As I cannot see on the eth0 interface through which eth1 interface traffic came in, I can''t use shaping on that interface this way. Does anyone have a solution for me? Could this be done using tc''s routing filter and route realms? _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Konstantin Astafjev
2007-May-22 14:44 UTC
Re: lc shaping in- and outbound traffic on same box
Hello beere, Tuesday, May 22, 2007, 5:24:29 PM, you wrote:> I’m looking for a way to shape all traffic on a virtual vlan > interface, say eth1.100 to a max of 100mbit. The box is a quagga > router with eth0 on the inside and vlan interfaces on the eth1 card > to our upstream partners. Each partner has his own vlan on eth1. > > I tried shaping but was only able to shape outbound traffic on the > eth1.100 interface. Inbound shaping was also possible, but only on > the eth0 interface. As I cannot see on the eth0 interface through > which eth1 interface traffic came in, I can’t use shaping on that interface this way. > > Does anyone have a solution for me? Could this be done using tc’s routing filter and route realms?If I understand you correct http://www.linuximq.net/ is what you need to make shaping on different interfaces. -- Best regards, Konstantin
<beere@vertis.nl>
2007-May-23 10:48 UTC
RE: lc shaping in- and outbound traffic on same box
Thanks! This is very interesting, but I need to patch the kernel for this to work. Would it be possible to mark all traffic that comes in through the eth1.100 interface using iptables and use that mark to shape that traffic leaving the eth0 interface? How would I go about doing this? Erwin -----Original Message----- From: Konstantin Astafjev [mailto:konstantin@astafjev.com] Sent: dinsdag 22 mei 2007 16:44 To: Beer, Erwin de Cc: lartc@mailman.ds9a.nl Subject: Re: [LARTC] lc shaping in- and outbound traffic on same box Hello beere, Tuesday, May 22, 2007, 5:24:29 PM, you wrote:> I''m looking for a way to shape all traffic on a virtual vlan > interface, say eth1.100 to a max of 100mbit. The box is a quagga > router with eth0 on the inside and vlan interfaces on the eth1 card > to our upstream partners. Each partner has his own vlan on eth1. > > I tried shaping but was only able to shape outbound traffic on the > eth1.100 interface. Inbound shaping was also possible, but only on > the eth0 interface. As I cannot see on the eth0 interface through > which eth1 interface traffic came in, I can''t use shaping on thatinterface this way.> > Does anyone have a solution for me? Could this be done using tc''srouting filter and route realms? If I understand you correct http://www.linuximq.net/ is what you need to make shaping on different interfaces. -- Best regards, Konstantin
Hi there! I believe it is possible, you can use the mark option in iptables to assign a mark to each packet and then set filters on tc using these marks. Be aware that this mark only exists within the kernel, so the packet is not modificated. Although I have not read throughly the IMQ stuff I''m wondering if you cant solve your problem with DSCP. On 5/23/07, beere@vertis.nl <beere@vertis.nl> wrote:> > Thanks! This is very interesting, but I need to patch the kernel for > this to work. Would it be possible to mark all traffic that comes in > through the eth1.100 interface using iptables and use that mark to shape > that traffic leaving the eth0 interface? > > How would I go about doing this? > > Erwin > > -----Original Message----- > From: Konstantin Astafjev [mailto:konstantin@astafjev.com] > Sent: dinsdag 22 mei 2007 16:44 > To: Beer, Erwin de > Cc: lartc@mailman.ds9a.nl > Subject: Re: [LARTC] lc shaping in- and outbound traffic on same box > > Hello beere, > > Tuesday, May 22, 2007, 5:24:29 PM, you wrote: > > I''m looking for a way to shape all traffic on a virtual vlan > > interface, say eth1.100 to a max of 100mbit. The box is a quagga > > router with eth0 on the inside and vlan interfaces on the eth1 card > > to our upstream partners. Each partner has his own vlan on eth1. > > > > I tried shaping but was only able to shape outbound traffic on the > > eth1.100 interface. Inbound shaping was also possible, but only on > > the eth0 interface. As I cannot see on the eth0 interface through > > which eth1 interface traffic came in, I can''t use shaping on that > interface this way. > > > > Does anyone have a solution for me? Could this be done using tc''s > routing filter and route realms? > > If I understand you correct http://www.linuximq.net/ is what you need > to make shaping on different interfaces. > > -- > Best regards, > Konstantin > > > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >_______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc