From owner-freebsd-net@freebsd.org Wed Jul 1 12:05:57 2015 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 EC5D098F602 for ; Wed, 1 Jul 2015 12:05:57 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1D891157; Wed, 1 Jul 2015 12:05:57 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZAGm2-0000Gp-UQ; Wed, 01 Jul 2015 13:05:54 +0100 Date: Wed, 1 Jul 2015 13:05:54 +0100 From: Gary Palmer To: Julian Elischer Cc: freebsd-net@freebsd.org Subject: Re: Same NIC name to MAC mapping on FreeBSD Message-ID: <20150701120554.GA989@in-addr.com> References: <559131AC.6010304@winterei.se> <559361B3.9030702@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <559361B3.9030702@freebsd.org> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 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, 01 Jul 2015 12:05:58 -0000 On Wed, Jul 01, 2015 at 11:42:43AM +0800, Julian Elischer wrote: > On 7/1/15 6:56 AM, Adrian Chadd wrote: > > Hi, > > > > If we don't support this as part of the interface renaming stuff, it > > would certainly be good to. > > > > > > a- > > > > > > On 29 June 2015 at 21:36, Wei Hu wrote: > >>> -----Original Message----- > >>> From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- > >>> net@freebsd.org] On Behalf Of Paul S. > >>> Sent: Monday, June 29, 2015 7:53 PM > >>> To: freebsd-net@freebsd.org > >>> Subject: Re: Same NIC name to MAC mapping on FreeBSD > >>> > >>> On my production systems, I've never seen it deviate without hardware > >>> changes. > >>> > >>> Are you seeing otherwise? > >>> > >> In Hyper-V, if say three NICs were assigned to the VM, I got following mapping > >> Initially: > >> > >> Hn0 -> MAC 0 > >> Hn1 -> MAC 1 > >> Hn2 -> MAC2 > >> > >> Then if I remove the NIC with MAC 1 and reboot, I want the other two interfaces to keep the same > >> Names instead of reassigning hn1 to MAC2. This is a requirement from virtual appliance > >> Vendor to retain such mappings. I am wondering if there is any way to do this without > >> Asking customer or manually editing any config files. > do interface arrivals show up in devd? if so they could be renamed on > arrival > I vaguely remember being able to do this some years ago but I can't > remember the details. I believe they do, yes. In fact I seem to remember a discussion on this in the last year and someone shared either a devd or an rc.d script to ensure static NIC names, however searching the web archvies I couldn't find it Regards, Gary