From owner-freebsd-stable@FreeBSD.ORG Tue Oct 21 19:44:03 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 269251065679 for ; Tue, 21 Oct 2008 19:44:03 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from smtp.sd73.bc.ca (smtp.sd73.bc.ca [142.24.13.140]) by mx1.freebsd.org (Postfix) with ESMTP id 062BA8FC0C for ; Tue, 21 Oct 2008 19:44:02 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from localhost (localhost [127.0.0.1]) by localhost.sd73.bc.ca (Postfix) with ESMTP id 326B51A000B3D for ; Tue, 21 Oct 2008 12:44:02 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at smtp.sd73.bc.ca Received: from smtp.sd73.bc.ca ([127.0.0.1]) by localhost (smtp.sd73.bc.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9cJoLc5obZRY for ; Tue, 21 Oct 2008 12:43:54 -0700 (PDT) Received: from coal (s10.sbo [192.168.0.10]) by smtp.sd73.bc.ca (Postfix) with ESMTP id D72391A000B18 for ; Tue, 21 Oct 2008 12:43:53 -0700 (PDT) From: Freddie Cash To: freebsd-stable@freebsd.org Date: Tue, 21 Oct 2008 12:43:53 -0700 User-Agent: KMail/1.9.9 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810211243.53844.fjwcash@gmail.com> Subject: Re: ifconfig won't allow me to change ether address and inet address in the same command X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 19:44:03 -0000 On October 21, 2008 11:48 am Eduardo Meyer wrote: > Please, follow: > > # ifconfig rl0 ether 00:02:4f:0a:ce:f3 inet 192.168.2.12 netmask > 255.255.255.0 ifconfig: can't set link-level netmask or broadcast > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 ether > 00:02:4f:0a:ce:f3 ifconfig: ether: bad value > > # ifconfig rl0 inet 192.168.2.12 netmask 255.255.255.0 > # 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 192.168.2.12 netmask 255.255.255.0 ether > 00:02:4f:0a:ce:f3" You can split it across two ifconfig lines using the alias feature in rc.conf: ifconfig_rl0="ether 00:02:4f:0a:ce:f3" ifconfig_rl0_alias0="inet 192.168.2.12 netmask 255.255.255.0" We use something similar for setting interface options and vlans separate from adding IPs to the interface. -- Freddie Cash fjwcash@gmail.com