Date: Thu, 04 Dec 2014 06:01:06 +0100 From: Martin Hanson <greencoppermine@yandex.com> To: Warren Block <wblock@wonkity.com> Cc: freebsd-net@freebsd.org Subject: Re: NICs devices switches "pshycial" place on each boot Message-ID: <2704971417669266@web25m.yandex.ru> In-Reply-To: <alpine.BSF.2.11.1412032119080.86447@wonkity.com> References: <1511041417624247@web23g.yandex.ru> <alpine.BSF.2.11.1412031024340.32996@wonkity.com> <212351417642134@web20h.yandex.ru> <alpine.BSF.2.11.1412031601220.13301@wonkity.com> <2659291417665100@web17m.yandex.ru> <alpine.BSF.2.11.1412032119080.86447@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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: <SNIP> Dec 4 05:44:14 gateway1 kernel: ugen7.2: <ASIX Elec. Corp.> at usbus7 Dec 4 05:44:14 gateway1 kernel: axge0: <NetworkInterface> 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: <MII bus> on axge0 Dec 4 05:44:15 gateway1 kernel: rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> 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: <USB Ethernet> 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 </SNIP> Notice the "Dec 4 05:44:14 gateway1 martin: DEVICE NAME IS: .!" part.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2704971417669266>