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

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

Revision #10
Created 2024-04-13 06:36:05 UTC by Admin
Updated 2024-12-12 19:48:05 UTC by Admin