LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Initial setup help request - can't ping VIP??

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Initial setup help request - can't ping VIP??
From: Tim Burke <burke@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Feb 2000 17:08:57 -0500
Through trial and error I removed all of the  required kernel options for LVS.  
Upon doing this I was able to successfully run
/sbin/ifconfig eth0:1 192.168.5.254.  Then one-by-one I added back the kernel 
options.  In the end, by only statically configuring in
the round robin LVS scheduling algorithm it worked.  Apparently the inability 
to ifconfig an alias was introduced by statically
configuring in all of the scheduling algorithms.


Tim Burke wrote:

> Thank you very much for the reply.  Unfortunately it didn't work.  However it 
> may be pointing more to the actual
> problem.
>
> Following your advice, I added in the ALIAS into ifcfg-eth0 but that didn't 
> make any difference.  (I tried ifdown/ifup,
> /etc/rc.d/init.d/network restart, and rebooting.)  The problem is that I 
> never get the eth0:1 to appear from ifconfig -a.
> However in looking in /var/log/messages when pulse is running I see that it 
> tries to execute this command to accomplish the alias:
>
> Feb 24 09:23:45 iclu7 pulse[678]: running command  "/sbin/ifconfig" "eth0:1" 
> "19
> 2.168.5.254" "up"
>
> So I tried to manually run this command and here's what I get:
> [root@iclu7 /root]# /sbin/ifconfig eth0:1 192.168.5.254 up
> SIOCSIFADDR: No such device
> SIOCSIFFLAGS: No such device
> SIOCSIFFLAGS: No such device
> Naturally, after this, ifconfig -a has no mention of the eth0:1 interface.
>
> For sanity sake, the following command does succeed:
> /sbin/ifconfig eth0 192.168.5.7 up
>
> Now I'm beginning to wonder if there is a kernel option that I'm missing.  
> Following the instructions in the LVS
> patch readme, I have included the following:
>
> Kernel Compile Options:
>
> Code maturity level options ---
>         [*] Prompt for development and/or incomplete code/drivers
> Networking options ---
>         [*] Network firewalls
>         ....
>         [*] IP: firewalling
>         ....
>         [*] IP: masquerading
>         ....
>         [*] IP: masquerading virtual server support
>         (12) IP masquerading table size (the Nth power of 2)
>         < > IPVS: round-robin scheduling
>         < > IPVS: weighted round-robin scheduling
>         < > IPVS: least-connection scheduling
>         < > IPVS: weighted least-connection scheduling
>
> I also added in:
>         [*] IP: aliasing support
> but that had no effect.
>
> Other settings include:[root@iclu7 /root]# ipchains -L
> Chain input (policy ACCEPT):
> Chain forward (policy ACCEPT):
> target     prot opt     source                destination           ports
> MASQ       all  ------  192.168.5.0/24       0.0.0.0               n/a
> Chain output (policy ACCEPT):
> [root@iclu7 /root]# cat /proc/sys/net/ipv4/ip_forward
> 1
> [root@iclu7 /root]# ipvsadm -L
> IP Virtual Server version 0.9.7 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port          Forward Weight ActiveConn InActConn
> TCP  cluweb1.mclinux.com:www rr
>   -> iclu4.mclinux.com:www       Masq    2000   0          0
>   -> iclu3.mclinux.com:www       Masq    2000   0          0
>
> bobby.moore@xxxxxxxxxxxxx wrote:
>
> > Your ifconfig -a doesn't show your VIPs for the aliased interfaces. I think
> > that if you do the following you'll be alright; your VIPS will show up when
> > you 'ifconfig -a'...
> >
> > Ensure that there's an ALIAS line in your network scripts for each
> > interface. Note the following examples...
> >
> > In /etc/sysconfig/network-scripts/ifcfg-eth0...
> >
> > DEVICE=eth0
> > BROADCAST=10.5.11.255
> > IPADDR=10.5.11.3
> > NETMASK=255.255.255.0
> > NETWORK=10.5.11.0
> > ONBOOT=yes
> > ALIAS=10.5.11.34
> >
> > ...and in /etc/sysconfig/network-scripts/ifcfg-eth1...
> >
> > DEVICE=eth1
> > BROADCAST=172.17.255.255
> > IPADDR=172.17.206.209
> > NETMASK=255.255.0.0
> > NETWORK=172.17.0.0
> > ONBOOT=yes
> > ALIAS=172.17.206.191
> >
> > (You may have to stop and restart the interfaces. (ifdown eth0/ifup eth0,
> > ifdown eth1/ifup eth1))
> >
> > After setting these scripts up, then I started pulse.
> >
> >      /etc/rc.d/init.d/pulse start
> >
> > After I did this, then I displayed my interface configs and got the
> > following result...
> >
> >      ifconfig -a
> >
> > eth0      Link encap:Ethernet  HWaddr 00:60:B0:38:E4:AF
> >           inet addr:10.5.11.3  Bcast:10.5.11.255  Mask:255.255.255.0
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           RX packets:140941 errors:1 dropped:0 overruns:0 frame:1
> >           TX packets:521 errors:24 dropped:0 overruns:0 carrier:24
> >           collisions:0 txqueuelen:100
> >           Interrupt:10 Base address:0xfc00 DMA chan:4
> >
> > eth0:1    Link encap:Ethernet  HWaddr 00:60:B0:38:E4:AF
> >           inet addr:10.5.11.34  Bcast:10.255.255.255  Mask:255.0.0.0
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           Interrupt:10 Base address:0xfc00 DMA chan:4
> >
> > eth1      Link encap:Ethernet  HWaddr 00:10:5A:C7:66:8B
> >           inet addr:172.17.206.209  Bcast:172.17.255.255  Mask:255.255.0.0
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           RX packets:1027977 errors:0 dropped:0 overruns:0 frame:0
> >           TX packets:17803 errors:0 dropped:0 overruns:0 carrier:0
> >           collisions:126 txqueuelen:100
> >           Interrupt:9 Base address:0xf480
> >
> > eth1:1    Link encap:Ethernet  HWaddr 00:10:5A:C7:66:8B
> >           inet addr:172.17.206.191  Bcast:172.17.255.255  Mask:255.255.0.0
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           Interrupt:9 Base address:0xf480
> >
> > lo        Link encap:Local Loopback
> >           inet addr:127.0.0.1  Mask:255.0.0.0
> >           UP LOOPBACK RUNNING  MTU:3924  Metric:1
> >           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> >           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> >           collisions:0 txqueuelen:0
> >
> > I was then able to ping the aliased IPs.
> >
> > Bobby Moore Worldspan
> > Phone: 770.563.7362 Fax: 770.563.6406
> > bobby.moore@xxxxxxxxxxxxx
> >
> >
> >                     Tim Burke
> >                     <burke@missioncritical        To:     
> > "lvs-users@xxxxxxxxxxxxxxxxxxxxxx"
> >                     linux.com>                    
> > <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
> >                     Sent by:                      cc:
> >                     burke@missioncriticall        Subject:     Initial 
> > setup help request - can't ping VIP??
> >                     inux.com
> >
> >
> >                     02/22/2000 06:04 PM
> >
> >
> >
> > I am trying to setup a simple LVS-nat cluster.  To do this I have followed
> > all of the instructions in the HOWTO including applying the kernel patch
> > and
> > new version of ipvsadm.
> >
> > My initial suspicion is that I am unable to ping the VIP from any node
> > (including from both virtual servers themselves).  Am I safe in assuming
> > that you should be able to ping the VIP?
> >
> > Also was thinking that `ifconfig`  on the VS nodes would have some
> > mention of the masqueraded IP.  But this seems to not be the case.
> > (See output below.)
> >
> > Looking in /var/log/messages I see evidence which leads me to think
> > that pulse is doing the correct things in terms of running `ifconfig`
> > and `arp` to takeover and advertise the service of the masqueraded IP
> > address.  Refer to the below details section for a cut at the log messages.
> >
> > Another thing I might have expected was to see a route to the VIP which is
> > the active LVS server.  In my case it doesn't show up at all from
> > the `route -n` command.  (See output below.)
> >
> > On the real servers I set the default GATEWAY in /etc/sysconfig/network
> > to be the IP address of the nat_router.
> >
> > It appears that the Primary and Backup LVS router are behaving correctly
> > in the sense that at any given time only one is active.
> >
> > Any suggestions on where to begin diagnosing the problem?
> >
> > Thanks.
> > --------------------------------------------------------------------------
> >
> > Shown below are the details of the setup of an http service.
> >
> > Using Piranha, I have a resulting /etc/lvs.cf file as follows:
> > primary = 192.168.1.155
> > backup_active = 1
> > backup = 192.168.1.156
> > nat_router = 192.168.5.254 eth0:1
> >
> > virtual cluweb1 {
> >         address = 192.168.1.160 eth1:1
> >         active = 1
> >         load_monitor = uptime
> >
> >         server iclu3 {
> >                 address = 192.168.5.3
> >                 active = 1
> >                 weight = 1000
> >         }
> >
> >         server iclu4 {
> >                 address = 192.168.5.4
> >                 active = 1
> >                 weight = 1000
> >         }
> >         scheduler = rr
> > }
> >
> > # route -n
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags Metric Ref    Use
> > Iface
> > 192.168.5.8     0.0.0.0         255.255.255.255 UH    0      0        0
> > eth0
> > 192.168.1.156   0.0.0.0         255.255.255.255 UH    0      0        0
> > eth1
> > 192.168.5.0     0.0.0.0         255.255.255.0   U     0      0        0
> > eth0
> > 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth
> >              # ifconfig
> > eth0      Link encap:Ethernet  HWaddr 00:D0:B7:16:96:FD
> >           inet addr:192.168.5.8  Bcast:192.168.5.255  Mask:255.255.255.0
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           RX packets:86340 errors:2 dropped:0 overruns:0 frame:0
> >           TX packets:105030 errors:0 dropped:0 overruns:0 carrier:0
> >           collisions:452 txqueuelen:100
> >           Interrupt:10 Base address:0xdf00
> >
> > eth1      Link encap:Ethernet  HWaddr 00:90:27:EB:56:D3
> >           inet addr:192.168.1.156  Bcast:192.168.1.255  Mask:255.255.255.0
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           RX packets:154213 errors:2 dropped:0 overruns:0 frame:0
> >           TX packets:70461 errors:0 dropped:0 overruns:6 carrier:0
> >           collisions:26 txqueuelen:100
> >           Interrupt:9 Base address:0xdd80
> >
> > lo        Link encap:Local Loopback
> >           inet addr:127.0.0.1  Mask:255.0.0.0
> >           UP LOOPBACK RUNNING  MTU:3924  Metric:1
> >           RX packets:475 errors:0 dropped:0 overruns:0 frame:0
> >           TX packets:475 errors:0 dropped:0 overruns:0 carrier:0
> >           collisions:0 txqueuelen:0
> >
> > # cat ip_forward
> > 1
> > # cat ip_always_defrag
> > 1
> >
> > Excerpt from /var/log/messages:
> > Feb 23 17:16:10 iclu8 pulse[14618]: starting pulse as backup
> > Feb 23 17:16:10 iclu8 pulse: pulse startup succeeded
> > Feb 23 17:16:15 iclu8 pulse[14618]: partner dead: activating lvs
> > Feb 23 17:16:10 iclu8 pulse: pulse startup succeeded
> > Feb 23 17:16:15 iclu8 pulse[14618]: partner dead: activating lvs
> > Feb 23 17:16:15 iclu8 pulse[14618]: running command  "/usr/sbin/lvs" "
> > --nofork"
> > "-c" "/etc/lvs.cf"
> > Feb 23 17:16:15 iclu8 lvs: running command  "/usr/sbin/ipvsadm" "-C"
> > Feb 23 17:16:15 iclu8 lvs[14622]: running command  "/usr/sbin/ipvsadm" "-A"
> > "-t"
> >  "192.168.1.160:80" "-s" "rr"
> > Feb 23 17:16:15 iclu8 lvs[14622]: running command  "/usr/sbin/nanny" "-c" "
> > -h" "
> > 192.168.5.3" "-p" "80" "-a" "180"
> > Feb 23 17:16:15 iclu8 lvs[14622]: running command  "/usr/sbin/ipvsadm" "-A"
> > "-t"
> >  "192.168.1.160:80" "-s" "rr"
> > Feb 23 17:16:15 iclu8 lvs[14622]: running command  "/usr/sbin/nanny" "-c" "
> > -h" "
> > 192.168.5.3" "-p" "80" "-a" "180"
> > Feb 23 17:16:15 iclu8 lvs[14622]: create_monitor for cluweb1/iclu3 running
> > as pi
> > d 14630
> > Feb 23 17:16:15 iclu8 lvs[14622]: running command  "/usr/sbin/nanny" "-c" "
> > -h" "
> > 192.168.5.4" "-p" "80" "-a" "180"
> > Feb 23 17:16:15 iclu8 lvs[14622]: create_monitor for cluweb1/iclu4 running
> > as pi
> > d 14631
> > Feb 23 17:16:15 iclu8 nanny[14630]: starting client_monitor for
> > 192.168.1.160:80
> > Feb 23 17:16:15 iclu8 pulse[14629]: running command  "/sbin/ifconfig"
> > "eth0:1" "
> > 192.168.5.254" "up"
> > Feb 23 17:16:15 iclu8 pulse[14627]: running command  "/usr/bin/send_arp" "
> > -i" "e
> > th0" "192.168.5.254" "00D0B71696FD"
> > Feb 23 17:16:15 iclu8 nanny[14630]: making 192.168.5.3:80 available
> > Feb 23 17:16:15 iclu8 nanny[14630]: running command  "/usr/sbin/ipvsadm" "
> > -a" "-
> > t" "192.168.1.160:80" "-r" "192.168
> > Feb 23 17:16:15 iclu8 pulse[14633]: running command  "/sbin/ifconfig"
> > "eth1:1" "
> > 192.168.1.160" "up"
> > Feb 23 17:16:15 iclu8 pulse[14628]: running command  "/usr/bin/send_arp" "
> > -i" "e
> > th1" "192.168.1.160" "009027EB56D3"
> > Feb 23 17:16:15 iclu8 nanny[14631]: starting client_monitor for
> > 192.168.1.160:80 Feb 23 17:16:15 iclu8 pulse[14628]: running
> > command  "/usr/bin/send_arp" "-i" "e
> > th1" "192.168.1.160" "009027EB56D3"
> > Feb 23 17:16:15 iclu8 nanny[14631]: starting client_monitor for
> > 192.168.1.160:80
> > Feb 23 17:16:15 iclu8 nanny[14631]: making 192.168.5.4:80 available
> > Feb 23 17:16:15 iclu8 nanny[14631]: running command  "/usr/sbin/ipvsadm" "
> > -a" "-
> > t" "192.168.1.160:80" "-r" "192.168
> > Feb 23 17:16:15 iclu8 nanny[14630]: bad load average returned:
> > Feb 23 17:16:15 iclu8 nanny[14631]: adjusting weight of 192.168.5.4:80 to
> > 2000
> > Feb 23 17:16:15 iclu8 nanny[14631]: running command  "/usr/sbin/ipvsadm" "
> > -e" "-
> > t" "192.168.1.160:80" "-r" "192.168
> > Feb 23 17:16:16 iclu8 pam_rhosts_auth[14645]: allowed to
> > root@xxxxxxxxxxxxxxxx a
> > s root
> > Feb 23 17:16:16 iclu8 PAM_pwdb[14645]: (rsh) session opened for user root
> > by (ui
> > d=0)
> > Feb 23 17:16:16 iclu8 in.rshd[14645]: root@xxxxxxxxxxxxxxxx as root: cmd
> > ='rcp -t
> >  /etc/lvs.cf'
> > Feb 23 17:16:20 iclu8 pulse[14624]: gratuitous arps finished
> > Feb 23 17:16:25 iclu8 nanny[14630]: adjusting weight of 192.168.5.3:80 to
> > 2000
> > Feb 23 17:16:20 iclu8 pulse[14624]: gratuitous arps finished
> > Feb 23 17:16:25 iclu8 nanny[14630]: adjusting weight of 192.168.5.3:80 to
> > 2000
> > Feb 23 17:16:25 iclu8 nanny[14630]: running command  "/usr/sbin/ipvsadm" "
> > -e" "-
> > t" "192.168.1.160:80" "-r" "192.168
> > Feb 23 17:19:32 iclu8 pam_rhosts_auth[14733]: allowed to
> > root@xxxxxxxxxxxxxxxx a
> > s root                                                              Feb 23
> > 17:16:25 iclu8 nanny[14630]: running command
> > "/usr/sbin/ipvsadm" "-e" "-
> > t" "192.168.1.160:80" "-r" "192.168
> > Feb 23 17:19:32 iclu8 pam_rhosts_auth[14733]: allowed to
> > root@xxxxxxxxxxxxxxxx a
> > s root
> > Feb 23 17:19:32 iclu8 PAM_pwdb[14733]: (rsh) session opened for user root
> > by (ui
> > d=0)
> > Feb 23 17:19:32 iclu8 in.rshd[14733]: root@xxxxxxxxxxxxxxxx as root: cmd
> > ='rcp -t
> >  /etc/lvs.cf'

<Prev in Thread] Current Thread [Next in Thread>