mrnx/network

Network command reference

Network commands by task, side by side: Cisco IOS-XE, NX-OS, Arista, Aruba, Juniper, Huawei, MikroTik and Fortinet, plus firewall commands for FortiGate, Cisco ASA and Palo Alto. Pick the vendors you use, click a command to copy it.

Vendors

Cisco
Arista
Aruba / HPE
Juniper
Huawei
MikroTik
Fortinet
Palo Alto
Switching, routing & management
Firewalls
FortiGate

Written from vendor documentation, not run on devices. verify marks a command whose syntax changes between releases or that I'm less sure of; check it with ? on your version. Aruba AOS-CX and AOS-Switch are different CLIs. A dash means there is no direct equivalent.

Software version and uptime

Basics & system
IOS-XE
show version
NX-OS
show version
Arista EOS
show version
AOS-CX
show version
AOS-Switch
show version
Junos
show version
show system uptime
Huawei VRP
display version
MikroTik
/system resource print
FortiSwitch
get system status
Managed FortiSwitchverify
execute switch-controller get-conn-status
FortiGate
get system status
Cisco ASA / FTD
show version
PAN-OS
show system info

On the FortiGate, get-conn-status lists each managed switch with its state and firmware.

Running configuration

Basics & system
IOS-XE
show running-config
NX-OS
show running-config
Arista EOS
show running-config
AOS-CX
show running-config
AOS-Switch
show running-config
Junos
show configuration
show configuration | display set
Huawei VRP
display current-configuration
MikroTik
/export
/export verbose
FortiSwitch
show full-configuration
Managed FortiSwitch
config switch-controller managed-switch
  edit <SN>
    show full-configuration
FortiGate
show full-configuration
show system interface   (one section)
Cisco ASA / FTD
show running-config
PAN-OS
show config running
(configure mode: show)

FortiOS "show" prints only non-default settings; "show full-configuration" prints everything. PAN-OS has a candidate and a running config; changes apply only after "commit".

Startup configuration

Basics & system
IOS-XE
show startup-config
NX-OS
show startup-config
Arista EOS
show startup-config
AOS-CX
show startup-config
AOS-Switch
show config
Junos
(the committed configuration is the active one; see "Save the configuration")
Huawei VRP
display saved-configuration
Cisco ASA / FTD
show startup-config
PAN-OS
show config saved <file>

FortiSwitchOS and FortiGate apply and persist changes immediately: there is no separate startup config.

Save the configuration

Basics & system
IOS-XE
write memory
(or copy running-config startup-config)
NX-OS
copy running-config startup-config
Arista EOS
write memory
(or copy running-config startup-config)
AOS-CX
write memory
(or copy running-config startup-config)
AOS-Switch
write memory
Junos
commit
commit confirmed 5
Huawei VRP
save
MikroTik
(automatic, nothing to save)
FortiSwitch
(automatic, nothing to save)
Managed FortiSwitch
(automatic, nothing to save)
FortiGate
(automatic, nothing to save)
Cisco ASA / FTD
write memory
PAN-OS
commit

Junos: "commit confirmed 5" rolls back after 5 minutes unless you commit again.

Reboot

Basics & system
IOS-XE
reload
NX-OS
reload
Arista EOS
reload
AOS-CX
boot system
AOS-Switch
reload
Junos
request system reboot
Huawei VRP
reboot
MikroTik
/system reboot
FortiSwitch
execute reboot
Managed FortiSwitchverify
execute switch-controller reset <SN>
FortiGate
execute reboot
Cisco ASA / FTD
reload
PAN-OS
request restart system

Set the hostname

Basics & system
IOS-XE
hostname SW1
NX-OS
hostname SW1
Arista EOS
hostname SW1
AOS-CX
hostname SW1
AOS-Switch
hostname SW1
Junos
set system host-name SW1
Huawei VRP
sysname SW1
MikroTik
/system identity set name=SW1
FortiSwitch
config system global
  set hostname SW1
end
Managed FortiSwitch
config switch-controller managed-switch
  edit <SN>
    set name SW1
  next
end
FortiGate
config system global
  set hostname FW1
end
Cisco ASA / FTD
hostname FW1
PAN-OS
set deviceconfig system hostname FW1

Enter configuration mode

Basics & system
IOS-XE
configure terminal
NX-OS
configure terminal
Arista EOS
configure terminal
AOS-CX
configure terminal
AOS-Switch
configure
Junos
configure
Huawei VRP
system-view
MikroTik
(no mode: commands start with a menu path such as /ip address)
FortiSwitch
config <section>   (no global config mode)
Managed FortiSwitch
config <section>   (no global config mode)
FortiGate
config <section>
Cisco ASA / FTD
configure terminal
PAN-OS
configure

FortiOS is a tree of config/edit/set blocks closed with next / end, not a flat list of lines. Junos changes only take effect after "commit".

Remove or reset a setting

Basics & system
IOS-XE
no <command>
NX-OS
no <command>
Arista EOS
no <command>
AOS-CX
no <command>
AOS-Switch
no <command>
Junos
delete <path>
deactivate <path>
Huawei VRP
undo <command>
MikroTik
/ip address remove numbers=0
/ip address remove [find address=10.0.0.1/24]
FortiSwitch
unset <parameter>
(delete <entry> to remove a table entry)
Managed FortiSwitch
unset <parameter>
(delete <entry> to remove a table entry)
FortiGate
unset <parameter>
delete <entry>
Cisco ASA / FTD
no <command>
PAN-OS
delete <path>

Clock

Basics & system
IOS-XE
show clock
NX-OS
show clock
Arista EOS
show clock
AOS-CX
show clock
AOS-Switch
show time
Junos
show system uptime
Huawei VRP
display clock
MikroTik
/system clock print
FortiSwitchverify
execute date
Managed FortiSwitch
execute date
FortiGate
execute time
execute date
Cisco ASA / FTD
show clock
PAN-OS
show clock

CPU load

Basics & system
IOS-XE
show processes cpu sorted
NX-OS
show processes cpu sort
Arista EOS
show processes top once
AOS-CX
show system resource-utilization
AOS-Switch
show cpu
Junos
show chassis routing-engine
Huawei VRP
display cpu-usage
MikroTik
/system resource print
/tool profile
FortiSwitch
get system performance status
FortiGate
get system performance status
diagnose sys top 2 30
Cisco ASA / FTD
show cpu usage
PAN-OS
show system resources

Memory use

Basics & system
IOS-XE
show processes memory sorted
NX-OS
show system resources
Arista EOS
show version
show processes top once
AOS-CX
show system resource-utilization
AOS-Switch
show system information
Junos
show chassis routing-engine
Huawei VRP
display memory-usage
MikroTik
/system resource print
FortiSwitch
get system performance status
FortiGate
get system performance status
diagnose sys top-mem
Cisco ASA / FTD
show memory
PAN-OS
show system resources

Serial number and hardware

Basics & system
IOS-XE
show inventory
NX-OS
show inventory
Arista EOS
show inventory
AOS-CX
show system
AOS-Switch
show modules
show system
Junos
show chassis hardware
Huawei VRP
display device
display esn
MikroTik
/system routerboard print
FortiSwitch
get system status
Managed FortiSwitchverify
execute switch-controller get-conn-status
FortiGate
get system status
Cisco ASA / FTD
show inventory
PAN-OS
show system info

Fans, power supplies, temperature

Basics & system
IOS-XE
show environment all
NX-OS
show environment
Arista EOS
show environment all
AOS-CXverify
show environment fan
show environment power-supply
show environment temperature
AOS-Switch
show system fans
show system power-supply
show system temperature
Junos
show chassis environment
Huawei VRP
display environment
display fan
display power
MikroTik
/system health print

Config checkpoint and rollback

Basics & system
IOS-XE
copy running-config flash:before.cfg
show archive config differences flash:before.cfg system:running-config
configure replace flash:before.cfg force
NX-OS
checkpoint BEFORE-CHANGE
show diff rollback-patch checkpoint BEFORE-CHANGE running-config
rollback running-config checkpoint BEFORE-CHANGE
Arista EOSverify
configure session CHANGE
 ...
 show session-config diffs
 commit timer 00:05:00
AOS-CXverify
copy running-config checkpoint BEFORE-CHANGE
checkpoint diff BEFORE-CHANGE running-config
checkpoint rollback BEFORE-CHANGE
Junos
show | compare
commit confirmed 5
rollback 1
MikroTik
/system backup save name=pre-change
/system backup load name=pre-change

On FortiSwitch/FortiGate use a config backup (see "Back up the configuration"). IOS-XE "configure replace flash:before.cfg time 10" rolls back by itself unless you "configure confirm" within 10 minutes. RouterOS "safe mode" (Ctrl+X) undoes the session's changes if the connection drops.

Filter command output

Basics & system
IOS-XE
show running-config | section interface
show ... | include <text>
show ... | begin <text>
NX-OS
show running-config | section interface
show ... | include <text>
show ... | begin <text>
Arista EOS
show running-config | section interface
show ... | include <text>
show ... | grep <text>
AOS-CXverify
show running-config | include <text>
show ... | exclude <text>
AOS-Switchverify
show running-config | include <text>
Junos
show configuration | display set | match <text>
show ... | find <text>
Huawei VRP
display current-configuration | include <text>
display ... | begin <text>
MikroTik
/ip address print where address~"10.0"
FortiSwitch
show full-configuration | grep <text>
Managed FortiSwitch
show full-configuration | grep <text>
FortiGate
show full-configuration | grep <text>
show full-configuration | grep -f <text>
Cisco ASA / FTD
show running-config | include <text>
PAN-OS
show config running | match <text>

FortiOS "grep -f" keeps the parent config blocks around each hit; very useful for finding where an address is used.

Turn off paging

Basics & system
IOS-XE
terminal length 0
NX-OS
terminal length 0
Arista EOS
terminal length 0
AOS-CXverify
no page
AOS-Switchverify
no page
Junos
set cli screen-length 0
Huawei VRP
screen-length 0 temporary
MikroTik
print without-paging
FortiSwitch
config system console
  set output standard
end
Managed FortiSwitch
config system console
  set output standard
end
FortiGate
config system console
  set output standard
end
Cisco ASA / FTD
terminal pager 0
PAN-OS
set cli pager off

Port status overview

Interfaces
IOS-XE
show interfaces status
show ip interface brief
NX-OS
show interface status
show interface brief
Arista EOS
show interfaces status
AOS-CX
show interface brief
AOS-Switch
show interfaces brief
Junos
show interfaces terse
show interfaces brief
Huawei VRP
display interface brief
MikroTik
/interface print
/interface ethernet print
FortiSwitch
diagnose switch physical-ports summary
Managed FortiSwitchverify
diagnose switch-controller switch-info port-properties <SN> <port>
FortiGate
get system interface physical
diagnose hardware deviceinfo nic port1
Cisco ASA / FTD
show interface ip brief
PAN-OS
show interface all

Port detail and counters

Interfaces
IOS-XE
show interfaces GigabitEthernet1/0/1
NX-OS
show interface Ethernet1/1
Arista EOS
show interfaces Ethernet1
AOS-CX
show interface 1/1/1
AOS-Switch
show interfaces 1
Junos
show interfaces ge-0/0/1 extensive
Huawei VRP
display interface GigabitEthernet0/0/1
MikroTik
/interface ethernet print stats
/interface monitor-traffic ether1
FortiSwitchverify
diagnose switch physical-ports list port1
diagnose switch physical-ports stats port1
Managed FortiSwitchverify
diagnose switch-controller switch-info port-stats <SN> <port>
FortiGate
diagnose hardware deviceinfo nic port1
diagnose netlink interface list port1
Cisco ASA / FTD
show interface GigabitEthernet0/0
PAN-OS
show interface ethernet1/1
show counter interface ethernet1/1

Select a port to configure

Interfaces
IOS-XE
interface GigabitEthernet1/0/1
NX-OS
interface Ethernet1/1
Arista EOS
interface Ethernet1
AOS-CX
interface 1/1/1
AOS-Switch
interface 1
Junos
edit interfaces ge-0/0/1
Huawei VRP
interface GigabitEthernet0/0/1
MikroTik
/interface ethernet
FortiSwitch
config switch physical-port
  edit port1
(L2 settings: config switch interface / edit port1)
Managed FortiSwitch
config switch-controller managed-switch
  edit <SN>
    config ports
      edit port1

FortiSwitchOS splits a port between "switch physical-port" (speed, status, PoE) and "switch interface" (VLANs, STP, LLDP, security).

Select a range of ports

Interfaces
IOS-XE
interface range GigabitEthernet1/0/1-24
NX-OS
interface Ethernet1/1-24
Arista EOS
interface Ethernet1-24
AOS-CX
interface 1/1/1-1/1/24
AOS-Switch
interface 1-24
Junos
set interfaces interface-range ACCESS member-range ge-0/0/0 to ge-0/0/23
Huawei VRP
port-group GROUP1
 group-member GigabitEthernet0/0/1 to GigabitEthernet0/0/24
MikroTik
/interface ethernet set [find where name~"ether"] ...
FortiSwitch
(no range: edit each port)
Managed FortiSwitch
(no range: edit each port)

Port description

Interfaces
IOS-XE
description Uplink to CORE
NX-OS
description Uplink to CORE
Arista EOS
description Uplink to CORE
AOS-CX
description Uplink to CORE
AOS-Switch
name Uplink to CORE
Junos
set interfaces ge-0/0/1 description "Uplink to CORE"
Huawei VRP
description Uplink to CORE
MikroTik
/interface ethernet set ether1 comment="Uplink to CORE"
FortiSwitch
config switch physical-port
  edit port1
    set description "Uplink to CORE"
Managed FortiSwitchverify
config ports
  edit port1
    set description "Uplink to CORE"

Shut down / enable a port

Interfaces
IOS-XE
shutdown
no shutdown
NX-OS
shutdown
no shutdown
Arista EOS
shutdown
no shutdown
AOS-CX
shutdown
no shutdown
AOS-Switch
disable
enable
Junos
set interfaces ge-0/0/1 disable
delete interfaces ge-0/0/1 disable
Huawei VRP
shutdown
undo shutdown
MikroTik
/interface ethernet set ether1 disabled=yes
FortiSwitch
config switch physical-port
  edit port1
    set status down   (or up)
Managed FortiSwitch
config ports
  edit port1
    set status down   (or up)

Speed and duplex

Interfaces
IOS-XE
speed 1000
duplex full
NX-OS
speed 1000
duplex full
Arista EOSverify
speed forced 1000full
AOS-CXverify
speed 1000-full
AOS-Switch
speed-duplex 1000-full
Junos
set interfaces ge-0/0/1 speed 1g
set interfaces ge-0/0/1 link-mode full-duplex
Huawei VRPverify
undo negotiation auto
speed 1000
duplex full
MikroTikverify
/interface ethernet set ether1 auto-negotiation=no speed=1G-baseT-full
FortiSwitch
set speed 1000full
Managed FortiSwitch
set speed 1000full

Fortinet combines speed and duplex in one value: auto, 100full, 1000full, 10000full… RouterOS before 7.12 writes the speed as 1Gbps with full-duplex=yes.

Access port (one VLAN)

Interfaces
IOS-XE
switchport mode access
switchport access vlan 10
NX-OS
switchport mode access
switchport access vlan 10
Arista EOS
switchport mode access
switchport access vlan 10
AOS-CX
no routing
vlan access 10
AOS-Switch
vlan 10 untagged 1
Junos
set interfaces ge-0/0/1 unit 0 family ethernet-switching interface-mode access vlan members v10
Huawei VRP
port link-type access
port default vlan 10
MikroTik
/interface bridge port add bridge=bridge1 interface=ether2 pvid=10
FortiSwitch
config switch interface
  edit port1
    set native-vlan 10
Managed FortiSwitch
config ports
  edit port1
    set vlan "v10"

FortiSwitchOS: the native VLAN is the untagged one; allowed-vlans adds tagged VLANs. On a FortiGate, VLANs are interfaces on the FortiLink and a port gets its untagged VLAN with "set vlan". MikroTik needs vlan-filtering=yes on the bridge and a /interface bridge vlan entry for the VLAN.

Trunk port (tagged VLANs)

Interfaces
IOS-XE
switchport mode trunk
switchport trunk allowed vlan 10,20
switchport trunk native vlan 99
NX-OS
switchport mode trunk
switchport trunk allowed vlan 10,20
switchport trunk native vlan 99
Arista EOS
switchport mode trunk
switchport trunk allowed vlan 10,20
switchport trunk native vlan 99
AOS-CX
no routing
vlan trunk native 99
vlan trunk allowed 10,20
AOS-Switch
vlan 10 tagged 24
vlan 20 tagged 24
vlan 99 untagged 24
Junos
set interfaces xe-0/0/1 native-vlan-id 99
set interfaces xe-0/0/1 unit 0 family ethernet-switching interface-mode trunk vlan members [ v10 v20 ]
Huawei VRP
port link-type trunk
port trunk allow-pass vlan 10 20
port trunk pvid vlan 99
MikroTik
/interface bridge vlan add bridge=bridge1 vlan-ids=10,20 tagged=ether1
FortiSwitch
config switch interface
  edit port1
    set native-vlan 99
    set allowed-vlans 10,20
Managed FortiSwitch
config ports
  edit port1
    set vlan "native99"
    set allowed-vlans "v10" "v20"

Routed port (no switchport)

Interfaces
IOS-XE
no switchport
ip address 10.0.0.1 255.255.255.0
NX-OS
no switchport
ip address 10.0.0.1/24
Arista EOS
no switchport
ip address 10.0.0.1/24
AOS-CX
routing
ip address 10.0.0.1/24
AOS-Switch
(use a VLAN with an IP address)
Junos
set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.1/24
Huawei VRPverify
undo portswitch
ip address 10.0.0.1 24
MikroTik
/ip address add address=10.0.0.1/24 interface=ether3
FortiSwitch
(use a VLAN interface, see "Layer 3 VLAN interface")
Managed FortiSwitch
(not applicable; routing is on the FortiGate)

Layer 3 VLAN interface (SVI)

Interfaces
IOS-XE
interface vlan 10
 ip address 10.0.10.1 255.255.255.0
NX-OS
feature interface-vlan
interface vlan 10
 ip address 10.0.10.1/24
Arista EOS
interface Vlan10
 ip address 10.0.10.1/24
AOS-CX
interface vlan 10
 ip address 10.0.10.1/24
AOS-Switch
vlan 10
 ip address 10.0.10.1/24
Junos
set vlans v10 vlan-id 10 l3-interface irb.10
set interfaces irb unit 10 family inet address 10.0.10.1/24
Huawei VRP
interface Vlanif10
 ip address 10.0.10.1 255.255.255.0
MikroTik
/interface vlan add name=vlan10 vlan-id=10 interface=bridge1
/ip address add address=10.0.10.1/24 interface=vlan10
FortiSwitchverify
config system interface
  edit vlan10
    set vlanid 10
    set interface internal
    set ip 10.0.10.1 255.255.255.0
Managed FortiSwitch
(the FortiGate holds the gateway address of the VLAN interface)

Ports shut down by a protection feature

Interfaces
IOS-XE
show interfaces status err-disabled
NX-OS
show interface status err-disabled
Arista EOS
show interfaces status errdisabled
AOS-CXverify
show interface brief
Huawei VRPverify
display error-down recovery

AOS-CX shows the down reason in "show interface brief"; Fortinet reports it in the port status.

IP addresses at a glance

Interfaces
IOS-XE
show ip interface brief
NX-OS
show ip interface brief
Arista EOS
show ip interface brief
AOS-CX
show ip interface brief
AOS-Switch
show ip
Junos
show interfaces terse | match inet
Huawei VRP
display ip interface brief
MikroTik
/ip address print
FortiGate
get system interface
Cisco ASA / FTD
show interface ip brief
PAN-OS
show interface all

Configuration of one interface

Interfaces
IOS-XE
show running-config interface Gi1/0/1
NX-OS
show running-config interface Eth1/1
Arista EOS
show running-config interfaces Ethernet1
AOS-CX
show running-config interface 1/1/1
AOS-Switch
show running-config interface 1
Junos
show configuration interfaces ge-0/0/1
Huawei VRP
display current-configuration interface GigabitEthernet0/0/1
MikroTik
/interface ethernet print detail where name=ether1
FortiSwitch
show switch interface port1
FortiGate
show system interface port1
Cisco ASA / FTD
show running-config interface GigabitEthernet0/0

Interface error counters

Interfaces
IOS-XE
show interfaces counters errors
NX-OS
show interface counters errors
Arista EOS
show interfaces counters errors
AOS-CX
show interface 1/1/1
AOS-Switch
show interfaces 1
Junos
show interfaces ge-0/0/1 extensive | match error
Huawei VRP
display interface GigabitEthernet0/0/1 | include error
MikroTik
/interface ethernet print stats
FortiSwitchverify
diagnose switch physical-ports stats port1
FortiGate
diagnose hardware deviceinfo nic port1
Cisco ASA / FTD
show interface GigabitEthernet0/0 | include error
PAN-OS
show counter interface ethernet1/1

Clear interface counters

Interfaces
IOS-XE
clear counters Gi1/0/1
NX-OS
clear counters interface Eth1/1
Arista EOS
clear counters Ethernet1
AOS-CXverify
clear interface 1/1/1 statistics
Junos
clear interfaces statistics ge-0/0/1
Huawei VRP
reset counters interface GigabitEthernet0/0/1
MikroTik
/interface reset-counters ether1
Cisco ASA / FTDverify
clear interface GigabitEthernet0/0

Interface descriptions at a glance

Interfaces
IOS-XE
show interfaces description
NX-OS
show interface description
Arista EOS
show interfaces description
AOS-Switchverify
show name
Junos
show interfaces descriptions
Huawei VRP
display interface description
MikroTik
/interface print where comment!=""

Jumbo frames / MTU

Interfaces
IOS-XEverify
system mtu 9198
(interface: mtu 9198)
NX-OS
interface Eth1/1
 mtu 9216
Arista EOS
interface Ethernet1
 mtu 9214
AOS-CXverify
interface 1/1/1
 mtu 9198
Junos
set interfaces xe-0/0/1 mtu 9216
Huawei VRP
jumboframe enable 9216
MikroTik
/interface ethernet set ether1 l2mtu=9216 mtu=9000
FortiGate
config system interface
  edit "port1"
    set mtu-override enable
    set mtu 9000
PAN-OSverify
set network interface ethernet ethernet1/1 layer3 mtu 9000

Interface IP with a zone / security level

Interfaces
FortiGate
config system interface
  edit "port2"
    set mode static
    set ip 192.168.10.1 255.255.255.0
    set allowaccess ping
    set alias "LAN"
    set role lan
Cisco ASA / FTD
interface GigabitEthernet0/1
 nameif inside
 security-level 100
 ip address 192.168.10.1 255.255.255.0
 no shutdown
PAN-OS
set network interface ethernet ethernet1/2 layer3 ip 192.168.10.1/24
set zone trust network layer3 ethernet1/2
set network virtual-router default interface ethernet1/2

ASA uses security levels and names, PAN-OS uses zones, FortiGate uses interfaces (optionally grouped into zones) inside policies.

List VLANs

VLANs & trunks
IOS-XE
show vlan brief
NX-OS
show vlan brief
Arista EOS
show vlan
AOS-CX
show vlan
AOS-Switch
show vlans
Junos
show vlans
Huawei VRP
display vlan
MikroTik
/interface bridge vlan print
FortiSwitch
show switch vlan
Managed FortiSwitchverify
show system interface   (look for vlanid on the fortilink)

Create a VLAN

VLANs & trunks
IOS-XE
vlan 10
 name USERS
NX-OS
vlan 10
 name USERS
Arista EOS
vlan 10
 name USERS
AOS-CX
vlan 10
 name USERS
AOS-Switch
vlan 10
 name USERS
Junos
set vlans v10 vlan-id 10
set vlans v10 description USERS
Huawei VRP
vlan 10
 name USERS
MikroTik
/interface bridge set bridge1 vlan-filtering=yes
/interface bridge vlan add bridge=bridge1 vlan-ids=10 untagged=ether2
FortiSwitch
config switch vlan
  edit 10
    set description "USERS"
Managed FortiSwitch
config system interface
  edit "v10"
    set vlanid 10
    set interface "fortilink"
    set ip 10.0.10.1 255.255.255.0

Trunk status

VLANs & trunks
IOS-XE
show interfaces trunk
NX-OS
show interface trunk
Arista EOS
show interfaces trunk
AOS-CXverify
show vlan port <port>
AOS-Switchverify
show vlans ports 24 detail
Junos
show ethernet-switching interface
Huawei VRPverify
display port vlan
MikroTik
/interface bridge vlan print

Voice VLAN

VLANs & trunks
IOS-XE
switchport voice vlan 20
NX-OS
(no voice VLAN feature; tag the voice VLAN on a trunk)

On AOS-CX and Fortinet voice VLANs are driven by LLDP-MED / the NAC policy.

MAC address table

Layer 2
IOS-XE
show mac address-table
NX-OS
show mac address-table
Arista EOS
show mac address-table
AOS-CX
show mac-address-table
AOS-Switch
show mac-address
Junos
show ethernet-switching table
Huawei VRP
display mac-address
MikroTik
/interface bridge host print
FortiSwitchverify
diagnose switch mac-address list
Managed FortiSwitch
diagnose switch-controller switch-info mac-table <SN>

Find one MAC

Layer 2
IOS-XE
show mac address-table address aaaa.bbbb.cccc
NX-OS
show mac address-table address aaaa.bbbb.cccc
Arista EOS
show mac address-table address aaaa.bbbb.cccc
AOS-CXverify
show mac-address-table | include aa:bb:cc:dd:ee:ff
AOS-Switch
show mac-address aabbcc-ddeeff
Junos
show ethernet-switching table | match aa:bb:cc:dd:ee:ff
Huawei VRP
display mac-address aaaa-bbbb-cccc
MikroTik
/interface bridge host print where mac-address=AA:BB:CC:DD:EE:FF
FortiSwitchverify
diagnose switch mac-address list | grep aa:bb:cc:dd:ee:ff
Managed FortiSwitchverify
diagnose switch-controller switch-info mac-table <SN> | grep aa:bb:cc:dd:ee:ff

Cisco writes MACs as aaaa.bbbb.cccc; Aruba and Fortinet use colons. MAC notation differs: aaaa.bbbb.cccc (Cisco, Arista), aabbcc-ddeeff (AOS-Switch), aaaa-bbbb-cccc (Huawei), aa:bb:cc:dd:ee:ff (Junos, MikroTik, Aruba CX).

Clear dynamic MACs

Layer 2
IOS-XE
clear mac address-table dynamic
NX-OS
clear mac address-table dynamic
Arista EOS
clear mac address-table dynamic
AOS-CXverify
clear mac-address-table dynamic
Junos
clear ethernet-switching table
Huawei VRPverify
undo mac-address dynamic

Spanning-tree mode

Layer 2
IOS-XE
spanning-tree mode rapid-pvst
NX-OS
spanning-tree mode rapid-pvst
Arista EOS
spanning-tree mode mstp
(or rapid-pvst)
AOS-CXverify
spanning-tree mode rpvst
spanning-tree
AOS-Switchverify
spanning-tree
spanning-tree mode mstp
Junos
set protocols rstp
(or mstp / vstp)
Huawei VRP
stp mode rstp
(or mstp)
MikroTik
/interface bridge set bridge1 protocol-mode=rstp
FortiSwitch
config switch stp settings
  set status enable
Managed FortiSwitch
(spanning tree is a FortiSwitch setting pushed from the FortiGate)

FortiSwitchOS runs RSTP/MSTP; it has no per-VLAN rapid-PVST+.

Spanning-tree status

Layer 2
IOS-XE
show spanning-tree
NX-OS
show spanning-tree
Arista EOS
show spanning-tree
AOS-CX
show spanning-tree
AOS-Switch
show spanning-tree
Junos
show spanning-tree bridge
show spanning-tree interface
Huawei VRP
display stp brief
MikroTik
/interface bridge monitor bridge1
FortiSwitch
diagnose stp instance list
Managed FortiSwitchverify
diagnose switch-controller switch-info stp <SN> <instance>

Make this switch the root bridge

Layer 2
IOS-XE
spanning-tree vlan 10 priority 4096
NX-OS
spanning-tree vlan 10 priority 4096
Arista EOS
spanning-tree vlan-id 10 priority 4096
(MSTP: spanning-tree mst 0 priority 4096)
AOS-CXverify
spanning-tree vlan 10 priority 1
AOS-Switchverify
spanning-tree priority 1
Junos
set protocols rstp bridge-priority 4k
Huawei VRP
stp root primary
(or stp priority 4096)
MikroTik
/interface bridge set bridge1 priority=0x1000
FortiSwitch
config switch stp instance
  edit 0
    set priority 4096
Managed FortiSwitchverify
config switch-controller managed-switch
  edit <SN>
    config stp-instance
      edit 0
        set priority 4096

AOS-CX priority is in steps of 4096 (1 = 4096). AOS-Switch priority is in steps of 4096.

Edge port (PortFast)

Layer 2
IOS-XE
spanning-tree portfast
NX-OS
spanning-tree port type edge
Arista EOS
spanning-tree portfast
AOS-CX
spanning-tree port-type admin-edge
AOS-Switch
spanning-tree 1 admin-edge-port
Junos
set protocols rstp interface ge-0/0/1 edge
Huawei VRP
stp edged-port enable
MikroTik
/interface bridge port set [find interface=ether2] edge=yes
FortiSwitch
config switch interface
  edit port1
    set edge-port enabled
Managed FortiSwitch
config ports
  edit port1
    set edge-port enabled

BPDU guard

Layer 2
IOS-XE
spanning-tree bpduguard enable
NX-OS
spanning-tree bpduguard enable
Arista EOS
spanning-tree bpduguard enable
AOS-CX
spanning-tree bpdu-guard
AOS-Switchverify
spanning-tree 1 bpdu-protection
Junos
set protocols rstp bpdu-block-on-edge
Huawei VRP
stp bpdu-protection
MikroTik
/interface bridge port set [find interface=ether2] bpdu-guard=yes
FortiSwitch
config switch interface
  edit port1
    set stp-bpdu-guard enabled
Managed FortiSwitch
config ports
  edit port1
    set stp-bpdu-guard enabled

Link aggregation (LACP)

Layer 2
IOS-XE
interface range Gi1/0/1-2
 channel-group 1 mode active
interface Port-channel1
NX-OS
feature lacp
interface Eth1/1-2
 channel-group 1 mode active
interface port-channel1
Arista EOS
interface Ethernet1-2
 channel-group 1 mode active
interface Port-Channel1
AOS-CX
interface lag 1
 lacp mode active
interface 1/1/1
 lag 1
AOS-Switch
trunk 1-2 trk1 lacp
Junos
set chassis aggregated-devices ethernet device-count 2
set interfaces ge-0/0/1 ether-options 802.3ad ae0
set interfaces ae0 aggregated-ether-options lacp active
Huawei VRP
interface Eth-Trunk1
 mode lacp-static
interface GigabitEthernet0/0/1
 eth-trunk 1
MikroTik
/interface bonding add name=bond1 slaves=ether1,ether2 mode=802.3ad transmit-hash-policy=layer-2-and-3
FortiSwitch
config switch trunk
  edit LAG1
    set mode lacp-active
    set members port1 port2
Managed FortiSwitchverify
config ports
  edit LAG1
    set type trunk
    set mode lacp-active
    set members port1 port2

Link aggregation status

Layer 2
IOS-XE
show etherchannel summary
NX-OS
show port-channel summary
Arista EOS
show port-channel summary
AOS-CX
show lacp aggregates
AOS-Switch
show lacp
Junos
show lacp interfaces
show interfaces ae0 terse
Huawei VRP
display eth-trunk 1
MikroTik
/interface bonding print
FortiSwitchverify
diagnose switch trunk list
Managed FortiSwitchverify
diagnose switch-controller switch-info trunk summary <SN>

Multi-chassis LAG (two switches as one)

Layer 2
IOS-XE
stackwise-virtual
 domain 1
NX-OS
feature vpc
vpc domain 10
 peer-keepalive destination 10.0.0.2
interface port-channel10
 vpc peer-link
Arista EOS
mlag configuration
 domain-id MLAG1
 local-interface Vlan4094
 peer-address 10.0.0.2
 peer-link Port-Channel10
interface Port-Channel20
 mlag 20
AOS-CX
vsx
 inter-switch-link lag 256
 role primary
 keepalive peer 10.0.0.2 source 10.0.0.1
AOS-Switchverify
(VSF: vsf enable domain 1)
Junosverify
(Virtual Chassis, or MC-LAG / ESI-LAG on QFX)
Huawei VRPverify
dfs-group 1
 source ip 10.0.0.1
interface Eth-Trunk10
 peer-link 1
FortiSwitchverify
config switch trunk
  edit ICL
    set mclag-icl enable
Managed FortiSwitchverify
config ports
  edit LAG-ICL
    set mclag-icl enable

IOS-XE has no vPC: StackWise Virtual joins two switches into one logical switch instead.

Multi-chassis status

Layer 2
IOS-XE
show stackwise-virtual
NX-OS
show vpc
Arista EOS
show mlag
AOS-CX
show vsx status
AOS-Switchverify
show vsf
Junos
show virtual-chassis status
Huawei VRPverify
display dfs-group 1 m-lag
FortiSwitchverify
diagnose switch mclag peer-info
Managed FortiSwitchverify
diagnose switch-controller switch-info mclag-icl <SN>

Port security (limit MACs)

Layer 2
IOS-XE
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
NX-OS
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
Arista EOSverify
switchport port-security
switchport port-security mac-address maximum 2
AOS-Switchverify
port-security 1 learn-mode limited-continuous address-limit 2
Junosverify
set switch-options interface ge-0/0/1.0 interface-mac-limit 2 packet-action drop
Huawei VRPverify
port-security enable
port-security max-mac-num 2
FortiSwitch
config switch interface
  edit port1
    set learning-limit 2
Managed FortiSwitchverify
config ports
  edit port1
    set learning-limit 2

MAC addresses learned on one port

Layer 2
IOS-XE
show mac address-table interface GigabitEthernet1/0/1
NX-OS
show mac address-table interface Ethernet1/1
Arista EOS
show mac address-table interface Ethernet1
AOS-CXverify
show mac-address-table port 1/1/1
AOS-Switch
show mac-address 1
Junos
show ethernet-switching table interface ge-0/0/1
Huawei VRPverify
display mac-address GigabitEthernet0/0/1
MikroTik
/interface bridge host print where on-interface=ether1
FortiSwitchverify
diagnose switch mac-address list | grep port1
Managed FortiSwitchverify
diagnose switch-controller switch-info mac-table <SN> port1

Pair it with the ARP table to go from an IP to a switch port.

Errdisable auto-recovery

Layer 2
IOS-XE
errdisable recovery cause bpduguard
errdisable recovery interval 300
NX-OS
errdisable recovery cause bpduguard
errdisable recovery interval 300
Arista EOSverify
errdisable recovery cause bpduguard
errdisable recovery interval 300
AOS-Switch
spanning-tree bpdu-protection-timeout 300
Junos
set protocols layer2-control bpdu-block disable-timeout 300
Huawei VRPverify
error-down auto-recovery cause bpdu-protection interval 300

Port-channel load balancing

Layer 2
IOS-XE
port-channel load-balance src-dst-ip
NX-OS
port-channel load-balance src-dst ip-l4port
Junosverify
set forwarding-options hash-key family inet layer-3
Huawei VRPverify
load-balance src-dst-ip
MikroTik
/interface bonding set bond1 transmit-hash-policy=layer-3-and-4

DHCP snooping bindings

Layer 2
IOS-XE
show ip dhcp snooping binding
NX-OS
show ip dhcp snooping binding
AOS-CXverify
show dhcpv4-snooping binding
AOS-Switch
show dhcp-snooping binding
Junos
show dhcp-security binding
Huawei VRPverify
display dhcp snooping user-bind all

Dynamic ARP inspection

Layer 2
IOS-XE
ip arp inspection vlan 10
interface Gi1/0/48
 ip arp inspection trust
NX-OS
ip arp inspection vlan 10
interface Eth1/48
 ip arp inspection trust
AOS-CXverify
vlan 10
 arp inspection
interface 1/1/48
 arp inspection trust
AOS-Switchverify
arp-protect
arp-protect vlan 10
arp-protect trust 24
Junosverify
set vlans v10 forwarding-options dhcp-security arp-inspection
Huawei VRPverify
arp anti-attack check user-bind enable

ARP inspection checks ARP against the DHCP snooping table, so turn snooping on first.

Show IGMP snooping groups

Layer 2
IOS-XE
show ip igmp snooping groups
NX-OS
show ip igmp snooping groups
Arista EOS
show ip igmp snooping groups
AOS-CXverify
show igmp group
AOS-Switchverify
show ip igmp
Junos
show igmp snooping membership
Huawei VRPverify
display igmp-snooping group

Show LLDP neighbours

Neighbours
IOS-XE
show lldp neighbors detail
NX-OS
show lldp neighbors detail
Arista EOS
show lldp neighbors detail
AOS-CX
show lldp neighbor-info
AOS-Switch
show lldp info remote-device
Junos
show lldp neighbors
Huawei VRP
display lldp neighbor brief
MikroTik
/ip neighbor print
FortiSwitch
get switch lldp neighbors-summary
get switch lldp neighbors-detail <port>
Managed FortiSwitch
diagnose switch-controller switch-info lldp neighbors-summary <SN>

Enable LLDP

Neighbours
IOS-XE
lldp run
NX-OS
feature lldp
Arista EOS
(on by default)
AOS-CX
(on by default)
AOS-Switch
(on by default)
Junos
set protocols lldp interface all
Huawei VRP
lldp enable
MikroTik
/ip neighbor discovery-settings set discover-interface-list=LAN
FortiSwitchverify
(on by default; profile per port: config switch lldp profile)
Managed FortiSwitch
config switch-controller lldp-profile

Show CDP neighbours

Neighbours
IOS-XE
show cdp neighbors detail
NX-OS
show cdp neighbors detail
AOS-Switch
show cdp neighbors
MikroTik
/ip neighbor print

CDP is Cisco-only. Use LLDP between vendors. Arista EOS, Junos and Huawei do not speak CDP.

ARP table

IP & routing
IOS-XE
show ip arp
NX-OS
show ip arp
Arista EOS
show ip arp
AOS-CX
show arp
AOS-Switch
show arp
Junos
show arp
Huawei VRP
display arp
MikroTik
/ip arp print
FortiSwitch
diagnose ip arp list
Managed FortiSwitch
get system arp
FortiGate
get system arp
Cisco ASA / FTD
show arp
PAN-OS
show arp all

Routing table

IP & routing
IOS-XE
show ip route
NX-OS
show ip route
Arista EOS
show ip route
AOS-CX
show ip route
AOS-Switch
show ip route
Junos
show route
Huawei VRP
display ip routing-table
MikroTik
/ip route print
FortiSwitch
get router info routing-table all
Managed FortiSwitch
get router info routing-table all
FortiGate
get router info routing-table all
Cisco ASA / FTD
show route
PAN-OS
show routing route

On a FortiGate-managed switch routing lives on the FortiGate.

Static route

IP & routing
IOS-XE
ip route 10.1.0.0 255.255.0.0 192.168.1.1
NX-OS
ip route 10.1.0.0/16 192.168.1.1
Arista EOS
ip route 10.1.0.0/16 192.168.1.1
AOS-CX
ip route 10.1.0.0/16 192.168.1.1
AOS-Switch
ip route 10.1.0.0 255.255.0.0 192.168.1.1
Junos
set routing-options static route 10.1.0.0/16 next-hop 192.168.1.1
Huawei VRP
ip route-static 10.1.0.0 16 192.168.1.1
MikroTik
/ip route add dst-address=10.1.0.0/16 gateway=192.168.1.1
FortiSwitch
config router static
  edit 1
    set dst 10.1.0.0/16
    set gateway 192.168.1.1
Managed FortiSwitch
config router static
  edit 1
    set dst 10.1.0.0 255.255.0.0
    set gateway 192.168.1.1
    set device "port1"
FortiGate
config router static
  edit 1
    set dst 10.1.0.0 255.255.0.0
    set gateway 192.168.1.1
    set device "port1"
Cisco ASA / FTD
route inside 10.1.0.0 255.255.0.0 192.168.1.1
PAN-OS
set network virtual-router default routing-table ip static-route R1 destination 10.1.0.0/16 nexthop ip-address 192.168.1.1

Default route

IP & routing
IOS-XE
ip route 0.0.0.0 0.0.0.0 192.168.1.1
NX-OS
ip route 0.0.0.0/0 192.168.1.1
Arista EOS
ip route 0.0.0.0/0 192.168.1.1
AOS-CX
ip route 0.0.0.0/0 192.168.1.1
AOS-Switch
ip route 0.0.0.0 0.0.0.0 192.168.1.1
Junos
set routing-options static route 0.0.0.0/0 next-hop 192.168.1.1
Huawei VRP
ip route-static 0.0.0.0 0 192.168.1.1
MikroTik
/ip route add dst-address=0.0.0.0/0 gateway=192.168.1.1
FortiSwitch
config router static
  edit 1
    set gateway 192.168.1.1
Managed FortiSwitch
config router static
  edit 1
    set gateway 192.168.1.1
    set device "wan1"
FortiGate
config router static
  edit 1
    set gateway 203.0.113.1
    set device "wan1"
Cisco ASA / FTD
route outside 0.0.0.0 0.0.0.0 203.0.113.1
PAN-OS
set network virtual-router default routing-table ip static-route DEFAULT destination 0.0.0.0/0 nexthop ip-address 203.0.113.1

OSPF neighbours

IP & routing
IOS-XE
show ip ospf neighbor
NX-OS
show ip ospf neighbors
Arista EOS
show ip ospf neighbor
AOS-CX
show ip ospf neighbors
AOS-Switch
show ip ospf neighbor
Junos
show ospf neighbor
Huawei VRP
display ospf peer
MikroTik
/routing ospf neighbor print
FortiSwitch
get router info ospf neighbor
Managed FortiSwitch
get router info ospf neighbor
FortiGate
get router info ospf neighbor
Cisco ASA / FTD
show ospf neighbor
PAN-OS
show routing protocol ospf neighbor

Enable OSPF on an interface

IP & routing
IOS-XE
router ospf 1
 network 10.0.0.0 0.0.0.255 area 0
NX-OS
feature ospf
router ospf 1
interface vlan10
 ip router ospf 1 area 0
Arista EOS
router ospf 1
 network 10.0.0.0/24 area 0
AOS-CX
router ospf 1
 area 0
interface vlan10
 ip ospf 1 area 0
AOS-Switchverify
router ospf
 area 0
vlan 10
 ip ospf area 0
Junos
set protocols ospf area 0.0.0.0 interface irb.10
Huawei VRP
ospf 1
 area 0
  network 10.0.0.0 0.0.0.255
MikroTik
/routing ospf instance add name=o1 router-id=1.1.1.1
/routing ospf area add name=a0 area-id=0.0.0.0 instance=o1
/routing ospf interface-template add area=a0 networks=10.0.0.0/24
FortiSwitch
config router ospf
  set router-id 10.0.0.2
  config area
    edit 0.0.0.0
    next
  end
  config network
    edit 1
      set area 0.0.0.0
      set prefix 10.0.0.0 255.255.255.0
    next
  end
end
Managed FortiSwitch
config router ospf
  set router-id 10.0.0.1
  config area
    edit 0.0.0.0
    next
  end
  config network
    edit 1
      set area 0.0.0.0
      set prefix 10.0.0.0 255.255.255.0
    next
  end
end

BGP summary

IP & routing
IOS-XE
show ip bgp summary
NX-OS
show bgp ipv4 unicast summary
Arista EOS
show ip bgp summary
AOS-CX
show bgp ipv4 unicast summary
AOS-Switch
show ip bgp summary
Junos
show bgp summary
Huawei VRP
display bgp peer
MikroTik
/routing bgp session print
FortiSwitch
get router info bgp summary
Managed FortiSwitch
get router info bgp summary
FortiGate
get router info bgp summary
Cisco ASA / FTD
show bgp summary
PAN-OSverify
show routing protocol bgp summary

DHCP relay

IP & routing
IOS-XE
interface vlan 10
 ip helper-address 10.0.0.5
NX-OS
feature dhcp
ip dhcp relay
interface vlan10
 ip dhcp relay address 10.0.0.5
Arista EOS
interface Vlan10
 ip helper-address 10.0.0.5
AOS-CX
interface vlan 10
 ip helper-address 10.0.0.5
AOS-Switch
vlan 10
 ip helper-address 10.0.0.5
Junos
set forwarding-options dhcp-relay server-group DHCP 10.0.0.5
set forwarding-options dhcp-relay group G1 active-server-group DHCP
set forwarding-options dhcp-relay group G1 interface irb.10
Huawei VRP
dhcp enable
interface Vlanif10
 dhcp select relay
 dhcp relay server-ip 10.0.0.5
MikroTik
/ip dhcp-relay add name=r1 interface=vlan10 dhcp-server=10.0.0.5 local-address=10.0.10.1
FortiGate
config system interface
  edit "port2"
    set dhcp-relay-service enable
    set dhcp-relay-ip 10.0.0.5
Cisco ASA / FTD
dhcprelay server 10.0.0.5 inside
dhcprelay enable inside
PAN-OSverify
set network dhcp interface ethernet1/2 relay ip server 10.0.0.5

DHCP snooping

IP & routing
IOS-XE
ip dhcp snooping
ip dhcp snooping vlan 10
interface Gi1/0/48
 ip dhcp snooping trust
NX-OS
feature dhcp
ip dhcp snooping
ip dhcp snooping vlan 10
interface Eth1/48
 ip dhcp snooping trust
AOS-CX
dhcpv4-snooping
vlan 10
 dhcpv4-snooping
interface 1/1/48
 dhcpv4-snooping trust
AOS-Switch
dhcp-snooping
dhcp-snooping vlan 10
dhcp-snooping trust 24
Junosverify
set vlans v10 forwarding-options dhcp-security
set vlans v10 forwarding-options dhcp-security group UPLINK overrides trusted
set vlans v10 forwarding-options dhcp-security group UPLINK interface ge-0/0/48.0
Huawei VRP
dhcp snooping enable
dhcp snooping enable vlan 10
interface GigabitEthernet0/0/48
 dhcp snooping trusted
MikroTik
/interface bridge set bridge1 dhcp-snooping=yes
/interface bridge port set [find interface=ether48] trusted=yes
FortiSwitchverify
config switch vlan
  edit 10
    set dhcp-snooping enable
config switch interface
  edit port48
    set dhcp-snooping trusted
Managed FortiSwitchverify
config ports
  edit port48
    set dhcp-snooping trusted

Ping and traceroute

IP & routing
IOS-XE
ping 10.0.0.1
traceroute 10.0.0.1
NX-OS
ping 10.0.0.1 vrf management
traceroute 10.0.0.1 vrf management
Arista EOS
ping 10.0.0.1
traceroute 10.0.0.1
AOS-CX
ping 10.0.0.1
traceroute 10.0.0.1
AOS-Switch
ping 10.0.0.1
traceroute 10.0.0.1
Junos
ping 10.0.0.1
traceroute 10.0.0.1
Huawei VRP
ping 10.0.0.1
tracert 10.0.0.1
MikroTik
/ping 10.0.0.1
/tool traceroute 10.0.0.1
FortiSwitch
execute ping 10.0.0.1
execute traceroute 10.0.0.1
Managed FortiSwitch
execute ping 10.0.0.1
execute traceroute 10.0.0.1
FortiGate
execute ping 10.0.0.1
execute traceroute 10.0.0.1
Cisco ASA / FTD
ping 10.0.0.1
traceroute 10.0.0.1
PAN-OS
ping host 10.0.0.1
traceroute host 10.0.0.1

On NX-OS and AOS-CX out-of-band management usually sits in its own VRF (management / mgmt).

IPv6 neighbours and routes

IP & routing
IOS-XE
show ipv6 neighbors
show ipv6 route
NX-OS
show ipv6 neighbor
show ipv6 route
Arista EOS
show ipv6 neighbors
show ipv6 route
AOS-CX
show ipv6 neighbors
show ipv6 route
Junos
show ipv6 neighbors
show route table inet6.0
Huawei VRP
display ipv6 neighbors
display ipv6 routing-table
MikroTik
/ipv6 neighbor print
/ipv6 route print
FortiGateverify
diagnose ipv6 neighbor-cache list
get router info6 routing-table
Cisco ASA / FTD
show ipv6 neighbor
show ipv6 route

OSPF interfaces and database

Routing protocols
IOS-XE
show ip ospf interface brief
show ip ospf database
NX-OS
show ip ospf interface brief
show ip ospf database
Arista EOS
show ip ospf interface brief
show ip ospf database
AOS-CXverify
show ip ospf interface
show ip ospf lsdb
AOS-Switchverify
show ip ospf interface
show ip ospf link-state
Junos
show ospf interface
show ospf database
Huawei VRP
display ospf interface
display ospf lsdb
MikroTik
/routing ospf interface print
/routing ospf lsa print
FortiGate
get router info ospf interface
get router info ospf database brief
Cisco ASA / FTD
show ospf interface
show ospf database

BGP session set-up

Routing protocols
IOS-XE
router bgp 65001
 neighbor 10.0.0.2 remote-as 65000
 address-family ipv4
  neighbor 10.0.0.2 activate
  network 10.0.0.0 mask 255.255.0.0
NX-OS
feature bgp
router bgp 65001
 address-family ipv4 unicast
  network 10.0.0.0/16
 neighbor 10.0.0.2
  remote-as 65000
  address-family ipv4 unicast
Arista EOS
router bgp 65001
 neighbor 10.0.0.2 remote-as 65000
 network 10.0.0.0/16
AOS-CXverify
router bgp 65001
 neighbor 10.0.0.2 remote-as 65000
 address-family ipv4 unicast
  neighbor 10.0.0.2 activate
  network 10.0.0.0/16
Junos
set routing-options autonomous-system 65001
set protocols bgp group EXT type external
set protocols bgp group EXT neighbor 10.0.0.2 peer-as 65000
Huawei VRP
bgp 65001
 peer 10.0.0.2 as-number 65000
 ipv4-family unicast
  network 10.0.0.0 255.255.0.0
MikroTikverify
/routing bgp connection add name=ISP as=65001 remote.address=10.0.0.2 remote.as=65000 local.role=ebgp
FortiGate
config router bgp
  set as 65001
  set router-id 1.1.1.1
  config neighbor
    edit "10.0.0.2"
      set remote-as 65000
    next
  end
  config network
    edit 1
      set prefix 10.0.0.0 255.255.0.0
    next
  end
end
Cisco ASA / FTD
router bgp 65001
 address-family ipv4 unicast
  neighbor 10.0.0.2 remote-as 65000
  neighbor 10.0.0.2 activate
  network 10.0.0.0 mask 255.255.0.0
PAN-OSverify
set network virtual-router default protocol bgp enable yes local-as 65001 router-id 1.1.1.1
set network virtual-router default protocol bgp peer-group EXT peer ISP peer-as 65000 local-address interface ethernet1/1 peer-address ip 10.0.0.2

BGP routes sent and received

Routing protocols
IOS-XE
show ip bgp neighbors 10.0.0.2 advertised-routes
show ip bgp neighbors 10.0.0.2 received-routes
NX-OS
show bgp ipv4 unicast neighbors 10.0.0.2 advertised-routes
Arista EOS
show ip bgp neighbors 10.0.0.2 advertised-routes
show ip bgp neighbors 10.0.0.2 received-routes
AOS-CX
show bgp ipv4 unicast neighbors 10.0.0.2 advertised-routes
Junos
show route advertising-protocol bgp 10.0.0.2
show route receive-protocol bgp 10.0.0.2
Huawei VRP
display bgp routing-table peer 10.0.0.2 advertised-routes
display bgp routing-table peer 10.0.0.2 received-routes
MikroTikverify
/routing bgp advertisements print
FortiGate
get router info bgp neighbors 10.0.0.2 advertised-routes
get router info bgp neighbors 10.0.0.2 received-routes
Cisco ASA / FTD
show bgp neighbors 10.0.0.2 advertised-routes

"received-routes" on Cisco needs soft-reconfiguration inbound; use "show ip bgp" for what was accepted.

Reset a BGP session

Routing protocols
IOS-XE
clear ip bgp 10.0.0.2 soft
NX-OS
clear ip bgp 10.0.0.2 soft
Arista EOS
clear ip bgp 10.0.0.2 soft
AOS-CXverify
clear bgp 10.0.0.2 soft
Junos
clear bgp neighbor 10.0.0.2 soft
Huawei VRPverify
refresh bgp 10.0.0.2 import
FortiGate
execute router clear bgp ip 10.0.0.2 soft
Cisco ASA / FTDverify
clear bgp 10.0.0.2 soft

Prefix list

Routing protocols
IOS-XE
ip prefix-list PL seq 5 permit 10.0.0.0/8 le 24
NX-OS
ip prefix-list PL seq 5 permit 10.0.0.0/8 le 24
Arista EOS
ip prefix-list PL seq 5 permit 10.0.0.0/8 le 24
AOS-CX
ip prefix-list PL seq 5 permit 10.0.0.0/8 le 24
AOS-Switch
ip prefix-list PL seq 5 permit 10.0.0.0/8 le 24
Junos
set policy-options policy-statement P term 1 from route-filter 10.0.0.0/8 upto /24
Huawei VRP
ip ip-prefix PL index 10 permit 10.0.0.0 8 less-equal 24
MikroTikverify
/routing filter rule add chain=in rule="if (dst in 10.0.0.0/8 && dst-len in 8-24) { accept }"
FortiGate
config router prefix-list
  edit "PL"
    config rule
      edit 1
        set prefix 10.0.0.0 255.0.0.0
        set le 24
Cisco ASA / FTD
prefix-list PL seq 5 permit 10.0.0.0/8 le 24

See the prefix list tool on this site to build and test these.

BFD for fast failure detection

Routing protocols
IOS-XE
interface Vlan10
 bfd interval 300 min_rx 300 multiplier 3
router ospf 1
 bfd all-interfaces
NX-OS
feature bfd
interface Vlan10
 bfd interval 300 min_rx 300 multiplier 3
 ip ospf bfd
Arista EOSverify
router ospf 1
 bfd default
bfd interval 300 min-rx 300 multiplier 3
Junosverify
set protocols ospf area 0 interface irb.10 bfd-liveness-detection minimum-interval 300
FortiGateverify
config router ospf
  config ospf-interface
    edit "LAN"
      set bfd enable

Route lookup for one destination

Routing protocols
IOS-XE
show ip route 8.8.8.8
NX-OS
show ip route 8.8.8.8
Arista EOS
show ip route 8.8.8.8
AOS-CX
show ip route 8.8.8.8
Junos
show route 8.8.8.8
Huawei VRP
display ip routing-table 8.8.8.8
MikroTikverify
/ip route check 8.8.8.8
FortiGate
get router info routing-table details 8.8.8.8
Cisco ASA / FTD
show route 8.8.8.8
PAN-OSverify
test routing fib-lookup virtual-router default ip 8.8.8.8

First-hop redundancy (HSRP / VRRP)

Redundancy (FHRP)
IOS-XE
interface Vlan10
 standby 10 ip 10.0.10.1
 standby 10 priority 110
 standby 10 preempt
NX-OS
feature hsrp
interface Vlan10
 hsrp 10
  ip 10.0.10.1
  priority 110
  preempt
Arista EOS
interface Vlan10
 vrrp 10 ipv4 10.0.10.1
 vrrp 10 priority-level 110
AOS-CXverify
interface vlan 10
 vrrp 10 address-family ipv4
  address 10.0.10.1
  priority 110
  enable
AOS-Switchverify
vlan 10
 vrrp vrid 10
  virtual-ip-address 10.0.10.1
  priority 110
  enable
Junos
set interfaces irb unit 10 family inet address 10.0.10.2/24 vrrp-group 10 virtual-address 10.0.10.1 priority 110
Huawei VRP
interface Vlanif10
 vrrp vrid 10 virtual-ip 10.0.10.1
 vrrp vrid 10 priority 110
MikroTik
/interface vrrp add name=vrrp10 interface=vlan10 vrid=10 priority=110
/ip address add address=10.0.10.1/32 interface=vrrp10
FortiGateverify
config system interface
  edit "port2"
    set vrrp-virtual-mac enable
    config vrrp
      edit 10
        set vrip 10.0.10.1
        set priority 110

First-hop redundancy status

Redundancy (FHRP)
IOS-XE
show standby brief
NX-OS
show hsrp brief
Arista EOS
show vrrp
AOS-CXverify
show vrrp
AOS-Switchverify
show vrrp
Junos
show vrrp summary
Huawei VRP
display vrrp brief
MikroTik
/interface vrrp print
FortiGateverify
get router info vrrp

QoS policy status on a port

QoS & multicast
IOS-XE
show policy-map interface Gi1/0/1
NX-OS
show policy-map interface Eth1/1
Arista EOSverify
show qos interfaces Ethernet1
AOS-CXverify
show qos trust
show qos queue-profile
Junos
show class-of-service interface ge-0/0/1
Huawei VRPverify
display qos queue statistics interface GigabitEthernet0/0/1
FortiGateverify
diagnose netlink interface list port1

Multicast: PIM neighbours and routes

QoS & multicast
IOS-XE
show ip pim neighbor
show ip mroute
NX-OS
show ip pim neighbor
show ip mroute
Arista EOS
show ip pim neighbor
show ip mroute
AOS-CXverify
show ip pim neighbor
show ip mroute
Junos
show pim neighbors
show multicast route
Huawei VRP
display pim neighbor
display multicast routing-table
FortiGateverify
get router info multicast pim sparse-mode neighbour
get router info multicast table

Create a VRF and put an interface in it

VRF & MPLS
IOS-XE
vrf definition RED
 address-family ipv4
interface Vlan10
 vrf forwarding RED
NX-OS
vrf context RED
interface Vlan10
 vrf member RED
Arista EOS
vrf instance RED
ip routing vrf RED
interface Vlan10
 vrf RED
AOS-CXverify
vrf RED
interface vlan 10
 vrf attach RED
Junos
set routing-instances RED instance-type virtual-router
set routing-instances RED interface irb.10
Huawei VRP
ip vpn-instance RED
 route-distinguisher 65001:1
interface Vlanif10
 ip binding vpn-instance RED
MikroTik
/ip vrf add name=RED interfaces=vlan10
FortiGateverify
config system interface
  edit "port3"
    set vrf 5
PAN-OS
set network virtual-router RED interface ethernet1/3

Re-enter the IP address after moving an interface into a VRF on IOS-XE, NX-OS and Arista; it is removed.

Routes and neighbours in a VRF

VRF & MPLS
IOS-XE
show ip route vrf RED
show ip arp vrf RED
NX-OS
show ip route vrf RED
Arista EOS
show ip route vrf RED
AOS-CX
show ip route vrf RED
Junos
show route table RED.inet.0
Huawei VRP
display ip routing-table vpn-instance RED
MikroTik
/ip route print where routing-table=RED
PAN-OS
show routing route virtual-router RED

MPLS LDP

VRF & MPLS
IOS-XE
mpls ip   (on the interface)
show mpls ldp neighbor
show mpls forwarding-table
NX-OSverify
feature mpls ldp
show mpls ldp neighbor
Arista EOSverify
mpls ldp router-id 1.1.1.1
show mpls ldp neighbor
Junos
set protocols ldp interface ge-0/0/1
show ldp neighbor
Huawei VRP
mpls
mpls ldp
display mpls ldp session
MikroTik
/mpls ldp interface add interface=ether1
/mpls ldp neighbor print

RADIUS server

Security & access
IOS-XE
radius server ISE
 address ipv4 10.0.0.10 auth-port 1812 acct-port 1813
 key SECRET
NX-OS
radius-server host 10.0.0.10 key SECRET authentication accounting
Arista EOS
radius-server host 10.0.0.10 key SECRET
AOS-CX
radius-server host 10.0.0.10 key plaintext SECRET
AOS-Switch
radius-server host 10.0.0.10 key SECRET
Junos
set access radius-server 10.0.0.10 secret SECRET
Huawei VRP
radius-server template R1
 radius-server authentication 10.0.0.10 1812
 radius-server shared-key cipher SECRET
MikroTik
/radius add address=10.0.0.10 secret=SECRET service=login
FortiSwitch
config user radius
  edit ISE
    set server 10.0.0.10
    set secret SECRET
Managed FortiSwitch
config user radius
  edit ISE
    set server 10.0.0.10
    set secret SECRET
FortiGate
config user radius
  edit "ISE"
    set server 10.0.0.10
    set secret SECRET
Cisco ASA / FTD
aaa-server ISE protocol radius
aaa-server ISE (inside) host 10.0.0.10
 key SECRET
PAN-OS
set shared server-profile radius ISE server S1 ip-address 10.0.0.10 secret SECRET port 1812

802.1X on a port

Security & access
IOS-XE
aaa new-model
dot1x system-auth-control
interface Gi1/0/1
 authentication port-control auto
 dot1x pae authenticator
NX-OSverify
feature dot1x
interface Eth1/1
 dot1x port-control auto
Arista EOSverify
dot1x system-auth-control
interface Ethernet1
 dot1x pae authenticator
 dot1x port-control auto
AOS-CXverify
aaa authentication port-access dot1x authenticator
 enable
interface 1/1/1
 aaa authentication port-access dot1x authenticator
  enable
AOS-Switch
aaa port-access authenticator 1
aaa port-access authenticator active
Junosverify
set protocols dot1x authenticator interface ge-0/0/1
Huawei VRPverify
dot1x enable
interface GigabitEthernet0/0/1
 dot1x enable
MikroTikverify
/interface dot1x server add interface=ether2 auth-types=dot1x
FortiSwitchverify
config switch interface
  edit port1
    config port-security
      set port-security-mode 802.1X
Managed FortiSwitch
config switch-controller security-policy 802-1X
  edit "dot1x-pol"
    set security-mode 802.1X
config ports
  edit port1
    set port-security-policy "dot1x-pol"

802.1X sessions

Security & access
IOS-XE
show authentication sessions
NX-OSverify
show dot1x all
Arista EOSverify
show dot1x hosts
AOS-CX
show port-access clients
AOS-Switch
show port-access authenticator
Junosverify
show dot1x interface ge-0/0/1 detail
Huawei VRPverify
display dot1x
FortiSwitchverify
diagnose switch 802-1x status
Managed FortiSwitchverify
diagnose switch-controller switch-info 802.1X <SN>

Apply an ACL to a port

Security & access
IOS-XE
interface Gi1/0/1
 ip access-group MY-ACL in
NX-OS
interface Eth1/1
 ip access-group MY-ACL in
Arista EOS
interface Ethernet1
 ip access-group MY-ACL in
AOS-CX
interface 1/1/1
 apply access-list ip MY-ACL in
AOS-Switch
interface 1
 ip access-group MY-ACL in
Junos
set interfaces ge-0/0/1 unit 0 family ethernet-switching filter input MY-FILTER
Huawei VRPverify
interface GigabitEthernet0/0/1
 traffic-filter inbound acl name MY-ACL
MikroTik
(use /ip firewall filter or /interface bridge filter)
FortiSwitchverify
config switch acl ingress
  edit 1
    config classifier
      set dst-ip-prefix 10.0.0.10/32
    config action
      set drop enable
Managed FortiSwitchverify
config switch-controller acl ingress
  edit 1
    config classifier
      set dst-ip-prefix 10.0.0.10/32
    config action
      set drop enable

FortiSwitch ACLs are numbered entries with a classifier and an action, not named permit/deny lists. Junos uses firewall filters (term / from / then) instead of access lists.

Port mirroring (SPAN)

Security & access
IOS-XE
monitor session 1 source interface Gi1/0/1
monitor session 1 destination interface Gi1/0/24
NX-OS
monitor session 1
 source interface Eth1/1 both
 destination interface Eth1/24
 no shut
Arista EOS
monitor session 1 source Ethernet1
monitor session 1 destination Ethernet24
AOS-CX
mirror session 1
 destination interface 1/1/24
 source interface 1/1/1 both
 enable
AOS-Switchverify
mirror-port 24
interface 1
 monitor all both mirror 1
Junos
set forwarding-options analyzer A input ingress interface ge-0/0/1
set forwarding-options analyzer A input egress interface ge-0/0/1
set forwarding-options analyzer A output interface ge-0/0/24
Huawei VRPverify
observe-port 1 interface GigabitEthernet0/0/24
interface GigabitEthernet0/0/1
 port-mirroring to observe-port 1 both
MikroTikverify
/interface ethernet switch set switch1 mirror-source=ether1 mirror-target=ether24
FortiSwitch
config switch mirror
  edit 1
    set dst port24
    set src-ingress port1
    set src-egress port1
    set status active
Managed FortiSwitchverify
config mirror
  edit 1
    set dst port24
    set src-ingress port1
    set src-egress port1
    set status active

NX-OS needs the destination port set with "switchport monitor".

Storm control

Security & access
IOS-XE
storm-control broadcast level 1
NX-OS
storm-control broadcast level 1
Arista EOS
storm-control broadcast level 1
AOS-CXverify
rate-limit broadcast 1000 kbps
AOS-Switchverify
interface 1
 broadcast-limit 5
Junosverify
set forwarding-options storm-control-profiles SC all bandwidth-percentage 5
set interfaces ge-0/0/1 unit 0 family ethernet-switching storm-control SC
Huawei VRPverify
broadcast-suppression 5

TACACS+ server

Security & access
IOS-XE
tacacs server TAC1
 address ipv4 10.0.0.11
 key SECRET
aaa new-model
aaa authentication login default group tacacs+ local
NX-OS
feature tacacs+
tacacs-server host 10.0.0.11 key SECRET
aaa authentication login default group TACGRP
Arista EOSverify
tacacs-server host 10.0.0.11 key SECRET
aaa authentication login default group tacacs+ local
Junos
set system tacplus-server 10.0.0.11 secret SECRET
set system authentication-order [ tacplus password ]
FortiGate
config user tacacs+
  edit "TAC1"
    set server 10.0.0.11
    set key SECRET
Cisco ASA / FTD
aaa-server TAC protocol tacacs+
aaa-server TAC (inside) host 10.0.0.11
 key SECRET

Who is logged in

Security & access
IOS-XE
show users
NX-OS
show users
Arista EOS
show users
Junos
show system users
Huawei VRP
display users
MikroTik
/user active print
FortiGate
get system admin list
Cisco ASA / FTD
show ssh sessions
PAN-OS
show admins

Login banner

Security & access
IOS-XE
banner motd ^C Authorised use only ^C
NX-OS
banner motd #Authorised use only#
Arista EOS
banner motd
Authorised use only
EOF
AOS-CXverify
banner motd $Authorised use only$
AOS-Switch
banner motd "Authorised use only"
Junos
set system login message "Authorised use only"
Huawei VRP
header login information "Authorised use only"
MikroTik
/system note set note="Authorised use only" show-at-login=yes
FortiGateverify
config system global
  set pre-login-banner enable
Cisco ASA / FTD
banner motd Authorised use only
PAN-OSverify
set deviceconfig system login-banner "Authorised use only"

Local admin user

Management
IOS-XE
username admin privilege 15 secret <password>
NX-OS
username admin password <password> role network-admin
Arista EOS
username admin privilege 15 role network-admin secret <password>
AOS-CX
user admin group administrators password plaintext <password>
AOS-Switch
password manager user-name admin
Junos
set system login user admin class super-user authentication plain-text-password
Huawei VRP
aaa
 local-user admin password irreversible-cipher <password>
 local-user admin service-type ssh
 local-user admin privilege level 15
MikroTik
/user add name=admin2 group=full password=<password>
FortiSwitch
config system admin
  edit admin
    set password <password>
    set accprofile super_admin
FortiGate
config system admin
  edit "admin2"
    set accprofile "super_admin"
    set password <password>
Cisco ASA / FTD
username admin password <password> privilege 15
PAN-OS
set mgt-config users admin2 password
set mgt-config users admin2 permissions role-based superuser yes

Managed FortiSwitches use the FortiGate admins.

Management IP address

Management
IOS-XE
interface vlan 99
 ip address 10.0.99.2 255.255.255.0
ip default-gateway 10.0.99.1
NX-OS
interface mgmt0
 vrf member management
 ip address 10.0.99.2/24
vrf context management
 ip route 0.0.0.0/0 10.0.99.1
Arista EOSverify
vrf instance MGMT
interface Management1
 vrf MGMT
 ip address 10.0.99.2/24
ip route vrf MGMT 0.0.0.0/0 10.0.99.1
AOS-CX
interface mgmt
 no shutdown
 ip static 10.0.99.2/24
 default-gateway 10.0.99.1
AOS-Switch
vlan 99
 ip address 10.0.99.2/24
ip default-gateway 10.0.99.1
Junosverify
set interfaces me0 unit 0 family inet address 10.0.99.2/24
Huawei VRP
interface Vlanif99
 ip address 10.0.99.2 24
ip route-static 0.0.0.0 0 10.0.99.1
MikroTik
/ip address add address=10.0.99.2/24 interface=bridge1
/ip route add gateway=10.0.99.1
FortiSwitch
config system interface
  edit mgmt
    set ip 10.0.99.2 255.255.255.0
    set allowaccess ping ssh https
Managed FortiSwitch
(address comes from FortiLink; the switch is reached through the FortiGate)
FortiGate
config system interface
  edit "mgmt"
    set ip 10.0.99.2 255.255.255.0
    set allowaccess ping https ssh
Cisco ASA / FTD
interface Management1/1
 nameif management
 security-level 100
 ip address 10.0.99.2 255.255.255.0
PAN-OS
set deviceconfig system ip-address 10.0.99.2 netmask 255.255.255.0 default-gateway 10.0.99.1

Enable SSH

Management
IOS-XE
ip domain-name example.com
crypto key generate rsa modulus 3072
ip ssh version 2
NX-OS
feature ssh
ssh key rsa 3072
Arista EOSverify
management ssh
 no shutdown
AOS-CXverify
ssh server vrf mgmt
AOS-Switch
ip ssh
Junos
set system services ssh
Huawei VRPverify
stelnet server enable
ssh user admin authentication-type password
MikroTik
/ip service set ssh disabled=no
FortiSwitch
config system interface
  edit mgmt
    set allowaccess ssh
Managed FortiSwitch
(set on the FortiGate)
FortiGate
config system interface
  edit "mgmt"
    set allowaccess ping https ssh
Cisco ASA / FTD
crypto key generate rsa modulus 3072
ssh 10.0.99.0 255.255.255.0 management
ssh version 2
PAN-OSverify
set deviceconfig system service disable-ssh no

NTP server

Management
IOS-XE
ntp server 10.0.0.1
NX-OS
ntp server 10.0.0.1 use-vrf management
Arista EOS
ntp server 10.0.0.1
AOS-CX
ntp server 10.0.0.1
ntp enable
AOS-Switchverify
timesync ntp
ntp enable
ntp server 10.0.0.1
Junos
set system ntp server 10.0.0.1
Huawei VRP
ntp-service unicast-server 10.0.0.1
MikroTik
/system ntp client set enabled=yes servers=10.0.0.1
FortiSwitch
config system ntp
  config ntpserver
    edit 1
      set server 10.0.0.1
Managed FortiSwitchverify
config switch-controller managed-switch
  edit <SN>
    (switches follow the FortiGate system time)
FortiGate
config system ntp
  set ntpsync enable
  set type custom
  config ntpserver
    edit 1
      set server 10.0.0.1
Cisco ASA / FTD
ntp server 10.0.0.1
PAN-OS
set deviceconfig system ntp-servers primary-ntp-server ntp-server-address 10.0.0.1

NTP status

Management
IOS-XE
show ntp status
NX-OS
show ntp peer-status
Arista EOS
show ntp status
AOS-CX
show ntp status
AOS-Switch
show ntp status
Junos
show ntp associations
Huawei VRP
display ntp-service status
MikroTik
/system ntp client print
FortiSwitchverify
diagnose sys ntp status
FortiGate
diagnose sys ntp status
Cisco ASA / FTD
show ntp status
PAN-OS
show ntp

Syslog server

Management
IOS-XE
logging host 10.0.0.9
NX-OS
logging server 10.0.0.9
Arista EOS
logging host 10.0.0.9
AOS-CX
logging 10.0.0.9
AOS-Switch
logging 10.0.0.9
Junos
set system syslog host 10.0.0.9 any notice
Huawei VRP
info-center loghost 10.0.0.9
MikroTik
/system logging action add name=remote target=remote remote=10.0.0.9
/system logging add topics=info action=remote
FortiSwitch
config log syslogd setting
  set status enable
  set server 10.0.0.9
Managed FortiSwitchverify
config switch-controller switch-log
  set status enable
FortiGate
config log syslogd setting
  set status enable
  set server 10.0.0.9
Cisco ASA / FTD
logging enable
logging host inside 10.0.0.9
PAN-OSverify
set shared log-settings syslog SYS server SRV server 10.0.0.9

Show the log

Management
IOS-XE
show logging
NX-OS
show logging last 100
Arista EOS
show logging
AOS-CX
show logging
AOS-Switch
show logging
Junos
show log messages
Huawei VRP
display logbuffer
MikroTik
/log print
FortiSwitch
execute log display
FortiGate
execute log filter category 0
execute log display
Cisco ASA / FTD
show logging
PAN-OS
show log system
show log traffic

SNMP community (v2c)

Management
IOS-XE
snmp-server community PUBLIC RO
NX-OS
snmp-server community PUBLIC ro
Arista EOS
snmp-server community PUBLIC ro
AOS-CXverify
snmp-server vrf mgmt
snmp-server community PUBLIC
AOS-Switch
snmp-server community PUBLIC operator
Junos
set snmp community PUBLIC authorization read-only
Huawei VRP
snmp-agent
snmp-agent community read PUBLIC
MikroTik
/snmp community add name=PUBLIC addresses=10.0.0.0/24
FortiSwitch
config system snmp community
  edit 1
    set name PUBLIC
Managed FortiSwitchverify
config switch-controller snmp-community
  edit 1
    set name PUBLIC
FortiGate
config system snmp community
  edit 1
    set name PUBLIC
Cisco ASA / FTD
snmp-server community PUBLIC
snmp-server host inside 10.0.0.9 poll
PAN-OSverify
set deviceconfig system snmp-setting access-setting version v2c snmp-community-string PUBLIC

Prefer SNMPv3 where the platform supports it.

Back up the configuration

Management
IOS-XE
copy running-config tftp://10.0.0.1/sw1.cfg
NX-OS
copy running-config tftp://10.0.0.1/sw1.cfg vrf management
Arista EOS
copy running-config flash:sw1.cfg
AOS-CX
copy running-config tftp://10.0.0.1/sw1.cfg vrf mgmt
AOS-Switch
copy running-config tftp 10.0.0.1 sw1.cfg
Junosverify
show configuration | save /var/tmp/sw1.conf
Huawei VRP
tftp 10.0.0.1 put vrpcfg.zip
MikroTik
/export file=sw1
/system backup save name=sw1
FortiSwitch
execute backup config tftp sw1.cfg 10.0.0.1
Managed FortiSwitch
execute backup config tftp fgt.cfg 10.0.0.1
FortiGate
execute backup config tftp fgt.cfg 10.0.0.1
Cisco ASA / FTD
copy running-config tftp://10.0.0.1/asa.cfg
PAN-OSverify
scp export configuration from running-config.xml to [email protected]:/backup/

A FortiGate backup includes the managed switch settings.

DNS servers

Management
IOS-XE
ip name-server 10.0.0.53
ip domain name example.com
NX-OS
ip name-server 10.0.0.53
ip domain-name example.com
Arista EOS
ip name-server 10.0.0.53
AOS-CX
ip dns server-address 10.0.0.53
AOS-Switch
ip dns server-address priority 1 10.0.0.53
Junos
set system name-server 10.0.0.53
Huawei VRP
dns server 10.0.0.53
MikroTik
/ip dns set servers=10.0.0.53
FortiSwitch
config system dns
  set primary 10.0.0.53
FortiGate
config system dns
  set primary 10.0.0.53
  set secondary 10.0.0.54
Cisco ASA / FTD
dns server-group DefaultDNS
 name-server 10.0.0.53
PAN-OS
set deviceconfig system dns-setting servers primary 10.0.0.53

Time zone

Management
IOS-XE
clock timezone CET 1
clock summer-time CEST recurring
NX-OS
clock timezone CET 1 0
clock summer-time CEST 5 sun mar 02:00 5 sun oct 03:00 60
Arista EOSverify
clock timezone Europe/Brussels
Junos
set system time-zone Europe/Brussels
Huawei VRP
clock timezone CET add 01:00:00
MikroTik
/system clock set time-zone-name=Europe/Brussels
FortiGateverify
config system global
  set timezone "Europe/Brussels"
Cisco ASA / FTD
clock timezone CET 1
PAN-OS
set deviceconfig system timezone Europe/Brussels

SNMPv3 user

Management
IOS-XE
snmp-server group G v3 priv
snmp-server user U G v3 auth sha <auth> priv aes 128 <priv>
NX-OS
snmp-server user U network-operator auth sha <auth> priv aes-128 <priv>
Arista EOSverify
snmp-server user U G v3 auth sha <auth> priv aes <priv>
Junosverify
set snmp v3 usm local-engine user U authentication-sha authentication-password <auth>
set snmp v3 usm local-engine user U privacy-aes128 privacy-password <priv>
FortiGate
config system snmp user
  edit "U"
    set security-level auth-priv
    set auth-proto sha
    set auth-pwd <auth>
    set priv-proto aes
    set priv-pwd <priv>
Cisco ASA / FTD
snmp-server group G v3 priv
snmp-server user U G v3 auth sha <auth> priv aes 128 <priv>

Remote access methods allowed on an interface

Management
Junos
set system services ssh
set system services netconf ssh
MikroTik
/ip service set ssh address=10.0.99.0/24
FortiGate
config system interface
  edit "port1"
    set allowaccess ping https ssh snmp fgfm
Cisco ASA / FTD
ssh 10.0.99.0 255.255.255.0 management
http 10.0.99.0 255.255.255.0 management
PAN-OS
set network profiles interface-management-profile MGMT ssh yes https yes ping yes
set network interface ethernet ethernet1/1 layer3 interface-management-profile MGMT

On FortiGate this is per interface; on PAN-OS it is a management profile; on ASA the source network is part of the command.

PoE status

PoE
IOS-XE
show power inline
AOS-CXverify
show power-over-ethernet brief
AOS-Switch
show power-over-ethernet brief
Junos
show poe interface
Huawei VRPverify
display poe information
MikroTik
/interface ethernet poe print
FortiSwitch
get switch poe inline
Managed FortiSwitchverify
diagnose switch-controller switch-info poe <SN>

NX-OS has no PoE.

PoE on / off for a port

PoE
IOS-XE
power inline auto
power inline never
AOS-CXverify
power-over-ethernet
no power-over-ethernet
AOS-Switch
interface 1
 power-over-ethernet
 no power-over-ethernet
Junos
set poe interface ge-0/0/1 disable
Huawei VRPverify
interface GigabitEthernet0/0/1
 poe enable
 undo poe enable
MikroTik
/interface ethernet poe set ether1 poe-out=off
/interface ethernet poe set ether1 poe-out=auto-on
FortiSwitchverify
config switch physical-port
  edit port1
    set poe-status enable   (or disable)
Managed FortiSwitchverify
config ports
  edit port1
    set poe-status enable   (or disable)

Disable then enable to power-cycle a stuck access point or phone.

Cable test

Troubleshooting
IOS-XE
test cable-diagnostics tdr interface Gi1/0/1
show cable-diagnostics tdr interface Gi1/0/1
MikroTik
/interface ethernet cable-test ether1
FortiSwitchverify
diagnose switch physical-ports cable-diag port1

Optics (SFP) light levels

Troubleshooting
IOS-XE
show interfaces transceiver detail
NX-OS
show interface transceiver details
Arista EOS
show interfaces transceiver
AOS-CXverify
show interface 1/1/1 dom
AOS-Switchverify
show interfaces transceiver 1 detail
Junos
show interfaces diagnostics optics xe-0/0/1
Huawei VRP
display transceiver interface GigabitEthernet0/0/1 verbose
MikroTik
/interface ethernet monitor sfp1 once
FortiSwitchverify
get switch modules detail

Support bundle

Troubleshooting
IOS-XE
show tech-support
NX-OS
show tech-support
Arista EOS
show tech-support
AOS-CXverify
show tech
AOS-Switch
show tech
Junos
request support information
Huawei VRP
display diagnostic-information
MikroTik
/system sup-output name=sup
FortiGateverify
execute tac report
Cisco ASA / FTD
show tech-support
PAN-OSverify
scp export tech-support to [email protected]:/tmp/

Is the managed switch connected to the FortiGate?

Troubleshooting
Managed FortiSwitchverify
execute switch-controller get-conn-status
execute switch-controller diagnose-connection <SN>

Check FortiLink first when a managed FortiSwitch shows offline.

List files / images

Files & upgrades
IOS-XE
dir flash:
NX-OS
dir bootflash:
Arista EOS
dir flash:
AOS-CX
show images
AOS-Switch
show flash
Junos
file list /var/tmp/
show system storage
Huawei VRP
dir
MikroTik
/file print

Upgrade the software

Files & upgrades
IOS-XE
install add file flash:cat9k_iosxe.bin activate commit
NX-OS
install all nxos bootflash:nxos64-cs.bin
Arista EOS
copy tftp://10.0.0.1/EOS.swi flash:
boot system flash:EOS.swi
reload
AOS-CXverify
copy tftp://10.0.0.1/image.swi primary vrf mgmt
boot system primary
AOS-Switch
copy tftp flash 10.0.0.1 image.swi primary
boot system flash primary
Junos
request system software add /var/tmp/junos.tgz reboot
Huawei VRP
startup system-software image.cc
reboot
MikroTik
/system package update check-for-updates
/system package update install
FortiSwitch
execute restore image tftp FSW_image.out 10.0.0.1
FortiGate
execute restore image tftp FGT_image.out 10.0.0.1
Cisco ASA / FTD
copy tftp://10.0.0.1/asa.bin disk0:
boot system disk0:/asa.bin
PAN-OSverify
request system software download version 11.1.0
request system software install version 11.1.0

Managed FortiSwitches are upgraded from the FortiGate (WiFi & Switch Controller > Managed FortiSwitch).

Factory reset

Files & upgrades
IOS-XE
write erase
reload
NX-OS
write erase
reload
Arista EOS
write erase
reload
AOS-CXverify
erase all zeroize
AOS-Switchverify
erase startup-config
reload
Junos
request system zeroize
Huawei VRP
reset saved-configuration
reboot
MikroTik
/system reset-configuration no-defaults=yes
FortiSwitchverify
execute factoryreset
FortiGate
execute factoryreset
Cisco ASA / FTD
configure factory-default
PAN-OSverify
request system private-data-reset

Allow traffic through the firewall (policy)

Firewall policy & NAT
FortiGate
config firewall policy
  edit 10
    set name "LAN-to-WAN"
    set srcintf "lan"
    set dstintf "wan1"
    set srcaddr "all"
    set dstaddr "all"
    set action accept
    set schedule "always"
    set service "ALL"
    set nat enable
    set logtraffic all
  next
end
Cisco ASA / FTD
access-list INSIDE-IN extended permit tcp 192.168.10.0 255.255.255.0 any eq 443
access-group INSIDE-IN in interface inside
PAN-OS
set rulebase security rules LAN-to-WAN from trust to untrust source any destination any application any service application-default action allow log-end yes

FortiGate and PAN-OS rules are explicit about from/to zones or interfaces; an ASA ACL is bound to one interface and direction.

Show policies and hit counts

Firewall policy & NAT
FortiGateverify
show firewall policy
diagnose firewall iprope list 100004
Cisco ASA / FTD
show access-list INSIDE-IN
PAN-OSverify
show rule-hit-count vsys vsys-name vsys1 rule-base security rules all

Which rule would match this packet?

Firewall policy & NAT
FortiGateverify
diagnose firewall iprope lookup 10.0.0.5 12345 8.8.8.8 443 tcp port2
Cisco ASA / FTD
packet-tracer input inside tcp 10.0.0.5 12345 8.8.8.8 443
PAN-OS
test security-policy-match from trust to untrust source 10.0.0.5 destination 8.8.8.8 protocol 6 destination-port 443

Move a policy up or down

Firewall policy & NAT
FortiGate
config firewall policy
  move 20 before 10
Cisco ASA / FTD
access-list INSIDE-IN line 1 extended permit tcp any any eq 22
PAN-OS
move rulebase security rules R2 before R1

ASA cannot move an entry: add it again at the line number you want, then remove the old one.

Address objects and groups

Firewall policy & NAT
FortiGate
config firewall address
  edit "SRV1"
    set subnet 10.0.0.10 255.255.255.255
  next
  edit "EXAMPLE"
    set type fqdn
    set fqdn "example.com"
  next
end
config firewall addrgrp
  edit "SERVERS"
    set member "SRV1" "SRV2"
Cisco ASA / FTD
object network SRV1
 host 10.0.0.10
object-group network SERVERS
 network-object object SRV1
PAN-OS
set address SRV1 ip-netmask 10.0.0.10/32
set address-group SERVERS static [ SRV1 SRV2 ]

Service (port) objects

Firewall policy & NAT
FortiGate
config firewall service custom
  edit "TCP-8443"
    set tcp-portrange 8443
  next
end
config firewall service group
  edit "WEB"
    set member "HTTP" "HTTPS" "TCP-8443"
Cisco ASA / FTD
object service TCP-8443
 service tcp destination eq 8443
object-group service WEB tcp
 port-object eq 80
 port-object eq 443
PAN-OS
set service TCP-8443 protocol tcp port 8443
set service-group WEB members [ service-http service-https TCP-8443 ]

Source NAT (internet access)

Firewall policy & NAT
FortiGate
(in the policy)
  set nat enable                 # use the outgoing interface address

config firewall ippool
  edit "POOL1"
    set startip 203.0.113.10
    set endip 203.0.113.20
  next
end
(in the policy)
  set ippool enable
  set poolname "POOL1"
Cisco ASA / FTD
object network LAN
 subnet 192.168.10.0 255.255.255.0
 nat (inside,outside) dynamic interface
PAN-OSverify
set rulebase nat rules SNAT from trust to untrust source any destination any source-translation dynamic-ip-and-port interface-address interface ethernet1/1

Destination NAT (port forward)

Firewall policy & NAT
FortiGate
config firewall vip
  edit "WEB-VIP"
    set extintf "wan1"
    set extip 203.0.113.10
    set mappedip "10.0.0.10"
    set portforward enable
    set extport 443
    set mappedport 443
    set protocol tcp
  next
end
(use "WEB-VIP" as dstaddr in the policy)
Cisco ASA / FTD
object network WEB
 host 10.0.0.10
 nat (inside,outside) static 203.0.113.10 service tcp 443 443
access-list OUTSIDE-IN extended permit tcp any object WEB eq 443
PAN-OSverify
set rulebase nat rules DNAT-WEB from untrust to untrust source any destination 203.0.113.10 service service-https destination-translation translated-address 10.0.0.10
set rulebase security rules WEB from untrust to dmz destination 203.0.113.10 service service-https action allow

FortiGate: the policy destination is the VIP object. ASA 8.3+: the ACL uses the real (private) address. PAN-OS: the security rule matches the pre-NAT address and the post-NAT destination zone.

NAT table and translations

Firewall policy & NAT
FortiGate
show firewall vip
show firewall ippool
Cisco ASA / FTD
show nat
show xlate
PAN-OS
show running nat-policy

Session table (filtered)

Firewall policy & NAT
FortiGate
diagnose sys session filter src 10.0.0.5
diagnose sys session filter dport 443
diagnose sys session list
diagnose sys session filter clear
Cisco ASA / FTD
show conn address 10.0.0.5
show conn port 443
PAN-OS
show session all filter source 10.0.0.5 destination-port 443

Clear sessions

Firewall policy & NAT
FortiGate
diagnose sys session filter src 10.0.0.5
diagnose sys session clear
Cisco ASA / FTD
clear conn address 10.0.0.5
PAN-OS
clear session all filter source 10.0.0.5

Clearing sessions drops live traffic: filter first, then clear.

Log what a policy matches

Firewall policy & NAT
FortiGate
(in the policy)
  set logtraffic all          # or utm
Cisco ASA / FTD
access-list INSIDE-IN extended permit tcp any any eq 443 log
PAN-OS
set rulebase security rules LAN-to-WAN log-end yes

Policy to the firewall itself (local-in / control plane)

Firewall policy & NAT
FortiGate
config firewall local-in-policy
  edit 1
    set intf "wan1"
    set srcaddr "ADMIN-NETS"
    set dstaddr "all"
    set action accept
    set service "HTTPS" "SSH"
    set schedule "always"
Cisco ASA / FTDverify
access-list MGMT-IN extended permit tcp 10.0.99.0 255.255.255.0 any eq 22
access-group MGMT-IN in interface outside control-plane
PAN-OS
set network profiles interface-management-profile MGMT ssh yes https yes permitted-ip 10.0.99.0/24

Internet service database (apps and cloud IP ranges)

Firewall policy & NAT
FortiGateverify
config firewall policy
  edit 20
    set internet-service enable
    set internet-service-name "Microsoft-Office365"
PAN-OS
set rulebase security rules O365 application ms-office365

FortiGate maintains the changing IP ranges of well-known services itself.

Traffic shaping (limit bandwidth)

Firewall policy & NAT
FortiGateverify
config firewall shaper traffic-shaper
  edit "LIMIT-10M"
    set maximum-bandwidth 10240
  next
end
config firewall shaping-policy
  edit 1
    set service "ALL"
    set srcaddr "GUESTS"
    set dstaddr "all"
    set traffic-shaper "LIMIT-10M"
Cisco ASA / FTDverify
policy-map POLICE
 class class-default
  police output 10000000
service-policy POLICE interface outside
PAN-OS
(QoS profile, QoS policy rule and QoS enabled on the egress interface:
 easiest in the web UI under Network > QoS)

IPsec site-to-site tunnel (route-based)

VPN & tunnels
FortiGate
config vpn ipsec phase1-interface
  edit "TO-BRANCH"
    set interface "wan1"
    set ike-version 2
    set remote-gw 198.51.100.2
    set psksecret <key>
    set proposal aes256-sha256
    set dpd on-idle
  next
end
config vpn ipsec phase2-interface
  edit "TO-BRANCH"
    set phase1name "TO-BRANCH"
    set proposal aes256-sha256
    set src-subnet 10.0.0.0 255.255.255.0
    set dst-subnet 10.1.0.0 255.255.255.0
  next
end
Cisco ASA / FTDverify
crypto ikev2 policy 10
 encryption aes-256
 integrity sha256
 group 14
 prf sha256
crypto ikev2 enable outside
crypto ipsec ikev2 ipsec-proposal AES256
 protocol esp encryption aes-256
 protocol esp integrity sha-256
crypto ipsec profile VTI
 set ikev2 ipsec-proposal AES256
tunnel-group 198.51.100.2 type ipsec-l2l
tunnel-group 198.51.100.2 ipsec-attributes
 ikev2 remote-authentication pre-shared-key <key>
 ikev2 local-authentication pre-shared-key <key>
interface Tunnel1
 nameif TO-BRANCH
 ip address 169.254.10.1 255.255.255.252
 tunnel source interface outside
 tunnel destination 198.51.100.2
 tunnel mode ipsec ipv4
 tunnel protection ipsec profile VTI
PAN-OSverify
set network ike gateway GW1 protocol ikev2 local-address interface ethernet1/1 peer-address ip 198.51.100.2 authentication pre-shared-key key <key>
set network ipsec crypto-profiles ipsec-crypto-profiles IPSEC esp encryption aes-256-cbc authentication sha256
set network tunnel ipsec TUN1 auto-key ike-gateway GW1 ipsec-crypto-profile IPSEC tunnel-interface tunnel.1

On FortiGate also add a static route and a policy in each direction for the tunnel interface; on ASA route the remote subnet into the tunnel (route TO-BRANCH 10.1.0.0 255.255.255.0 169.254.10.2).

IPsec status

VPN & tunnels
IOS-XE
show crypto ikev2 sa
show crypto ipsec sa
FortiGate
get vpn ipsec tunnel summary
diagnose vpn tunnel list name TO-BRANCH
diagnose vpn ike gateway list
Cisco ASA / FTD
show crypto ikev2 sa
show crypto ipsec sa
PAN-OS
show vpn ike-sa
show vpn ipsec-sa

Debug an IPsec tunnel that will not come up

VPN & tunnels
FortiGate
diagnose vpn ike log-filter dst-addr4 198.51.100.2
diagnose debug application ike -1
diagnose debug enable
(then: diagnose debug disable / diagnose debug reset)
Cisco ASA / FTDverify
debug crypto ikev2 protocol 127
debug crypto ikev2 platform 127
PAN-OSverify
less mp-log ikemgr.log

Restart a tunnel

VPN & tunnels
FortiGateverify
diagnose vpn ike gateway clear name TO-BRANCH
Cisco ASA / FTD
clear crypto ikev2 sa
PAN-OSverify
clear vpn ike-sa gateway GW1
clear vpn ipsec-sa tunnel TUN1

GRE tunnel

VPN & tunnels
IOS-XE
interface Tunnel0
 ip address 10.255.0.1 255.255.255.252
 tunnel source GigabitEthernet0/0
 tunnel destination 198.51.100.2
NX-OS
feature tunnel
interface Tunnel0
 ip address 10.255.0.1/30
 tunnel source Ethernet1/1
 tunnel destination 198.51.100.2
Arista EOSverify
interface Tunnel0
 tunnel mode gre
 tunnel source 203.0.113.2
 tunnel destination 198.51.100.2
 ip address 10.255.0.1/30
Junosverify
set interfaces gr-0/0/0 unit 0 tunnel source 203.0.113.2 destination 198.51.100.2
set interfaces gr-0/0/0 unit 0 family inet address 10.255.0.1/30
Huawei VRPverify
interface Tunnel0/0/1
 tunnel-protocol gre
 source 203.0.113.2
 destination 198.51.100.2
 ip address 10.255.0.1 30
MikroTik
/interface gre add name=gre1 local-address=203.0.113.2 remote-address=198.51.100.2
/ip address add address=10.255.0.1/30 interface=gre1
FortiGate
config system gre-tunnel
  edit "gre1"
    set interface "wan1"
    set local-gw 203.0.113.2
    set remote-gw 198.51.100.2

Remote-access VPN users

VPN & tunnels
FortiGateverify
get vpn ssl monitor
diagnose vpn ike gateway list
Cisco ASA / FTD
show vpn-sessiondb anyconnect
PAN-OSverify
show global-protect-gateway current-user

Configure a two-unit cluster

High availability
FortiGate
config system ha
  set group-name "HA1"
  set mode a-p
  set password <key>
  set hbdev "ha1" 50 "ha2" 100
  set priority 200
  set override disable
end
Cisco ASA / FTD
failover lan unit primary
failover lan interface FOLINK GigabitEthernet0/3
failover interface ip FOLINK 10.255.0.1 255.255.255.252 standby 10.255.0.2
failover
PAN-OSverify
set deviceconfig high-availability enabled yes group group-id 1 mode active-passive
set deviceconfig high-availability interface ha1 port ha1-a ip-address 10.255.0.1 netmask 255.255.255.252

Cluster status

High availability
FortiGate
get system ha status
diagnose sys ha status
Cisco ASA / FTD
show failover
PAN-OS
show high-availability state

Check that the cluster is in sync

High availability
FortiGate
diagnose sys ha checksum cluster
execute ha synchronize start
Cisco ASA / FTD
write standby
PAN-OSverify
show high-availability state-synchronization
request high-availability sync-to-remote running-config

Force a failover

High availability
FortiGateverify
diagnose sys ha reset-uptime
Cisco ASA / FTD
failover active   (on the standby unit)
PAN-OS
request high-availability state suspend
request high-availability state functional

On FortiGate with override disabled, resetting the uptime makes the other unit win the next election.

Log in to the other cluster unit

High availability
FortiGateverify
execute ha manage 1 admin

Understand the FortiOS CLI structure

FortiGate system
FortiGate
config <table>        enter a section
  edit <name>         create or open an entry
    set <key> <value>
  next                finish an entry
end                   save and leave the section
abort                 leave without saving
show / get / diagnose / execute
?  and <TAB>          help and completion

Changes apply when you leave the section with "end".

Add to a list instead of replacing it

FortiGate system
FortiGate
config firewall addrgrp
  edit "SERVERS"
    append member "SRV3"
    unselect member "SRV1"
    show

"set member" REPLACES the whole list: use "append" to add one entry and "unselect" to remove one.

Management ports and trusted hosts

FortiGate system
FortiGate
config system global
  set admin-sport 8443
  set admin-ssh-port 2222
end
config system admin
  edit "admin2"
    set trusthost1 10.0.99.0 255.255.255.0

VDOMs (virtual firewalls)

FortiGate system
FortiGate
config system global
  set vdom-mode multi-vdom
end
config vdom
  edit CUSTOMER-A
  next
end
config vdom
  edit root
  (commands for that VDOM)
config global
  (commands for the whole box)
Cisco ASA / FTDverify
mode multiple
context CUSTOMER-A
PAN-OS
set vsys vsys2 display-name CUSTOMER-A

VLAN interface

FortiGate system
FortiGate
config system interface
  edit "vlan10"
    set vdom "root"
    set vlanid 10
    set interface "port2"
    set ip 10.0.10.1 255.255.255.0
    set allowaccess ping
  next
end
Cisco ASA / FTD
interface GigabitEthernet0/1.10
 vlan 10
 nameif users
 security-level 100
 ip address 10.0.10.1 255.255.255.0
PAN-OS
set network interface ethernet ethernet1/2 layer3 units ethernet1/2.10 tag 10 ip 10.0.10.1/24

Aggregate (LACP) interface

FortiGate system
FortiGate
config system interface
  edit "agg1"
    set type aggregate
    set member "port3" "port4"
    set lacp-mode active
Cisco ASA / FTD
interface Port-channel1
interface GigabitEthernet0/2
 channel-group 1 mode active
PAN-OS
set network aggregate-ethernet ae1 layer3 ip 10.0.0.1/24
set network interface ethernet ethernet1/3 aggregate-group ae1

Zones and software switches

FortiGate system
FortiGate
config system zone
  edit "LAN-ZONE"
    set interface "port2" "port3"
end
config system switch-interface
  edit "lan"
    set member "lan1" "lan2"
PAN-OS
set zone trust network layer3 [ ethernet1/2 ethernet1/3 ]

A zone groups interfaces for policies. A software switch bridges them into one L2 domain.

DHCP server

FortiGate system
FortiGate
config system dhcp server
  edit 1
    set interface "port2"
    set default-gateway 192.168.10.1
    set netmask 255.255.255.0
    set dns-server1 1.1.1.1
    config ip-range
      edit 1
        set start-ip 192.168.10.100
        set end-ip 192.168.10.200
      next
    end
  next
end
Cisco ASA / FTD
dhcpd address 192.168.10.100-192.168.10.200 inside
dhcpd dns 1.1.1.1
dhcpd enable inside
PAN-OSverify
set network dhcp interface ethernet1/2 server option lease timeout 1440 dns primary 1.1.1.1
set network dhcp interface ethernet1/2 server ip-pool 192.168.10.100-192.168.10.200

DHCP leases

FortiGate system
FortiGate
execute dhcp lease-list
Cisco ASA / FTD
show dhcpd binding
PAN-OS
show dhcp server lease interface all

FortiGuard / update status

FortiGate system
FortiGateverify
execute update-now
diagnose autoupdate versions
diagnose debug rating

Full backup and restore

FortiGate system
FortiGate
execute backup config tftp fgt.cfg 10.0.0.1
execute restore config tftp fgt.cfg 10.0.0.1

Restoring a configuration reboots the FortiGate.

Attach security profiles to a policy

FortiGate profiles & users
FortiGate
config firewall policy
  edit 10
    set utm-status enable
    set ssl-ssh-profile "certificate-inspection"
    set av-profile "default"
    set webfilter-profile "default"
    set ips-sensor "default"
    set application-list "default"
  next
end
PAN-OS
set rulebase security rules LAN-to-WAN profile-setting group DEFAULT-PROFILES

certificate-inspection reads only the TLS handshake; deep-inspection decrypts traffic and needs the CA certificate installed on clients.

List the security profiles

FortiGate profiles & users
FortiGate
show antivirus profile
show webfilter profile
show ips sensor
show application list
show dnsfilter profile
show firewall ssl-ssh-profile

Local users and groups

FortiGate profiles & users
FortiGate
config user local
  edit "alice"
    set type password
    set passwd <password>
  next
end
config user group
  edit "STAFF"
    set member "alice"
Cisco ASA / FTD
username alice password <password>
PAN-OSverify
set shared local-user-database user alice phash <hash>

LDAP / Active Directory server

FortiGate profiles & users
FortiGate
config user ldap
  edit "AD"
    set server "10.0.0.20"
    set cnid "sAMAccountName"
    set dn "dc=example,dc=com"
    set type regular
    set username "CN=svc-fw,OU=Service,DC=example,DC=com"
    set password <password>
Cisco ASA / FTD
aaa-server AD protocol ldap
aaa-server AD (inside) host 10.0.0.20
 ldap-base-dn dc=example,dc=com
 ldap-login-dn CN=svc-fw,OU=Service,DC=example,DC=com
 ldap-login-password <password>
PAN-OSverify
set shared server-profile ldap AD server S1 address 10.0.0.20 port 389
set shared server-profile ldap AD base dc=example,dc=com bind-dn "CN=svc-fw,OU=Service,DC=example,DC=com" bind-password <password>

Test a RADIUS or LDAP login from the firewall

FortiGate profiles & users
FortiGate
diagnose test authserver radius ISE pap alice <password>
diagnose test authserver ldap AD alice <password>
Cisco ASA / FTD
test aaa-server authentication ISE host 10.0.0.10 username alice password <password>
PAN-OS
test authentication authentication-profile AUTH-PROFILE username alice password

Debug authentication problems

FortiGate profiles & users
FortiGate
diagnose debug application fnbamd -1
diagnose debug enable
Cisco ASA / FTD
debug radius all
debug aaa authentication
PAN-OSverify
less mp-log authd.log

SD-WAN members, health checks and rules

FortiGate SD-WAN & networking
FortiGateverify
config system sdwan
  set status enable
  config members
    edit 1
      set interface "wan1"
      set gateway 203.0.113.1
    next
    edit 2
      set interface "wan2"
      set gateway 198.51.100.1
    next
  end
  config health-check
    edit "Google"
      set server "8.8.8.8"
      set members 1 2
    next
  end
  config service
    edit 1
      set name "Voice"
      set mode sla
      set dst "all"
    next
  end
end
PAN-OS
(path monitoring: set network virtual-router default routing-table ip static-route R1 path-monitor ...)

Policies and routes then reference the SD-WAN zone, not the individual WAN interfaces.

SD-WAN status

FortiGate SD-WAN & networking
FortiGateverify
diagnose sys sdwan member
diagnose sys sdwan health-check
diagnose sys sdwan service4

FortiOS 7.0 and older: "diagnose sys sdwan service".

Policy-based routing

FortiGate SD-WAN & networking
IOS-XE
route-map PBR permit 10
 match ip address SRC-NETS
 set ip next-hop 198.51.100.1
interface Vlan10
 ip policy route-map PBR
FortiGateverify
config router policy
  edit 1
    set input-device "port2"
    set src "10.0.0.0/255.255.255.0"
    set dst "0.0.0.0/0.0.0.0"
    set gateway 198.51.100.1
    set output-device "wan2"
Cisco ASA / FTDverify
route-map PBR permit 10
 match ip address SRC-NETS
 set ip next-hop 198.51.100.1
PAN-OSverify
set rulebase pbf rules R1 from zone trust source 10.0.0.0/24 action forward egress-interface ethernet1/2 nexthop ip-address 198.51.100.1

WAN link monitor (failover without SD-WAN)

FortiGate SD-WAN & networking
FortiGateverify
config system link-monitor
  edit "ISP1"
    set srcintf "wan1"
    set server "8.8.8.8"
    set gateway-ip 203.0.113.1
    set interval 1000
    set failtime 5
Cisco ASA / FTD
sla monitor 1
 type echo protocol ipIcmpEcho 8.8.8.8 interface outside
sla monitor schedule 1 life forever start-time now
track 1 rtr 1 reachability
route outside 0.0.0.0 0.0.0.0 203.0.113.1 1 track 1

FortiLink: let the FortiGate manage a FortiSwitch

FortiGate SD-WAN & networking
FortiGateverify
config system interface
  edit "fortilink"
    set type aggregate
    set member "port5"
    set fortilink enable
    set ip 10.255.1.1 255.255.255.0
    set allowaccess ping capwap fabric
end
config switch-controller managed-switch
  edit <SN>
    set fsw-wan1-admin enable

The wizard under WiFi & Switch Controller > FortiLink Interface creates this; the last line authorises a discovered switch.

List managed FortiAPs

FortiGate SD-WAN & networking
FortiGateverify
get wireless-controller wtp-status
diagnose wireless-controller wlac -c wtp

Trace a packet through the firewall (debug flow)

FortiGate diagnostics
FortiGate
diagnose debug reset
diagnose debug flow filter addr 10.0.0.5
diagnose debug flow show function-name enable
diagnose debug flow trace start 100
diagnose debug enable
(when done)
diagnose debug disable
diagnose debug reset
Cisco ASA / FTD
packet-tracer input inside tcp 10.0.0.5 12345 8.8.8.8 443 detailed
PAN-OS
test security-policy-match from trust to untrust source 10.0.0.5 destination 8.8.8.8 protocol 6 destination-port 443

The flow output names the policy ID or the reason for a drop ("no session matched", "denied by forward policy check", "Denied by NAT" …).

Capture packets

FortiGate diagnostics
FortiGate
diagnose sniffer packet any "host 10.0.0.5 and port 443" 4 0 l
Cisco ASA / FTD
capture CAP interface inside match tcp host 10.0.0.5 any eq 443
show capture CAP
PAN-OSverify
debug dataplane packet-diag set filter match source 10.0.0.5 destination-port 443
debug dataplane packet-diag set filter on
debug dataplane packet-diag set capture stage firewall file cap.pcap
debug dataplane packet-diag set capture on
(when done: set capture off, then view-pcap filter-pcap cap.pcap)

FortiGate verbosity 4 shows interface names; the final "l" prints local time stamps. On PAN-OS, tcpdump only sees the management port: transit traffic needs the dataplane capture.

Processes, CPU and memory hogs

FortiGate diagnostics
FortiGate
diagnose sys top 2 30
diagnose sys top-mem
diagnose sys top-summary
Cisco ASA / FTD
show processes cpu-usage sorted
PAN-OSverify
show running resource-monitor

Conserve mode (memory pressure)

FortiGate diagnostics
FortiGate
diagnose hardware sysinfo conserve
get system performance status

Interface and driver errors

FortiGate diagnostics
FortiGate
diagnose hardware deviceinfo nic port1
diagnose netlink interface list port1

Crash logs and technical support report

FortiGate diagnostics
FortiGateverify
diagnose debug crashlog read
execute tac report

Debug DHCP, DNS and routing daemons

FortiGate diagnostics
FortiGateverify
diagnose debug application dhcps -1
diagnose debug application dnsproxy -1
diagnose ip router command show "show ip ospf neighbor"
diagnose debug enable

ARP table and local addresses

FortiGate diagnostics
FortiGate
diagnose ip arp list
diagnose ip address list
get router info routing-table details 10.0.0.5
Cisco ASA / FTD
show arp
show ip address

Same idea, different words

Config style

IOS-XE
Flat lines in modes; "no" removes
NX-OS
Flat lines; "no" removes
Arista EOS
Flat lines (IOS-like); "no" removes
AOS-CX
Flat lines; "no" removes
AOS-Switch
Flat lines; "no" removes
Junos
Hierarchy; "set", "delete", then "commit"
Huawei VRP
Flat lines; "undo" removes
MikroTik
Menu paths (/ip address add …)
FortiSwitch
config / edit / set … next / end; "unset" removes
Managed FortiSwitch
Same, from the FortiGate
FortiGate
config / edit / set … next / end; "unset" removes
Cisco ASA / FTD
Flat lines; "no" removes
PAN-OS
"set" / "delete" then "commit"

Saving

IOS-XE
write memory
NX-OS
copy run start
Arista EOS
write memory
AOS-CX
write memory
AOS-Switch
write memory
Junos
commit
Huawei VRP
save
MikroTik
Automatic
FortiSwitch
Automatic
Managed FortiSwitch
Automatic
FortiGate
Automatic
Cisco ASA / FTD
write memory
PAN-OS
commit (candidate → running)

Interface names

IOS-XE
Gi1/0/1
NX-OS
Eth1/1
Arista EOS
Ethernet1
AOS-CX
1/1/1
AOS-Switch
1 or A1
Junos
ge-0/0/1
Huawei VRP
GigabitEthernet0/0/1
MikroTik
ether1
FortiSwitch
port1
Managed FortiSwitch
port1 under the switch serial
FortiGate
port1, wan1
Cisco ASA / FTD
GigabitEthernet0/0
PAN-OS
ethernet1/1

Link aggregation

IOS-XE
EtherChannel / Port-channel
NX-OS
Port-channel
Arista EOS
Port-Channel
AOS-CX
LAG
AOS-Switch
Trunk (trk1)
Junos
ae0 (aggregated Ethernet)
Huawei VRP
Eth-Trunk
MikroTik
Bonding
FortiSwitch
Trunk
Managed FortiSwitch
Trunk
FortiGate
Aggregate interface
Cisco ASA / FTD
Port-channel
PAN-OS
Aggregate Ethernet (ae1)

Two devices as one

IOS-XE
StackWise Virtual
NX-OS
vPC
Arista EOS
MLAG
AOS-CX
VSX
AOS-Switch
VSF
Junos
Virtual Chassis / MC-LAG
Huawei VRP
M-LAG / stack
MikroTik
MLAG (CRS)
FortiSwitch
MCLAG
Managed FortiSwitch
MCLAG over FortiLink
FortiGate
HA cluster (FGCP)
Cisco ASA / FTD
Failover pair
PAN-OS
HA pair

Edge port

IOS-XE
PortFast
NX-OS
port type edge
Arista EOS
portfast
AOS-CX
admin-edge
AOS-Switch
admin-edge-port
Junos
edge
Huawei VRP
edged-port
MikroTik
edge=yes
FortiSwitch
edge-port
Managed FortiSwitch
edge-port
FortiGate
no equivalent
Cisco ASA / FTD
no equivalent
PAN-OS
no equivalent

Neighbour protocol

IOS-XE
CDP + LLDP
NX-OS
CDP + LLDP
Arista EOS
LLDP
AOS-CX
LLDP
AOS-Switch
LLDP + CDP
Junos
LLDP
Huawei VRP
LLDP
MikroTik
MNDP + LLDP + CDP
FortiSwitch
LLDP
Managed FortiSwitch
LLDP
FortiGate
LLDP
Cisco ASA / FTD
no equivalent
PAN-OS
LLDP

Management VRF / plane

IOS-XE
Mgmt-vrf (optional)
NX-OS
management
Arista EOS
MGMT (optional)
AOS-CX
mgmt
AOS-Switch
no equivalent
Junos
me0 / vme
Huawei VRP
no equivalent
MikroTik
no equivalent
FortiSwitch
mgmt interface
Managed FortiSwitch
via FortiLink
FortiGate
mgmt port or any interface with allowaccess
Cisco ASA / FTD
management interface
PAN-OS
MGT port / management profile

Access list / firewall filter

IOS-XE
ACL
NX-OS
ACL
Arista EOS
ACL
AOS-CX
ACL
AOS-Switch
ACL
Junos
Firewall filter (term from/then)
Huawei VRP
ACL (rule numbers)
MikroTik
/ip firewall filter
FortiSwitch
ACL (classifier + action)
Managed FortiSwitch
ACL (classifier + action)
FortiGate
Policy with objects
Cisco ASA / FTD
ACL + access-group
PAN-OS
Security rule with zones

↑↓ move↵ openesc close