Hi all, Atlast i successfully marked IP packets with dsmark.I want to know exactly in which place the dsmark will work? Suppose i have firewall on my traffic control machine.I am curious to know whether marking is done before getting firewall the packet or after firewall?Diagramatically it is like below: --------------------------------- tc utility -------------------------------- | | | ------------------------------- Firewall -------------------------------- | | | ---------------------------------- Interface ----------------------------------- I want to know where exactly packets are marked and queued? Thanks in advance, Aravind. Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more.
On Thursday 11 March 2004 14:40, Aravind babu wrote:> Hi all, > > Atlast i successfully marked IP packets with dsmark.I want to know > exactly in which place the dsmark will work? Suppose i have firewall on my > traffic control machine.I am curious to know whether marking is done before > getting firewall the packet or after firewall?Diagramatically it is like > below: > > > --------------------------------- > tc utility > -------------------------------- > > > > ------------------------------- > Firewall > -------------------------------- > > > > ---------------------------------- > Interface > ----------------------------------- > > I want to know where exactly packets are marked and queued?See http://docum.org/stef.coene/qos/kptd/ Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi, Thanks for the reply. Aravind. Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more.
Dear stef, Thanks for your previous reply.I gone through the link that u mentioned in reply.I need some help from you.I am curious to know the exact flow of the packet i.e. where exactly "ds" will be set,where queuing will happen etc ? Let me describe my thing.I added some printk statements in some files of netfilter code and sch_dsmark.c file.I gave the following sequence of commands in my machine. $ ./tc qdisc add dev eth0 handle 1:0 root dsmark indices 4 $ ./tc class change dev eth0 classid 1:1 dsmark mask 0x0 value 0x80 $ ./tc class change dev eth0 classid 1:2 dsmark mask 0x0 value 0x40 $ ./tc class change dev eth0 classid 1:3 dsmark mask 0x0 value 0x20 $ ./tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip src 172.30.180.43 flowid 1:1 $ ./tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 172.30.180.100 flowid 1:2 After that i gave ping to machine 172.30.180.44 . On 172.30.180.44 i am capturing packets using tcpdump.In IP header,ds is set to 0x80 which is fine. From the printk statements on the console i understand the following things: -> First packet is going to iptables -> After that packet is coming to dsmark_enqueue -> Packet is coming to dsmark_dequeue -> Packet is coming to iptables again. I have seen the code of dsmark_enqueue and dsmark_dequeue functions.In dsmark_enqueue ds value is reading and in dsmark_dequeue ds value is setting with what we gave in command line.Let me clarify if anything wrong in this flow?Also tell me why packet is again going to iptables after queueing? If u know exact flow pls explain in brief.Anyhelp is appreciated. Thanks in advance, Aravind. Yahoo! India Promos: Win a trip for 2 to Britain. Click here.