DHCP with VRRP

Hi Guys

I maintain a separate network for my Wifi Clients that consists of two VyOS VMs running VRRP between them (for the gateway).

Each VM has a unique IP in 10.0.4.0/24 and VRRP is configured for 10.0.4.1 address. These two VMs also provide DHCP for this subnet and is configured using DHCP failover. Prior to this setup I was running a standalone VyOS VM (also DHCP) and had no problems whatsoever

Since replacing it with this new VRRP pair however, I’m getting a lot more disconnects from my wifi clients and I suspect its to do with DHCP. As per the below, you can see there’s a lot of DHCP leases for the same IP/MAC and I’m not too sure if this is a possible problem - As an aside, I’ve seen that the VRRP master responds to DHCP requests from both 10.0.4.1 and 10.0.4.2 at the same time (with the same offer).

Does anyone have any thoughts on this?

[code]> root@vy-gw-a:~# show vrrp detail


Interface: eth2

Group: 100

State: MASTER
Last transition: 2d9h44s

RFC 3768 Compliant
Virtual MAC interface: eth2v100
Address Owner: no

Source Address: 10.0.4.2
Priority: 100
Advertisement interval: 1 sec
Authentication type: IPSEC_AH
Preempt: enabled

Sync-group: SYNC

VIP count: 1
10.0.4.1/24

root@vy-gw-a:~#
root@vy-gw-a:~# show configuration commands | grep dhcp
set service dhcp-server disabled ‘false’
set service dhcp-server shared-network-name DHCPPOOL1 authoritative ‘disable’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 default-router ‘10.0.4.1’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 dns-server ‘10.0.4.1’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 domain-name ‘mydomain.com
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 failover local-address ‘10.0.4.2’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 failover name ‘DHCP-HA’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 failover peer-address ‘10.0.4.3’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 failover status ‘primary’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 lease ‘7200’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 start 10.0.4.10 stop ‘10.0.4.50’
root@vy-gw-a:~#
root@vy-gw-a:~# show dhcp server leases

IP address Hardware address Lease expiration Pool Client Name


10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 21:09:52 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.30 14:dd:xx:xx:xx:xx 2016/11/07 21:10:08 DHCPPOOL1 android-d9c1cxxxxxxxxxxx
root@vy-gw-a:~#
[/code]

and the other router

[code]> root@vy-gw-b:~# show vrrp detail


Interface: eth2

Group: 100

State: BACKUP
Last transition: 10h7m40s

Master router: 10.0.4.2
Master priority: 100

RFC 3768 Compliant
Virtual MAC interface: eth2v100
Address Owner: no

Source Address: 10.0.4.3
Priority: 50
Advertisement interval: 1 sec
Authentication type: IPSEC_AH
Preempt: enabled

Sync-group: SYNC

VIP count: 1
10.0.4.1/24

root@vy-gw-b:~#
root@vy-gw-b:~# show configuration commands | grep dhcp
set service dhcp-server disabled ‘false’
set service dhcp-server shared-network-name DHCPPOOL1 authoritative ‘disable’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 default-router ‘10.0.4.1’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 dns-server ‘10.0.4.1’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 domain-name ‘mydomain.com
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 failover local-address ‘10.0.4.3’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 failover name ‘DHCP-HA’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 failover peer-address ‘10.0.4.2’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 failover status ‘secondary’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 lease ‘7200’
set service dhcp-server shared-network-name DHCPPOOL1 subnet 10.0.4.0/24 start 10.0.4.10 stop ‘10.0.4.50’
root@vy-gw-b:~#
root@vy-gw-b:~# show dhcp server leases

IP address Hardware address Lease expiration Pool Client Name


10.0.4.30 14:dd:xx:xx:xx:xx 2016/11/07 20:10:08 DHCPPOOL1 android-d9c1cxxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/08 05:43:20 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:13:33 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:13:33 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:13:33 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:16:22 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:16:22 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:16:22 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:25:08 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:25:08 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:25:08 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:37:16 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:37:16 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:37:16 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:43:53 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:43:53 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:43:53 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:49:49 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:49:49 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:49:49 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:55:06 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:55:06 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 20:55:06 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 21:09:52 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 21:09:52 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.29 ac:37:xx:xx:xx:xx 2016/11/07 21:09:52 DHCPPOOL1 android-38538xxxxxxxxxxx
10.0.4.30 14:dd:xx:xx:xx:xx 2016/11/07 21:10:08 DHCPPOOL1 android-d9c1cxxxxxxxxxxx
root@vy-gw-b:~#[/code]

Hello,
it’s indeed likely DHCP related issue,
can you please submit your findings on https://phabricator.vyos.net
Thanks!

Hi Syncer

https://phabricator.vyos.net/T186

@tsumaru720 Is that works in vyos1.2?