Home > Article > Operation and Maintenance > Configuration steps for LVS NAT in Linux
This article mainly introduces relevant information on the detailed explanation of LVS NAT configuration steps in Linux. Here are the detailed implementation steps. Friends in need can refer to the following
LVS NAT configuration steps in Linux Detailed explanation
Summary:
Planning machines and IP addresses, There are three types of machines and four types of IPs in the LVS cluster address. Machine types: Client, Director, Real Server. The IP addresses corresponding to the machine types are: CIP, DIP, RIP. Director corresponds to two IPs. In addition to DIP, there is also a VIP. Usually DIP and RIP are on the same network, and CIP and VIP are on the same network.
CIP:192.168.56.1 VIP:192.168.56.101 DIP : 192.168.0.10 RIP : 192.168.0.100、192.168.0.200
##
1:enable ip_forwardp vi /etc/sysctl.conf set net.ipv4.ip_forward = 1 sysctl - 2 : set DIP ifconfig eth0:0 192.168.0.10 up 3 : disable firewall service iptables stop 4: config ipvs ipvsadm -A -t 192.168.56.01:80 -s rr ipvsadm -a -t 192.168.56.01 -r 192.168.0.100 -m ipvsadm -a -t 192.168.56.01 -r 192.168.0.200 -m
Key points:
The above is the detailed content of Configuration steps for LVS NAT in Linux. For more information, please follow other related articles on the PHP Chinese website!