Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2012 14:54:46 -0500
From:      Chad M Stewart <chad@balius.com>
To:        freebsd-questions@freebsd.org
Subject:   VLANs, default route not working on boot
Message-ID:  <081FD3D2-E569-4B33-A4EC-ABFECA96091C@balius.com>

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

I can't figure out why on boot the default route is not being setup =
correctly.  I'm coming back to FreeBSD, having spent many years using =
OpenBSD primarily.  The server has 2 NICs, of which em0 is the one being =
used.   I did see something during boot about not adding the default =
route but it scrolled to fast for me to read it completely.


relay02# uname -a
FreeBSD relay02 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

relay02# cat /etc/rc.conf=20
hostname=3D"relay02"
sshd_enable=3D"YES"
ntpd_enable=3D"YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev=3D"AUTO"
ifconfig_em0=3D"up"
cloned_interfaces=3D"vlan4 vlan7"
ifconfig_vlan4=3D"inet 192.168.4.21 netmask 255.255.255.0 vlan 4 vlandev =
em0"
ifconfig_vlan7=3D"inet 192.168.7.21 netmask 255.255.255.0 vlan 7 vlandev =
em0"
ifconfig_vlan7=3D"alias 192.168.7.31 netmask 255.255.255.255"
ifconfig_vlan7=3D"alias 192.168.7.41 netmask 255.255.255.255"
ifconfig_vlan7=3D"alias 192.168.7.41 netmask 255.255.255.255"
ifconfig_vlan7=3D"alias 192.168.7.51 netmask 255.255.255.255"
ifconfig_vlan7=3D"alias 192.168.7.61 netmask 255.255.255.255"
ifconfig_vlan7=3D"alias 192.168.7.71 netmask 255.255.255.255"
defaultrouter=3D"192.168.7.1"
syslog_ng_enable=3D"YES"
syslogd_enable=3D"NO"
ezjail_enable=3D"YES"


relay02# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif =
Expire
127.0.0.1          link#7             UH          0        9    lo0
192.168.4.0/24     link#8             U           0    10360  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>
192.168.7.31/32    link#9             U           0        0  vlan7
192.168.7.41       link#9             UHS         0        1    lo0 =3D>
192.168.7.41/32    link#9             U           0        0  vlan7
192.168.7.51       link#9             UHS         0        1    lo0 =3D>
192.168.7.51/32    link#9             U           0        0  vlan7
192.168.7.61       link#9             UHS         0        1    lo0 =3D>
192.168.7.61/32    link#9             U           0        0  vlan7
192.168.7.71       link#9             UHS         0        1    lo0 =3D>
192.168.7.71/32    link#9             U           0        0  vlan7
192.168.7.75       link#9             UHS         0       17    lo0

Internet6:
Destination                       Gateway                       Flags    =
  Netif Expire
::/96                             ::1                           UGRS     =
   lo0
::1                               ::1                           UH       =
   lo0
::ffff:0.0.0.0/96                 ::1                           UGRS     =
   lo0
fe80::/10                         ::1                           UGRS     =
   lo0
fe80::%em0/64                     link#1                        U        =
   em0
fe80::211:43ff:fedc:ba98%em0      link#1                        UHS      =
   lo0
fe80::%lo0/64                     link#7                        U        =
   lo0
fe80::1%lo0                       link#7                        UHS      =
   lo0
fe80::%vlan4/64                   link#8                        U        =
 vlan4
fe80::211:43ff:fedc:ba98%vlan4    link#8                        UHS      =
   lo0
fe80::%vlan7/64                   link#9                        U        =
 vlan7
fe80::211:43ff:fedc:ba98%vlan7    link#9                        UHS      =
   lo0
ff01::%em0/32                     fe80::211:43ff:fedc:ba98%em0  U        =
   em0
ff01::%lo0/32                     ::1                           U        =
   lo0
ff01::%vlan4/32                   fe80::211:43ff:fedc:ba98%vlan4 U       =
  vlan4
ff01::%vlan7/32                   fe80::211:43ff:fedc:ba98%vlan7 U       =
  vlan7
ff02::/16                         ::1                           UGRS     =
   lo0
ff02::%em0/32                     fe80::211:43ff:fedc:ba98%em0  U        =
   em0
ff02::%lo0/32                     ::1                           U        =
   lo0
ff02::%vlan4/32                   fe80::211:43ff:fedc:ba98%vlan4 U       =
  vlan4
ff02::%vlan7/32                   fe80::211:43ff:fedc:ba98%vlan7 U       =
  vlan7
relay02#=20

Post boot I can login from a box on the same LAN and manually add the =
default route no problem.  Anyone have some suggestions how I can fix =
this?


Thank you,
Chad





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?081FD3D2-E569-4B33-A4EC-ABFECA96091C>