Chinaunix

标题: 为何LVS/TUN方式不能正常工作呢? [打印本页]

作者: Linuxcn.com    时间: 2006-06-30 12:15
标题: 为何LVS/TUN方式不能正常工作呢?
情况交代:
1>主机:win XP,本地连接的网卡LAN接局域网,IP地址:192.168.1.79/24,本地连接的Internet连接共享属性中,选择VMware Network Adapter VMnet1虚拟网卡,VMware Network Adapter VMnet1的IP地址:192.168.0.1/24

2>vm:ubuntu
Loadbalance:192.168.0.10/24
Realserver1:192.168.0.12/24
Realserver2:192.168.0.13/24

3>在win XP的DOS窗口下可以ping通192.168.0.10-192.168.0.13,在ubuntu下它们之间也可以相互ping通
4>相同的环境下,LVS/DR方式可以顺利工作
5>LVS/TUN方式下的一些配置文件内容摘要:
Loadbalance:
  1. echo "1" >/proc/sys/net/ipv4/ip_forward
  2. ifconfig eth0:0 192.168.0.20 netmask 255.255.255.255 broadcast 192.168.0.20
  3. $IPVSADM -C
  4. $IPVSADM -A -t 192.168.0.20:80 -s rr
  5. $IPVSADM -a -t 192.168.0.20:80 -r 192.168.0.12 -i
  6. $IPVSADM -a -t 192.168.0.20:80 -r 192.168.0.13 -i
复制代码


Realserver1 & Realserver2:
  1. ifconfig tunl0 192.168.0.20 netmask 255.255.255.255 broadcast 192.168.0.20
  2. route add -host 192.168.0.20 dev tunl0
  3. echo "1" > /proc/sys/net/ipv4/ip_forward
  4. echo "1" > /proc/sys/net/ipv4/conf/all/hidden
  5. echo "1" > /proc/sys/net/ipv4/conf/tunl0/hidden
复制代码


6>Realserver1 & Realserver2的kernel都已经支持了IP Tunnel,见图


7>Loadbalance的route表:
  1. root@Loadbalance:/etc/init.d# route -n
  2. Kernel IP routing table
  3. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  4. 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
  5. 10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 eth1
  6. 0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
复制代码

8>Realserver的route表:
  1. root@Realserver1:/etc/init.d# route -n
  2. Kernel IP routing table
  3. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  4. 192.168.0.20    0.0.0.0         255.255.255.255 UH    0      0        0 tunl0
  5. 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
  6. 0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
复制代码


9>但是,当我在win XP下从IE访问虚拟IP:http://192.168.0.20时,却不能够正常访问到测试的web页面
大家帮我看看我那里出错了,不胜感激!

[ 本帖最后由 Linuxcn.com 于 2006-6-30 12:21 编辑 ]
作者: Linuxcn.com    时间: 2006-07-03 09:35
小顶一下
作者: crazycash    时间: 2006-07-03 17:10
标题: 回复 1楼 Linuxcn.com 的帖子
在win XP下从IE访问虚拟IP:http://192.168.0.12/13,能够正常访问到测试的web页面么?
从loadbalance能够正常ping通192.168.0.2么?
使用tcpdump命令看看有没有包被转发过来。

另外可以把192.168.0.2配在tunl0:0上,这样如果有其他服务也作loadbalance,就不会引起冲突。
作者: Linuxcn.com    时间: 2006-07-03 17:19
原帖由 crazycash 于 2006-7-3 17:10 发表
在win XP下从IE访问虚拟IP:http://192.168.0.12/13,能够正常访问到测试的web页面么?
从loadbalance能够正常ping通192.168.0.2么?
使用tcpdump命令看看有没有包被转发过来。

另外可以把192.168.0.2配在tunl0:0上,这样如果有其他服务也作loadbalance,就不会引起冲突。


我开始也是想把虚拟IP在RS上配置到tunl0:0上来的, 但是配的时候它说设备不存在
作者: Linuxcn.com    时间: 2006-07-04 14:07
顶了
作者: Linuxcn.com    时间: 2006-07-04 14:33
当我做这个动作:从IE里输入:http://192.168.0.20访问web服务时,在Loadbalance机器上监视虚拟IP
  1. root@Loadbalance:/etc/init.d# tcpdump dst 192.168.0.20
  2. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  3. listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
  4. 11:01:32.495079 IP 192.168.0.1.3478 > 192.168.0.20.www: S 1562695239:1562695239(0) win 65535 <mss 1460,nop,nop,sackOK>
  5. 11:01:35.114333 IP 192.168.0.1.3478 > 192.168.0.20.www: S 1562695239:1562695239(0) win 65535 <mss 1460,nop,nop,sackOK>
  6. 11:01:38.467705 IP 192.168.0.1.3478 > 192.168.0.20.www: S 1562695239:1562695239(0) win 65535 <mss 1460,nop,nop,sackOK>
  7. 11:04:24.610365 arp who-has 192.168.0.20 tell 192.168.0.1
  8. 11:04:24.611726 IP 192.168.0.1.3479 > 192.168.0.20.www: S 2187440212:2187440212(0) win 65535 <mss 1460,nop,nop,sackOK>
  9. 11:04:26.425108 IP 192.168.0.1.3479 > 192.168.0.20.www: S 2187440212:2187440212(0) win 65535 <mss 1460,nop,nop,sackOK>
  10. 11:04:32.180984 IP 192.168.0.1.3479 > 192.168.0.20.www: S 2187440212:2187440212(0) win 65535 <mss 1460,nop,nop,sackOK>
复制代码



在RS上监视Loadbalance的IP动作
  1. root@Realserver1:/home# tcpdump src 192.168.0.10
  2. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  3. listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
  4. 13:37:57.111593 IP 192.168.0.10 > 192.168.0.13: IP 192.168.0.1.3479 > 192.168.0.20.www: S 2187440212:2187440212(0) win 65535 <mss 1460,nop,nop,sackOK> (ipip-proto-4)
  5. 13:37:57.118789 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 4234777010:4234777110(100) ack 295366668 win 8576
  6. 13:37:57.120787 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 100:264(164) ack 1 win 8576
  7. 13:37:57.122823 arp reply 192.168.0.10 is-at 00:0c:29:77:76:c7 (oui Unknown)
  8. 13:37:59.430390 IP 192.168.0.10 > 192.168.0.13: IP 192.168.0.1.3479 > 192.168.0.20.www: S 2187440212:2187440212(0) win 65535 <mss 1460,nop,nop,sackOK> (ipip-proto-4)
  9. 13:37:59.430476 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 264:428(164) ack 1 win 8576
  10. 13:38:02.742802 arp who-has 192.168.0.13 tell 192.168.0.10
  11. 13:38:05.031489 IP 192.168.0.10 > 192.168.0.13: IP 192.168.0.1.3479 > 192.168.0.20.www: S 2187440212:2187440212(0) win 65535 <mss 1460,nop,nop,sackOK> (ipip-proto-4)
  12. 13:38:05.034128 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 428:592(164) ack 1 win 8576
  13. 13:38:22.508823 IP 192.168.0.10.netbios-dgm > 192.168.0.255.netbios-dgm: NBT UDP PACKET(138)
复制代码


不明白像这样的信息是什么意思:
13:37:59.430476 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 264:428(164) ack 1 win 8576

192.168.0.1是主机上的虚拟网卡IP,其他4台机器都是VM ware虚拟的

[ 本帖最后由 Linuxcn.com 于 2006-7-4 14:37 编辑 ]
作者: Linuxcn.com    时间: 2006-07-04 14:47
我LVS/DR方式时抓的包:
Loadbalance:
  1. root@Loadbalance:/etc/init.d# tcpdump dst 192.168.0.20
  2. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  3. listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
  4. 11:12:14.495745 IP 192.168.0.1.3579 > 192.168.0.20.www: S 1508679512:1508679512(0) win 65535 <mss 1460,nop,nop,sackOK>
  5. 11:12:14.515957 IP 192.168.0.1.3579 > 192.168.0.20.www: S 1508679512:1508679512(0) win 65535 <mss 1460,nop,nop,sackOK>
  6. 11:12:14.496939 IP 192.168.0.1.3579 > 192.168.0.20.www: . ack 2153076980 win 65535
  7. 11:12:14.497034 IP 192.168.0.1.3579 > 192.168.0.20.www: . ack 1 win 65535
  8. 11:12:14.496975 IP 192.168.0.1.3579 > 192.168.0.20.www: P 0:454(454) ack 1 win 65535
  9. 11:12:14.497110 IP 192.168.0.1.3579 > 192.168.0.20.www: P 0:454(454) ack 1 win 65535
  10. 11:12:14.600835 IP 192.168.0.1.3579 > 192.168.0.20.www: . ack 367 win 65169
  11. 11:12:14.600883 IP 192.168.0.1.3579 > 192.168.0.20.www: . ack 367 win 65169
  12. 11:12:32.695592 IP 192.168.0.1.3579 > 192.168.0.20.www: . ack 368 win 65169
  13. 11:12:32.696973 IP 192.168.0.1.3579 > 192.168.0.20.www: . ack 368 win 65169
  14. 11:12:33.626790 IP 192.168.0.1.3579 > 192.168.0.20.www: R 454:454(0) ack 368 win 0
  15. 11:12:33.626845 IP 192.168.0.1.3579 > 192.168.0.20.www: R 454:454(0) ack 368 win 0
  16. 11:12:43.782567 IP 192.168.0.1.3581 > 192.168.0.20.www: S 2172478390:2172478390(0) win 65535 <mss 1460,nop,nop,sackOK>
  17. 11:12:43.782879 IP 192.168.0.1.3581 > 192.168.0.20.www: S 2172478390:2172478390(0) win 65535 <mss 1460,nop,nop,sackOK>
  18. 11:12:43.783658 IP 192.168.0.1.3581 > 192.168.0.20.www: . ack 430936399 win 65535
  19. 11:12:43.783747 IP 192.168.0.1.3581 > 192.168.0.20.www: . ack 1 win 65535
  20. 11:12:43.783684 IP 192.168.0.1.3581 > 192.168.0.20.www: P 0:454(454) ack 1 win 65535
  21. 11:12:43.784286 IP 192.168.0.1.3581 > 192.168.0.20.www: P 0:454(454) ack 1 win 65535
  22. 11:12:43.819822 IP 192.168.0.1.3581 > 192.168.0.20.www: . ack 367 win 65169
  23. 11:12:43.819881 IP 192.168.0.1.3581 > 192.168.0.20.www: . ack 367 win 65169
  24. 11:13:01.135798 IP 192.168.0.1.3581 > 192.168.0.20.www: . ack 368 win 65169
  25. 11:13:01.135872 IP 192.168.0.1.3581 > 192.168.0.20.www: . ack 368 win 65169
复制代码


Realserver1:
  1. root@Realserver1:/etc/init.d# tcpdump src 192.168.0.10
  2. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  3. listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
  4. 13:45:55.017984 IP 192.168.0.10.1024 > dns-chj.sh.cncnet.net.domain:  46347+ PTR? 20.0.168.192.in-addr.arpa. (43)
  5. 13:45:55.033165 IP 192.168.0.10.1024 > dns-chj.sh.cncnet.net.domain:  14949+ PTR? 1.0.168.192.in-addr.arpa. (42)
  6. 13:45:55.049390 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 4234787174:4234787338(164) ack 295370700 win 9648
  7. 13:45:55.052651 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 164:328(164) ack 1 win 9648
  8. 13:45:55.059150 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 328:460(132) ack 1 win 9648
  9. 13:45:55.062662 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 460:576(116) ack 1 win 9648
  10. 13:45:55.065992 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 576:708(132) ack 1 win 9648
  11. 13:45:55.067946 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 708:840(132) ack 1 win 9648
  12. 13:45:55.142332 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 840:956(116) ack 1 win 9648
  13. 13:45:55.142343 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 956:1072(116) ack 1 win 9648
  14. 13:45:59.417299 arp who-has 192.168.0.13 tell 192.168.0.10
  15. 13:46:13.879055 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1072:1188(116) ack 1 win 9648
  16. 13:46:13.885049 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1188:1304(116) ack 1 win 9648
  17. 13:46:14.970845 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1304:1436(132) ack 1 win 9648
  18. 13:46:14.973078 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1436:1568(132) ack 1 win 9648
  19. 13:46:25.379295 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1568:1732(164) ack 1 win 9648
  20. 13:46:25.381318 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1732:1896(164) ack 1 win 9648
  21. 13:46:25.386048 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1896:2028(132) ack 1 win 9648
  22. 13:46:25.390993 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2028:2144(116) ack 1 win 9648
  23. 13:46:25.397327 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2144:2276(132) ack 1 win 9648
  24. 13:46:25.398270 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2276:2408(132) ack 1 win 9648
  25. 13:46:25.441275 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2408:2524(116) ack 1 win 9648
  26. 13:46:25.443290 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2524:2640(116) ack 1 win 9648
  27. 13:46:29.592310 arp who-has Realserver1 tell 192.168.0.10
  28. 13:46:41.591921 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2640:2756(116) ack 1 win 9648
  29. 13:46:41.595049 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2756:2872(116) ack 1 win 9648
  30. 13:47:50.542438 IP 192.168.0.10.netbios-ns > 192.168.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
  31. 13:47:50.551414 arp reply 192.168.0.10 is-at 00:0c:29:77:76:c7 (oui Unknown)
复制代码


Realserver2:
  1. root@Realserver2:/etc/init.d# tcpdump src 192.168.0.10
  2. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  3. listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
  4. 14:15:09.051809 IP 192.168.0.10.1024 > dns-chj.sh.cncnet.net.domain:  46347+ PTR? 20.0.168.192.in-addr.arpa. (43)
  5. 14:15:09.070910 IP 192.168.0.10.1024 > dns-chj.sh.cncnet.net.domain:  14949+ PTR? 1.0.168.192.in-addr.arpa. (42)
  6. 14:15:09.098295 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 4234787174:4234787338(164) ack 295370700 win 9648
  7. 14:15:09.098340 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 164:328(164) ack 1 win 9648
  8. 14:15:09.098384 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 328:460(132) ack 1 win 9648
  9. 14:15:09.098597 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 460:576(116) ack 1 win 9648
  10. 14:15:09.098655 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 576:708(132) ack 1 win 9648
  11. 14:15:09.102670 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 708:840(132) ack 1 win 9648
  12. 14:15:09.195099 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 840:956(116) ack 1 win 9648
  13. 14:15:09.195115 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 956:1072(116) ack 1 win 9648
  14. 14:15:12.290227 arp who-has Realserver2 tell 192.168.0.10
  15. 14:15:25.805998 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1072:1188(116) ack 1 win 9648
  16. 14:15:25.812478 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1188:1304(116) ack 1 win 9648
  17. 14:15:27.440328 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1304:1436(132) ack 1 win 9648
  18. 14:15:27.440328 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1436:1568(132) ack 1 win 9648
  19. 14:15:37.461602 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1568:1732(164) ack 1 win 9648
  20. 14:15:37.466608 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1732:1896(164) ack 1 win 9648
  21. 14:15:37.469582 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 1896:2028(132) ack 1 win 9648
  22. 14:15:37.474732 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2028:2144(116) ack 1 win 9648
  23. 14:15:37.479656 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2144:2276(132) ack 1 win 9648
  24. 14:15:37.482315 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2276:2408(132) ack 1 win 9648
  25. 14:15:37.542983 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2408:2524(116) ack 1 win 9648
  26. 14:15:37.545591 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2524:2640(116) ack 1 win 9648
  27. 14:15:43.928563 arp who-has 192.168.0.12 tell 192.168.0.10
  28. 14:15:55.998471 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2640:2756(116) ack 1 win 9648
  29. 14:15:56.002589 IP 192.168.0.10.ssh > 192.168.0.1.3248: P 2756:2872(116) ack 1 win 9648
  30. 14:17:04.177823 IP 192.168.0.10.netbios-ns > 192.168.0.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
  31. 14:17:04.185172 arp reply 192.168.0.10 is-at 00:0c:29:77:76:c7 (oui Unknown)
复制代码


LVS/DR方式能够正常工作
作者: Linuxcn.com    时间: 2006-07-05 14:55
那位大哥来指点一下啊
作者: Linuxcn.com    时间: 2006-07-06 12:56
大侠们伸个手
作者: Linuxcn.com    时间: 2006-07-07 10:33
今天看了LVS的官网http://www.linuxvirtualserver.org中的LVS HOWTO FOR LVS/TUN中的一段:
  1. 7.1. You need a tunl0 device
  2. In LVS-Tun, the tunl0 device holds the VIP, just as the lo device holds the device for LVS-DR.

  3. You need to build the tunl0 device into the Linux kernel (in networking options - IP:tunneling) - it is turned off by default. tunl0 is a networking device like eth0, lo, dummy0. The tunnelling can be built as a module, in which case you'll have to insmod ipip before you can use it, or you can build it directly into the kernel.

  4. With a kernel built for tunneling, you should be able to see the unconfigured tunl0 device with ifconfig or with ip addr show (Feb 2004 - my ifconfig used to see the unconfigured tunl0, but it doesn't anymore.)
复制代码


按照它说的,我的IP:tunneling是配置成了模块方式的了,这样可以在ifconfig tunl0 vip network bcast前,要先通过命令insmod ipip来加载IP:tunneling这么模块,
可以,当我这样做的时候:
  1. root@Realserver1:/usr/src/linux# insmod ipip
  2. insmod: can't read 'ipip': No such file or directory
复制代码


这是为什么呢?

大家都不说话了吗?
作者: nntp    时间: 2006-07-07 12:48
LVS不专长,不敢发话,哈.

不过你在 /usr/src/linux 下面 insmod ipip 操作不对吧.  modprobe或者到 lib 下面去 insmod,  locate一下你的ipip module 在哪儿.
作者: Linuxcn.com    时间: 2006-07-07 14:01
原帖由 nntp 于 2006-7-7 12:48 发表
LVS不专长,不敢发话,哈.

不过你在 /usr/src/linux 下面 insmod ipip 操作不对吧.  modprobe或者到 lib 下面去 insmod,  locate一下你的ipip module 在哪儿.


首先感谢回复,这个问题搞了好几天了,很郁闷,一直不得其解

是的,刚看了下insmod和modprobe的区别,
2者都是把模块载入到kernel里去,不过insmod载入的时候是要绝对路径的,并且不会载入有依赖关系的其他模块,而modprobe载入模块时不要求绝对路径,而且会把相关依赖模块也自动载入

下面是locate ipip的结果
  1. root@Loadbalance:/etc/init.d# locate ipip
  2. /lib/modules/2.6.12-9-386/kernel/net/ipv4/ipip.ko
  3. /lib/modules/2.6.14-ck9/kernel/net/ipv4/ipip.ko
  4. /lib/modules/2.6.14/kernel/net/ipv4/ipip.ko
  5. /usr/src/kernel-headers-2.6.14-ck9/include/config/net/ipip
  6. /usr/src/kernel-headers-2.6.14-ck9/include/config/net/ipip/module.h
  7. /usr/src/kernel-headers-2.6.14-ck9/include/net/ipip.h
  8. /usr/src/kernel-headers-2.6.14/include/config/net/ipip
  9. /usr/src/kernel-headers-2.6.14/include/config/net/ipip/module.h
  10. /usr/src/kernel-headers-2.6.14/include/net/ipip.h
  11. /usr/src/linux-2.6.14/include/config/net/ipip
  12. /usr/src/linux-2.6.14/include/config/net/ipip/module.h
  13. /usr/src/linux-2.6.14/include/net/ipip.h
  14. /usr/src/linux-2.6.14/net/ipv4/ipip.c
  15. /usr/src/linux-2.6.14/net/ipv4/ipip.ko
  16. /usr/src/linux-2.6.14/net/ipv4/.ipip.ko.cmd
  17. /usr/src/linux-2.6.14/net/ipv4/ipip.mod.c
  18. /usr/src/linux-2.6.14/net/ipv4/ipip.mod.o
  19. /usr/src/linux-2.6.14/net/ipv4/.ipip.mod.o.cmd
  20. /usr/src/linux-2.6.14/net/ipv4/ipip.o
  21. /usr/src/linux-2.6.14/net/ipv4/.ipip.o.cmd
  22. /usr/src/linux-2.6.14/.tmp_versions/ipip.mod
复制代码


在任意目录下执行modprobe ipip后没任何提示,好像是通过了,但是还是不能够是LVS/TUN正常工作
作者: Linuxcn.com    时间: 2006-07-07 14:46
无比的郁闷,modprobe ipip后,ifconfig -a已经可以看到tunl0这个网络设备了,而且是处在没有配置的状态下,
这点和HOWTO里说的情况一样,
但是我配置了tunl0的IP后还是不行,疯掉

我在想是否是这里出错了呢,在LVS/DR方式下,当Loadbalance的虚拟网络设备这样配置的时候:
  1. ifconfig eth0:0 vip netmask bcast
复制代码

RS上的虚拟网络设备lo要配置成这样:
  1. ifconfig lo:0 vip netmask bcast
复制代码


:0的意思是说都在0这个端口吧

但在LVS/TUN方式下,RS的网络设备tunl0只能是这样配置:
  1. ifconfig tunl0 vip netmask bcast
复制代码


而不能是像这样的
  1. ifconfig tunl0:0 vip netmask bcast
复制代码


请做过这个的兄弟进来看看,指点一下小弟那块出了错,谢谢了先

[ 本帖最后由 Linuxcn.com 于 2006-7-7 14:47 编辑 ]
作者: Linuxcn.com    时间: 2006-07-07 14:54
还有就是关于ip_forwad这个链是否关闭的疑问
不管是google还是CU还是别的论坛上,有关这个值:
echo "N">/proc/sys/net/ipv4/ip_forward

还是LVS的官网,N的值有说是1的,有说是0的,,说1的状态是打开,0的状态是关闭
说1的:
http://www.linuxvirtualserver.org/VS-IPTunneling.html

说0的
http://www.austintek.com/LVS/LVS ... -HOWTO.LVS-Tun.html

能否请问一下大大们
echo "N">/proc/sys/net/ipv4/ip_forwad

我知道1是打开IP转发,0是关闭IP转发功能

我的意思是这句在LVS/DR,LVS/TUN中的作用

的作用是什么?俺都糊涂了

[ 本帖最后由 Linuxcn.com 于 2006-7-7 15:04 编辑 ]
作者: Linuxcn.com    时间: 2006-07-10 01:18
自己顶一顶,不好意思啊大家,小弟实在郁闷,刚好在等世界杯的最后一场到来,无聊来灌点水,哈,大家不要鄙视
作者: Linuxcn.com    时间: 2006-07-13 17:07
是不是LVS-TUN方式在win host+vm环境下无法做实验啊?
人要疯掉,怎么着它就是不行,救命啊

[ 本帖最后由 Linuxcn.com 于 2006-7-13 17:32 编辑 ]




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2