Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Oct 2010 16:55:28 +0100
From:      Miguel Arroz <arroz@guiamac.com>
To:        freebsd-net@freebsd.org
Subject:   Cannot attribute both IPv4 and IPv6 to a VLAN interface
Message-ID:  <CCAE3A86-A6CD-49DC-B8EC-A5CEA74E4E22@guiamac.com>

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

  I'm using a FreeBSD machine as a NATBox/router for two small networks. =
The installed version is FreeBSD 7.1-RELEASE-p13.

  My network setup is one ethernet cable connecting to the NATBox, with =
3 VLANs (2 of them tagged). The non-tagged VLAN is the "outter" network, =
and the other two VLANs are the two networks referred above.

  Here's my network config for IPv4:

cloned_interfaces=3D"vlan18 vlan19"
ifconfig_em0=3D"inet xxx.xxx.xxx.51  netmask 255.255.255.0"
ifconfig_vlan18=3D"inet 10.5.25.254 netmask 255.255.255.0 vlan 18 =
vlandev em0"
ifconfig_vlan19=3D"inet 10.5.24.254 netmask 255.255.255.0 vlan 19 =
vlandev em0"
ifconfig_vlan18_alias0=3D"inet 10.5.25.253 netmask 0xffffffff"

defaultrouter=3D"xxx.xxx.xxx.254"

  vlan18 has a second IP for a jail running a service needed on that =
network, but it's not part of my problem. All this works fine under =
IPv4, both the "inside" networks are NATed, and that's it.

  Now, I'm adding IPv6. The idea is having an IPv6 address on the =
router, and two /64 networks for each one of the "inside" networks. But =
I'm having a problem configuring the network interfaces. Although I have =
no problem on the main interface, I'm not able to attribute both a =
globally routable IPv6 address and an IPv4 address to the vlan =
interfaces. This is what I'm trying to do:

ipv6_ifconfig_em0=3D"xxx:xxx:xxx:40::460:1 prefixlen 64"
ipv6_ifconfig_vlan18=3D"xxx:xxx:xxx:460:: prefixlen 64 vlan 18 vlandev =
em0"
ipv6_ifconfig_vlan19=3D"xxx:xxx:xxx:461:: prefixlen 64 vlan 19 vlandev =
em0"

ipv6_defaultrouter=3D"xxx:xxx:xxx:40::"

  When I run /etc/rc.d/network_ipv6 restart, among the output I get =
this:

ifconfig: SIOCSETVLAN: Device busy

  The final result is that em0 gets the correct configuration, but both =
vlan18 and 19 do not. They both have the IPv4 and an fe80:... IPv6, but =
not the globally routed 2001:... IPv6.

  Is this a known bug? Is there a workaround?

  Regards,

Miguel Arroz




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CCAE3A86-A6CD-49DC-B8EC-A5CEA74E4E22>