Topology:
 The full MAC address table of a managed FortiSwitch can be displayed with the FortiOS command 'diagnose switch-controller switch-info mac-table <FortiSwitch serial number>':
The output below shows the MAC address table of FortiSwitch in this topology:
# diagnose switch-controller switch-info mac-table S108EPXXXXXXXXXX
Managed Switch : S108EPXXXXXXXXXX 0
flag bit pattern: 0x00000000
flag bit Mask: 0x00000000
vlan map: 0-4094
port-id map: 0-11
trunk-id map: 0-127
MAC: e0:23:ff:fc:bc:07 VLAN: 3 Trunk: FGT-PRIMARY(trunk-id 0) # FortiGate virtual MAC
Flags: 0x000000c1 [ hit trunk dynamic ]
MAC: e0:23:ff:fc:bc:07 VLAN: 2 Trunk: FGT-PRIMARY(trunk-id 0) # FortiGate virtual MAC
Flags: 0x000000c1 [ hit trunk dynamic
MAC: e8:1c:ba:96:19:78 VLAN: 3 Port: port2(port-id 2) # AP MAC
Flags: 0x00000041 [ hit dynamic ]
MAC: 70:4c:a5:27:b4:5c VLAN: 4094 Trunk: FGT-PRIMARY(trunk-id 0) # internal6 physical MAC
Flags: 0x000000c1 [ hit trunk dynamic ]
MAC: 70:4c:a5:27:b4:5b VLAN: 4094 Trunk: FGT-PRIMARY(trunk-id 0) # internal5 physical MAC
Flags: 0x000000c1 [ hit trunk dynamic ]
MAC: 90:6c:ac:1a:a7:b0 VLAN: 2 Port: port4(port-id 4) # Endpoint MAC
Flags: 0x00000041 [ hit dynamic ]
MAC: e0:23:ff:fc:bc:07 VLAN: 4094 Trunk: FGT-PRIMARY(trunk-id 0) # FortiGate virtual MAC
Flags: 0x000000c1 [ hit trunk dynamic ]
MAC: e8:1c:ba:a2:f6:92 VLAN: 4094 Trunk: FGT-SECONDARY(trunk-id 1) # FGT-SECONDARY internal6 physical MAC
Flags: 0x000000c1 [ hit trunk dynamic ]
MAC: e8:1c:ba:a2:f6:91 VLAN: 4094 Trunk: FGT-SECONDARY(trunk-id 1) # FGT-SECONDARY internal6 physical MAC
Flags: 0x000000c1 [ hit trunk dynamic ]
MAC: e8:1c:ba:3a:e1:a6 VLAN: 4094 Port: internal(port-id 11) # FortiSwitch MAC
Flags: 0x00000060 [ static ]
Total Displayed: 10
The MAC address table of an individual VLAN can be displayed with the FortiOS command 'diagnose switch-controller switch-info mac-table <FortiSwitch serial number> <vlan-id>'.
The output below shows the MAC address table of FortiSwitch in vlan id 2:
# diagnose switch-controller switch-info mac-table S108EPXXXXXXXXXX 2
Managed Switch : S108EPXXXXXXXXXX 0
flag bit pattern: 0x00000000
flag bit Mask: 0x00000000
vlan map: 2
port-id map: 0-11
trunk-id map: 0-127
MAC: e0:23:ff:fc:bc:07 VLAN: 2 Trunk: FGT-PRIMARY(trunk-id 0) # FortiGate virtual MAC
Flags: 0x000000c1 [ hit trunk dynamic ]
MAC: 90:6c:ac:1a:a7:b0 VLAN: 2 Port: port4(port-id 4) # Endpoint MAC
Flags: 0x00000041 [ hit dynamic ]
Total Displayed: 2
This is an example of MAC address tracking using the 'grep' function. This shows how a MAC address is learned through a network.
# diagnose switch-controller switch-info mac-table | grep -i "Managed\|D6:6A:6D:A6:5A:67"
Managed Switch : Core-1 0
MAC: d6:6a:6d:a6:5a:67 VLAN: 111 Trunk: 4EPTF18003538-0(trunk-id 4)
Managed Switch : Core-2 0
MAC: d6:6a:6d:a6:5a:67 VLAN: 111 Trunk: 4EPTF18003538-0(trunk-id 1)
Managed Switch : S124FPTF23004921 0
MAC: d6:6a:6d:a6:5a:67 VLAN: 111 Trunk: FlInK1MLAG0_(trunk-id 0)
Managed Switch : S224EPTF18003538 0
MAC: d6:6a:6d:a6:5a:67 VLAN: 111 Port: port6(port-id 6)
FGT-LAB #
Related documents:
|