UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20796 errors:0 dropped:0 overruns:0 frame:0
TX packets:20603 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7436479 (7.0 MiB) TX bytes:3990691 (3.8 MiB)
Interrupt:169 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16824 errors:0 dropped:0 overruns:0 frame:0
TX packets:16824 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8218210 (7.8 MiB) TX bytes:8218210 (7.8 MiB)
lo:0 Link encap:Local Loopback
inet addr:192.168.1.200 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1
第三测试的部分:
为了测试效果明显,所以在realserver特意设置网页的内容不同,当然这仅仅是为了测试用,在真实的环境中是必须保持网页内容的完全相同的。
测试效果
在地址栏里输入VIP测试,并且不断的刷新页面

[root@localhost ~]# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.1.200:http rr
-> 192.168.1.195:http Tunnel 1 0 6
-> 192.168.1.193:http Tunnel 1 0 8
[root@localhost ~]# ipvsadm -lnc
IPVS connection entries
pro expire state source virtual destination
TCP 00:13 FIN_WAIT 192.168.1.188:53866 192.168.1.200:80 192.168.1.193:80
TCP 01:47 FIN_WAIT 192.168.1.188:53884 192.168.1.200:80 192.168.1.195:80
TCP 01:49 FIN_WAIT 192.168.1.188:53888 192.168.1.200:80 192.168.1.195:80
TCP 01:48 FIN_WAIT 192.168.1.188:53885 192.168.1.200:80 192.168.1.193:80
TCP 01:47 FIN_WAIT 192.168.1.188:53882 192.168.1.200:80 192.168.1.195:80
TCP 01:47 FIN_WAIT 192.168.1.188:53883 192.168.1.200:80 192.168.1.193:80
TCP 01:50 FIN_WAIT 192.168.1.188:53893 192.168.1.200:80 192.168.1.193:80
TCP 01:50 FIN_WAIT 192.168.1.188:53889 192.168.1.200:80 192.168.1.193:80
TCP 01:50 FIN_WAIT 192.168.1.188:53892 192.168.1.200:80 192.168.1.195:80
TCP 01:46 FIN_WAIT 192.168.1.188:53880 192.168.1.200:80 192.168.1.193:80
TCP 01:49 FIN_WAIT 192.168.1.188:53887 192.168.1.200:80 192.168.1.193:80
TCP 01:50 FIN_WAIT 192.168.1.188:53890 192.168.1.200:80 192.168.1.195:80
TCP 01:50 FIN_WAIT 192.168.1.188:53891 192.168.1.200:80 192.168.1.193:80
TCP 01:49 FIN_WAIT 192.168.1.188:53886 192.168.1.200:80 192.168.1.195:80
实验结束
总结:这篇文章是对赶星老师视频教学的第三篇学习笔记,当然只是皮毛的部分,更复杂的算法和设置,期待更进一步的学习。