Skip to main content

Cisco Switch commands

Assign IP

enable
configure terminal
interface vlan <No>
ip address <IP> <Mask>
no shutdown
exit

Remove IP

enable
configure terminal
interface vlan <No>
no ip address <IP> <Mask>
exit

Assign a Gateway

enable
configure terminal
ip default-gateway <ip>
exit

Show interface IPs

show ip interface brief

Backup Config

  • Run tftp64 on windows machine: tftpd64.464.zip (make sure IPs are on same subnet)
  • Make sure it can be reached i.e. the Windows firewall is not blocking it (must be able to get through "Public Network").
copy startup-config tftp:

For restore put tftp: first.

To reboot the switch

enable
reload now

Remove a trunk

enable
configure terminal
interface GigabitEthernet1/0/13
switchport trunk allowed vlan remove 20,30,50,100
switchport mode access
no switchport nonegotiate
no switchport trunk allowed vlan none
no switchport trunk native vlan 100

Changing VLAN on port

enable
configure terminal
interface GigabitEthernet1/0/port
switchport access vlan vlanNo
switchport mode access
end

Check config and save to start-up config

show running-config interface GigabitEthernet1/0/port

write memory