2020-06-28

Initial Configuration on Cisco Switch

Switch>
Switch>enable
Switch#
Switch#conf t
Switch(config)#no logging console
Switch(config)#no ip domain lookup
Switch(config)#no service config
Switch(config)#service password-encryption
Switch(config)#enable secret cisco


Restrict Access to Switch via Console.

Switch(config)#line console 0
Switch(config-line)#password cisco1
Switch(config-line)#login
Switch(config-line)#exec-timeout 5
Switch(config-line)#logging synchronous
Switch(config-line)#exit


Restrict Access to Switch via Telnet.

Switch(config)#line vty 0 4
Switch(config-line)#password cisco1
Switch(config-line)#login
Switch(config-line)#exec-timeout 5
Switch(config-line)#logging synchronous
Switch(config-line)#end
Switch#copy run start

Configure a Trunk Port
We need to configure a trunk port when we connect
two or more switches on our network.

Switch#conf t
Switch(config)#int range fa0/23-24
Switch(config-if-range)#no shutdown
Switch(config-if-range)#switchport trunk encapsulation dot1q
Switch(config-if-range)#switchport mode trunk

Configure a VLAN

Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#name ACCOUNTING

Assign Ports to a VLAN

Switch(config-vlan)#int range giga0/1-10
Switch(config-if-range)no shutdown
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit
Switch(config)#do show vlan br

Configure Port Security

Switch#conf t
Switch(config)#int range fa0/1-22
Switch(config-if-range)#switchport port-security mac-address sticky                                          Switch(config-if-range)#switchport port-security maximum 1
Switch(config-if-range)#switchport port-security violation shutdown
Switch(config-if-range)#switchport port-security




Reactions:

0 comments:

Post a Comment