Technical Tip: FortiGate dropping VLAN traffic, debug flows not showing any output
| Description | This article describes one of the reasons why VLAN packets are getting dropped on FortiGate. |
| Scope | FortiOS, FortiGate |
| Solution | In this scenario, the packets show up on the sniffer but are not giving any details for the reason of drop when running debug flow.
When running the sniffer, the following can be seen:
FGT-1 # diagnose sniffer packet any 'net 172.16.0.0/16' 4 0 l
Traffic seems to be reaching FortiGate, however, it is not forwarded and getting dropped. When running the debug flows, nothing shows up on the FortiGate:
diagnose debug flow filter addr 172.16.0.10 diagnose debug flow show func enable diagnose debug console timestamp enable
Interface configuration:
config system interface edit "port2" set vdom "root" set type physical set snmp-index 4 next edit "vlan11" set vdom "root" set ip 172.20.20.1 255.255.255.0 set allowaccess ping set device-identification enable set role lan set snmp-index 25 set interface "port2" set vlanid 11 next end
It is advised to perform a capture on each VLAN interface of the FortiGate involved during the communication between source and destination, then check the details in a Wireshark. There are two options of capturing packets - GUI, and CLI. Article describing how to perform a packet capture in the GUI. Below example in CLI console:
FGT-1 # diagnose sniffer packet <vlan-name> ' ' 6 0 l diagnose sniffer packet VLAN11 ' ' 6 0 l <------ Source VLAN interface name. diagnose sniffer packet VLAN12 ' ' 6 0 l <------ Destination VLAN interface name.
MAC addresses for the ports on FortiGate could be verified by commands below:
get hardware nic <if_name> | grep -i hwaddr get hardware nic port11 | grep -i hwaddr
fnsysctl ifconfig <port-name> fnsysctl ifconfig port2 <------ Port2 as an example. port2 Link encap:Ethernet HWaddr 00:09:0F:09:0A:03
fnsysctl ifconfig vlan11 vlan11 Link encap:Ethernet HWaddr 00:09:0F:09:0A:03
In the Wireshark capture, the details show up as follows:
Ethernet II, Src: xxxx (xx:xx:xx:xx:xx:xx), Dst: Fortinet_09:0a:0a (00:09:0f:09:0a:0a)
The destination MAC address for this packet should be 00:09:0F:09:0A:03, however, the connecting device is forwarding the packet on the wrong port with the wrong MAC address 00:09:0f:09:0a:0a because of which packets are getting dropped.
|
