Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

LVS+DR+NAT

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Experimental topology

2. Experimental goal: to realize NAT + LVS-DR Load Balancer cluster

3. Experiment requirements: (Cluster IP address is 192.168.1.254, all hosts turn off firewall and NetworkManager service)

1. Configuration of lvs:

(1) Configure cluster IP address 192.168.1.254 on ifcfg-eth0:0 with subnet mask 255.255.255.0

(2) Load ip_vs module and install ipvsadm administrative tool. Create virtual server IP address 192.168.1.254, add server nodes: 192.168.1.3 and 192.168.1.4 192.168.1.3. Cluster using DR mode.

(3) Modify the kernel parameters (/etc/sysctl.conf) file to turn off ICMP redirection.

2. Web1 and web2 server configuration: (default gateway is configured as 192.168.1.1)

(1) ifcfg-lo:0 Configure cluster ip address 192.168.1.254 with subnet mask 255.255.255.255

(2) Modify the kernel parameters (/etc/sysctl.conf) file to turn off ARP replies.

(3) Add a vip local access route

(4) Enable httpd service and create test web pages.

3, access on the RS (router) host, test whether you can access the web content. Thereby verifying the Load Balancer function of lvs DR.

4. Configure NAT port mapping function of firewall on RS server. The purpose is to enable external network hosts to directly map port 80 of address 192.168.1.254 when accessing port 80 of 200.0.0.1. Enable routing forwarding.

iptables -t nat -A PREROUTING -d 200.0.0.1 -p tcp - -dport 80 -j DNAT - -to 192.168.1.254:80

5. Test whether the client can access the web content. This verifies NAT+ LVS-DR functionality.

6. Configure a shared storage server on the nfs host to provide background web page storage for two web servers.

7. Mount shared web directories on node servers

Finally, test the visit website on the client host.

Blogger small narrative: in order to publish this blog post here, blogger experienced pictures too big to upload, network failure and other difficulties, today can finally send this blog post, I hope to be able to help you love learning.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report