Is it possible to classify traffic by ip groups ? The situation is, Say a client is connected directly to our network but pays only for a international rate. Say he is connected at 10Mpbs and is allowed 64Kbps international. The agreement is that anything local (on our network) he may access at 10mbps, but intl stays 64k. This is pretty straightforward. Say now he wants to share his 64k with another company, both connected at his connection point. Then he wants 32k guaranteed for both companies. (Thus a linux box, 3 network cards;; 1 network for each company; 1 to connect to us) My solution is I would shape the host at the edge of the network to 64k, so it shapes international. (this is already in place) To shape the 32k each on his 2 lan interfaces and allow the 10mbps local lets say...: Our network is A= x.x.x.x/x Then anything which is not our network will be !A Can I then say to tc to class !A? Basically my question is, can I class/shape the inverse of a certain group of IP''s ? And logically would this solution work at all? Hope I explained myself correctly... Could somebody maybe give me a tc example to maybe help me understand it better? Tnx I _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
----- Original Message ----- From: "Ivan Groenewald" <ivan@office.adept.co.za> To: <lartc@mailman.ds9a.nl> Sent: Παρασκευή, 20 Ιουνίου 2003 11:28 πμ Subject: [LARTC] tc ip group> Is it possible to classify traffic by ip groups ?How do you classify your packets? u32? Generally speaking, I have many problems with the u32 classifier. Now, I do marking with IPtables, which has power to do just about anything anyone could ever want... Including the exceptions you want. Have you tried it? - Giannis _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
I have only used u32 in the past. On the LAN I still have to decide. Marking the packets with Iptables sounds like a good idea and is quite simple. How would I setup tc to match the marked packets (sorry I''m a bit lazy to rtfm today :-)) Regards Ivan -----Original Message----- From: Giannis Stoilis [mailto:giannis@stoilis.gr] Sent: Friday, June 20, 2003 10:42 AM To: Ivan Groenewald Cc: lartc@mailman.ds9a.nl Subject: Re: [LARTC] tc ip group ----- Original Message ----- From: "Ivan Groenewald" <ivan@office.adept.co.za> To: <lartc@mailman.ds9a.nl> Sent: Παρασκευή, 20 Ιουνίου 2003 11:28 πμ Subject: [LARTC] tc ip group> Is it possible to classify traffic by ip groups ?How do you classify your packets? u32? Generally speaking, I have many problems with the u32 classifier. Now, I do marking with IPtables, which has power to do just about anything anyone could ever want... Including the exceptions you want. Have you tried it? - Giannis _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
----- Original Message ----- From: "Ivan Groenewald" <ivan@office.adept.co.za> To: "''Giannis Stoilis''" <giannis@stoilis.gr>; "''Ivan Groenewald''" <ivan@office.adept.co.za> Cc: <lartc@mailman.ds9a.nl> Sent: Παρασκευή, 20 Ιουνίου 2003 11:48 πμ Subject: RE: [LARTC] tc ip group> I have only used u32 in the past. > On the LAN I still have to decide. Marking the packets with Iptables > sounds like a good idea and is quite simple. > How would I setup tc to match the marked packets (sorry I''m a bit lazy > to rtfm today :-))And I am too bored, to send you to hell... :-) So, this is an example: iptables rules: iptables -A FORWARD -t mangle -p tcp --sport 80 -j MARK --set-mark 2 iptables -A FORWARD -t mangle -p tcp --dport 80 -j MARK --set-mark 2 iptables -A FORWARD -t mangle -p icmp -j MARK --set-mark 2 tc filter rules: tc filter add dev eth0 parent 1: protocol ip prio 1 handle 2 fw classid 1:12 - Giannis _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/