From owner-freebsd-net@FreeBSD.ORG Thu Dec 4 05:01:12 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18D0E4B5 for ; Thu, 4 Dec 2014 05:01:12 +0000 (UTC) Received: from forward2m.mail.yandex.net (forward2m.mail.yandex.net [IPv6:2a02:6b8:0:2519::3:11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCC856B6 for ; Thu, 4 Dec 2014 05:01:11 +0000 (UTC) Received: from web25m.yandex.ru (web25m.yandex.ru [37.140.138.116]) by forward2m.mail.yandex.net (Yandex) with ESMTP id C50675CA0C0A; Thu, 4 Dec 2014 08:01:07 +0300 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web25m.yandex.ru (Yandex) with ESMTP id EFDC020E1107; Thu, 4 Dec 2014 08:01:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1417669267; bh=/AfKrMwoxrw18nPI2cmBQ9oz2yCdYsxdme/nyz1IDdM=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=J7ib+8X4FJexJrj8kZ2HyAUY9KRKo1RM0lgc5vwkoHYR7tk/v7v4JupGmxcLflj8f rY1RnowLnwKHMDFjzbSXrgOxTcf4vbqLaDD74lnjbYIay2VX0Zxar+bAvX+0EMqiO4 9PCBRLxkcjSqmLjB6WmVLQhf46lnHkrozevDhTUw= Received: from 108.61.122.70.choopa.net (108.61.122.70.choopa.net [108.61.122.70]) by web25m.yandex.ru with HTTP; Thu, 04 Dec 2014 08:01:06 +0300 From: Martin Hanson To: Warren Block In-Reply-To: References: <1511041417624247@web23g.yandex.ru> <212351417642134@web20h.yandex.ru> <2659291417665100@web17m.yandex.ru> Subject: Re: NICs devices switches "pshycial" place on each boot MIME-Version: 1.0 Message-Id: <2704971417669266@web25m.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 04 Dec 2014 06:01:06 +0100 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2014 05:01:12 -0000 > > I would use three of these sections, one with the serial number of each > interface. šSo: > > action "ifconfig $device-name name wan inet ..." > action "ifconfig $device-name name dmz inet ..." > action "ifconfig $device-name name lan inet ..." > > Then the interface names can be easily used in firewall settings. I tried that as well, but $device-name is empty. If I do this: notify 1000 { match "system" "USB"; match "subsystem" "INTERFACE"; match "vendor" "0x0b95"; match "product" "0x1790"; match "sernum" "0000249B0DE00C"; match "type" "ATTACH"; action "logger DEVICE NAME IS: $device-name."; }; I get: Dec 4 05:44:14 gateway1 kernel: ugen7.2: at usbus7 Dec 4 05:44:14 gateway1 kernel: axge0: on usbus7 Dec 4 05:44:14 gateway1 devd: Executing 'logger DEVICE NAME IS: .!' Dec 4 05:44:14 gateway1 martin: DEVICE NAME IS: .! Dec 4 05:44:15 gateway1 kernel: miibus1: on axge0 Dec 4 05:44:15 gateway1 kernel: rgephy0: PHY 3 on miibus1 Dec 4 05:44:15 gateway1 kernel: rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow Dec 4 05:44:15 gateway1 kernel: ue0: on axge0 Dec 4 05:44:15 gateway1 kernel: ue0: Ethernet address: 00:24:9b:0d:e0:0c Dec 4 05:44:15 gateway1 devd: Executing '/etc/pccard_ether ue0 start' Dec 4 05:44:15 gateway1 kernel: ue0: link state changed to DOWN Notice the "Dec 4 05:44:14 gateway1 martin: DEVICE NAME IS: .!" part.