Re: dhclient.conf alias declarations?

2015-07-27 Thread Josh Grosse
On Mon, Jul 27, 2015 at 01:34:09PM +0300, Kimmo Paasiala wrote:
 ...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.

Perhaps you could add an ifconfig(8) command to rc.local(8) to set
the alias.

Or, you might be able to do what you desire with isc-dhcp-client.



Re: dhclient.conf alias declarations?

2015-07-27 Thread lists
  ...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.  
 
 Perhaps you could add an ifconfig(8) command to rc.local(8) to set
 the alias.  

As previously said any ifconfig aliasing command removes the DHCP
obtained configuration which breaks the expected address reception from
the DHCP server. Currently at the moment it's either DHCP or have
alias, or not documented / known to me how to solve it.

Please consider this real scenario.

Sometimes it's not possible to reach the modem if it uses the so called
IP extension to pass the external IP by DHCP (in the modem) to the
OpenBSD box external interface.

In this case, not having the option to manually add the alias
declaration in the hostname.if leaves you without connection to the
modem LAN interface. This is a deal breaker as not being able to
control the modem you lose chances of resetting it when it stops
passing traffic, monitor stats, logs etc.

Not to mention the fact that it was not within reach how to set a
default gateway on the OpenBSD box assigned by the ISP as a static route
upon DHCP reception of the external IP so that the OpenBSD box would be
able to access the Internet. The gateway is a different IP with each
lease and is not in the DHCP address space, so requires manual
addition of the route to be able to reach it via the modem. This was the
second show stopper and had to rest the case. If anyone had the same
issue, please advise if it has a solution.

This lead to abandon the passing of external IP address (IP extension)
to the OpenBSD system and forced use of the NAT in the modem which is
flawed anyway and can't handle that much connections due to its limited
resources.

So, sometimes the fact you can't use DHCP with aliasing another IP is
not that easy to live with. One could imagine more use cases when DHCP
and aliasing an IP is required.

Please can someone say if this is possible to achieve using base
dhclient?

 Or, you might be able to do what you desire with isc-dhcp-client.
   

That's not nice to handle, and creates another set of problems.

This does not solve the need to have a alias capability after / with
dhclient in base.



Re: dhclient.conf alias declarations?

2015-07-27 Thread Stuart Henderson
On 2015-07-26, Kimmo Paasiala kpaas...@gmail.com 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?

I need to do this sometimes too. The only way to do this with
dhclient(8) in recent versions of OpenBSD is to fetch the lease, pkill
-9 dhclient, then add the alias.

Otherwise use an alternative DHCP client from packages.



Re: dhclient.conf alias declarations?

2015-07-27 Thread Kimmo Paasiala
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



Re: dhclient.conf alias declarations?

2015-07-26 Thread Josh Grosse

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



Re: dhclient.conf alias declarations?

2015-07-26 Thread Kimmo Paasiala
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



Re: dhclient.conf alias declarations?

2015-07-26 Thread Kimmo Paasiala
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



dhclient.conf alias declarations?

2015-07-26 Thread Kimmo Paasiala
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



Re: dhclient.conf alias declarations?

2015-07-26 Thread Anathae Townsend
Look at hostname.if, for the vr0 interface, it would be called hostname.vr0

This is how you define aliases for a particular alias in OpenBSD.

-Original Message-
From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of Kimmo 
Paasiala
Sent: Sunday, July 26, 2015 5:12 PM
To: misc@openbsd.org
Subject: dhclient.conf alias declarations?

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



Re: dhclient.conf alias declarations?

2015-07-26 Thread Edgar Pettijohn

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