Every command the free NanoTech-kw Network Lab understands - 177 commands in 28 categories, each with its mode and an example. Try any of them on a simulated router or switch.
â–¶ Open the free Network LabenableuserEnter privileged EXEC mode (prompt changes from > to #).
disableprivReturn to user EXEC mode.
configure terminalprivEnter global configuration mode.
exitany configGo back one mode level.
endany configReturn straight to privileged EXEC mode.
do <command>any configRun an EXEC command (show, ping…) without leaving configuration mode.
? / helpanyList the commands available in the current mode.
copy running-config startup-configprivSave the configuration (labs are saved automatically too).
clearprivClear the terminal screen.
hostname <name>configRename the device.
interface <type><number>configEnter interface configuration mode. Short forms work: g0/0, fa0/1, s0/0/0, g0/0/1.
description <text>config-ifLabel an interface.
shutdownconfig-ifAdministratively disable the interface.
no shutdownconfig-ifEnable the interface (router ports start shut down).
speed / duplexconfig-ifAccepted for compatibility (no effect in the simulator).
ip address <ip> <mask>config-ifSet the interface's IPv4 address.
no ip addressconfig-ifRemove the IPv4 address.
ip default-gateway <ip>configLayer-2 switch: default gateway for its management SVI.
vlan <id>configCreate a VLAN and enter VLAN mode.
name <text>config-vlanName the VLAN.
no vlan <id>configDelete a VLAN (VLAN 1 can't be deleted).
switchport mode accessconfig-ifMake the port an access port (one VLAN).
switchport access vlan <id>config-ifPut an access port in a VLAN.
switchport mode trunkconfig-ifCarry all VLANs (802.1Q tagged, native VLAN 1) to another switch or a router.
switchport trunk encapsulation dot1qconfig-ifAccepted for compatibility with 3560/3650 switches.
show vlan briefprivList VLANs and their access ports.
show interfaces trunkprivList trunk ports and their state.
interface <port>.<n>configRouter: create a subinterface (router-on-a-stick).
encapsulation dot1Q <vlan>config-subifTie the subinterface to a VLAN tag.
interface vlan <id>configSwitch: create a VLAN interface (SVI). It starts shut down.
ip routingconfigLayer-3 switch: route between its SVIs / routed ports.
no switchportconfig-ifLayer-3 switch: turn the port into a routed port that takes an IP address.
no interface <name>configRemove a subinterface or SVI.
ip route <net> <mask> <next-hop>configAdd a static route via a next-hop address.
ip route <net> <mask> <exit-if>configStatic route out of an interface (good for serial links).
ip route 0.0.0.0 0.0.0.0 <next-hop>configDefault route (gateway of last resort).
ip route <net> <mask> <next-hop> <distance>configFloating static route (backup with a higher distance).
no ip route <net> <mask>configRemove a static route.
router ospf <process-id>configStart OSPF and enter router mode.
network <net> <wildcard> area <id>config-routerRun OSPF on interfaces inside this range.
passive-interface <if>config-routerAdvertise the network but send no hellos on the interface.
default-information originateconfig-routerAdvertise this router's default route to OSPF neighbours.
router-id <ip>config-routerSet the OSPF router ID.
no router ospf <id>configRemove OSPF.
show ip ospf neighborprivList OSPF neighbours (FULL state).
router eigrp <as-number>configStart EIGRP; neighbours must use the same AS number.
network <net> [wildcard]config-routerRun EIGRP on matching interfaces (no wildcard = the whole classful network).
passive-interface <if>config-routerAdvertise the network but form no neighbours on it.
no router eigrp <as>configRemove EIGRP.
show ip eigrp neighborsprivEIGRP neighbours.
show ip eigrp topologyprivSuccessors and feasible distances.
router ripconfigStart RIP and enter router mode.
version 2config-routerUse RIPv2.
network <classful-net>config-routerRun RIP on interfaces in this classful network.
no auto-summaryconfig-routerAccepted (RIPv2 best practice).
passive-interface <if>config-routerDon't send RIP updates out of the interface.
show ip protocolsprivShow running routing protocols and their networks.
ip dhcp pool <name>configCreate a DHCP pool on the router and enter dhcp-config mode.
network <net> <mask>config-dhcpSubnet the pool hands addresses from.
default-router <ip>config-dhcpGateway given to clients.
dns-server <ip>config-dhcpDNS server given to clients.
ip dhcp excluded-address <first> [last]configAddresses the pool must never hand out.
ip helper-address <server-ip>config-ifRelay DHCP broadcasts from this subnet to a server on another subnet.
show ip dhcp bindingprivShow addresses leased to clients.
ip nat insideconfig-ifMark the LAN-side interface.
ip nat outsideconfig-ifMark the Internet-side interface.
ip nat inside source list <acl> interface <if> overloadconfigPAT: translate addresses permitted by the ACL to the outside interface's address.
ip nat inside source static <local> <global>configStatic NAT: publish an inside host on a public address.
show ip nat translationsprivShow NAT entries created by traffic.
access-list <1-99> permit|deny <source>configStandard ACL: match by source only. Source: any | host <ip> | <ip> <wildcard>.
access-list <100-199> permit|deny <proto> <src> <dst>configExtended ACL: protocol ip | icmp | tcp | udp, source and destination.
access-list <n> permit ip any anyconfigAllow everything else (ACLs end with an implicit deny).
ip access-group <n> in|outconfig-ifApply an ACL to an interface in one direction.
no access-list <n>configDelete an ACL.
show access-listsprivShow all ACLs and their entries.
ipv6 unicast-routingconfigEnable IPv6 routing on a router.
ipv6 address <addr>/<len>config-ifSet an IPv6 address.
no ipv6 addressconfig-ifRemove the IPv6 address.
ipv6 route <prefix>/<len> <next-hop>configIPv6 static route.
show ipv6 interface briefprivIPv6 addresses per interface.
show ipv6 routeprivIPv6 routing table.
ipconfig /renew6hostGet an IPv6 address automatically (SLAAC) from the router's advertisement.
ipv6 router ospf <id>configStart OSPFv3.
ipv6 ospf <id> area <n>config-ifRun OSPFv3 on this interface.
show ipv6 ospf neighborprivOSPFv3 neighbours.
show ip interface briefprivEvery interface with its IP, status and protocol.
show ip routeprivIPv4 routing table (C, L, S, O, R codes).
show running-configprivThe whole current configuration.
show cdp neighborsprivDirectly connected Cisco devices.
show versionprivModel and interface count.
ping <ip>user/privSend 5 echo requests; the packet is animated and logged.
traceroute <ip>user/privList each router on the path.
show mac address-tableprivWhich MAC addresses the switch learned on which port.
show arpprivIP-to-MAC mappings the router knows.
show interfaces <if>privDetailed status, MAC, IP, bandwidth and packet counters.
show ip interface <if>privIP settings of one interface (helper, ACLs, NAT).
show interfaces descriptionprivStatus and descriptions of all interfaces.
show running-config interface <if>privConfiguration of one interface.
show ip route <ip> | static | connected | ospf | ripprivLook up one destination, or one route type.
ping <ip> repeat <n> size <n> source <ip|if>user/privExtended ping, e.g. from a loopback.
show history / show clock / show flashprivRecent commands, the time, the files in flash.
ipconfighostShow the IP address, mask and gateway.
ipconfig /allhostAlso MAC address, DHCP and DNS settings.
ipconfig /renewhostGet an address from DHCP.
ipconfig /releasehostGive the DHCP address back.
ping <ip | name>hostTest reachability (names need a DNS server).
tracert <ip | name>hostShow the routers on the path.
nslookup <name>hostAsk the DNS server for a name.
arp -ahostNeighbours on the same subnet with their MAC addresses.
clshostClear the screen.
show spanning-treeprivRoot bridge, this switch's ports, their role (Root/Desg/Altn) and state (FWD/BLK).
spanning-tree vlan <id> priority <n>configLower priority wins the root election (multiples of 4096).
spanning-tree vlan <id> root primaryconfigMake this switch the root bridge (priority 24576).
spanning-tree portfastconfig-ifEdge port for a single host - skips listening/learning.
spanning-tree bpduguard enableconfig-ifErr-disable the port if a switch is plugged into it.
interface range <ports>configConfigure several ports at once.
channel-group <n> mode active|passive|on|desirable|autoconfig-ifBundle ports into one logical link. LACP: active/passive, PAgP: desirable/auto, static: on.
show etherchannel summaryprivBundles and their member ports (P = bundled, s = suspended).
standby <group> ip <virtual-ip>config-ifShare a virtual gateway address between routers.
standby <group> priority <n>config-ifHigher priority becomes Active (default 100).
standby <group> preemptconfig-ifTake the Active role back when this router returns.
show standby briefprivHSRP state per interface.
switchport port-securityconfig-ifLimit which/how many MAC addresses may use an access port.
switchport port-security maximum <n>config-ifNumber of allowed MAC addresses.
switchport port-security mac-address stickyconfig-ifLearn and remember the first MAC addresses seen.
switchport port-security violation shutdown|restrict|protectconfig-ifWhat happens to an unknown device (shutdown = err-disable the port).
show port-securityprivSecure ports, address counts and violations.
show interfaces statusprivPort status including err-disabled.
ip domain-name <name>configNeeded before generating SSH keys.
crypto key generate rsaconfigCreate RSA keys - enables SSH.
username <name> secret <password>configLocal user account for login local.
enable secret <password>configPassword for the enable command on remote sessions.
line vty 0 4configConfigure the remote-access lines.
transport input ssh|telnet|allconfig-lineWhich remote protocols are allowed.
login localconfig-lineAsk for a username and password from the local user list.
ssh -l <user> <ip>hostFrom a PC: open an encrypted session to a router or switch.
telnet <ip>hostFrom a PC: unencrypted remote session.
http <ip | name>hostFrom a PC: open a web page (TCP port 80).
interface loopback <n>configA virtual interface that is always up - handy for router IDs and tests.
terminal length <0-512>user/privLines per page before --More--. 0 = no paging (Space = next page, Enter = next line, q = stop).
Ctrl+Z / Ctrl+CconfigLeave configuration mode straight to privileged EXEC (shows ^Z).
exit / logoutuserEnd the console session - press RETURN to start again.
<show command> | include <text>privOnly lines containing the text (regular expressions work).
<show command> | exclude <text>privHide lines containing the text.
<show command> | begin <text>privStart the output at the first matching line.
<show command> | section <text>privMatching sections with their indented lines.
<show command> | count <text>privCount matching lines.
copy running-config startup-configprivSave the running configuration to NVRAM (asks for the destination filename - press Enter).
write memoryprivSame as copy run start, without the question.
show startup-configprivThe saved configuration.
reloadprivRestart the device - unsaved changes are lost (it offers to save first).
erase startup-configprivDelete the saved configuration (factory reset after reload). Also: write erase.
default interface <if>configReset an interface to its factory settings.
system-viewuser viewEnter system view (like conf t). Prompt changes from <R1> to [R1].
quit / returnanyquit = one level up (like exit); return = back to user view (like end).
display ...anyHuawei's show: display ip interface brief | ip routing-table | vlan | current-configuration | ospf peer | this.
sysname <name>systemSet the device name (like hostname).
vlan batch 10 20 / vlan batch 10 to 20systemCreate several VLANs at once.
port link-type access|trunkinterfacePort mode (like switchport mode).
port default vlan <id> (HP: port access vlan <id>)interfaceAccess VLAN of the port.
port trunk allow-pass vlan all (HP: port trunk permit vlan all)interfaceVLANs allowed on a trunk.
ip address <ip> <mask|length>interfaceInterface address; the mask can be a length (24).
dot1q termination vid <vlan> (HP: vlan-type dot1q vid)interfaceRouter subinterface VLAN (router-on-a-stick).
interface Vlanif<id>systemVLAN interface on a Huawei L3 switch (routes by default).
ip route-static <net> <mask> <next-hop>systemStatic route.
ospf 1 → area 0 → network <net> <wildcard>systemOSPF: areas are their own view on Huawei.
ip pool <name> → gateway-list / network <net> mask <m> / dns-listsystemDHCP server pool.
undo <command>anyRemove a setting (like no).
saveuser viewSave the configuration (like write).
interface ethernet 1/1/1configDell port names; otherwise very close to Cisco (switchport access vlan, show running-configuration).
ip address <ip>/<length>interfaceAddress with prefix length.
interface 1/1/1configAruba port names (member/slot/port).
vlan access <id>interfaceAccess VLAN of the port.
vlan trunk allowed allinterfaceMake the port a trunk.
routing / ip address <ip>/<len>interfaceRouted port with an address.
AbbreviationsanyAny unambiguous prefix works, like on real IOS: conf t, int g0/0, sh ip int br, no shut, sw acc vlan 10.
Tab / ↑ ↓anyTab completes a word; the arrow keys recall earlier commands.