From owner-freebsd-net@freebsd.org Mon Jan 30 12:28:19 2017 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 3F0BBCC7E06 for ; Mon, 30 Jan 2017 12:28:19 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from dg.fsn.hu (dg.fsn.hu [84.2.225.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "dg.fsn.hu", Issuer "dg.fsn.hu" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EE7E515C1 for ; Mon, 30 Jan 2017 12:28:18 +0000 (UTC) (envelope-from bra@fsn.hu) Received: by dg.fsn.hu (Postfix, from userid 1003) id 48A3B2F3D; Mon, 30 Jan 2017 13:19:28 +0100 (CET) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 15.3167] X-CRM114-CacheID: sfid-20170130_13192_5A1A6677 X-CRM114-Status: Good ( pR: 15.3167 ) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Mon Jan 30 13:19:28 2017 X-DSPAM-Confidence: 0.9899 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 588f2f5087263974615548 X-DSPAM-Factors: 27, could, 0.01000, the+IP, 0.01000, the+IP, 0.01000, AM, 0.01000, netbooted, 0.01000, Subject*IP+from, 0.01000, ideas+about, 0.01000, "freebsd, 0.01000, Received*online.co.hu+[195.228.243.99]), 0.01000, an, 0.01000, an, 0.01000, change+link, 0.01000, Date*Mon+30, 0.01000, 10, 0.01000, statically, 0.01000, machine+boots, 0.01000, org, 0.01000, interface, 0.01000, interface, 0.01000, from, 0.01000, from, 0.01000, of, 0.01000, Received*30+Jan, 0.01000, [, 0.01000, [, 0.01000, From*"Nagy, Attila" , 0.01000, X-Spambayes-Classification: ham; 0.00 Received: from [IPv6:::1] (japan.t-online.co.hu [195.228.243.99]) by dg.fsn.hu (Postfix) with ESMTPSA id 902362F3B for ; Mon, 30 Jan 2017 13:19:27 +0100 (CET) Subject: Re: Interface cannot change link addresses - switching IP from one IF to another on a netbooted machine To: freebsd-net@freebsd.org References: <578F4AB6.2090200@fsn.hu> From: "Nagy, Attila" Message-ID: Date: Mon, 30 Jan 2017 13:19:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <578F4AB6.2090200@fsn.hu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 12:28:19 -0000 Hi, Following up on this, placing the script into /etc/rc.conf.lagg and configuring/including it in rc.conf with: lagg_dev="lagg0" lagg_devs="igb0 igb1 igb2 igb3" Solves the issue. if [ -n "${lagg_dev}" ]; then /sbin/ifconfig "${lagg_dev}" create > /dev/null 2>&1 if [ $? -eq 0 ]; then /sbin/mount -t tmpfs tmpfs /tmp /bin/cp /rescue/ifconfig /tmp addr=`kenv boot.netif.ip` netmask=`kenv boot.netif.netmask` bootif=`kenv boot.netif.name` if_lagg_devs=`echo ${lagg_devs} | sed "s/ / laggport /g"` for dev in ${lagg_devs} do /tmp/ifconfig ${dev} up done ifconfig ${lagg_dev} up ifconfig ${lagg_dev} ${addr} netmask ${netmask} laggproto \ lacp laggport ${if_lagg_devs} up ifconfig ${bootif} -alias ${addr} /sbin/umount /tmp fi fi On 07/20/2016 11:56 AM, Nagy, Attila wrote: > Hi, > > I have several netbooted machines, which operate in this way: > - the machine boots up from one interface (PXE, DHCP), for example igb0 > - during the boot, an rc script runs* which deletes the IP from igb0 > and creates the lagg interface with igb0, igb1 etc and sets the > original IP on that interface (with a statically linked ifconfig) > - normal booting continues from the lagg interface > > This has worked for years and broke somewhere in the lifecycle of > 10-STABLE. > > Now I can't remove the IP address from the interface, ifconfig igb0 > delete gives: > interface igb0 cannot change link addresses! > > Any ideas about how could I work around this? > > Basically I would like to switch the IP from one interface to another > while running from an NFS root. (and this has worked before svn rev xxx) > > Thanks, > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"