You are on page 1of 3

# Cisco Commands

#Switched to privileged mode


>en or enable
#Switch to Global configuration mode
>conf t or configure terminal
#Hostname for Switch / Router
>hostname abc
#Negating Commands
>no hostname
#Console password
>line console 0
>password cisco
>login
#Telnet password
>line vty 0 15
>password cisco
#Enable password
>enable secret (for encrypted password)
>enable password (for clear text password)
#Console idle timeout
>line console 0
>no exec-timeout
#Logging Synchronous messages
>line console 0
>logging synchronous
#Add IP Address to Vlan interface
>interface vlan 1
>ip address 192.168.0.1 255.255.255.0
>no shutdown
#For Passwords encryption
>service password-encryption
#Save configuration, writing running memory to startup memory
>copy running-configuration startup-configuration
or
>write memory
or
>wr
#Configuring SSH
>hostname abc
>ip domain-name xyz.com
>crypto key generate rsa
>1024 or 2048
>ip ssh version 2
>username abc secret abcpassword
>line vty 0 15
>transport input ssh
>login local

#Configure port security


>interface fastethernet 0/14
>switchport mode access
>switchport port-security maximum 1
>switchport port-security violation shutdown
>switchport port-security mac-address aaaa.bbbb.cccc
or
>switchport port-security sticky
>switchport port-security
#Port security Violation
>interface fa0/1
>shutdown
>no shutdown
#Show
>show
>show
>show
>show

commands for port security


mac address-table
port-security
port-security address
port-security interface fastethernet 0/14

#Ethernet Speed and Duplex


>int fa0/16
>speed 100 or auto or 1000
>duple full
#Hardcore Switchports modes
>interface range fastethernet 0/1-24
>switchport mode access
#Configuring VTP
>Show vtp status
>vtp domain abc
>vtp mode transparent
#Configure Switchport as trunk
>interface fastethernet 0/1
>switchport mode trunk
>switchport trunk encapsulation dot1q
>show interface trunk
#Configuring Vlan
>vlan 10
>name SALES
>exit
>interface fastethernet 0/1
>switchport access vlan 10
>exit
>interface vlan 10
>ip address 10.10.10.1 255.255.255.0
>exit
>show vlan brief
#Routing Between VLAN
#Router On A Stick
(Switch configuration)
>no ip domain-lookup
>vlan 10
>name vlan10

>vlan 20
>name vlan20
>interface fa0/10
>Description ....
>switchport access vlan 10
> interface fa 0/20
>switchport access vlan 20
>interface fa 0/1
>switchport mode trunk
(Router Configuration)
>interface fa0/1
>no shutdown
>interface fa 0/1.10
>encapsulation dot1Q 10
>ip address 10.10.10.1 255.255.255.0
>interface fa 0/1.20
>encapsulation dot1Q 20
>ip address 10.10.20.1 255.255.255.0
>show ip route
#Routing between vlan with L3 switch
>no ip domain-lookup
>vlan10
>vlan20
>interface fa 0/10
>switchport access vlan 10
>interface fa 0/20
>switchport access vlan 20
>show ip route
>interface vlan 10
>ip address 10.10.10.1 255.255.255.0
>interface vlan 20
>ip address 10.10.20.1 255.255.255.0
>ip routing
>show ip vlan brief
>show ip route

You might also like