ifconfig won't allow me to change ether address and inet address in the same command

Freddie Cash fjwcash at gmail.com
Tue Oct 21 12:44:03 PDT 2008

On October 21, 2008 11:48 am Eduardo Meyer wrote:
> Please, follow:
> # ifconfig rl0 ether 00:02:4f:0a:ce:f3 inet netmask
> ifconfig: can't set link-level netmask or broadcast
> # ifconfig rl0 inet netmask ether
> 00:02:4f:0a:ce:f3 ifconfig: ether: bad value
> # ifconfig rl0 inet netmask
> # ifconfig rl0 ether 00:02:4f:0a:ce:f3
> I ask you some help, how can I accomplish both tasks with rc_ng? In
> /etc/rc.conf
> ifconfig_rl0="inet netmask ether
> 00:02:4f:0a:ce:f3"

You can split it across two ifconfig lines using the alias feature in 

ifconfig_rl0="ether 00:02:4f:0a:ce:f3"
ifconfig_rl0_alias0="inet netmask"

We use something similar for setting interface options and vlans separate 
from adding IPs to the interface.
Freddie Cash
fjwcash at gmail.com

More information about the freebsd-stable mailing list