LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-03-2003, 05:31 AM   #1
brabard
LQ Newbie
 
Registered: Nov 2002
Posts: 11

Rep: Reputation: 0
Question iptables - dscp not matches


I am using 2.4.18 kernel + iptables v1.2.7a .
After trying iptables -m dscp it replies "No match by that name"
Is the problem in my iptables version , ore the kernel must be preconfigured ?
Thanks for help
 
Old 04-03-2003, 08:54 AM   #2
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
I've never heard of the 'dscp' match extension. Take a look at 'man iptables' under the 'MATCH EXTENSIONS' section for a list a valid match extensions.
 
Old 04-03-2003, 09:40 PM   #3
Magueta
LQ Newbie
 
Registered: Apr 2003
Location: Toronto, Ontario, Canada
Distribution: Red Hat
Posts: 29

Rep: Reputation: 15
I don't think that module exists, what are you trying to do?

Joe
 
Old 04-04-2003, 12:27 AM   #4
brabard
LQ Newbie
 
Registered: Nov 2002
Posts: 11

Original Poster
Rep: Reputation: 0
dscp
This module matches the 6 bit DSCP field within the TOS field in the IP
header. DSCP has superseded TOS within the IETF.

--dscp value
Match against a numeric (decimal or hex) value [0-32].

--dscp-class DiffServ Class
Match the DiffServ class. This value may be any of the BE, EF,
AFxx or CSx classes. It will then be converted into it's
according numeric value.

directly copied from man iptables ))
 
Old 04-04-2003, 12:39 AM   #5
brabard
LQ Newbie
 
Registered: Nov 2002
Posts: 11

Original Poster
Rep: Reputation: 0
May be I have to be more concrete .
I'm trying to filter packets in case of values of the prec bits in the ToS field of the header . My Linux is a forwarder&firewall and I am using only iptables rules for making decisions .
 
Old 04-04-2003, 09:08 AM   #6
Magueta
LQ Newbie
 
Registered: Apr 2003
Location: Toronto, Ontario, Canada
Distribution: Red Hat
Posts: 29

Rep: Reputation: 15
Then that's very new, I'm using version 1.2.5 (the difference between .5 and .7 is at patch level) and that specification can't be found in the man pages. Perhaps because you're using version "a" it has that extra function, I don't know. But it looks like it's brand new so I don't think you'll find too many people who will know what you're talking about.

Joe
 
Old 04-05-2003, 08:17 AM   #7
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
I'm in the same boat, iptables v1.2.5 doesn't have support for this Match Extension. Sorry to be so quick to tell you to RTFM, but I'd never heard of this one before.
 
Old 10-15-2003, 09:46 AM   #8
deterrak
LQ Newbie
 
Registered: Oct 2003
Distribution: Red Hat and Mandrake mostly, but I like them all
Posts: 2

Rep: Reputation: 0
DSCP marking working on (iptables v1.2.7a on a Redhat 9.0 system)

To get DSCP working with netfilter/ iptables v1.2.7a on a Redhat 9.0 system.

1) as root
'insmod ipt_dscp'

I still got the following error ------
iptables -A ETH1_OUTPUT_PROTOCOLS -s 0/0 -m dscp-class af1
iptables v1.2.7a: Couldn't load match `dscp-class':/lib/iptables/libipt_dscp-class.so: cannot open shared object file: No such file or directory

Try `iptables -h' or 'iptables --help' for more information.
------------------------------------------------------

Needless to say the "help" was of no help.

Next, I tried to look a the library to see what it expected
strings /lib/iptables/libipt_dscp.so | more

Based upon it's output, I tried the following and it seemed to take. I will get to testing it later today to make sure it actually marks the packets. Here is how it was done.

2) Set up a quick test
'iptables -A OUTPUT -s 0/0 -m dscp --dscp-class AF11'

Note the 2 instances of dscp in the command line '-m dscp --dscp-class'

I hope this helps, In the past I have received alot of on-line help from news groups and message boards. I am glad to give back a little.
Kevin

------------------------------------------------------------------
I have an error above. That rule is setup to match a particular DSCP, not mark it. I am still attempting to figure out how to mark code points usinf iptables.

I tried the following rule after another insmod -- ' insmod ipt_DSCP'. I still get an error.

iptables -t mangle -A ETH2_OUTPUT -p icmp -o eth2 -j DSCP --set-dscp-class af11
iptables: No chain/target/match by that name

Any help would be.... helpful.
Thanks,
Kevin

Last edited by deterrak; 10-16-2003 at 09:45 AM.
 
Old 10-15-2003, 12:22 PM   #9
brabard
LQ Newbie
 
Registered: Nov 2002
Posts: 11

Original Poster
Rep: Reputation: 0
Hi Kevin , Hi All ,
Actually I killed my problem before , upgrading to 2.4.20 and iptables 1.2.8 and compiling it as modules to kernel .
Now everything is working fine , I did'n know what was my mistake .

Hope that post will be usefull for others .

Rgrds
Brabard
 
Old 10-16-2003, 12:08 PM   #10
deterrak
LQ Newbie
 
Registered: Oct 2003
Distribution: Red Hat and Mandrake mostly, but I like them all
Posts: 2

Rep: Reputation: 0
Found my problem. I was attempting to mangle a user defined chain. I guess you can't do that. The following worked. Note: I switched from using th eETH2_OUTPUT chain to the OUTPUT chain. I measured the paskets and they get the assigned diffserv code point.

iptables -t mangle -A OUTPUT -o eth2 -j DSCP --set-dscp-class af11

Thanks,
Kevin
 
  


Reply



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
yum = No Matches found jgibz Linux - Newbie 2 03-27-2005 12:38 PM
iptables:cannot apply dscp.patch greklas Linux - Software 0 09-08-2004 10:29 AM
bash: routine outputting both matches and non-matches separately??? Bebo Programming 8 07-19-2004 06:52 AM
vpn only when destination matches given subnet colin.mca Linux - Networking 0 03-18-2004 03:29 AM
sed - multiple matches on the same line mjoc27x Programming 6 04-17-2003 07:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:12 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration