1. Load Balancing cluster related
2. Three modes of LVS: NAT, DR, IP Tunnel
3, LVS scheduling algorithm (a total of 8)
4, LVS NAT mode construction
Preparation conditions:
Installing on the Distributor:yum install ipvsadm-y
Modified:/usr/local/sbin/lvs_nat.sh
Add the following code:
#!/bin/bash
# Enable routing forwarding on the director server
echo 1 >/proc/sys/net/ipv4/ip_forward
# Turn off ICMP redirection
echo 0 >/proc/sys/net/ipv4/conf/all/send_redirects
echo 0 >/proc/sys/net/ipv4/conf/default/send_redirects
# Note the name of the network card, the two NICs of this machine are ENS33 and ens37 respectively.
echo 0 >/proc/sys/net/ipv4/conf/ens33/send_redirects
echo 0 >/proc/sys/net/ipv4/conf/ens37/send_redirects
# Director Set NAT firewall
iptables-t nat-f
iptables-t nat-x
iptables-t nat-a postrouting-s 192.168.133.0/24-j Masquerade
# Director Setup Ipvsadm
ipvsadm= '/usr/sbin/ipvsadm '
$IPVSADM-C
$IPVSADM-A-T 192.168.147.144:80-s wlc-p 3
$IPVSADM-T 192.168.147.144:80-r 192.168.133.132:80-m-W 1
$IPVSADM-T 192.168.147.144:80-r 192.168.133.133:80-m-W 1
The specific settings:
Access test:
The NAT configuration to this LVS is complete.
Load Balancing cluster correlation, LVS introduction, LVS scheduling algorithm, LVS NAT mode construction