Kristof Provost
2016-Jun-29 11:51 UTC
How to setup ethernet address and IPv4 address on interface?
On 29 Jun 2016, at 13:47, Slawa Olhovchenkov wrote:> I am trying to change MAC address and setup IPv4 address and got > error: > > # ifconfig em1 ether 00:30:48:63:19:04 inet 192.168.2.1/24 > ifconfig: can't set link-level netmask or broadcast > > Is this posible?Yes, but you can?t do both in one call. This works: ifconfig em1 ether 00:30:48:63:19:04 ifconfig em1 inet 192.168.2.1/24 Regards, Kristof
Slawa Olhovchenkov
2016-Jun-29 12:01 UTC
How to setup ethernet address and IPv4 address on interface?
On Wed, Jun 29, 2016 at 01:51:40PM +0200, Kristof Provost wrote:> On 29 Jun 2016, at 13:47, Slawa Olhovchenkov wrote: > > I am trying to change MAC address and setup IPv4 address and got > > error: > > > > # ifconfig em1 ether 00:30:48:63:19:04 inet 192.168.2.1/24 > > ifconfig: can't set link-level netmask or broadcast > > > > Is this posible? > > Yes, but you can?t do both in one call. > > This works: > ifconfig em1 ether 00:30:48:63:19:04 > ifconfig em1 inet 192.168.2.1/24I am need in one call, multiple commands not allways allowed. Using /etc/start_if.$IFNAME produce side effects and can mask errors in rc.conf.