linux,faqs,howtos,man,forum,squid,mount,ntfs,bandwidth,gnu,opensource,directory
 
Home | Forum | MAN Pages | Tutorials | Directory | HOWTOs | About Me | Contact
You are Browsing Linux HOWTOS
 
FAQS
- Advanced Routing & Traffic Control
- General FAQ
- Squid Proxy Server
- Sendmail
- Fetchmail
- Postfix
- Connecting Mobile Phone
- Paging from Linux
- Standard Commands
- Some common terms
Linux HOWTOs
- Single List of HOWTOs
- 3-Button-Mouse
- Belgian-HOWTO
- DB2-HOWTO
- DNS HOWTO
- Italian HOWTO
- Francophones HOWTO
- - IP-Alias
- Kerneld
- Linux+Windows-HOWTO
- Multicast-HOWTO
- Network-Install-HOWTO
- Quake-HOWTO
- RCS -Linux HOWTO
- Software-Release-Practice-HOWTO
- Text-Terminal-HOWTO
- Update
- VMailMgr-HOWTO
- Wacom-USB-mini-HOWTO
- XFree-Local-multi-user-HOWTO

- ADSL Bandwidth Management
- Compile Apache
- Make a Bootdisk
- Linux-Windows9x-Grub
- Linux-Windows
- Linux Crash Recovery
- Optimise Squid
- Block websites in Squid
- Broadcast webcam in linux
- Compile RedHat Linux kernel
- Implement Firewall Security
- Increase Harddrive Performance
- Mount NTFS filesystem
- Patch / rebuild SRPM
- Secure Linux
- Set up a DHCP Server
- Set up an FTP server
- Set up Linux as a Router
- Use Cron
- Samba
Miscellaneous
- All Ports
- Spammers fetch email addresses
- Mounting NTFS in linux
- Linux Gazette
- Linux Directory
- Linux Man

linux,man,pages,linux man pages,squid,ntfs,mount
 

Chapter 10. Load sharing over multiple interfaces

Table of Contents
10.1. Caveats
10.2. Other possibilities

There are several ways of doing this. One of the easiest and straightforward ways is 'TEQL' - "True" (or "trivial") link equalizer. Like most things having to do with queueing, load sharing goes both ways. Both ends of a link may need to participate for full effect.

Imagine this situation:

                 +-------+   eth1   +-------+
                 |       |==========|       |
 'network 1' ----|   A   |          |   B   |---- 'network 2'
                 |       |==========|       |
                 +-------+   eth2   +-------+

A and B are routers, and for the moment we'll assume both run Linux. If traffic is going from network 1 to network 2, router A needs to distribute the packets over both links to B. Router B needs to be configured to accept this. Same goes the other way around, when packets go from network 2 to network 1, router B needs to send the packets over both eth1 and eth2.

The distributing part is done by a 'TEQL' device, like this (it couldn't be easier):

# tc qdisc add dev eth1 root teql0
# tc qdisc add dev eth2 root teql0
# ip link set dev teql0 up

Don't forget the 'ip link set up' command!

This needs to be done on both hosts. The device teql0 is basically a roundrobbin distributor over eth1 and eth2, for sending packets. No data ever comes in over an teql device, that just appears on the 'raw' eth1 and eth2.

But now we just have devices, we also need proper routing. One way to do this is to assign a /31 network to both links, and a /31 to the teql0 device as well:

FIXME: does this need something like 'nobroadcast'? A /31 is too small to house a network address and a broadcast address - if this doesn't work as planned, try a /30, and adjust the ip addresses accordingly. You might even try to make eth1 and eth2 do without an IP address!

On router A:
# ip addr add dev eth1 10.0.0.0/31
# ip addr add dev eth2 10.0.0.2/31
# ip addr add dev teql0 10.0.0.4/31

On router B:
# ip addr add dev eth1 10.0.0.1/31
# ip addr add dev eth2 10.0.0.3/31
# ip addr add dev teql0 10.0.0.5/31

Router A should now be able to ping 10.0.0.1, 10.0.0.3 and 10.0.0.5 over the 2 real links and the 1 equalized device. Router B should be able to ping 10.0.0.0, 10.0.0.2 and 10.0.0.4 over the links.

If this works, Router A should make 10.0.0.5 its route for reaching network 2, and Router B should make 10.0.0.4 its route for reaching network 1. For the special case where network 1 is your network at home, and network 2 is the Internet, Router A should make 10.0.0.5 its default gateway.

 
Random Linux Commands
NFS
Network File System. This lets a user work with remote files as if they were local files, and NFS uses the TCP/IP networking protocol.

Common Linux terms
Linux-FAQs Search
linux,faqs,howto,howtos,man,manpages,directory,forum


Linux-FAQs Forum Categories
- About Forum
- Hardware Troubleshooting in Linux
- Linux Entertainment
- Resources
- Software toubleshooting and configuration
Linux-FAQs Man Pages
- About Forum
- Hardware Troubleshooting in Linux
- Linux Entertainment
- Resources
- Software toubleshooting and configuration
All Linux-FAQs Forums
- Crash Recovery
- FAQs
- Forum Talk
- Games
- General
- Linux Audio Support
- Linux Hardware / Driver
- Linux Installation Support
- Linux misc.
- Linux Networking
- Linux Newbies
- Linux Printing Support
- Linux Security
- Linux Video Support
- Mail Server
- Multimedia
- Tutorials
- Web Proxy Server
- Web Server

linux,man,man pages,faqs,howtos,forum
 
Powered by HTML
Linux-faqs.com Copyright, All rights reserved www.linux-faqs.com. Peeyush Maurya.