From owner-freebsd-net@freebsd.org Wed Jun 29 12:01:48 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B212B86E7E; Wed, 29 Jun 2016 12:01:48 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2AC5268E; Wed, 29 Jun 2016 12:01:47 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bIEBk-000LOS-OG; Wed, 29 Jun 2016 15:01:52 +0300 Date: Wed, 29 Jun 2016 15:01:52 +0300 From: Slawa Olhovchenkov To: Kristof Provost Cc: freebsd-stable@freebsd.org, freebsd-net@freebsd.org Subject: Re: How to setup ethernet address and IPv4 address on interface? Message-ID: <20160629120152.GQ46309@zxy.spb.ru> References: <20160629114729.GB20831@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2016 12:01:48 -0000 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/24 I 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.