Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Aug 2009 13:45:08 GMT
From:      Vladimir Shebaldenkov <vladimir.shebaldenkov@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/137641: Various problems with "vlan_device.vlan_id" syntax
Message-ID:  <200908101345.n7ADj8ok067510@www.freebsd.org>
Resent-Message-ID: <200908101350.n7ADo1Mg059780@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         137641
>Category:       misc
>Synopsis:       Various problems with "vlan_device.vlan_id" syntax
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 10 13:50:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Vladimir Shebaldenkov
>Release:        7.2-RELEASE
>Organization:
Stenos
>Environment:
FreeBSD stenos.net.ua 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 08:49:13 UTC 2009     root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
"Since FreeBSD 5.3 a vlan device can be created and configured with one command:
ifconfig vlan_device.vlan_id create"

Quote from here - http://people.freebsd.org/~arved/vlan/vlan_en.html

This is so, but have some problems with ifconfig and rc scripts. 
1. ifconfig does not load if_vlan.ko automatically, when using this syntax. Need  to add if_vlan_load="YES" into loader.conf
2. /etc/rc.d/netif has a similar with this syntax problem also.
And may be similar errors in other places.

In rc.conf something like this:
cloned_interfaces="xl0.101 xl0.102"
ifconfig_xl0_101="inet 10.10.10.1/30"
ifconfig_xl0_102="inet 10.10.10.5/30"
>How-To-Repeat:
# kldstat
Id Refs Address    Size     Name
 1    7 0xc0400000 9fab28   kernel

# ifconfig vlan101 create
# kldstat
Id Refs Address    Size     Name
 1    9 0xc0400000 9fab28   kernel
 8    1 0xc4329000 5000     if_vlan.ko

# kldunload if_vlan
# ifconfig xl0.101 create
ifconfig: SIOCIFCREATE2: Invalid argument

# kldload if_vlan
# ifconfig xl0.101 create

-----------------------

# kldunload if_vlan
# /etc/rc.d/netif restart
Stopping network: lo0 xl0.
ifconfig: SIOCIFCREATE2: Invalid argument
ifconfig: SIOCIFCREATE2: Invalid argument
..
# kldload if_vlan
# /etc/rc.d/netif restart
Stopping network: lo0 xl0.
showstat_xl0.101=1: not found
showstat_xl0.102=1: not found
..
# /etc/rc.d/netif restart
Stopping network:showstat_xl0.101=1: not found
showstat_xl0.102=1: not found
 lo0 xl0 xl0.101 xl0.102.
ifconfig: SIOCIFCREATE2: File exists
ifconfig: SIOCIFCREATE2: File exists
showstat_xl0.101=1: not found
showstat_xl0.102=1: not found
..
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908101345.n7ADj8ok067510>