LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] multiple IP on same NICs

To: "lvs-users" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] multiple IP on same NICs
From: "wlx" <wlx@xxxxxxxxx>
Date: Tue, 26 Jun 2007 16:16:04 +0800
hi,all.
    my lvs is tunnel,realservers run squid ,all work well.but  now i want a 
realserver run two squid process(such as squid and squid2)with two ip 
seperately. 
For the time being, I'm using one director and just one real-server.

The setup is as follows:

director RIP = 192.168.100.122 
LVS VIP = 192.168.100.203
real server RIP = 192.168.100.124(eth0)
                RIP = 192.168.100.200(eth0:0)

[root@LAN-122 linux]# ipvsadm -ln
IP Virtual Server version 1.2.0 (size=1048576)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.100.203:80 wrr
  -> 192.168.100.200:80           Tunnel  1      0          0         
  -> 192.168.100.124:80           Tunnel  1      0          0     

realserver:
eth0      Link encap:Ethernet  HWaddr 00:0D:61:6B:C0:F2  
          inet addr:192.168.100.124  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:61ff:fe6b:c0f2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:177497722 errors:0 dropped:0 overruns:1 frame:1
          TX packets:151769553 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1613863993 (1.5 GiB)  TX bytes:3776001903 (3.5 GiB)

eth0:0    Link encap:Ethernet  HWaddr 00:0D:61:6B:C0:F2  
          inet addr:192.168.100.200  Bcast:192.168.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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:14352327 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14352327 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2971562342 (2.7 GiB)  TX bytes:2971562342 (2.7 GiB)

tunl0     Link encap:IPIP Tunnel  HWaddr   
          inet addr:192.168.100.203  Mask:255.255.255.255
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:458 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:29063 (28.3 KiB)  TX bytes:0 (0.0 b)
squid's squid.conf
http_port 192.168.100.124:80 transparent
squid2's squid.conf
http_port 192.168.100.200:80 transparent

now i telnet 192.168.100.203 80 from a client,it display:

[root@linuxtelnet 192.168.100.203 80
Trying 192.168.100.203...
telnet: connect to address 192.168.100.203: Connection refused
telnet: Unable to connect to remote host: Connection refused










*************************** 
* 上海帝联信息科技发展公司    
* 邮编:2000333
* 电话:021-52835702
* -------------------------
* 上海:上海市普陀区中江路879号天地软件园21号楼1层
* 北京:北京市海淀区王庄路1号清华同方科技广场B座
* -------------------------
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
<Prev in Thread] Current Thread [Next in Thread>