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nGTI+yl99hyZZ7Pw+m+zL/fq/qsfS7qvTZtx11VaxMNBoVQryEHI8/jZktQ5dva/NNTcbgTyYfWaQyZvZtWbq94ZePjW8btQG+w650OzM7xMPkh6X6x9r7a7MwZiOXyyUskDF53g8V9T/Qxu92+wlDya7qcYiH+VOwudEMGQPgMTImr1ZrY3u/FlPydtBhwmBYhrZ/O+t+A6unYHmjGTIGwGNCiDzk1OyA+9JfdzEZMDieVKCom0xYnUjA/QZWT4GMAWgcMiaPk1G5R8YAeEwI8QvkkDH3yBgAj5ExeWTMPTIGwGNkTB4Zc4+MAfCYEOJnyCFj7pExAB4jY/LImHtkDIDHyJg8MuYeGQPgMTImj4y5R8YAeIyMySNj7pExAB4TQvwEOWTMPTIGwGNkTB4Zc4+MAfAYGZNHxtwjYwA8JoTYhRwy5h4ZA+AxMiaPjLlHxgB4jIzJI2PukTEAHhNC5CCHjLlHxgB4jIzJI2PukTEAHhNCvIAcMuYeGQPgsUAgICAnEAg0+p/L98gYAMDHyBicKZF9ZTomtva+FFFMt1Fvt7I10aHfYGuio2zPJtu728D0cQH4HRmDM61V+hv26lX6H/ptHJKjba+1ZWuiw/RO7jcwfVwA/kfG4MyQqL1aWGfMKijqx7ZIRLe9/hOSEjG5k/sNTB8XQAsgY3BmkrG3kXLImHpLSVgU5e1tpuExHfq538D0cQG0ADIGZ6Yv/Wo57IeKNr2oe8bk/loA/IaMwZlsxiwOA3HcJxkDUDUyBmdWQ8WIYrc2Jr9PMgagamQMzqo7xEN+n3U5xMP6uQDwMzIGZzYH03uSsb2DGu2Op3e3geVzAeBvZAzOZH/92SoPZp+PyrY3+eXl0nu538D0cQH4HRkDAPgYGQMA+BgZAwD4GBkDAPgYGQMA+BgZAwD4GBkDAPjY/wF7VVccfw1f5QAAAABJRU5ErkJggg==" alt="" />

director: RHEL7.0 两块网卡

RS1、RS2 : RHEL6.7

网络配置:VIP为公网地址 , RS1,RS2 网关指向DIP

RS1,RS2安装web server 并测试正常访问。

二、director环境配置:

[root@rhel7 ~]# ifconfig | grep cas
inet 192.168.2.13 netmask 255.255.255.0 broadcast 192.168.2.255
inet 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255
[root@rhel7 ~]# curl 10.0.0.10/index.html  # 测试RS1是否正常访问
<h1>10.0.0.10</h1>
[root@rhel7 ~]# curl 10.0.0.11/index.html  # 测试RS2 是否正常访问
<h1>10.0.0.11</h1>
[root@rhel7 ~]# echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf  # 打开转发功能,在这里之前请将iptables关闭
[root@rhel7 ~]# sysctl -p  
net.ipv4.ip_forward = 1
[root@rhel7 ~]# vim /etc/hosts    # 注意:经过测试rhel6和rhel7 使用ipvs保存时,都会以主机名的形式,请在/etc/hosts里填写正确 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
# director
192.168.2.13    rhel7
10.0.0.1        rhel7 # realserver
10.0.0.10       RS1
10.0.0.11       RS2
[root@rhel7 ~]# yum install ipvsadm -y

三、IPVS配置:

[root@rhel7 ~]# ipvsadm -A -t 192.168.2.13: -s rr    # -A 新增 -t tcp协议 VIP socket -s 算法 这里使用静态rr算法以方便测试

# 当访问192.168.2.: 通过nat方式转发到后端的realserver
[root@rhel7 ~]# ipvsadm -a -t 192.168.2.13: -r 10.0.0.10 -m -w
[root@rhel7 ~]# ipvsadm -a -t 192.168.2.13: -r 10.0.0.11 -m -w 1
[root@rhel7 ~]# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.2.13:80 rr
  -> 10.0.0.10:80                 Masq    1      0          0         
  -> 10.0.0.11:80                 Masq    1      0          0
[root@rhel7 ~]# ipvsadm-save > /etc/sysconfig/ipvsadm  # 保存相关配置,关闭和开启服务都会去/etc/sysconfig/ipvsadm读取
[root@rhel7 ~]# cat !$
cat /etc/sysconfig/ipvsadm
-A -t rhel7:http -s rr
-a -t rhel7:http -r RS1:http -m -w 1
-a -t rhel7:http -r RS2:http -m -w 1
[root@rhel7 ~]# systemctl status ipvsadm.service
ipvsadm.service - Initialise the Linux Virtual Server
   Loaded: loaded (/usr/lib/systemd/system/ipvsadm.service; enabled)
   Active: active (exited) since Sun 2016-04-24 15:30:48 CST; 1s ago
  Process: 4069 ExecStart=/bin/bash -c exec /sbin/ipvsadm-restore < /etc/sysconfig/ipvsadm (code=exited, status=0/SUCCESS)
 Main PID: 4069 (code=exited, status=0/SUCCESS) Apr 24 15:30:48 rhel7 systemd[1]: Starting Initialise the Linux Virtual Server...
Apr 24 15:30:48 rhel7 systemd[1]: Started Initialise the Linux Virtual Server.

四、测试

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUsAAAB/CAIAAADpSXfGAAAPUElEQVR4nO3da1Ab16EHcE2m005n7gyl6Sc+5Is/5LozndvbcF17cm8nJr72JG0a94knvk3LuI2vMn2kY8fNQOw7jcGEPGQcXBfHJKkDsiK/YoMEaFdibWSCDLEDQrJJqECYt4xsAXoYZO32w+auj1fSaiWBUE/+v9EH7bJ79jH7Z885u9rVCABAL81qrwAArCAkHIBmSDgAzZBwAJoh4QA0Q8IBaIaEA9AMCQegGRIOQDMkHIBmaSQ8Fov5fD6Xy8WybHt7e0tLS0tLS3t7O8uyLpdreno6Fout3IoCQAZUJXxqaqq7u/vkqVP7XqvdcfDEuqrTxdXnvrS3/Ut724urz62rOr3j4Ik/v3n45KlTHR0dU1NTK73SAKBSioSPjY3Z7fb9bx7aVG14oNKe8rOp2rD/zUMMw4yNjeVmAwBAQdKELywscBz31pGj6yuNarJNftZXGt86ctThcCwsLORyYwBAJnHCp6amLBbL84ea0s02+flf3XGLxYJKO8AqSpDw4eHhlhbT5gP6bOItfjYf0JtMpuHh4dxvGAAI8QmfmppqaTF9c/+Z7OMtfr65/0xLiyndM3kkEhkeHrbZbK2trWKnfWtrq81mGx4ejkQiy7f5AJS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Jlv5azcfgBYOSkSLjutxUt2Equvr1fzfLKU7d48KWel9wPACsGzVgFohoQD0AwJB6AZEg5AMyQcgGZIOADNkHAAmiHhADRDwgFohoQD0AwJB6AZEg5AMyQcgGZIOADNkHAAmiHhADRDwgFohoQD0AwJB6AZEg5AMyQcgGZIOADNkHAAmiHhADRDwgFohoQD0AwJB6AZEg5AMyQcgGZIOADNkHAAmiHhADRDwgFohoQD0AwJB6AZEg5AMyQcgGZIOADNkHAAmiHhADRDwgFohoQD0AwJB6AZEg5As38AeGDQ5SiAAiQAAAAASUVORK5CYII=" alt="" />        aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAScAAAB2CAIAAAAFncLwAAAPG0lEQVR4nO3da3AT16EHcE2mczt3pjOum37yh3zhQy6d6bS98aUwaTvBoTBJmxva29ZMaNN6aMNVpo/cgdCMHeg02DjOQ5iYUhOcpMQWingFYsm2diUvWDgWdiC2LIETV37gt7BAtvXAFtrth81dDitptSuZg0D/3+iDdr179jH7955z9iGdAAB06e72CgDkHaQOgDakDoA2DamLx+N+v9/j8bAs29bW1tzc3Nzc3NbWxrKsx+OZnp6Ox+N3bkUB7huqUjc1NdXV1XX02LFdr9Vu2XtkVdXx4upTX9rZ9qWdbcXVp1ZVHd+y98hf39x/9Nix9vb2qampO73SAPe0NKkbGxtzOp2739y3rtr0QKUz7WddtWn3m/sYhhkbG6OzAQD3nJSpW1hY4DjurQMHV1ea1eSN/KyuNL914KDL5VpYWKC5MQD3hOSpm5qastlsz+9r0po38vO/hsM2mw0VTgCZJKkbGhpqbras32PMJnLiZ/0eo8ViGRoaor9hADlLnrqpqanmZss3dp/IPnLi5xu7TzQ3W7Se8aLR6NDQkMPhaGlpETtLW1paHA7H0NBQNBpdvs0HuAtuS93CwoLNZluWs5zsjGez2VS28ebm5liWZRimq6trZmYmGAzyPM/zfDAYnJmZsdvtDMN8/PHHc3NzCoV8BJDDbkudy+XKsi2X6vP8viaXy5U2cl6v12azjYyM8Dyfahqe50dGR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1ALQhdQC0IXUAtCF1ALQhdQC0IXUAtCF1ALQhdQC0IXUAtCF1ALQhdQC0IXUAtCF1ALQhdQC0IXUAtCF1ALQhdQC0IXUAtCF1ALT9C7WwOFCc+lEpAAAAAElFTkSuQmCC" alt="" />

测试成功。

[root@rhel7 ~]# ipvsadm -L -n
IP Virtual Server version 1.2. (size=)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.2.13: rr
-> 10.0.0.10: Masq
-> 10.0.0.11: Masq 可以看到InActConn是轮询的方式进行的。

【LVS 】NAT方式实现过程的更多相关文章

  1. LVS NAT,DR,TUN三种负载原理

    负载均衡简单介绍 用通俗的话来说负载均衡,就是通过不同的调度机制将用户的请求分派到后端不同的服务器.缓解服务器的请求压力,实现负载均衡的方案有多种,下面简单说说了解的几种方式: DNS 负载:利用DN ...

  2. 使用NAT方式连网的linux服务器虚拟机搭建

    从一开始我就很纠结centos服务器搭建的过程. 由于自己方向并不在运维上,但是学习开发也需要用到Linux所以就一直没认真去学. 经过自己多方面摸索与学习找到了自己的一套方法. 首先我用到的是 ce ...

  3. CentOS 6.3下部署LVS(NAT)+keepalived实现高性能高可用负载均衡【转】

    CentOS 6.3下部署LVS(NAT)+keepalived实现高性能高可用负载均衡   一.简介 VS/NAT原理图: 二.系统环境 实验拓扑: 系统平台:CentOS 6.3 Kernel:2 ...

  4. centos LB负载均衡集群 三种模式区别 LVS/NAT 配置 LVS/DR 配置 LVS/DR + keepalived配置 nginx ip_hash 实现长连接 LVS是四层LB 注意down掉网卡的方法 nginx效率没有LVS高 ipvsadm命令集 测试LVS方法 第三十三节课

    centos   LB负载均衡集群 三种模式区别 LVS/NAT 配置  LVS/DR 配置  LVS/DR + keepalived配置  nginx ip_hash 实现长连接  LVS是四层LB ...

  5. Linux学习总结(二) 网络配置-NAT方式静态IP配置篇

    一:DHCP 服务验证 1: 之前我们在里面已经装好了centos,当时我们选择的组网方式为NAT方式,那么我们怎么样如何快速实现虚拟机系统访问外网呢?能不能直接上网呢,来我们试一下ping baid ...

  6. Linux centosVMware 负载均衡集群介绍、LVS介绍、LVS调度算法、LVS NAT模式搭建

    一.负载均衡集群介绍 主流开源软件LVS.keepalived.haproxy.nginx等 其中LVS属于4层(网络OSI 7层模型),nginx属于7层,haproxy既可以认为是4层,也可以当做 ...

  7. 关于Hadoop的集群环境下虚拟机采用NAT方式连不上网的解决

    使用虚拟机搭建hadoop集群的时候采用的是NAT方式联网,但是会出现时常掉网的现象,查看后排查了很久也没有发现什么问题. 很可能是Windows下的NAT服务没有开启,这时候尽管虚拟机和主机是在一个 ...

  8. Vmware虚拟机配置LVS/NAT模式遇到的坑。

    这两天在研究LVS的负载均衡,先从最简单的LVS/NAT模式开始入手. 最后配置完之后能够相互之间Ping通,并且能够直接访问real服务器提供的web服务,而且防火墙也已经关闭了. 但是通过访问LV ...

  9. Vmware安装Centos NAT方式设置静态IP

    [Vmware中在搭建集群环境等,DHCP自动获取IP方式不方便,为了固定IP减少频繁更改配置信息,建议使用静态IP来配置,网络连接主要有三种方式 1.nat 2.桥接,3主机模式 ,在这里主要介NA ...

随机推荐

  1. 合规P2P平台成PE/VC新宠

    013年是互联网金融元年,余额宝.百发等掀起了大众理财的新一轮高潮.P2P平台作为互联网金融模式之一,也受到市场的重点关注-在部分平台不断爆出风险事件的同时,业内较为成熟的平台也正成为PE/VC的新宠 ...

  2. python 注册表重置ie代理 ss使用后的代理恢复

    每次用完ss客户端,浏览器代理都不会改回来,不想手动改,只能用python脚本处理了. import winreg def disableProxy(): proxy = "" x ...

  3. (转载)MYSQL千万级数据量的优化方法积累

    转载自:http://blog.sina.com.cn/s/blog_85ead02a0101csci.html MYSQL千万级数据量的优化方法积累 1.分库分表 很明显,一个主表(也就是很重要的表 ...

  4. [Java文件操作] 将素数输出到文件

    [要求]编写程序求出10万以内的所有素数,并将这些素数输出到一个文本文件中,每行文本只包含一个素数数据. import java.util.*; import java.io.*; public cl ...

  5. ELK6.2.4集群

    ELK6.2.4集群安装使用 https://www.cnblogs.com/frankdeng/p/9139035.html 一 简介 Elasticsearch是一个高度可扩展的开源全文搜索和分析 ...

  6. 【bzoj4813】[Cqoi2017]小Q的棋盘 树上dfs+贪心

    题目描述 小Q正在设计一种棋类游戏.在小Q设计的游戏中,棋子可以放在棋盘上的格点中.某些格点之间有连线,棋子只能在有连线的格点之间移动.整个棋盘上共有V个格点,编号为0,1,2…,V-1,它们是连通的 ...

  7. Python 错误和异常处理

    #常见的异常 class Human: #属性 sex = 'man' age = 18 #方法 def run(self): print('跑啊~~~') #实例化对象 #zw = Human() ...

  8. DataBase -- Employees Earning More Than Their Managers My Submissions Question

    Question: The Employee table holds all employees including their managers. Every employee has an Id, ...

  9. [poj] 2396 [zoj] 1994 budget || 有源汇的上下界可行流

    poj原题 zoj原题 //注意zoj最后一行不要多输出空行 现在要针对多赛区竞赛制定一个预算,该预算是一个行代表不同种类支出.列代表不同赛区支出的矩阵.组委会曾经开会讨论过各类支出的总和,以及各赛区 ...

  10. Codeforces 937.C Save Energy!

    C. Save Energy! time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...