Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi all,
i wann to create my linux router as a load balancing divice mean i have two isp and i wann both on a singal linux router and masqurade them with my local network, i have three lan card two for wan and one for lan, i have create some rules but it's not working i am showing this all rules below
p route add $P1_NET dev $IF1 src $IP1 table T1
ip route add default via $P1 table T1
ip route add $P2_NET dev $IF2 src $IP2 table T2
ip route add default via $P2 table T2
ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2
ip route add default via $P1
ip rule add from $IP1 table T1
ip rule add from $IP2 table T2
ip route add $P0_NET dev $IF0 table T1
ip route add $P2_NET dev $IF2 table T1
ip route add 127.0.0.0/8 dev lo table T1
ip route add $P0_NET dev $IF0 table T2
ip route add $P1_NET dev $IF1 table T2
ip route add 127.0.0.0/8 dev lo table T2
ip route add default scope global nexthop via $P1 dev $IF1 weight 1 nexthop via $P2 dev $IF2 weight 1
/sbin/iptables -t nat -A POSTROUTING -j MASQUERADE
when i apply this rules it's only work on gatway one (i.e. 192.168.1.1 on eth1) and i wann to work on both isp on same time with my local network so plz help me out.
I think you need to do ethernet bonding for combining multiple NICs. Ethernet bonding refers to the process by which the network cards are bonded or tied up virtually by the aid of the OS. It is mainly used for load balancing. If you have the kernel source installed, the documentation will exist under networking section called bonding.txt. You will need to recompile the kernel to include ethernet bonding if it does not support the feature. After that you need to edit the /etc/modules.conf or /et/modprobe.conf (depends on ur distro and add the line 'alias bond0 bonding'. This would load the module on request.
The next part seems the most important.. You need to create a new configuration file for the virtual 'bond' interface. Copy your config: file for the ethernet interface and edit as follows:
DEVICE=bond0
IPADDR=X.X.X.X
NETMASK=X.X.X.X
NETWORK=X.X.X.X
BROADCAST=X.X.X.X
ONBOOT=yes
BOOTPROTO=none
Now as the next step, edit the config: files for your real NICs and add the following config:.
DEVICE=ethX
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
This step has to be done for each and every one of your NIC, replacing ethX with that of your config:. After the config: restart network service or issue the command ' ifup bond0' which would bring the bonding interface up. Issue 'ifconfig' to see whether the interface is up...
Hope this was what you were after.Contact in case of need........
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.