Hello misc@, I finally got around to setup a dhcpd in my local LAN. All hosts get their IP by dhcp, but also need an alias (as secure VPN inside LAN) on each interface, after playing around with "/etc/hostname.<iface>" I found the place to put the stuff: /etc/dhclient.conf. Seemed to work well until I tried it on my laptop having two ifaces (wired and wireless).
As soon as I define several alias { ... } statements in dhclient.conf, following dhclient.conf(5) (alias must be _outside_ interface "<iface>" {...} statements), I receive errors. Here is exactly what I did: root# uname -a OpenBSD ahbabe 3.9 GENERIC#617 i386 root# ifconfig -A lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224 groups: lo inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:0a:e4:2f:30:7e groups: egress media: Ethernet autoselect (100baseTX full-duplex) status: active inet6 fe80::20a:e4ff:fe2f:307e%em0 prefixlen 64 scopeid 0x1 inet 10.0.0.8 netmask 0xffffff00 broadcast 10.0.0.255 inet 10.2.0.8 netmask 0xffffff00 broadcast 10.2.0.255 ath0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:0e:9b:a2:97:07 groups: if_int media: IEEE802.11 autoselect (DS1 mode 11b) status: no network ieee80211: nwid "" inet6 fe80::20e:9bff:fea2:9707%ath0 prefixlen 64 scopeid 0x2 pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33224 pfsync0: flags=0<> mtu 1460 enc0: flags=0<> mtu 1536 root# cat /etc/dhclient.conf # This works fine. #alias { # interface "ath0"; # fixed-address 10.2.0.101; # option subnet-mask 255.255.255.0; #} alias { interface "em0"; fixed-address 10.2.0.8; option subnet-mask 255.255.255.0; } root# dhclient em0 DHCPREQUEST on em0 to 255.255.255.255 port 67 DHCPACK from 10.0.0.254 bound to 10.0.0.8 -- renewal in 21600 seconds. # Works fine until here, but with several alias directives: root# cat /etc/dhclient.conf # Errors but works alias { interface "ath0"; fixed-address 10.2.0.101; option subnet-mask 255.255.255.0; } alias { interface "em0"; fixed-address 10.2.0.8; option subnet-mask 255.255.255.0; } root# dhclient em0 /etc/dhclient.conf line 2: wrong interface name. Expecting 'em0'. interface "ath0" /etc/dhclient.conf line 3: expecting semicolon. fixed-address DHCPREQUEST on em0 to 255.255.255.255 port 67 DHCPACK from 10.0.0.254 bound to 10.0.0.8 -- renewal in 21600 seconds. root# cat /etc/dhclient.conf # Note only the order was switched # Errors and _not_ working. alias { interface "em0"; fixed-address 10.2.0.8; option subnet-mask 255.255.255.0; } alias { interface "ath0"; fixed-address 10.2.0.101; option subnet-mask 255.255.255.0; } root# dhclient em0 /etc/dhclient.conf line 8: wrong interface name. Expecting 'em0'. interface "ath0" /etc/dhclient.conf line 9: expecting semicolon. fixed-address # Here it hangs until I hit ^C I hope someone can help me or point out what I did wrong. Regards, ahb