All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Completely baffled..
Date: Sun, 26 Oct 2003 17:20:21 +0000	[thread overview]
Message-ID: <marc-lartc-106719117924175@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106704377127977@msgid-missing>

On Saturday 25 October 2003 02:53, Paul J. Caritj wrote:
> Hello again,
> I am completely stumped. I have the following configuration bound to
> both the ingress and egress adapters of a firewall (the only difference
> between them being that the external interface matches by source ip, the
> internal by destination), the goal of which is to throttle traffic to
> and from the local network on a host-by-host basis. Now, with this
> configuration throttling works perfectly for uploading (ie host -> eth2
> -> eth1 -> *). However, downloading is not throttled at all *except*
> when the machine is uploading and downloading simultaneously; only then
> does the download throttle have any effect.
>
> I tested this using IPerf, with the throttle set to 256kbit both ways.
> Upload always yields the expected results. Download tops out at about
> 4.5Mbit - its a wireless link, ie no throttling evident. However, when
> the test machine is running iperf as a client and server simultaneously
> (ie uploading and downloading about the same amount of data
> simultaneously), both directions are throttled as they should be around
> 256kbit.
>
> "tc -s class show dev eth2" shows that no packets are being referred to
> this class; this is not the case for the same class on eth1.
>
> Let me know if you would like to see the setup for eth1 (external
> interface) as well; this is the setup on eth2 (internal interface).
>
> qdisc htb 1: r2q 10 default 0 direct_packets_stat 3
>
> class htb 1:fffe root prio 0 rate 256Kbit ceil 256Kbit burst 6Kb cburst
> 3565b
>
> filter parent 1: protocol ip pref 1 u32
> filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1
> filter parent 1: protocol ip pref 1 u32 fh 2: ht divisor 256
> filter parent 1: protocol ip pref 1 u32 fh 2:fe:800 order 2048 key ht 2
> bkt fe flowid 1:fffe
>   match 0a00fffe/ffffffff at 16
> filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht
> 800 bkt 0 link 2:
>   match 0a000000/ffff0000 at 16
>     hash mask 000000ff at 12
> filter parent 1: protocol ip pref 5 u32
> filter parent 1: protocol ip pref 5 u32 fh 801: ht divisor 1
> filter parent 1: protocol ip pref 5 u32 fh 2: ht divisor 256
> filter parent 1: protocol ip pref 5 u32 fh 2:fe:800 order 2048 key ht 2
> bkt fe flowid 1:fffe
>   match 0a00fffe/ffffffff at 16
> filter parent 1: protocol ip pref 5 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 5 u32 fh 800::800 order 2048 key ht
> 800 bkt 0 link 2:
>   match 0a000000/ffff0000 at 16
>     hash mask 000000ff at 12
>
> Please help; I am completely confused.
You are working on a a firewall.  So the box is natting the packets.  That 
means that the source address of the packets you send to the internet is 
rewritten.  So you can't use the source address to classify the packets.

You can use iptables and the fw filtter to mark the packets and classify them 
based on the source address.

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/

      reply	other threads:[~2003-10-26 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-25  0:53 [LARTC] Completely baffled Paul J. Caritj
2003-10-26 17:20 ` Stef Coene [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=marc-lartc-106719117924175@msgid-missing \
    --to=stef.coene@docum.org \
    --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.