"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 ..
Responsible Changed From-To: freebsd-bugs->freebsd-net reassign to networking team
Hi, attached patch should fix automatic loading of if_vlan when creating interface as device.vlan_id and vlan module is not loaded. -- Artis Caune Everything should be made as simple as possible, but not simpler.
I noticed this in 7.3-RELEASE as well; it has been fixed in 7.4-RELEASE/9.0-RELEASE (probably an rc bug, not a vlan(4) bug specifically), so I would close this PR. Thanks! -Garrett
On Fri, Aug 17, 2012 at 1:07 PM, Garrett Cooper <yanegomi@gmail.com> wrote: > I noticed this in 7.3-RELEASE as well; it has been fixed in > 7.4-RELEASE/9.0-RELEASE (probably an rc bug, not a vlan(4) bug > specifically), so I would close this PR. I stand partly corrected: # uname -a FreeBSD 7.4-RELEASE-p10 FreeBSD 7.4-RELEASE-p10 #0: Fri Aug 17 07:15:01 UTC 2012 root@:/usr/obj/mnt/freebsd/releng/7.4/sys/ISI-GENERIC amd64 # service netif stop cxgb0.190 Stopping network:showstat_cxgb0.190=1: not found cxgb0.190. There are probably more rc bugs that maybe need to be dealt with on 7.x that people probably don't care about at this point in the maintenance cycle. Thanks! -Garrett
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped