Switches: IOS


Packet Tracer uses a simplified model of the Cisco IOS. Click on the CLI tab in the switch configuration window to access the Cisco IOS command line interface for the switch. Use the Copy and Paste buttons to copy and paste text to and from the command line. This page lists the Cisco IOS command tree for Packet Tracer switches. For the Cisco Catalyst 3560-PS switch with Layer 3 capabilities, refer to the "Router IOS" page for additional commands. The tree contains only Cisco IOS command chains that are supported in Packet Tracer.

 

User Mode

  • <1-99>
  • connect WORD
  • disconnect <1-16>
  • enable <0-15>
  • exit
  • logout
  • ping WORD
  • resume [ <1-16> | WORD ]
  • show
    • arp
    • cdp
      • entry
        • * [ protocol | version ]
        • WORD [ protocol | version ]
      • interface
        • Ethernet <0-9>/<0-24>[.][<0-4294967295>]
        • FastEthernet <0-9>/<0-24>[.][<0-4294967295>]
        • GigabitEthernet <0-9>/<0-24>[.][<0-4294967295>]
      • neighbors [ detail ]
    • clock
    • crypto key mypubkey rsa
    • etherchannel
      • load-balance
      • port-channel
      • summary
    • flash:
    • history
    • interface
      • Ethernet <0-9>/<0-24> [ switchport ]
      • FastEthernet <0-9>/<0-24> [ switchport ]
      • GigabitEthernet <0-9>/<0-24> [ switchport ]
      • Vlan <1-1005>
      • etherchannel
      • switchport
      • trunk
    • ip interface
      • Vlan <1-1005>
      • brief
    • ipv6 interface Vlan <1-1005>
    • mac address-table
      • dynamic
      • interfaces
        • Ethernet <0-9>/<0-24>
        • FastEthernet <0-9>/<0-24>
        • GigabitEthernet <0-9>/<0-24>
        • Port-channel <1-64>
      • static
    • mls [ qos ] [ interface ] [ FastEthernet <0-9>/<0-24> ]
    • privilege
    • sessions
    • ssh
    • tcp [ brief ]
    • terminal
    • users
    • version
    • vlan
      • brief
      • id <1-1005>
      • name [ WORD ]
    • vtp [ counters | status ]
  • telnet [ WORD ]
  • terminal history size [ <0-256> ]
  • traceroute WORD

Enable Mode

  • <1-99>
  • clear
    • access-list counters [ <1-199> | <1300-2699> | WORD ]
    • arp-cache
    • cdp table
    • mac address-table
    • port-security [ all | configured | dynamic | sticky ]
    • vtp counters
  • clock set hh:mm:ss [ <1-31> MONTH <1993-2035> | MONTH <1-31> <1993-2035> ]
  • configure terminal
  • connect [ WORD ]
  • copy
    • flash
      • ftp:
      • running-config
      • startup-config
      • tftp:
    • ftp:
      • flash:
      • running-config
      • startup-config
    • running-config
      • startup-config
      • tftp:
      • flash:
      • ftp:
    • startup-config
      • running-config
      • tftp:
      • flash:
      • ftp:
  • debug
    • ip icmp
    • sw-vlan
      • packets
      • vtp events
  • delete [ WORD | flash: ]
  • dir [ flash: ]
  • disable
  • disconnect <1-16>
  • enable [ <0-15> ]
  • erase startup-config
  • exit
  • logout
  • more flash: WORD
  • no debug
    • all
    • ip icmp
    • sw-vlan
      • packets
      • vtp events
  • ping [ WORD ]
    • [ Protocol ] [ Target IP address ] [ Repeat count ] [ Datagram size ] [ Timeout in seconds ] [ Extended commands ] [ Sweep range of sizes ]
  • reload
  • resume [ <1-16> | WORD ]
  • setup
  • show
    • access-list [ <1-99> | WORD ]
    • arp
    • boot
    • cdp
      • entry
        • * [ protocol | version ]
        • WORD [ protocol | version ]
      • interfaces
        • Ethernet <0-9>/<0-24>[.][<0-4294967295>]
        • FastEthernet <0-9>/<0-24>[.][<0-4294967295>]
        • GigabitEthernet <0-9>/<0-24>[.][<0-4294967295>]
      • neighbors [ detail ]
    • clock
    • crypto key mypubkey rsa
    • dhcp lease
    • dtp
    • etherchannel [ load-balance | port-channel | summary ]
    • flash:
    • history
    • hosts
    • interfaces
      • Ethernet <0-9>/<0-24>[ switchport ]
      • FastEthernet <0-9>/<0-24>[ switchport ]
      • GigabitEthernet <0-9>/<0-24>[ switchport ]
      • Vlan <1-1005>
      • etherchannel
      • switchport
      • trunk
    • ip
      • access-list [ <1-199> | WORD ]
      • arp
      • dhcp binding
      • interface
        • vlan <1-1005>
        • brief
      • ssh
    • ipv6 interface Vlan <1-1005>
    • logging
    • mac address-table
      • static
      • dynamic
      • interfaces
        • Ethernet <0-9>/<0-24>
        • FastEthernet <0-9>/<0-24>
        • GigabitEthernet <0-9>/<0-24>
        • Port-channel <1-64>
    • mls qos interface [ FastEthernet <0-9>/<0-24> ]
    • port-security
      • address
      • interface
        • Ethernet <0-9>/<0-24>
        • FastEthernet <0-9>/<0-24>
        • GigabitEthernet <0-9>/<0-24>
    • privilege
    • processes
    • running-config
    • sessions
    • snmp
    • spanning-tree
      • active
      • detail
      • inconsistentports
      • interface
        • FastEthernet <0-9>/<0-24> [ portfast ]
        • GigabitEthernet <0-9>/<0-24> [ portfast ]
        • Port-channel <1-6>
        • Vlan <1-4094> [ portfast ]
      • summary [ totals ]
      • vlan WORD
    • ssh
    • startup-config
    • storm-control broadcast
    • tcp [ brief ]
    • tech-support
    • terminal
    • users
    • version
    • vlan [ brief | id <1-1005> | name WORD ]
    • vtp
      • counters
      • password
      • status
  • ssh
    • -l WORD [ WORD | -v [ 1 WORD | 2 WORD ] ]
    • -v [ 1 | 2 ] -l WORD WORD
  • telnet [ WORD ]
  • terminal history size <0-256>
  • traceroute [ WORD ]
    • [ Protocol ] [ Target IP address ] [ Source address ] [ Numeric display ] [ Timeout in seconds ] [ Probe count ] [ Minimum Time to Live ] [ Maximum Time to Live ]
  • undebug
    • all
    • ip icmp
    • sw-vlan
      • packets
      • vtp events
  • vlan database
  • write [ erase | memory | terminal ]

Global Mode

  • access-list
    • <1-99>
      • [ deny | permit ] [ A.B.C.D | any | host A.B.C.D ]
      • [ deny | permit ] [ A.B.C.D A.B.C.D ]
    • <100-199>
      • [ deny | permit ] [ ahp | eigrp | esp | gre | icmp | ip | ospf ] [ A.B.C.D A.B.C.D | any | host A.B.C.D ] [ A.B.C.D A.B.C.D | any | host A.B.C.D ]
      • [ deny | permit ] [ tcp | udp ] [ A.B.C.D A.B.C.D | any | host A.B.C.D ] [ A.B.C.D A.B.C.D | any | eq <0-65535> | host A.B.C.D | gt <0-65535> | lt <0-65535> | neq <0-65535> | range <0-65535> <0-65535> ] [ eq <0-65535> | gt <0-65535> | lt <0-65535> | neq <0-65535< | range <0-65535> <0-65535> ]
    • remark LINE
  • banner motd LINE
  • boot system flash WORD
  • cdp run
  • clock timezone WORD <-23-23> [ <0-59> ]
  • do LINE exec command
  • enable
    • password
      • 7 WORD
      • LINE
      • level set exec level password
    • secret [ 0 | 5 ] LINE
  • end
  • exit
  • hostname WORD
  • interface
    • Ethernet <0-9>/<0-24>
    • FastEthernet <0-9>/<0-24>
    • GigabitEthernet <0-9>/<0-24>
    • Port-channel <1-6>
    • Vlan <1-1005>
    • range
      • Ethernet <0-9>/<0-24>
      • FastEthernet <0-9>/<0-24>
      • GigabitEthernet <0-9>/<0-24>
      • Vlan <1-1005>
  • ip
    • access-list
      • extended [ <100-199> | WORD ]
      • standard [ <1-99> | WORD ]
    • default-gateway A.B.C.D
    • dhcp
      • excluded-address [ A.B.C.D A.B.C.D ]
      • pool WORD
    • domain [ lookup | name WORD ]
    • domain-lookup
    • domain-name WORD
    • ftp
      • passive
      • password [ <0-7> | LINE ]
      • username WORD
    • host WORD A.B.C.D [ A.B.C.D ] [ A.B.C.D ]
    • name-server A.B.C.D
    • ssh
      • authentication-retries <0-5>
      • time-out <1-120>
      • version <1-2>
  • line
    • <0-16> [ <1-16> ]
    • console <0-0>
    • vty <0-15> [ <1-15> ]
  • logging
    • A.B.C.D
    • buffered <4096-2147483647>
    • console
    • host A.B.C.D
    • on
    • trap debugging
  • mac-address-table static H.H.H vlan <1-1005> interface
    • Ethernet <0-9>/<0-24>
    • FastEthernet <0-9>/<0-24>
    • GigabitEthernet <0-9>/<0-24>
  • no
    • access-list [ <1-99> | <100-199> ]
    • banner motd
    • boot system
    • cdp run
    • clock timezone
    • enable
      • password [ 7 WORD | level <1-15> ]
      • secret [ level <1-15> ]
    • hostname
    • interface
      • Port-channel <1-6>
      • Vlan <1-1005>
    • ip
      • access-list
        • extended [ <100-199> | WORD ]
        • standard [ <1-99> | WORD ]
      • default-gateway
      • domain [ lookup | name ]
      • domain-lookup
      • domain-name
      • ftp
        • passive
        • password
        • username
      • host WORD [ A.B.C.D ] [ A.B.C.D ] [ A.B.C.D ]
      • name-server
      • ssh
        • authentication-retries <0-5>
        • time-out <1-120>
        • version <1-2>
    • logging
      • A.B.C.D
      • buffered
      • console
      • host A.B.C.D
      • on
      • trap debugging
    • mac address-table static H.H.H vlan <1-1005> interface
      • Ethernet <0-9>/<0-24>
      • FastEthernet <0-9>/<0-24>
      • GigabitEthernet <0-9>/<0-24>
    • mls qos
    • port-channel load balance
    • privilege
      • configure
        • LINE
        • all
          • LINE
          • level <0-15>
        • level <0-15>
      • exec
        • LINE
        • all
          • LINE
          • level <0-15>
        • level <0-15>
      • interface
        • LINE
        • all
          • LINE
          • level <0-15>
        • level <0-15>
      • line
        • LINE
        • all
          • LINE
          • level <0-15>
        • level <0-15>
      • line
        • LINE
        • all
          • LINE
          • level <0-15>
        • level <0-15>
      • router
        • LINE
        • all
          • LINE
          • level <0-15>
        • level <0-15>
    • service
      • password-encryption
      • time stamps
        • debug [ datetime ] [ msec ]
        • log [ datetime ] [ msec ]
    • snmp-server community WORD [ ro | rw ]
    • spanning-tree vlan WORD [ priority | root [ primary | secondary ] ]
    • username
    • vlan <1-1005>
    • vtp [ mode | password | version <1-2> ]
  • port-channel load-balance [ dst-ip | dst-mac | src-dst-ip | src-dst-mac | src-ip | src-mack ]
  • privilege
    • configure
      • LINE
      • all
        • LINE
        • level <0-15>
      • level <0-15>
    • exec
      • LINE
      • all
        • LINE
        • level <0-15>
      • level <0-15>
    • interface
      • LINE
      • all
        • LINE
        • level <0-15>
      • level <0-15>
    • line
      • LINE
      • all
        • LINE
        • level <0-15>
      • level <0-15>
    • router
      • LINE
      • all
        • LINE
        • level <0-15>
      • level <0-15>
  • service
    • password-encryption
    • timestamps [ debug | log ] [ datetime ] [ msec ]
  • snmp-server community WORD [ ro | rw ]
  • spanning-tree
    • mode [ pvst | rapid-pvst ]
    • portfast default
    • vlan WORD [ priority <0-61440> | root [ primary | secondary ] ]
  • username WORD
    • password [ 0 | 7 ] LINE
    • privilege <0-15>
      • password [ 0 | 7 ] LINE
      • secret [ 0 LINE | 5 WORD | LINE ]
    • secret
  • vlan <1-1005>
  • vtp
    • domain WORD
    • mode
      • client
      • server
      • transparent
    • password WORD
    • version <1-2>

Ethernet / FastEthernet / GigabitEthernet Interface Mode

  • cdp enable
  • channel-group <1-6> mode [ active | auto | desirable | on | passive ]
  • channel-protocol [ lacp | bagp ]
  • description LINE
  • duplex [ auto | full | half ]
  • exit
  • mac-address H.H.H
  • mdix auto
  • mls qos
    • cos <0-7>
    • trust [ cos | device cisco-phone | dscp ]
  • no
    • cdp enable
    • channel-group
    • channel-protocol
    • description
    • duplex
    • mac-address
    • mdix auto
    • mls qos
      • cos <0-7>
      • trust [ cos | device cisco-phone | dscp ]
    • shutdown
    • spanning-tree
      • bpduguard
      • guard
      • link-type
      • portfast
      • vlan WORD port-priority
    • speed
    • storm-control broadcast level
    • switchport
      • access vlan
      • mode
      • native vlan
      • nonegotiate
      • port-security
        • mac-address
          • H.H.H
          • sticky [ H.H.H ]
        • maximum
        • violation
      • priority extend
      • trunk [ allowed | native ] vlan
      • voice vlan
    • tx-ring-limit
  • shutdown
  • spanning-tree
    • bpduguard [ disable | enable ]
    • guard root
    • link-type [ point-to-point | shared ]
    • portfast [ disable | trunk ]
    • vlan WORD port-priority <0-240>
  • speed [ 10 | 100 | 1000 | auto ] (10/100 options are only available for FastEthernet and GigabitEthernet interfaces and 10/100/1000 options are only available for GigabitEthernet interfaces respectively)
  • storm-control broadcast level <0.0-100.0>
  • switchport
    • access vlan <1-1005>
    • mode
      • access
      • dynamic [ auto | desirable ]
      • trunk
    • native vlan <1-1005>
    • nonegotiate
    • port-security
      • mac-address
        • H.H.H
        • sticky [ H.H.H ]
      • maximum <1-132>
      • violation [ protect | restrict | shutdown ]
    • priority extend cos <0-7>
    • trunk
      • allowed vlan
        • WORD
        • add <1-1005>
        • all
        • except <1-1005>
        • none
        • remove <1-1005>
      • native vlan <1-1005>
    • voice vlan <1-1005>
  • tx-ring-limit <1-32767>

VLAN Interface Mode

  • arp timeout <0-2147483>
  • description LINE
  • exit
  • ip
    • address [ A.B.C.D A.B.C.D | dhcp ]
    • helper-address A.B.C.D
  • no
    • arp timeout
    • description
    • ip
      • address [ dhcp ]
      • helper-address A.B.C.D
    • shutdown
    • standby
      • <0-4095>
        • FastEthernet <0-9>/<0-24>[.][<0-4294967295>]
        • GigabitEthernet <0-9>/<0-24>[.][<0-4294967295>]
        • Serial Ethernet <0-9>/<0-24>[.][<0-4294967295>]
        • ip A.B.C.D
        • ipv6 autoconfig
        • preempt
        • priority
      • preempt
      • priority
      • track
        • FastEthernet <0-9>/<0-24>[.][<0-4294967295>]
        • GigabitEthernet <0-9>/<0-24>[.][<0-4294967295>]
        • Serial Ethernet <0-9>/<0-24>[.][<0-4294967295>]
  • shutdown
  • standby
    • <0-4095>
      • FastEthernet <0-9>/<0-24>[.][<0-4294967295>]
      • GigabitEthernet <0-9>/<0-24>[.][<0-4294967295>]
      • Serial Ethernet <0-9>/<0-24>[.][<0-4294967295>]
      • ip A.B.C.D
      • ipv6 autoconfig
      • preempt
      • priority
    • preempt
    • priority
    • track
      • FastEthernet <0-9>/<0-24>[.][<0-4294967295>]
      • GigabitEthernet <0-9>/<0-24>[.][<0-4294967295>]
      • Serial Ethernet <0-9>/<0-24>[.][<0-4294967295>]

VLAN Configuration Mode

  • exit
  • name WORD The ascii name for the VLAN
  • no
    • name Ascii name of the VLAN

Line Configuration Mode

  • access-class [ <1-199> | <1300-2699> | WORD ] [ in | out ]
  • databits [ 5 | 6 | 7 | 8 ]
  • default [ databits | flowcontrol | history size | parity | speed | stopbits ]
  • exec-timeout <0-35791> Timeout in minutes
  • exit
  • flowcontrol [ NONE | hardware | software ]
  • history size <0-256>
  • ipv6 access-class Filter connections based on an IPv6 access list
  • logging synchronous Synchronized message output
  • login [ local ]
  • motd-banner
  • no [ access-class [ <1-199> | <1300-2699> | WORD ] [ in | out ] | databits | flowcontrol | history size | ipv6 | login | motd-banner | parity | password | speed | stopbits ]
  • parity [ even | mark | none | odd | space ]
  • password
    • 7 WORD
    • LINE
  • privilege level Assign default privilege level for line
  • speed <0-4294967295>
  • stopbits [ 1 | 1.5 | 2 ]
  • transport output Define which protocols to use for outgoing connections

Rommon Mode

  • boot
  • dir flash:
  • flash_init
  • help
  • reset
  • set
  • unset variable
  • variable=value