Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2012 15:28:59 -0500
From:      Chad M Stewart <Chad@Balius.com>
To:        Mark Felder <feld@feld.me>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: VLANs, default route not working on boot
Message-ID:  <BF761396-BD0F-4C1B-A471-DE8CBFC3FFF4@Balius.com>
In-Reply-To: <op.wc2xvmnl34t2sn@tech304>
References:  <081FD3D2-E569-4B33-A4EC-ABFECA96091C@balius.com> <op.wc2xvmnl34t2sn@tech304>

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

On Apr 20, 2012, at 3:00 PM, Mark Felder wrote:

> On Fri, 20 Apr 2012 14:54:46 -0500, Chad M Stewart <chad@balius.com> =
wrote:
>=20
>> Anyone have some suggestions how I can fix this?
>=20
>=20
> I'm guessing having the default route on a tagged vlan was not tested =
and the default route is attempted before the vlan interface is all the =
way up. After the system is booted up does the default route work if you =
run "sh /etc/netstart" ? That should prove whether or not it's handling =
the rc.conf syntax OK.

Yes running it manually after the system is booted works, though I see =
two errors that may indicate something.  See below.

relay02# sh /etc/netstart=20
devd already running? (pid=3D1099).
Setting hostuuid: 44454c4c-3400-105a-804d-b7c04f303731.
Setting hostid: 0x9061cce4.
ifconfig: create: bad value
ifconfig: create: bad value

I edited /etc/netstart and /etc/rc.d/netif and 'set -x' in both.  Those =
two errors are coming from netif.  I'm still looking into what it does =
not like.

ifconfig: SIOCSETVLAN: Device busy
Starting Network: lo0 em0 em1 vlan4 vlan7.
lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=3D3<RXCSUM,TXCSUM>
	inet6 ::1 prefixlen 128=20
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x7=20
	inet 127.0.0.1 netmask 0xff000000=20
	nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>
em0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu =
1500
	options=3D9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
	ether 00:11:43:dc:ba:98
	inet6 fe80::211:43ff:fedc:ba98%em0 prefixlen 64 scopeid 0x1=20
	nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
em1: flags=3D8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=3D9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
	ether 00:11:43:dc:ba:99
	nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect
	status: no carrier
vlan4: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu =
1500
	options=3D3<RXCSUM,TXCSUM>
	ether 00:11:43:dc:ba:98
	inet 192.168.4.21 netmask 0xffffff00 broadcast 192.168.4.255
	inet6 fe80::211:43ff:fedc:ba98%vlan4 prefixlen 64 scopeid 0x8=20
	nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
	vlan: 4 parent interface: em0
vlan7: flags=3D8003<UP,BROADCAST,MULTICAST> metric 0 mtu 1500
	ether 00:00:00:00:00:00
	inet 192.168.7.31 netmask 0xffffffff broadcast 192.168.7.31
	inet6 fe80::211:43ff:fedc:ba98%vlan7 prefixlen 64 tentative =
scopeid 0x9=20
	inet 192.168.7.41 netmask 0xffffffff broadcast 192.168.7.41
	inet 192.168.7.51 netmask 0xffffffff broadcast 192.168.7.51
	inet 192.168.7.61 netmask 0xffffffff broadcast 192.168.7.61
	inet 192.168.7.71 netmask 0xffffffff broadcast 192.168.7.71
	inet 192.168.7.75 netmask 0xffffff00 broadcast 255.255.255.255
	nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	vlan: 0 parent interface: <none>
add net default: gateway 192.168.7.1
route: writing to routing socket: File exists
add net ::ffff:0.0.0.0: gateway ::1: route already in table
route: writing to routing socket: File exists
add net ::0.0.0.0: gateway ::1: route already in table
route: writing to routing socket: File exists
add net fe80::: gateway ::1: route already in table
route: writing to routing socket: File exists
add net ff02::: gateway ::1: route already in table


relay02# netstat -rn|head
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif =
Expire
default            192.168.7.1        UGS         0        0  vlan7
127.0.0.1          link#7             UH          0        0    lo0
192.168.4.0/24     link#8             U           0    10501  vlan4
192.168.4.21       link#8             UHS         0        0    lo0
192.168.7.0/24     link#9             U           0        5  vlan7
192.168.7.31       link#9             UHS         0       54    lo0 =3D>


-Chad





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BF761396-BD0F-4C1B-A471-DE8CBFC3FFF4>