Skip to contentSkip to conversation

How about this setup? Please help!

LARTC Koot, M. 2 participants 2 messages Dec 3, 2002

lore
Share & tools
lore

Koot, M.

author
#0 lore raw

Hi all,

I have the following setup.

              192.168.1.2	  
         +------+  /           +-----+  
         | ADSL | /            |     |          +--------+
INTERNET-|Router|-eth0----eth1-|Linux|-eth0- ---| SWITCH |         
         |      |            / |     | \        +-+-+-+-++
         +------+           /  +-----+  \         | | | |
                    192.168.1.1      192.168.2.1  | | | |
                                                  | | | |
                                                  | | | | 
            [client] 192.168.2.50 (Me) -----------+ | | |
            [client] 192.168.2.51      -------------+ | |
            [client] 192.168.2.52      ---------------+ |
                                                        |
                                                        |
                                       +---+            |       
            [client] 192.168.3.50 -----| H |            | 
            [client] 192.168.3.51 -----| u |   +------+ |
            [client] 192.168.3.52 -----| b |---|Router|-+
                                       +---+  /+------+ \
                                             /           \
                                       192.168.3.1   192.168.2.2

I have an ADSL connection with the following specs:
Down: 8 Mbit :-))
Up: 512 kbps

What I want to do is the following:

I want to ensure that the download speed to the net 192.168.3.0, 192.168.2.52 and 192.168.2.51 is guaranteed at 512 kbps each. When there is no traffic in the 192.168.3.0 net, i want to allow 192.168.2.50 to take the full 8Mbit (that's me)

Same for 192.168.2.52 and 192.168.2.51: When the client is not generating traffic it must go to 192.168.2.50.

When the clients DO generate traffic, there speed must be at 512 kbps. All the rest go to 192.168.2.50

Further I want to shape the upload traffic from net 192.168.3.0, 192.168.2.51 and 192.168.2.52 to a max of 128 kbps.

What is the best way to do that using tc?

TIA

Martijn
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 22 lines · M.

Hi all,

I have the following setup.

              192.168.1.2
         +------+  /           +-----+

         | ADSL | /            |     |          +--------+

INTERNET-|Router|-eth0----eth1-|Linux|-eth0- ---| SWITCH |

         |      |            / |     | \        +-+-+-+-++

         +------+           /  +-----+  \         | | | |
                    192.168.1.1      192.168.2.1  | | | |


            [client] 192.168.2.50 (Me) -----------+ | | |
            [client] 192.168.2.51      -------------+ | |
            [client] 192.168.2.52      ---------------+ |
Quoted 7 lines
                                       +---+            |
            [client] 192.168.3.50 -----| H |            |
            [client] 192.168.3.51 -----| u |   +------+ |
            [client] 192.168.3.52 -----| b |---|Router|-+
                                       +---+  /+------+ \
                                             /           \
                                       192.168.3.1   192.168.2.2

Nice ascii drawing :)

Quoted 8 lines

I want to ensure that the download speed to the net 192.168.3.0, 192.168.2.52 and 192.168.2.51 is guaranteed at 512 kbps each. When there is no traffic in the 192.168.3.0 net, i want to allow 192.168.2.50 to take the full 8Mbit (that's me)

Same for 192.168.2.52 and 192.168.2.51: When the client is not generating traffic it must go to 192.168.2.50.

Quoted 7 lines

When the clients DO generate traffic, there speed must be at 512 kbps. All the rest go to 192.168.2.50

Further I want to shape the upload traffic from net 192.168.3.0, 192.168.2.51 and 192.168.2.52 to a max of 128 kbps.

What is the best way to do that using tc?

Reading the howto on www.lartc.org and the pages on www.docum.org. Remember, you can only manage outgoing bandwidth. So eth1 for download and eth0 for upload speed.

If you use htb, the rate is the minimum bandwidth. If you want to give all unused bandwidth to you, create 1 class for you with a lower prio and 1 class for the others. Add 1 extra class for each PC in the LAN to the "other class". Filtering can be done based on ip-address.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/