All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samit <janasamit@wlink.com.np>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Traffic shaping PPPoe encapsulated packet [SOLVED]
Date: Tue, 28 Aug 2007 12:51:52 +0000	[thread overview]
Message-ID: <46D41A26.3010207@wlink.com.np> (raw)
In-Reply-To: <46D1ABFA.1060901@wlink.com.np>

Thanks..it worked.. :)

/sbin/tc filter add dev eth1 protocol 0x8864  parent 2:0 prio 1 u32 \
match u32 0x$IPREMOTE_HEX 0xffffffff at 24 flowid 2:$ID

Now I don't have to shape the dst traffic on each ppp interface.

Regards,
Samit

Andy Furniss wrote:
> Samit wrote:
>> Hi,
>>
>> I want a way to  traffic shape pppoe encapsulated pkts based on its
>> src/dst Ip address. Is there any way I can mark pppoe encapsulated pkts?
> 
> I don't know what you can do with iptables now it's X tables.
> 
> If you have the ppp interface on the shaping/netfilter box then you will
> see ip from/to it anyway.
> 
> If the pppoe is just passing through then you should be able to make a
> u32 filter to match parts of the packet. Use tcpdump -e to see the
> ethertype protocol number for pppoe data frames and make a filter to
> match that number, then I guess the IP part will be at an offset of 8
> more than the normal offsets. You will need to use u32 to match the
> src/dst addresses in hex. I have never done it, but it should be possible.
> 
> tc filter add dev $DEV protocol $PPPOE prio 1 u32 match u32 0xc0a80001
> 0xffffffff at 20 flowid ....
> 
> should match src 192.168.0.1 use "at 24" for dst.
> 
> Andy
> 
> 
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

      parent reply	other threads:[~2007-08-28 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-26 16:54 [LARTC] Traffic shaping PPPoe encapsulated packet Samit
2007-08-27 20:55 ` Andy Furniss
2007-08-28 12:51 ` Samit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46D41A26.3010207@wlink.com.np \
    --to=janasamit@wlink.com.np \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.