Fair bandwidth distribution of an internet connection shared with IP masquerading



  • 1. How to mount linux driver to solaris 5.8 with write permission
    We have a linux machine with big disk space, need to work on solaris 5.8. I am wondering whether could mount linux disk to solaris 5.8, I need to write on linux disk from solaris. Thanks.
  • 2. dhcp & dns
    Hi, yesteray I installed slackware 10.2 to my comp. I have 3 ethernet cards in my computer - one connects to cable modem. Two others are connected to bros and dads winxp comps so they should be able to access inet too (at least when I boot my comp to winxp it works - some network bridge and internet connection sharing). How can I get same setup with my linux? I am trying dnsmasq but after several hours of playing with dnsmasq.conf and rereading man pages I am getting confused. Can someone pls advice me what I have to configure to get it working? Thx for your time. ps: i got vlaid line in /var/state/dnsmasq/dnsmasq.leases but client still cant connect to inet ...
  • 3. How to open ports in Linux
    Hi All, I am newbie in linux I have the need to open the port 8000 in my linux box. I do not have any firewall or serurity tools enabled. Help is highly aprreciated Thank You, Kanthi
  • 4. How do I determine which eth i/f is which?
    How do I determine which eth i/f is which? I need a way to determine which interface is assigned to which eth*. For example, which NIC i/f is assigned to eth0 ... and which NIC i/f is assigned to eth1. Can I physically disable eth0 (or eth1) from a terminal and then look at the LED's on the back to determine which is which? Thanks!

Fair bandwidth distribution of an internet connection shared with IP masquerading

Postby Anirban » Thu, 30 Nov 2006 04:24:29 GMT

Hi everybody !
I set up a Linux box (Fedora Core 4 on a Pentium III 833MHz processor
and 128MB RAM) to share a broadband connection (dialup type :  uses
rp-pppoe) over a local Ethernet LAN. The material available on the net
was of great help.
The sharing worked flawlessly but then I ran into the next problem
which the tutorials had not foreseen :
            Fair bandwidth distribution.

Can anyone point me to any material on the internet or to any reading
material which broaches on the subject of imposing bandwidth
restriction using possibly iptables.
Any other solution would be equally welcome as long as it does not call
for using a proxy.

Thanks in advance.

--- Anirban

Re: Fair bandwidth distribution of an internet connection shared with IP masquerading

Postby Lasse Jensen » Thu, 30 Nov 2006 06:12:27 GMT

Iptables can't do that, but squid is a good choice if you only have to deal
with HTTP traffic.

Lasse Jensen [fafler at g mail dot com]
Linux, the choice of a GNU generation.

Re: Fair bandwidth distribution of an internet connection shared with IP masquerading

Postby Michael Heiming » Thu, 30 Nov 2006 06:53:15 GMT

In comp.os.linux.networking Anirban < XXXX@XXXXX.COM >:

No need for Internet, install the iproute package if it isn't
already and look at /usr/share/doc/iproute* which should get you
going on using "tc" to play with qdisc/filter/class until it
suits your needs.

"Linux Advanced Routing & Traffic Control HOWTO" (ww.tldp.org)
should be helpful in addition.

Good luck

Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo  XXXX@XXXXX.COM  | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 246: It must have been the lightning storm we had
(yesterday) (last week) (last month)

Similar Threads:

1.LAN loses internal IP connectivity when BSD router loses internet connection

I have a small home network that looks like this: (mumbai) - P3-350 128MB RAM, dedicated FreeBSD 6.0-RELEASE router (cochin) - Mac Mini 1.42GHz PowerPC 256MB RAM, OS X 10.3.9 (kolkata) - P3-933 1.2GB RAM, FreeBSD 6.0-RELEASE fileserver (delhi) - MacBook 2GHz Core Duo 512MB RAM, OS X 10.4.7 (pondicherry) - iMac 2.16GHz Core Duo 2GB RAM, OS X 10.4.8

Internet connectivity is via an RCA DCM425C Comcast cable modem.  Comcast 
isn't so bad, and neither is the modem, but like any other consumer grade 
internet service, it loses its connection on occasion.  The problem is 
this: when the router (mumbai) loses connectivity on its external 
interface, the LAN grinds to a halt.  I'm able to ping any and all hosts.  
However, I can't make connections to mumbai or kolkata via ssh, all nfs 
mounts become unusable, and http requests are unresponsive as well.  So, 
I'm forced to power cycle mumbai so it renews the DHCP lease upon startup.  
Alternately, I attach the crappy 15" CRT and keyboard I keep in my closet 
to it, so I can manually run dhclient on its console or otherwise 
investigate the issue.  I wish I could do that stuff with ssh, but I 

So, let's say the internet stops working for whatever reason.  When I 
attempt to ssh to mumbai or kolkata from one of my Macs, the connection is 
not refused -- it just hangs until the connection is closed after a few 
minutes.  The error messages in /var/log/messages look like this:

Oct  8 20:28:44 kolkata sshd[4236]: fatal: Timeout before authentication for
Oct  9 07:22:33 mumbai sshd[2376]: fatal: Timeout before authentication for

The moment the internet connection is restored on mumbai's external 
interface, everything works smoothly.

This is mumbai's pf.conf -- pieced together from others' examples; I know 
it's not perfect:

int_if="xl0"                    # internal (to switch) xl0 (100 Mbps)
ext_if="xl1"                    # external (to modem) xl1 (10 Mbps)
internal_net=""   # internal network ip range
btmachine=""         # kolkata is the bt machine
icmp_types="echoreq"            # icmp packet type to allow at firewall
isp_dhcp_server=""   # dhcp server
set block-policy return
set loginterface $ext_if
set skip on lo0
scrub in
nat on $ext_if from !($ext_if) to any -> ($ext_if)
nat-anchor "ftp-proxy/*"
rdr-anchor "ftp-proxy/*"
rdr pass on $int_if proto tcp to port ftp -> port 8021
rdr on $ext_if proto tcp from any to any port 6881:65014 -> $btmachine port 6881:65014
rdr on $ext_if proto udp from any to any port 6881:65014 -> $btmachine port 6881:65014
block in
pass out keep state
antispoof quick for { lo $int_if }
pass in quick on $ext_if proto tcp from any to $btmachine port 6881:65014 flags S/SA keep state
pass in quick on $ext_if proto udp from any to $btmachine port 6881:65014 keep state
pass in quick on $ext_if inet proto udp from $isp_dhcp_server port bootps to port bootpc keep state
anchor "ftp-proxy/*"
pass in inet proto icmp all icmp-type $icmp_types keep state
pass quick on $int_if

Can anyone offer any advice?

Thanks a lot,


2.Internet Connection Sharing with Linux

 I've been trying to network my Linux computer with this
Windows XP machine. I'm trying to connect the Linux machine
through this computer using the Internet Connection Sharing
feature. In doing so, however, I think I've seriously
messed up some kind of configuration, and I get an error
message that tells me "Cannot accept control messages at
this time" or something like that when the network is
enabled and I try to share and/or firewall my dial-up
connection. What can I do to fix this problem and is
Internet Connection Sharing possible with Linux?

3.Internet Connection Sharing (Fedora Core)

Back when i used Windoze (which was really only about three months
ago) Internet Connection Sharing was really easy. I use Fedora Core
Linux now and I need to share an Internet connection with a Windoze
box. the Winbox I need to share with is far underpowered (xp, 96 MB of
ram avail.) and thus cannot function as an ICS server...

Thats why i need to setup my linux computer (which is connected now)
to share its connection with the windoze computer. I've looked through
some of the posts here, but have not found info relevant to my distro.
My distro uses kernel 2.4.22 and has every package that came with it

If you know how to do ICS on a Fedora Core machine, please let me know
how, or if you know some universal method that works on all distros,
that would be great, too.

4.Internet connection sharing

Hello all,

I am facing a problem here. I have RH 8.0 box on a our LAN which i m
using to connect to the internet. I am unable to share this connection
with the LAN. Can anyone point why this is happenin ??
I can connect to the net from RH 8.0 but i am unable to connect from
the LAN.
When i ping the ip for e.g which is RH 8.0 box configured
as a gateway from internal LAN it pings.

Any solutions ?? 

Thanks in advance.

Return to linux


Who is online

Users browsing this forum: No registered users and 65 guest