LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

UDP (DNS) with keepalived?

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: UDP (DNS) with keepalived?
From: Allen Pomeroy <apomeroy@xxxxxxxxxxxx>
Date: Sun, 20 Jun 2004 22:22:50 -0600
Hello All,
I am running LVS with primary and failover directors in LVS-NAT mode (using keepalived). Kernel 2.4.25, ipvsadm 1.21, keepalived 1.1.6, IPVS 1.0.10 -- and with TCP services, such as ssh and http, all works great (including connection state failover to the backup director). The problem is I'm now trying to setup DNS services behind an LVS VIP, and I think I have a problem with my keepalived configuration. Below is the config I'm trying to use .. I've included most of the config file for completeness - sorry for the length.

The symptom is no UDP or TCP port 53 packets out the real server side of the LVS director. The syslog output from keepalived insists that the virtual server for both udp and tcp have been setup without error (shown below). I'm at a loss as to why this combined udp / tcp virtual server isn't working as I expect... comparing the config to what little udp keepalived doc I could find seems to agree.

Comments or thoughts from anyone would be appreciated.
Thanks,
AP

keepalived.conf:
! v1.5 2004-06-15 06:33 added dns service to ps101 and ps102 vips
global_defs {
  notification_email {
    admin@xxxxxxxxxxxxxx
  }
  notification_email_from lvs@xxxxxxxxxxxxxx
  smtp_server 127.0.0.1
  smtp_connect_timeout 30

  lvs_id lvs1
}

vrrp_sync_group VG1 {
  group {
    VI_1
    VI_GATEWAY
   }
}

vrrp_instance VI_1 {
  state MASTER
  interface eth0
  lvs_sync_daemon_inteface eth2
  virtual_router_id 51

  priority 150
  advert_int 1
  smtp_alert

  authentication {
    auth_type PASS
    auth_pass somepass
  }

  virtual_ipaddress {
    192.168.130.104
    192.168.130.111
  }
}

vrrp_instance VI_GATEWAY {
  state MASTER
  interface bond0
  lvs_sync_daemon_inteface eth2
  virtual_router_id 52
  priority 150
  advert_int 1
  smtp_alert
  authentication {
    auth_type PASS
    auth_pass somepass
  }
  virtual_ipaddress {
    10.1.110.10
  }
}

! dns VIP for tcp connections
virtual_server 192.168.130.111 53 {
  delay_loop 6
  lb_algo wrr
  lb_kind NAT
  nat_mask 255.255.255.0
  protocol TCP
  real_server 10.1.110.201 53 {
    weight 100
    TCP_CHECK {
      connect_timeout 3
      connect_port 53
    }
  }
  real_server 10.1.110.203 53 {
    weight 100
    TCP_CHECK {
      connect_timeout 3
      connect_port 53
    }
  }
}

! dns VIP for udp connections
virtual_server 192.168.130.111 53 {
  delay_loop 6
  lb_algo wrr
  lb_kind NAT
  nat_mask 255.255.255.0
  protocol UDP
  real_server 10.1.110.201 53 {
    weight 100
  }
  real_server 10.1.110.203 53 {
    weight 100
  }
}

! ssh ps-pool
virtual_server 192.168.130.104 22 {
  delay_loop 6
  lb_algo wrr
  lb_kind NAT
  nat_mask 255.255.255.0
  protocol TCP
  real_server 10.1.110.201 22 {
    weight 100
    TCP_CHECK {
      connect_timeout 3
      connect_port 22
    }
  }
  real_server 10.1.110.203 22 {
    weight 50
    TCP_CHECK {
      connect_timeout 3
      connect_port 22
    }
  }
}

Versions:
 [root@lvs1 samples]# ipvsadm -v
ipvsadm v1.21 2003/10/27 (compiled with popt and IPVS v1.0.10)
[root@lvs1 samples]# keepalived -v
Keepalived v1.1.6 (23/02, 2004)
[root@lvs1 samples]# uname -a
Linux lvs1 2.4.25 #6 Mon Mar 29 22:00:34 MST 2004 i686 i686 i386 GNU/Linux

syslog output:
Jun 20 22:12:14 s_dgram@lvs1 Keepalived: Starting Keepalived v1.1.6 (23/02, 2004) Jun 20 22:12:14 s_dgram@lvs1 Keepalived: Starting Healthcheck child process, pid=21631 Jun 20 22:12:14 s_dgram@lvs1 Keepalived: Starting VRRP child process, pid=21632 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Using MII-BMSR NIC polling thread... Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Registering Kernel netlink reflector Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Registering Kernel netlink comand channel Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Configuration is using : 289661 Bytes Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Using MII-BMSR NIC polling thread... Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: ------< Global definitions >------
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:  LVS ID = lvs1
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Smtp server = 127.0.0.1 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Smtp server connection timeout = 30 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Email notification from = lvs@xxxxxxxxxxxxxx Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Email notification = someuser@xxxxxxxxxxxxxx Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: ------< LVS Topology >------ Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: System is compiled with LVS v1.0.10 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: VIP = 192.168.130.111, VPORT = 53 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: delay_loop = 6, lb_algo = wrr Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: protocol = TCP
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:    lb_kind = NAT
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.201, RPORT = 53, WEIGHT = 100 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.203, RPORT = 53, WEIGHT = 100 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: VIP = 192.168.130.111, VPORT = 53 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: delay_loop = 6, lb_algo = wrr Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: protocol = UDP
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:    lb_kind = NAT
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.201, RPORT = 53, WEIGHT = 100 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.203, RPORT = 53, WEIGHT = 100 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: VIP = 192.168.130.107, VPORT = 22 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: delay_loop = 6, lb_algo = wrr Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: protocol = TCP
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:    lb_kind = NAT
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.201, RPORT = 22, WEIGHT = 100 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: VIP = 192.168.130.108, VPORT = 22 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: delay_loop = 6, lb_algo = wrr Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: protocol = TCP
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:    lb_kind = NAT
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.203, RPORT = 22, WEIGHT = 100 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: VIP = 192.168.130.104, VPORT = 22 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: delay_loop = 6, lb_algo = wrr Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: protocol = TCP
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:    lb_kind = NAT
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.201, RPORT = 22, WEIGHT = 100 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.203, RPORT = 22, WEIGHT = 50 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: VIP = 192.168.130.105, VPORT = 22 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: delay_loop = 6, lb_algo = wrr Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: protocol = TCP
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:    lb_kind = NAT
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.30, RPORT = 22, WEIGHT = 1 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: RIP = 10.1.110.40, RPORT = 22, WEIGHT = 1 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: ------< Health checkers >------
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:  10.1.110.201:53
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Keepalive method = TCP_CHECK Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Connection port = 53 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Connection timeout = 3
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:  10.1.110.203:53
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Keepalive method = TCP_CHECK Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Connection port = 53 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Connection timeout = 3
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:  10.1.110.201:22
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Keepalive method = TCP_CHECK Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Connection port = 22 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Connection timeout = 3
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers:  10.1.110.203:22
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Keepalive method = TCP_CHECK Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Connection port = 22 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Connection timeout = 3 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Watchdog: Starting listener on /tmp/.healthcheckers wdog socket Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Activating healtchecker for service [10.1.110.201:53] Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Activating healtchecker for service [10.1.110.203:53] Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Activating healtchecker for service [10.1.110.201:22] Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Activating healtchecker for service [10.1.110.203:22] Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Activating healtchecker for service [10.1.110.201:22] Jun 20 22:12:14 s_dgram@lvs1 Keepalived_healthcheckers: Activating healtchecker for service [10.1.110.203:22] Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Registering Kernel netlink reflector Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Registering Kernel netlink comand channel Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Registering gratutious ARP shared channel Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Configuration is using : 296591 Bytes Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: ------< Global definitions >------
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:  LVS ID = lvs1
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:  Smtp server = 127.0.0.1
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Smtp server connection timeout = 30 Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Email notification from = lvs@xxxxxxxxxxxxxx Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Email notification = someuser@xxxxxxxxxxxxxx Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: ------< VRRP Topology >------
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:  VRRP Instance = VI_1
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Want State = MASTER
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Runing on device = eth0
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Virtual Router ID = 51
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Priority = 150
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Advert interval = 1sec
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Preempt Active
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Authentication type = SIMPLE_PASSWORD
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Password = somepass
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Virtual IP = 2
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: 192.168.130.104/32 brd 192.168.130.104 dev eth0 scope global Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: 192.168.130.111/32 brd 192.168.130.111 dev eth0 scope global
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Using smtp notification
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: VRRP Instance = VI_GATEWAY
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Want State = MASTER
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Runing on device = bond0
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Virtual Router ID = 52
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Priority = 150
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Advert interval = 1sec
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Preempt Active
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Authentication type = SIMPLE_PASSWORD
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Password = somepass
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Virtual IP = 1
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: 10.1.110.10/32 brd 10.1.110.10 dev bond0 scope global
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    Using smtp notification
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: ------< VRRP Sync groups >------ Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: VRRP Sync Group = VG1, BACKUP
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    monitor = VI_1
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp:    monitor = VI_GATEWAY
Jun 20 22:12:14 s_dgram@lvs1 Keepalived_vrrp: Watchdog: Starting listener on /tmp/.vrrp wdog socket

<Prev in Thread] Current Thread [Next in Thread>
  • UDP (DNS) with keepalived?, Allen Pomeroy <=