Notes for Cisco Switches Configuration

Set management ip address

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.123.203 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
Switch(config-if)#end

Set default gateway

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip default-gateway 192.168.123.4
Switch(config)#end
Switch#

Create vlans

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#name wan01
Switch(config-vlan)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 4
Switch(config-vlan)#name wan02
Switch(config-vlan)#end
Switch#

Create trunk port

Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface GigabitEthernet 1/0/24
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int
Switch(config)#interface gigabitEthernet 1/0/24
Switch(config-if)#switchport trunk allowed vlan 1,2,3,4
Switch(config-if)#end
Switch#
Switch# show run interface gigabitEthernet 1/0/24
Switch# show interface trunk

Enable SNMP

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#snmp-server community public RO
Switch(config)#snmp-server community private RW
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#write memory
Building configuration...
Compressed configuration from 7383 bytes to 3601 bytes[OK]
[OK]
Switch#

Configure Extended VLAN Number

Switch#en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vtp mode transparent
Setting device to VTP TRANSPARENT mode.
Switch(config)#

Set interface range

Switch#
Switch#en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface range gigabitEthernet 1/0/20-24
Switch(config-if-range)#switchport access vlan 2005
Switch(config-if-range)#

 by the author.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store