Date: Mon, 5 Nov 2012 19:43:53 GMT From: Mateusz Kwiatkowski <mateusz.kwiatkowski@atlashost.eu> To: freebsd-gnats-submit@FreeBSD.org Subject: docs/173405: Undocumented feature of ifconfig (reading configuration from rc.conf) Message-ID: <201211051943.qA5Jhri6060737@red.freebsd.org> Resent-Message-ID: <201211051950.qA5Jo1lM040629@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 173405
>Category: docs
>Synopsis: Undocumented feature of ifconfig (reading configuration from rc.conf)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 05 19:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Mateusz Kwiatkowski
>Release: 9.0-RELEASE
>Organization:
Atlashost
>Environment:
FreeBSD gw-5 9.0-RELEASE FreeBSD 9.0-RELEASE #1: Wed May 23 23:28:34 CEST 2012 root@gw-5:/usr/obj/usr/src/sys/NPHXGW amd64
>Description:
If configuration for NIC exists in /etc/rc.conf, ifconfig automatically configures interface when created.
>How-To-Repeat:
1. Create configuration in /etc/rc.conf for non existing NIC:
vlans_em0="181"
ifconfig_em0_181="inet6 2001:123:0:0::e001:121/126"
2. Bring up interface manually:
ifconfig em0.181 create
3. Interface is created with IP from rc.conf:
# ifconfig em0.181
em0.181: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=3<RXCSUM,TXCSUM>
ether 52:54:00:74:bd:1b
inet6 2001:123:0:0::e001:121 prefixlen 126 duplicated
inet6 fe80::5054:ff:fe74:bd1b%em0.181 prefixlen 64 scopeid 0x4
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
vlan: 181 parent interface: em0
This works both for IPv4 and IPv6.
>Fix:
This feature should be documented in ifconfig(8) manual.
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211051943.qA5Jhri6060737>
