| Red Hat Documentation |
Routing PrerequisitesThe LVS routers require Red Hat High Availability Server 1.0 or greater, and the type of routing you choose must be supported by your kernel/module configuration. Enabling NATWith NAT routing, packet forwarding, packet defragmenting, and IP masquerading must be enabled on the LVS routers. Enable packet forwarding. To do this at system boot, make sure the file /etc/sysctl.conf contains the line net.ipv4.ip_forward = 1. To enable packet forwarding without rebooting, as root issue this command:
Enable packet defragmenting. To do this at system boot, make sure the file /etc/sysctl.conf contains the line net.ipv4.ip_always_defrag = 1. To enable packet defragmenting without rebooting, as root issue this command:
To enable IP masquerading, issue this command:
where:
You will probably want to put the ipchains command in an init script (e.g., /etc/rc.d/rc.local), so that masquerading is configured on the LVS routers at system startup. ipchains is the tool used to create and manage firewalling rules set in the kernel's TCP stack. Masquerading is a small subset of these rules that allow machines making use of private IP networks to communicate with the outside world. Using ipchains can have an impact on system security. If you have security concerns, read the ipchains HOWTO (http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html). Enabling IP EncapsulationOn each real server, establish a tunnel between it and each virtual server address. For example, these commands establish two tunnels (tunl0 and tunl1) to two virtual server addresses (1.2.3.1 and 1.2.3.2):
To prevent real servers, rather than the active router, from intercepting ARP broadcasts, you also need to hide tunnels from ARP broadcasts. For example, these commands hide tunnels tunl0 and tunl1:
Enabling Direct RoutingOn each real server, enable a route to each virtual server address. For example, the following command aliases virtual server 1.2.3.1 to adapter eth0:
You also need to hide virtual server routes from ARP broadcasts. For example, these commands hide any virtual server addresses on device eth0:
|
||||||||||||||||
|
© 2001 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Y2K statement : Contact Red Hat |