Re: dot1 issue, can't ping 2 interfaces each others

From: <sthaug_at_nethelp.no>
Date: Wed, 07 Feb 2024 07:27:31 UTC
> I have 2 machines connected on 2 ports of the same switch on which I try to pass a vlan 10 encapsulated in vlan 330 using dot1 q protocol. The configuration is very generic, but I cant ping each others machines

Did you want to have 802.1q (Ethertype 0x8100) for both inner and
outer tags? From the ifconfig output it looks like you're using
802.1ad (Ethertype 0x88a8) for the outer tag:

> vlan: 330 vlanproto: 802.1ad vlanpcp: 0 parent interface: mlxen0

This will *not* work with a switch configured for 802.1q, which this
certainly looks like:

> switchport mode trunk

FreeBSD is absolutely capable of using the 802.1q Ethertype for both
tags.

Steinar Haug, Nethelp consulting, sthaug@nethelp.no

> 
> Ex:
> ```
> # ping 1.1.1.198
> PING 1.1.1.1.198 (1.1.1.1.198): 56 data bytes
> ping: sendto: Host is down
> ```
> 
> Configuration:
> 
> M1:
> ```
> vlan330: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
> options=680703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
> ether 50:65:f3:8b:98:71
> groups: vlan
> vlan: 330 vlanproto: 802.1ad vlanpcp: 0 parent interface: mlxen0
> media: Ethernet autoselect (40Gbase-CR4 <full-duplex,rxpause,txpause>)
> status: active
> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> vlan330.10: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1480
> options=80000<LINKSTATE>
> ether 50:65:f3:8b:98:71
> inet 1.1.1.199 netmask 0xfffffffe broadcast 255.255.255.255
> groups: vlan
> vlan: 10 vlanproto: 802.1q vlanpcp: 0 parent interface: vlan330
> media: Ethernet autoselect (40Gbase-CR4 <full-duplex,rxpause,txpause>)
> status: active nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> ```
> 
> M2:
> 
> ```
> vlan330: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
> description: service
> options=1c680703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG,TXTLS4,TXTLS6>
> ether 02:01:02:02:01:00
> groups: vlan
> vlan: 330 vlanproto: 802.1ad vlanpcp: 0 parent interface: mce0
> media: Ethernet 25GBase-SR <full-duplex,txpause>
> status: active
> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> vlan330.10: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1480
> options=1c080000<LINKSTATE,MEXTPG,TXTLS4,TXTLS6>
> ether 02:01:02:02:01:00
> inet 1.1.1.198 netmask 0xfffffffe broadcast 255.255.255.255
> inet6 fe80::1:2ff:fe02:100%vlan330.10 prefixlen 64 scopeid 0xe
> groups: vlan
> vlan: 10 vlanproto: 802.1q vlanpcp: 0 parent interface: vlan330
> media: Ethernet 25GBase-SR <full-duplex,txpause>
> status: active nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> 
> ```
> 
> On the switch:
> 
> ```
> interface eth-0-29
> switchport mode trunk
> switchport trunk allowed vlan all!
> interface eth-0-30
> switchport mode trunk
> switchport trunk allowed vlan all!
> 
> ```
> 
> Any idea is welcome :)
> 
> Benoît Chesneau, Enki Multimedia
> —
> t. +33608655490
> 
> Sent with [Proton Mail](https://proton.me/) secure email.