Solved FreeBSD VLAN Can't Ping Thru Switch Either Direction

I'm stumped.

On the FreeBSD v12.0 server:

to /boot/loader.conf added this:
Code:
if_vlan_load="YES"
reboot
Code:
|# ifconfig em1.10 create vlan 10 vlandev em1 inet 10.0.10.1/24
|# ifconfig
em1.10: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=3<RXCSUM,TXCSUM>
ether 08:00:27:c8:42:4a
inet 10.0.10.1 netmask 0xffffff00 broadcast 10.0.10.255
inet6 fe80::a00:27ff:fec8:424a%em1.1 prefixlen 64 scopeid 0x5
groups: vlan
vlan: 10 vlanpcp: 0 parent interface: em1
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

|# netstat -rn

Internet:
Destination        Gateway            Flags     Netif Expire
default            10.0.0.1           UGS         em0
10.0.0.0/24        link#1             U           em0
10.0.0.133         link#1             UHS         lo0
10.0.1.0/24        link#2             U           em1
10.0.1.1           link#2             UHS         lo0
10.0.10.0/24       link#4             U        em1.10
10.0.10.1          link#4             UHS         lo0
127.0.0.1          link#3             UH          lo0
On the managed switch:
Created VLAN 10
VLAN 10, Port 2 (tagged) connected to FBSD server interface em1.
VLAN 10, Port 10 (untagged) connected to laptop with static IP set to 10.0.10.2
VLAN 10, both Ports 2 & 10 are members

Cannot ping in either direction.

Question(s):
Do I need to do more with/on em1.10 to make it issue tagged packets the
em1.10 interface? I presumed that this: "vlan: 10 vlanpcp: 0 parent interface: em1"
in the ifconfig result means that tagging is being used.

The switch works - I swapped it out with a completely different, managed switch configured the same way.

Any thoughts?
 
Thank you, SirDice!

[head now hanging in shame]

I'm too stupid to own a computer...

In my posting I left out one, crucial bit of information - I was doing all this experimenting in a VirtualBox VM. I failed to remember that the VM ports are VIRTUALIZED and not physical. It dawned on me at bedtime last night (about an hour after I posted my question here) and this morning I repeated my experiment on a physical FBSD box and the VLAN setup works perfectly.

Thanks for all you do here! I'll mark this solved.

Bucky
 
Back
Top