From nobody@FreeBSD.org  Wed Aug 22 02:53:59 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 076981065672
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Aug 2012 02:53:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id E5CCD8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Aug 2012 02:53:58 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7M2rw15033713
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Aug 2012 02:53:58 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q7M2rwXw033712;
	Wed, 22 Aug 2012 02:53:58 GMT
	(envelope-from nobody)
Message-Id: <201208220253.q7M2rwXw033712@red.freebsd.org>
Date: Wed, 22 Aug 2012 02:53:58 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [rc] static IPv6 addresses+vlans don't work ala rc(5)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         170847
>Category:       conf
>Synopsis:       [rc] static IPv6 addresses+vlans don't work ala rc(5)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hrs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 22 03:00:22 UTC 2012
>Closed-Date:    
>Last-Modified:  Sun Feb 03 22:30:52 UTC 2013
>Originator:     Garrett Cooper
>Release:        9.0-RELEASE
>Organization:
EMC Isilon
>Environment:
FreeBSD wf048.west.isilon.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

NOTE: the kernel is 9.0-RELEASE, but userland is STABLE/9 @ r239343.
>Description:
Setting up static IPv6 addresses with vlan interfaces is broken on 9.0-RELEASE (the link local address is set via rc(5), but not the IPv6 static address). Example:

# cat /etc/rc.conf 
hostname="wf048.west.isilon.com"
loctet=1

: ${mtu=9000}
: ${vlan_mtu=9000}

vlans_cxgb1="223"
ifconfig_cxgb1="inet 192.168.21.$loctet/24 mtu $mtu vlanmtu $vlan_mtu $cap"
ifconfig_cxgb1_223="inet 192.168.20.$loctet/24"
case "$(uname -r)" in
9*|1[0-9]*)
        ifconfig_cxgb1_ipv6="inet6 fec0::00:d3:ad:b3:3f:0$loctet prefixlen 24"
        ifconfig_cxgb1_223_ipv6="inet6 fec0::01:d3:ad:b3:3f:0$loctet prefixlen 22
4"
        ;;
*)
        ipv6_ifconfig_cxgb1="fec0::00:d3:ad:b3:3f:0$loctet prefixlen 24"
        ipv6_ifconfig_cxgb1_223="fec0::01:d3:ad:b3:3f:0$loctet prefixlen 24"
        ipv6_enable="YES"
        ;;
esac
ifconfig_em0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
wf048# service netif restart
ifconfig: interface cxgb1.223 does not exist
ifconfig: interface cxgb1.223 does not exist
Stopping Network: lo0 cxgb0 cxgb1 em0 em1 cxgb1.223.
lo0: flags=8048<LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 ::1 prefixlen 128 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
cxgb0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=c05bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWTSO,LINKSTATE>
        ether 00:07:43:07:3f:70
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet none
        status: no carrier
cxgb1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=c05bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWTSO,LINKSTATE>
        ether 00:07:43:07:3f:71
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: no carrier
em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:25:90:35:59:ca
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:25:90:35:59:cb
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier
ifconfig: interface cxgb1.223 does not exist
ifconfig: 4: bad value
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ HERE? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Starting Network: lo0 cxgb0 cxgb1 em0 em1.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0xd 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
cxgb0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=c05bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWTSO,LINKSTATE>
        ether 00:07:43:07:3f:70
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet none
        status: no carrier
cxgb1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=c05bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWTSO,LINKSTATE>
        ether 00:07:43:07:3f:71
        inet 192.168.21.1 netmask 0xffffff00 broadcast 0.0.35.40
        inet6 fe80::207:43ff:fe07:3f71%cxgb1 prefixlen 64 scopeid 0x2 
        inet6 fec0::d3:ad:b3:3f:1 prefixlen 24 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: active
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:25:90:35:59:ca
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:25:90:35:59:cb
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier
wf048# ifconfig cxgb1.223
cxgb1.223: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=103<RXCSUM,TXCSUM,TSO4>
        ether 00:07:43:07:3f:71
        inet 192.168.20.1 netmask 0xffffff00 broadcast 192.168.20.255
        inet6 fe80::207:43ff:fe07:3f71%cxgb1.223 prefixlen 64 scopeid 0xe
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ HMMMMMM... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: active
        vlan: 223 parent interface: cxgb1
wf048# cat /etc/rc.conf 
hostname="wf048.west.isilon.com"
loctet=1

: ${mtu=9000}
: ${vlan_mtu=9000}

vlans_cxgb1="223"
ifconfig_cxgb1="inet 192.168.21.$loctet/24 mtu $mtu vlanmtu $vlan_mtu $cap"
ifconfig_cxgb1_223="inet 192.168.20.$loctet/24"
case "$(uname -r)" in
9*|1[0-9]*)
        ifconfig_cxgb1_ipv6="inet6 fec0::00:d3:ad:b3:3f:0$loctet prefixlen 24"
        ifconfig_cxgb1_223_ipv6="inet6 fec0::01:d3:ad:b3:3f:0$loctet prefixlen 24"
        ;;
*)
        ipv6_ifconfig_cxgb1="fec0::00:d3:ad:b3:3f:0$loctet prefixlen 24"
        ipv6_ifconfig_cxgb1_223="fec0::01:d3:ad:b3:3f:0$loctet prefixlen 24"
        ipv6_enable="YES"
        ;;
esac
ifconfig_em0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"


Manually configuring the vlan interface with ifconfig works though, so it's an rc(5) problem, as suspected earlier:


wf048# ifconfig cxgb1.223 inet6 fec0::01:d3:ad:b3:3f:01 prefixlen 24
wf048# ifconfig cxgb1.223
cxgb1.223: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=103<RXCSUM,TXCSUM,TSO4>
        ether 00:07:43:07:3f:71
        inet 192.168.20.1 netmask 0xffffff00 broadcast 192.168.20.255
        inet6 fe80::207:43ff:fe07:3f71%cxgb1.223 prefixlen 64 scopeid 0xe 
        inet6 fec0:0:1:d3:ad:b3:3f:1 prefixlen 24 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: active
        vlan: 223 parent interface: cxgb1
>How-To-Repeat:
# cat >> /etc/rc.conf <<EOF
interface=cxgb1 # Change this.
vlan=223
vlans_${interface}="$vlan"
ifconfig_${interface}_ipv6="inet6 fec0::00:d3:ad:b3:3f:01 prefixlen 24"
ifconfig_${interface}_${vlan}_ipv6="inet6 fec0::01:d3:ad:b3:3f:01 prefixlen 24"
EOF

# service netif restart cxgb1
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Aug 22 18:14:54 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170847 
Responsible-Changed-From-To: freebsd-rc->hrs 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Wed Aug 22 21:27:52 UTC 2012 
Responsible-Changed-Why:  

Assign to the person responsible for that code 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170847 
>Unformatted:
