Monday, 18 February 2013

Some Cisco CCNA Notes


Some CCNA Notes (I will retaking my CCNA soon)

switch> (User mode or User Exec)
switch# Enable (Privileged Mode)
switch (config)# Comnfigure Terminal (Global configuration Mode)
switch(config)#interface fastethernet 0/1 or int fa0/1
swicth(config-if)# 
[end] goes back to privileged mode
[exit] goes back to privileged mode

<Ctrl>+Z goes back to Privileged mode

Set Name:
hostname <name>

Set IP:
Interface VLAN1
swicth>enable
switch#config t
switch(config)# int
switch(config)#interface vlan 1
switch(config-if)#ip address 192.168.10.100 255.255.255.0
switch# show interface vlan 1

Note: whenever you see an interface administratively down, it is logically down and needs to be brought up.

swicth>enable
switch#config t
switch(config)# int
switch(config)#interface vlan 1
switch(config-f)#no shutdown

VLAN is not the same as Interface VLAN1. VLAN 1 is the default VLAn which all ethernet ports on the switch belongs to by default.
Interface VLAn1 is a virtual interface which allows you to assign an IP address

Setup Default Gateway
from global mode
switcch(config)# ip default-gateway 192.168.10.1

Save Config:
copy running-confg startup-config
NVRAM - Non-Volatile RAM

Setup Password
Switch>enable
switch#configure terminal
swiitch(config)#enable password <password>
Note: This is unencrypted password

Setup encrypted password
Switch>enable
switch#configure terminal
swiitch(config)#enable secret <password>

setup password for console mode
Switch>enable
switch#configure terminal
swiitch(config)#line console 0
switch(config-line)# password <password>
switch(config-line)# login
switch(config-line)# line vty 0 4
switch(config-line)# password <passsword>
switch(config-line)# service password-encryption
Note: level 7 password for Cisco is very easily crack-able
http://www.ifm.net.nz/cookbooks/passwordcracker.html

Setting the Banner:
switch(config)#banner motd # TEXT #

Setting up SSH
Switch>enable
switch#configure terminal
switch(config)#username <renato> password <password>
switch(config)#ip domain-name <domain>

Generate SSH keys
Switch>enable
switch#configure terminal
switch(config)#crypto key generate rsa <ENTER>
[1024]
switch(config)#ip ssh version 2
switch(config)#line vty 0 4
switch(config-line)#trasport input ssh
<Ctrl> + Z
switch#

Setup Port sercurity
switch>enable
switch#configure terminal
switch(config)#interface fastethernet <port>i.e. 0/5
switch(config-if)#switchport mode access
switch(config-if)#switchport port-security 
switch(config-if)#switchport port-security maximum 1
switch(config-if)#switchport port-security violation restrict
switch(config-if)#switchport port-security mac-address <MAC ADDRESS> or sticky
switch# show ip interface brief
switch# terminal monitor
switch# show mac address-table 
switch# show port-security interface fastEthernet <port> i.e. 0/5
switch# show port-security 

Configure a Range of Ports
switch>enable
switch#config terminal
switch(config)#interface range fastEthernet 0/2 - 24
switch(config-if-range)# switchport port-security

Troubleshooting Switches
switch# terminal monitor

No comments:

Post a Comment