LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-26-2004, 04:21 AM   #1
markraem
Member
 
Registered: Nov 2003
Posts: 82

Rep: Reputation: 15
How to set TOS bits on LINUX ethernet interface


How can I configure TOS bits ( or IP precendence bits) on an ethernet interface of linux (Red Hat) ?

Can I configure this on a per ethernet interface basis ?

Tnx.
 
Old 02-26-2004, 07:23 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
To do that you need iptables. The table of TOS is the following:
HEXA BINAIRE DECIMAL SIGNIFICATION
0x10 1000 8 Minimize Delay
0x08 0100 4 Maximize throughput
0x04 0010 2 Maximize reliability
0x02 0001 1 Minimize monetary cost
0x00 0000 0 Normal

and here is an example of the rules to use to add TOS in packets:
iptables -A PREROUTING -t mangle -p tcp --sport ssh -j TOS --set-tos Minimize-Delay
iptables -A PREROUTING -t mangle -p tcp --sport ftp -j TOS --set-tos Minimize-Delay
iptables -A PREROUTING -t mangle -p tcp --sport ftp-data -j TOS --set-tos Maximize-Throughput

Hope this help you
 
Old 02-26-2004, 08:01 AM   #3
markraem
Member
 
Registered: Nov 2003
Posts: 82

Original Poster
Rep: Reputation: 15
Tnx for your reply

Are you sure I need iptables for that ?

There is no way doing it without IPtables ?
 
Old 02-26-2004, 08:11 AM   #4
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Maybe there's a way to do it without iptables but I don't know it... Each time I've done QoS on Linux I have used tools like iptable or tc.
Now another way is to do your own program to modify TOS bits in packets
 
  


Reply


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
TOS in IP Header set to Minimize-Dealay - no difference ddaas Linux - Networking 5 07-26-2005 07:32 PM
Java 64 bits and applications of 32 bits RGB_mdk Linux - Software 3 06-13-2005 09:05 AM
set the tos alaios Linux - Networking 4 02-08-2005 06:04 AM
Linux HOW-TOs.. sramelyk Linux - Software 3 03-06-2004 11:36 AM
IP TOS in Linux MajorTux Linux - Networking 2 08-05-2002 06:06 AM


All times are GMT -5. The time now is 02:45 PM.

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