Re: Problems with traffic shaping (tcng / tc)

From: Clemens Eisserer (linuxhippy_at_gmail.com)
Date: 09/20/05

  • Next message: Giovani Dias: "I want to be vendor of Debian."
    Date: Tue, 20 Sep 2005 21:39:33 +0200
    To: debian-user@lists.debian.org
    
    

    Does really nobody know wether this does not work?
    Should it work theoretically?

    Maybe you could point me where tc/tcng-experienced people are - I do
    not want to nerve with this topic since its of course on topic on the
    debian users list ;-)

    Thanks for your patience, lg Clemens

    2005/9/20, Clemens Eisserer <linuxhippy@gmail.com>:
    > Hi there,
    >
    > I use a old P90 for routing our LAN into the internet, however
    > sometimes I want to download large binaries to the server itself which
    > may not slow down the internet-connection of the PCs in the LAN.
    >
    > I wrote a small tcng-skript which should do the trick - basically
    > assign all available bandwith tho the two end-user pcs in the LAN
    > (user1, user2) - and only very little minium bandwith to the server
    > itself (user3).
    > However if I start to download an iso on the server using wget
    > browsing is almost impossible on the LAN pcs at all :-(
    > Any ideas what could be wrong, since I am very new to tcng it could be
    > easily that I made mistakes or misunderstood something.
    > Btw. I route the two PCs into the internet doing NAT via iptables.
    >
    > Please help, I already tried days to slove it myself but I simply was
    > not able to find the problem :-(
    >
    > Thank you in advance, lg Clemens
    >
    > The tcng-"source":
    >
    > #include "fields.tc"
    > #include "ports.tc"
    > $INTERFACE="ippp0";
    > $MAX=75kbps;
    > $RATE_USER1=60kbps;
    > $RATE_USER2=12kbps;
    > $RATE_USER3=3kbps;
    >
    >
    > dev $INTERFACE
    > {
    > egress
    > {
    > class (<$user1>) if ip_src == 192.168.0.2;
    > class (<$user2>) if ip_src == 192.168.1.2;
    > class (<$user3>) if ip_src == 127.0.0.1;
    >
    > htb ()
    > {
    > class (rate $MAX, ceil $MAX)
    > {
    > $user1 = class (rate $RATE_USER1, ceil $MAX) {sfq;};
    > $user2 = class (rate $RATE_USER2, ceil $MAX) {sfq;};
    > $user3 = class (rate $RATE_USER3, ceil $MAX) {sfq;};
    > }
    > }
    > }
    > }
    >
    >
    > The resulting tc-skript:
    >
    > tc qdisc del dev ippp0 root
    >
    > # =============================== Device ippp0 ================================
    >
    > tc qdisc add dev ippp0 handle 1:0 root dsmark indices 4 default_index 0
    > tc qdisc add dev ippp0 handle 2:0 parent 1:0 htb
    > tc class add dev ippp0 parent 2:0 classid 2:1 htb rate 9375bps ceil 9375bps
    > tc class add dev ippp0 parent 2:1 classid 2:2 htb rate 7500bps ceil 9375bps
    > tc qdisc add dev ippp0 handle 3:0 parent 2:2 sfq
    > tc class add dev ippp0 parent 2:1 classid 2:3 htb rate 1500bps ceil 9375bps
    > tc qdisc add dev ippp0 handle 4:0 parent 2:3 sfq
    > tc class add dev ippp0 parent 2:1 classid 2:4 htb rate 375bps ceil 9375bps
    > tc qdisc add dev ippp0 handle 5:0 parent 2:4 sfq
    > tc filter add dev ippp0 parent 2:0 protocol all prio 1 tcindex mask 0x3 shift 0
    > tc filter add dev ippp0 parent 2:0 protocol all prio 1 handle 3
    > tcindex classid 2:4
    > tc filter add dev ippp0 parent 2:0 protocol all prio 1 handle 2
    > tcindex classid 2:3
    > tc filter add dev ippp0 parent 2:0 protocol all prio 1 handle 1
    > tcindex classid 2:2
    > tc filter add dev ippp0 parent 1:0 protocol all prio 1 u32 match u32
    > 0xc0a80002 0xffffffff at 12 classid 1:1
    > tc filter add dev ippp0 parent 1:0 protocol all prio 1 u32 match u32
    > 0xc0a80102 0xffffffff at 12 classid 1:2
    > tc filter add dev ippp0 parent 1:0 protocol all prio 1 u32 match u32
    > 0x7f000001 0xffffffff at 12 classid 1:3
    >


  • Next message: Giovani Dias: "I want to be vendor of Debian."

    Relevant Pages

    • RAS - Routingproblem? DNS? Wins?
      ... ging übers Kabelmodem ins Internet und die andere ins LAN. ... Adapter und über diesen nam der Router externe Anrufe unseres Aussenlagers ... anderen PCs ganz normal mit 1 Netzwerkkarte im LAN angehängt ist. ...
      (microsoft.public.de.german.windowsxp.networking)
    • RAS - Routingproblem? DNS? Wins?
      ... ging übers Kabelmodem ins Internet und die andere ins LAN. ... Adapter und über diesen nam der Router externe Anrufe unseres Aussenlagers ... anderen PCs ganz normal mit 1 Netzwerkkarte im LAN angehängt ist. ...
      (microsoft.public.de.german.windowsxp.networking)
    • Re: NetMeeting 3.01
      ... How do I try to ping the other PCs on LAN? ... I have cable internet accessing through a LAN. ...
      (microsoft.public.windowsxp.general)
    • Connect to Internet thru Lan
      ... LAN OS NT4 when one PC on LAN is OS W2000Pro and connected ... to Internet by dialup or cable? ... Assume since all PCs can ...
      (microsoft.public.win2000.networking)
    • Re: Moving Exchange Server
      ... Placing them in the LAN gives internal users 100% access with no firewall to ... DMZ, thus 0% risk/ports open between them. ... If Microsoft Exchange and/or Active Directory cannot run ... >> Internet is better? ...
      (microsoft.public.exchange.setup)