LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Dynamic internet sharing among several hosts (https://www.linuxquestions.org/questions/linux-networking-3/dynamic-internet-sharing-among-several-hosts-223421/)

fillgood 08-28-2004 04:30 AM

Dynamic internet sharing among several hosts
 
Hello All !

I have the difficulties in configuring dynamic priorities for several hosts to allow them share the internet in this case:
- one host with highest priority makes connection and borrow all bandwidth
- second host in the same time with lowest priority make connetion and borrow less then host with highest priority
- third host in the same time and the same priority share bandwidth in half.
... and so on
I have had read a documentaion about Linux Advanced Routing and found some similar (1) but there configuration is

statical. It would be ideally if this sample is possible to change for my needs. If somebody knows please direct me.

www . opalsoft . net / qos / DS-28 .htm

maxut 08-28-2004 04:42 AM

there is something there :
http://www.szabilinux.hu/bandwidth/

i didnt try it. but it seems good.

also it is possible to limit bandtwith trougth squid proxy with "delaying pool" supporrt. but squid must be compiled with delaying pools support. rpms of squid come without this support.

fillgood 08-28-2004 05:07 AM

Exactly squid's delay pools helps limit, but watch for this:

host1 ----------- \ NAT \ SQUID <--> Inet link
host2------------ / Rules etc. /

Squid download's in cache all requested data by all bandwidth. I don't want limit users, but I want to share among users. Here is the problem - If somebody download a file nobody can't get enything for the time. To allow them (for two hosts) I must disable cache or squid and insert NAT rules for limiting. But If first user stops downloading second wouldn't borrow the link on full speed.

:) I like CBQ but can I use this for dynamic sharing? FIFO is working but if some user makes lot of connections no way for others to borrow some.

teluguswan 05-23-2006 03:42 AM

can any one help how to share the internet over the internal network is there any small config file to make linux internet sharing easy

dimis 05-23-2006 07:20 AM

Quote:

Originally Posted by teluguswan
can any one help how to share the internet over the internal network is there any small config file to make linux internet sharing easy


echo 1 > /proc/sys/net/ipv4/ip_forward

iptables --flush
iptables -t nat --flush
iptables --delete-chain
iptables -t nat --append POSTROUTING --out-interface (your internet interface, ex. eth0) -j MASQUERADE
iptables --append FORWARD --in-interface your LAN interface, ex. eth1) -j ACCEPT

teluguswan 07-04-2006 05:16 AM

hai
 
Quote:

Originally Posted by dimis
echo 1 > /proc/sys/net/ipv4/ip_forward

iptables --flush
iptables -t nat --flush
iptables --delete-chain
iptables -t nat --append POSTROUTING --out-interface (your internet interface, ex. eth0) -j MASQUERADE
iptables --append FORWARD --in-interface your LAN interface, ex. eth1) -j ACCEPT

Hey what it will do what more i need to do please give the information

This will be very useful if i get more explanation for the above code.


All times are GMT -5. The time now is 05:56 AM.