1.4rc1 - DHCP static-mapping-error

Hi All,

Having trouble setting a different DNS server for a specific machine using DHCP scope.

Yesterday I was following the link
https://docs.vyos.io/en/sagitta/configuration/service/dhcp-server.html#dhcp-server-v4-example-raw

set service dhcp-server shared-network-name dhcpexample subnet 192.0.2.0/24 static-mapping example static-mapping-parameters "option domain-name-servers 192.0.2.11, 192.0.2.12;"

When I commit I got the following error

Configuration file errors encountered - check your options!

[[service dhcp-server]] failed

This morning I tried running the same command and this time committed properly? How do I check?

When I look at journalctl I see following messages??.

WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Warning: subnet 172.16.12.0/24 overlaps subnet 172.16.12.0/24
Run 'dpkg-reconfigure isc-dhcp-server' to fix the problem.
/etc/default/isc-dhcp-server does not exist! - Aborting...

DHCP scope for Guest Wireless

set service dhcp-server listen-address '172.16.12.254'
set service dhcp-server shared-network-name GuestWLAN_POOL authoritative
set service dhcp-server shared-network-name GuestWLAN_POOL subnet 172.16.12.0/24 default-router '172.16.12.254'
set service dhcp-server shared-network-name GuestWLAN_POOL subnet 172.16.12.0/24 domain-name 'guestwlan.lan'
set service dhcp-server shared-network-name GuestWLAN_POOL subnet 172.16.12.0/24 lease '86400'
set service dhcp-server shared-network-name GuestWLAN_POOL subnet 172.16.12.0/24 name-server '8.8.8.8'
set service dhcp-server shared-network-name GuestWLAN_POOL subnet 172.16.12.0/24 name-server '8.8.4.4'
set service dhcp-server shared-network-name GuestWLAN_POOL subnet 172.16.12.0/24 range 0 start '172.16.12.2'
set service dhcp-server shared-network-name GuestWLAN_POOL subnet 172.16.12.0/24 range 0 stop '172.16.12.250'

Cheers

Actually DHCP does not seem to be working correctly or I am miss-reading something?

I have about 30 systems connected to this VyOS in different subnets and only two systems in the run show dhcp server leases

Systems are being allocated IP addresses but don’t seem to be updating on VyOS?

/config/dhcp.leases also does not show all systems that have picked up a lease.

Hi All,

Not sure why I could not add the following command the first time? although that issue has disappeared?

set service dhcp-server shared-network-name dhcpexample subnet 192.0.2.0/24 static-mapping example static-mapping-parameters "option domain-name-servers 192.0.2.11, 192.0.2.12;"

Also worked out that show dhcp server leases will only show dhcp addresses give out and not reservations. Looking for a command that will show both leases and reservations.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.