Hi,
I am playing with 3 things:
A) FreeBSD 10.1-p6 RELEASE amd64
B) Tp-Link TL-SG3424 L2 Switch
C) A PC.
I can't seem to reach the PC from the FreeBSD router and vice versa when using VLAN tagging on the FreeBSD box and a TRUNK port on the switch to the FreeBSD box.
It works fine without any VLANs at all, or if I use VLANs only within the switch (and no VLAN tagging on the FreeBSD box).
e.g
A) Configuration:
- Freshly installed (just updated via freebsd-update)
2 NICs: bge0 (WAN), sk0 (LAN)
/etc/rc.conf
/etc/sysctl.conf
B) Tp-Link Switch Configuration
Is by default set to factory defaults, i.e
All ports belong to VLAN 1 and are of type ACCESS and PVID 1
My only changes:
PORT 1 set to TRUNK VLAN 100 PVID 100
PORT 2 set to ACCESS VLAN 100 PVID 100
C) PC Configuration
FreeBSD router is connected to PORT 1 of the Switch
PC is connected to PORT 2 of the Switch
FreeBSD to PC
tcpdump on FreeBSD
PC to FreeBSD
tcpdump on FreeBSD
Is there any error in my setup?
Unplugging the cables, rebooting the PC, FreeBSD, Switch has no effect and to me it seems that the configuration I've done should work fine with a TRUNK port to the FreeBSD router and VLAN tagging on it.
Thank you.
I am playing with 3 things:
A) FreeBSD 10.1-p6 RELEASE amd64
B) Tp-Link TL-SG3424 L2 Switch
C) A PC.
I can't seem to reach the PC from the FreeBSD router and vice versa when using VLAN tagging on the FreeBSD box and a TRUNK port on the switch to the FreeBSD box.
It works fine without any VLANs at all, or if I use VLANs only within the switch (and no VLAN tagging on the FreeBSD box).
e.g
# ifconfig sk0 inet 10.10.10.1/24
Code:
INTERNET<---WAN(bge0)--->[FREEBSD]<---LAN(sk0)--->([PORT 1 ACCESS VLAN 100 PVID 100][TPLINK SWITCH][PORT 2 ACCESS VLAN 100 PVID 100])<---->PC
A) Configuration:
- Freshly installed (just updated via freebsd-update)
2 NICs: bge0 (WAN), sk0 (LAN)
/etc/rc.conf
Code:
# WAN
ifconfig_bge0="inet XXX.XXX.XXX.XXX netmask 255.255.255.0"
defaultrouter="XXX.XXX.XXX.XXX"
# LAN
gateway_enable="YES"
vlans_sk0="100"
ifconfig_sk0_100="inet 10.10.10.1/24"
/etc/sysctl.conf
Code:
net.inet.ip.forwarding=1
net.inet.ip.fastforwarding=1
net.inet.ip.redirect=0
B) Tp-Link Switch Configuration
Is by default set to factory defaults, i.e
All ports belong to VLAN 1 and are of type ACCESS and PVID 1
My only changes:
PORT 1 set to TRUNK VLAN 100 PVID 100
PORT 2 set to ACCESS VLAN 100 PVID 100
C) PC Configuration
Code:
ip address 10.10.10.2
netmask 255.255.255.0
gateway 10.10.10.1
dns 8.8.8.8
FreeBSD router is connected to PORT 1 of the Switch
PC is connected to PORT 2 of the Switch
Code:
INTERNET<---WAN(bge0)--->[FREEBSD]<---LAN(sk0.100)--->([PORT 1 TRUNK VLAN 100 PVID 100][TPLINK SWITCH][PORT 2 ACCESS VLAN 100 PVID 100])<---->PC
ifconfig -v
Code:
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
ether 00:22:22:38:b3:27
inet XXX.XXX.XXX.XXX netmask 0xffffff00 broadcast XXX.XXX.XXX.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
sk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80009<RXCSUM,VLAN_MTU,LINKSTATE>
ether 00:21:31:3b:40:15
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
sk0.100: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:21:31:3b:40:15
inet 10.10.10.1 netmask 0xffffff00 broadcast 10.10.10.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
vlan: 100 parent interface: sk0
groups: vlan
FreeBSD to PC
ping 10.10.10.2
Code:
ping: sento: Host is down
tcpdump -i sk0.100
Code:
13:21:33.301577 ARP, Request who-has 10.10.10.2 tell 10.10.10.1, length 28
13:21:34.319573 ARP, Request who-has 10.10.10.2 tell 10.10.10.1, length 28
arp -a
Code:
...
? (10.10.10.2) at (incomplete) on sk0.100 expired [vlan]
PC to FreeBSD
ping 10.10.10.1
Code:
Reply from 10.10.10.1: Destiniation host unreachable
tcpdump -i sk0.100
Code:
no traffic at all
Is there any error in my setup?
Unplugging the cables, rebooting the PC, FreeBSD, Switch has no effect and to me it seems that the configuration I've done should work fine with a TRUNK port to the FreeBSD router and VLAN tagging on it.
Thank you.