Re: Server configuration using conditional evaluation
| Newsgroups | gmane.network.dhcp.isc.dhcp-server |
|---|---|
| Message-ID | <CAAjorqXp2jw2gqN0yzkYvn9ecr9o0H3H8GY4NcZmZ+qntSEyig@mail.gmail.com> |
This config didn't start out as a Windows file with cr lf line endings did it? (And is still in that format?) On Sat, Feb 11, 2023, 6:30 AM Thomas Köller <[email protected]> wrote: > Hi, > > in my DHCP server configuration I have these lines: > > host raspi-400 { > host-identifier option dhcp6.client-id > 00:02:00:00:99:5c:df:c4:9e:c6:7c:c1:7f:3e; > switch (binary-to-ascii(16, 32, ".", substring(option dhcp6.ia-na, 0, > 4))) { > case "0": > fixed-address6 fd46:1ffa:d8e0::9; > option host-name "raspi-400"; > break; > case "2": > fixed-address6 fd46:1ffa:d8e0:1::9; > option host-name "raspi-400-sshvpn"; > break; > } > } > > The intention is to return different data to the client, based on the > IAID received. However, I apparently got the syntax wrong, although I > cannot spot any mistake: > > [root@sarkovy ~]# dhcpd -6 -cf /etc/dhcp/dhcpd6.conf -t > Internet Systems Consortium DHCP Server 4.4.3-P1 > Copyright 2004-2022 Internet Systems Consortium. > All rights reserved. > For info, please visit https://www.isc.org/software/dhcp/ > lease_id_format is: hex > /etc/dhcp/dhcpd6.conf line 80: right brace expected. > fixed-address6 > ^ > /etc/dhcp/dhcpd6.conf line 83: case statement in inappropriate scope. > case > ^ > /etc/dhcp/dhcpd6.conf line 87: expecting a declaration > } > ^ > Configuration file errors encountered -- exiting > > This version of ISC DHCP is based on the release available > on ftp.isc.org. Features have been added and other changes > have been made to the base software release in order to make > it work better with this distribution. > > Please report issues with this software via: > https://bugzilla.redhat.com/ > > exiting. > > Can anybody explain what's wrong? > > Thomas > -- > ISC funds the development of this software with paid support > subscriptions. Contact us at https://www.isc.org/contact/ for more > information. > > dhcp-users mailing list > [email protected] > https://lists.isc.org/mailman/listinfo/dhcp-users > -- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. dhcp-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/dhcp-users