On Sun, Jan 17, 2016 at 12:21:51PM -0800, Yury Shefer wrote:
> Hi misc,
> 
> I was not able to find the information about ifconfig support for the IPv4
> address configuration where I have primary address assigned by DHCP
> (Comcast) and alias with static IP. My cable modem mgmt IP belongs to
> 192.168.100.0/24 subnet and to access it - I have to add an alias - but it
> always overwrite DHCP-assigned address (OpenBSD 5.8-stable (GENERIC.MP)).
> 
> I tried the following hostname.if config but the last line overwrite dhcp
> address:
> 
> $ cat /etc/hostname.em0
> lladdr b8:c7:ff:cd:ff:0e
> dhcp
> up
> rtsol
> inet alias 192.168.100.50 255.255.255.0
> 
> # sh /etc/netstart em0
> em0: no link ..... got link
> DHCPREQUEST on em0 to 255.255.255.255
> DHCPACK from 96.xxx.xx.113 (00:01:5c:63:fc:46)
> bound to 67.xxx.xx.xx9 -- renewal in 92649 seconds.
> # ifconfig em0
> em0: flags=208843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF6> mtu 1500
>         lladdr b8:c7:ff:cd:ff:0e
>         priority: 0
>         groups: egress
>         media: Ethernet autoselect (1000baseT full-duplex)
>         status: active
>         inet6 fe80::bac7:ffff:abcd:abc%em0 prefixlen 64 scopeid 0x1
>         inet6 2001:abc:dead:10d:beef:be0b:2e16:9486 prefixlen 128 pltime
> 343370 vltime 343370
>         inet 192.168.100.50 netmask 0xffffff00 broadcast 192.168.100.255
 
Instead of seting an alias, just route the 192.168.100/24 subnet through your 
upstream gateway.

In my case, none of my inner subnets are 192.168.100/24, so any packets
to that subnet go to the default route assigned by dhcp.

Reply via email to