On Mon, Jul 27, 2015 at 4:21 AM, Edgar Pettijohn <ed...@pettijohn-web.com> wrote: > On 07/26/15 19:10, Kimmo Paasiala wrote: >> >> On Mon, Jul 27, 2015 at 3:00 AM, Kimmo Paasiala <kpaas...@gmail.com> >> wrote: >>> >>> On Mon, Jul 27, 2015 at 2:33 AM, Josh Grosse <j...@jggimi.homeip.net> >>> wrote: >>>> >>>> On 2015-07-26 19:12, Kimmo Paasiala wrote: >>>>> >>>>> Hello, >>>>> >>>>> I'm in the process of migrating my router/firewall system from FreeBSD >>>>> to OpenBSD and I came across a minor problem. I want to have a static >>>>> alias address on an interface that is otherwise configured with DHCP. >>>>> What I had in FreeBSD was this entry in /etc/dhclient.conf: >>>>> >>>>> alias { >>>>> interface "vr0"; >>>>> fixed-address 192.168.1.200; >>>>> option subnet-mask 255.255.255.0; >>>>> } >>>>> >>>>> This seems to be silently ignored on OpenBSD 5.7 and the dhclient.conf >>>>> manual page makes no mention of alias declarations. How am I supposed >>>>> to achieve the same effect? >>>>> >>>>> -Kimmo >>>> >>>> >>>> Perhaps something like this in your /etc/hostname.vr0 instead would work >>>> for you? >>>> >>>> dhcp >>>> !ifconfig vr0 alias 192.168.1.200/32 >>> >>> No, doesn't work. Interestingly doing the alias manually when dhclient >>> is running and vr0 has a public IP address from DHCP: >>> >>> sudo ifconfig vr0 alias 192.168.1.200/24 >>> >>> This kills dhclient(8) completely and removes the main address. >>> >>> Any other ideas? >>> >>> -Kimmo >> >> >> The system log /var/log/messages reveals: >> >> Jul 27 03:01:30 firewall dhclient[23894]: 192.168.1.200 added to vr0; >> exiting >> >> Why is this done in so bizarre fashion? It is not unusual to want to >> have a static alias address on an interface that is otherwise >> configured with DHCP. >> >> -Kimmo >> > I can't test this, but from what I'm reading I think this should work > > /etc/hostname.vr0 > > dhcp "alias 192.168.1.200 netmask 255.255.255.0" >
Unfortunately that doesn't work either, ifconfig complains about invalid options. It looks like you can only add media options etc. with "dhcp". I can live without the alias address, it would have been a convinient way to access the ADSL modem on the WAN side from inside the LAN network. -Kimmo