From owner-freebsd-net@FreeBSD.ORG Thu Dec 4 20:42:49 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B024B6 for ; Thu, 4 Dec 2014 20:42:49 +0000 (UTC) Received: from forward5h.mail.yandex.net (forward5h.mail.yandex.net [IPv6:2a02:6b8:0:f05::5]) (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 F00A7169 for ; Thu, 4 Dec 2014 20:42:48 +0000 (UTC) Received: from web27h.yandex.ru (web27h.yandex.ru [84.201.187.161]) by forward5h.mail.yandex.net (Yandex) with ESMTP id 26A26D002EA; Thu, 4 Dec 2014 23:42:31 +0300 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web27h.yandex.ru (Yandex) with ESMTP id 52D1D6220242; Thu, 4 Dec 2014 23:42:31 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1417725751; bh=m2tH53M1oa5LtJu1b6eC2ZCrWM261u+tNDqmRJw1aPY=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=cCLSTH68+ZUrOVE5+UnRnxAPhTYfH4qA3brhnwWTNOEz++rcLuGcpTni7vJ6rBs1m +DxDtcyJZBnzsgq0DdU1x6ViAQZif/XraQwdv3mYdRxYfl3EPirnmfPsbXmyPRT/98 xvi/AUYuRuHW2QrD/DGkqGxZhCbzPoXI7BbiihYo= Received: from 108.61.122.215.choopa.net (108.61.122.215.choopa.net [108.61.122.215]) by web27h.yandex.ru with HTTP; Thu, 04 Dec 2014 23:42:30 +0300 From: Martin Hanson To: Ian Smith In-Reply-To: <20141204180007.Q85722@sola.nimnet.asn.au> References: <1511041417624247@web23g.yandex.ru> <212351417642134@web20h.yandex.ru> <2659291417665100@web17m.yandex.ru> <2704971417669266@web25m.yandex.ru> <20141204180007.Q85722@sola.nimnet.asn.au> Subject: Re: NICs devices switches "pshycial" place on each boot MIME-Version: 1.0 Message-Id: <114611417725750@web27h.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 04 Dec 2014 21:42:30 +0100 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r Cc: Warren Block , "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 20:42:49 -0000 > ======= > 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."; > }; > ======= > > Maybe devd does'nt parse quite the same as sh(1), in that your trailing > '.' might be seen as part of the name to match? šTried leaving it off? Yes, I have remove the trailing '.', but $device-name is empty. > Notice the "Dec š4 05:44:14 gateway1 martin: DEVICE NAME IS: .!" part. > ======= > > See above maybe, but then, where did that trailing '!' come from? That was me making a mistake in the email. With the following I can get the device-name "axge0", but I don't know how to create a usable NIC interface name for that. attach 1000 { device-name "axge[0-9]+"; match "vendor" "0x0b95"; match "product" "0x1790"; match "sernum" "0000249B0DE00C"; action "logger DEVICE NAME IS: $device-name"; }; Dec 4 06:41:39 gateway1 devd: Executing 'logger DEVICE NAME IS: axge0' Dec 4 06:41:39 gateway1 martin: DEVICE NAME IS: axge0 What action would I then take to create a usable device for ifconfig? Doing this doesn't work: # ifconfig axge0 name lan1 inet 192.168.1.1 netmask 255.255.255.0 ifconfig: interface axge0 does not exist Kind regards.