Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-07-2012, 02:33 AM   #1
LQ Newbie
Registered: Jan 2012
Posts: 12

Rep: Reputation: Disabled
Traffic prioritisation using iptables

I have created vlans on ubuntu with id 100,200,300,400 on raw interface eth0.Now i wanted to prioritise the traffic flowing on these VLAN interfaces, like traffic flowing through eth0.100 is having more priority than eth0.200.I think so we can do this by using iptables.But i don't know how to implement it.I requesting anyone who has idea on this can share it.Thanks in advance.

thanks and regards
Old 08-07-2012, 02:54 AM   #2
LQ Newbie
Registered: Aug 2012
Distribution: Slackware+RHEL
Posts: 24

Rep: Reputation: Disabled
No, I do not think you will be able to do that with iptables alone, because any network component in your network needs to know you are priorizing something.

IP is layer 3 and Ethernet is layer 2. You'd have to tell your switches how to priorize the ethernet traffic by doing a CoS-map for your subinterfaces, or doing CoS on your linux box and have the switch trust the CoS-values it gets. Alternatively DSCP and DSCP-CoS Maps work too.

Of course, shaping is a different story if you meant to do that.

Last edited by Gleylancer; 08-07-2012 at 03:07 AM.
Old 08-07-2012, 05:26 AM   #3
LQ Newbie
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Yes i think iptables alone is not enough for that.It just marks the packets.

I did further study and this is the understanding i have about using the iptables and tc for traffic prioritisation for my above stated situation.I want to verify that is valid one. Firstly,using iptables we can mark the packets coming from the particular vlan interface with an integer.(I think so this is just a number that is added in the IP header to segregate the packets).Secondly, we need to create classes and assign priority, then add filter rules to classify the packets into different classes.So packets of particular interface will belong to particular class and particular priority,and thus the packets of high priority will get be transferred.

Is my above understanding right? If not can anyone please explain on this,please.

thanks and regards


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM
VoIP udp packets prioritisation sqn Linux - Networking 3 01-25-2006 09:32 PM
iptables forward traffic alaios Linux - Networking 1 09-28-2005 04:43 AM
Iptables, traffic logging burn0ut Linux - Networking 4 12-11-2004 04:08 AM
IPTABLES and PPTP Traffic pssst_yeah_you Linux - Security 2 07-27-2004 05:31 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration