Describe the issue
I have a working keepalived vrrp setup with two direct routing loadbalancer and two realserver behind.
i can reach the real server direktly and they work as expected.
i cant reach them through the VIP of the loadbalancer.
i expect that the packages gets routed in both direction through the VIP.
if i talk direktly to the real server (172.128.10.32:3128 / 172.128.10.31:3128) the connection does work.
Keepalived version
Output of keepalived -v
see "To Reproduce"
Distro (please complete the following information):
Name: CentOS
Version: 8 Stream
Architecture: x86_64
Details of any containerisation or hosted service (e.g. AWS)
If keepalived is being run in a container or on a hosted service, provide full details
Configuration file:
A full copy of the configuration file, obfuscated if necessary to protect passwords and IP addresses
see "To Reproduce"
Notify and track scripts
If any notify or track scripts are in use, please provide copies of them
System Log entries
Full keepalived system log entries from when keepalived started
Jan 10 11:47:55 loadbalancer01 Keepalived[107310]: Starting VRRP child process, pid=107312
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: Registering Kernel netlink reflector
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: Registering Kernel netlink command channel
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: Opening file '/etc/keepalived/keepalived.conf'.
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) Ignoring track_interface enp1s0 since own interface
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: Assigned address 172.16.10.11 for interface enp1s0
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: (LBN) Ignoring track_interface enp4s0 since own interface
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: Assigned address 172.128.10.2 for interface enp4s0
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: Registering gratuitous ARP shared channel
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) removing VIPs.
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) removing E-VIPs.
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: (LBN) removing VIPs.
Jan 10 11:47:55 loadbalancer01 systemd[1]: Started LVS and VRRP High Availability Monitor.
Jan 10 11:47:55 loadbalancer01 Keepalived_healthcheckers[107311]: Opening file '/etc/keepalived/keepalived.conf'.
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: VRRP sockpool: [ifindex(2), family(IPv4), proto(112), unicast(0), fd(12,13)]
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: VRRP sockpool: [ifindex(3), family(IPv4), proto(112), unicast(0), fd(14,15)]
Jan 10 11:47:55 loadbalancer01 Keepalived_healthcheckers[107311]: Gained quorum 1+0=1 <= 2 for VS [172.16.10.30]:tcp:3128
Jan 10 11:47:55 loadbalancer01 kernel: IPVS: sync thread started: state = BACKUP, mcast_ifn = enp4s0, syncid = 171, id = 0
Jan 10 11:47:55 loadbalancer01 Keepalived_vrrp[107312]: VRRP_Script(CHK_UPTIME) succeeded
Jan 10 11:47:57 loadbalancer01 Keepalived_vrrp[107312]: VRRP_Script(CHK_EXT_GW) succeeded
Jan 10 11:47:57 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) Entering BACKUP STATE
Jan 10 11:47:57 loadbalancer01 Keepalived_vrrp[107312]: VRRP_Group(LBINT) Syncing instances to BACKUP state
Jan 10 11:47:57 loadbalancer01 Keepalived_vrrp[107312]: (LBN) Entering BACKUP STATE
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) Receive advertisement timeout
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (LBN) Receive advertisement timeout
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (LBN) Entering MASTER STATE
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (LBN) setting VIPs.
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (LBN) Sending/queueing gratuitous ARPs on enp4s0 for 172.128.10.1
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:01 loadbalancer01 kernel: IPVS: stopping backup sync thread 107313 ...
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: VRRP_Group(LBINT) Syncing instances to MASTER state
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) Entering MASTER STATE
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) setting VIPs.
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) setting E-VIPs.
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) Sending/queueing gratuitous ARPs on enp1s0 for 172.16.10.10
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) Sending/queueing gratuitous ARPs on enp1s0 for 172.16.10.30
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:01 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:01 loadbalancer01 kernel: IPVS: sync thread started: state = MASTER, mcast_ifn = enp4s0, syncid = 171, id = 0
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: (LBN) Sending/queueing gratuitous ARPs on enp4s0 for 172.128.10.1
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp4s0 for 172.128.10.1
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) Sending/queueing gratuitous ARPs on enp1s0 for 172.16.10.10
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: (DMZ) Sending/queueing gratuitous ARPs on enp1s0 for 172.16.10.30
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.10
Jan 10 11:48:02 loadbalancer01 Keepalived_vrrp[107312]: Sending gratuitous ARP on enp1s0 for 172.16.10.30
Did keepalived coredump?
If so, can you please provide a stacktrace from the coredump, using gdb.
Additional context
Add any other context about the problem here.
firewalld and selinux are disabled
The main problem seems to be that the loadbalancer cant or wouldnt route the packages back.
I cant see an ARP problem
C:\Windows\system32>cmd /V /C "set "IP=172.16.10.30" & FOR /L %i in (1,1,2) do @ping -n 1 -w 1000 "!IP!" >NUL & arp -a | findstr /c:"!IP! "
172.16.10.30 LB-VIP-MAC dynamisch
172.16.10.30 LB-VIP-MAC dynamisch
on the loadbalancer:
With a tcpdum on enp1s0 [DMZ] i see the packages flow from my client to the lb VIP MAC (172.16.10.30 [enp1s0])
i cant see packages in the other direction.
With a tcpdum on enp4s0 [LBN] i see the packages flow from my client to the real server VIP MAC (172.16.10.30 on lo [enp1s0 MAC])
AND i see the answer packages from that real server to my client with client MAC and real server MAC - which never pass enp1s0 [DMZ] on the loadbalancer to rech the client.
maybe this is related to #1551 ?
am i missing something?
Describe the issue I have a working keepalived vrrp setup with two direct routing loadbalancer and two realserver behind. i can reach the real server direktly and they work as expected. i cant reach them through the VIP of the loadbalancer.
To Reproduce CentOS 8 Stream minimal installation
Setup loadbalancer:
dnf install -y keepalived ipvsadm
configure keepalived:
configure /etc/modules-load.d/ipvs.conf
(load ip_vs kernel module on boot)
configure /etc/sysctl.conf
setup realserver
configure startup script
Expected behavior A clear and concise description of what you expected to happen.
but the connection does never realy work:
i expect that the packages gets routed in both direction through the VIP. if i talk direktly to the real server (172.128.10.32:3128 / 172.128.10.31:3128) the connection does work.
Keepalived version Output of
keepalived -v
Distro (please complete the following information):
Details of any containerisation or hosted service (e.g. AWS) If keepalived is being run in a container or on a hosted service, provide full details
Configuration file: A full copy of the configuration file, obfuscated if necessary to protect passwords and IP addresses
Notify and track scripts If any notify or track scripts are in use, please provide copies of them
System Log entries Full keepalived system log entries from when keepalived started
Did keepalived coredump? If so, can you please provide a stacktrace from the coredump, using gdb.
Additional context Add any other context about the problem here.
firewalld and selinux are disabled The main problem seems to be that the loadbalancer cant or wouldnt route the packages back.
I cant see an ARP problem
on the loadbalancer:
tcpdum
on enp1s0 [DMZ] i see the packages flow from my client to the lb VIP MAC (172.16.10.30 [enp1s0]) i cant see packages in the other direction.tcpdum
on enp4s0 [LBN] i see the packages flow from my client to the real server VIP MAC (172.16.10.30 on lo [enp1s0 MAC]) AND i see the answer packages from that real server to my client with client MAC and real server MAC - which never passenp1s0 [DMZ]
on the loadbalancer to rech the client.maybe this is related to #1551 ? am i missing something?