Lecture Notes For CCNA

Chapter 3 - IOS


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Login

Aux port with modem, console, or telnet
User / priveleged mode
exec= cisco ios command interpreter
Privelged needed to view config

Console

Enter to start
User password or straight to router> prompt
enable to get to priveleged mode .. enter password
disable to exit ...
n? shows all comands that start n etc.
clock set h:mmss dd mm yyyy

Advanced editing

terminal no editing to turn off, terminal editing to turn on
Control A = start of line
Control E = end of line
Control F or -> = right (forward
Control B or <- = left (back)
Control P or ^ = repeat last= previous command
Control N or v = repeat most recent command
Esc B = back 1 word
Esc F = Fwd 1 wors
show history - lists buffer
terminal history size - sets buffer size
tab key completes entry, eg sh run [tab] gives show running-config

Memory types

ROM, RAM, Flash, NVRAM
startup-config
in nvram.  accessed on boot and copied to dram
show startup-config
sh start
running-config
copied from nvram on startup
config [t]erminal updates the file.
copy running-config startup-config
copy run start
show running-config
sh run
cisco ios
Held in flash
sh flash to see size & free flash mem

CDP - Cisco Discovery Protocol

Cisco proprietary protocol
If SNAP runs at data link layer then devices can communicate even if different net layers as long as directly connected  - SNAP does not route.
Starts as default in IOS 10.3+
Data link broadcast allows it to find neighbouring routers running CDP
Can display other router's stats about protocols, eg IP / IPX
show cdp to see update and holdtime frequency.
cdp timer sets frequency (secs)
cdp holdtime
sh cdp [entry],[interface],[neighbors],[traffic]
sh cdp entry xxxxx where xxxxx is other router name
sh cdp int - encapsulation, timers etc.
sh cdp entry * shows all known cdp routers
sh cdp neighbor detail gives entry info. aswell as summary
sh cdp neighbor gives device id, local int, holdtime, capability, platform, port id.

EXEC mode

All run from router# prompt (not config t)
show startup-config
show running-config
copy run start
copy start run
erase startup-config - erase nvram settings to defaults!
reload - restarts router
setup - starts initial config. dialog
Continue with config dialog Y/N
control-c aborts config.
Passwords
enable secret
one way password for IOS 10.3 up.
precedence over enable password
set with enable secret within config t
enable
when no secret password or for older software
manually encrypted - setup in setup mode
set with enable password within config t
Keep different to secret - will warn not to set same but will not work if the same!

VTY - virtual terminal password

Telnet access
setup in setup mode
line vty 0 4 - specifies 0 - 4 are telnet sessions
to change pword:
config t
line vty 0 4
login
password xxxxxx
^z
no login means no password over telnet
line vty n  to setup different password for line n

Auxilliary password

for Aux modem access.
Set manually
config t
line aux 0
login
password xxxxx
^z

Console password

used with direct access to console port
config t
line con 0
login
password xxxxx
^z

Banners

banner exec
shown to user after login on telnet
banner incoming
Reverse telnet sessions show this but not exec
baner login
shows message before login command
banner motd #   where # send character (choose any)
first message shown on connection to router
banner motd #
This is the banner text for router xyz
#
end

Router ID

hostname [routername]

interfaces

2500 : serial0, serial1, ethernet0,tokenring0,fddi0
in config mode can use s0,s1,e0,t0,f0
Catalyst 5000 / other modular
numbered as type slot/port, eg e4/2
7000 / 7500
Has Versatile Int Proc cards
1/2 slots per port
type slot/port number adaptor/port, eg w2/0/1

shutdown - changes amin state of int, down
no shutdown - turns admin back on
description - adds text description to an interface (eg circuit nums)

hosts table

Setting up hosts entries
config t
ip host [name] [ip] [port for telnet]
ip host feathers 10.0.0.5 23
sh hosts
shows default domain, list of hosts, dns servers

Router startup ios commands

sh interface
general, inc ip, subnet mask
eth is up, line protocol is down
hardware, logical addresses
encapsulations, stats, errors etc.
sh ip interface
ip paramaters on an int.

Usability status - if hardware is working then int is up

if both ends of comms link are up then line protocol is up
sh protocol
displays all protocols and addresses running
sh ip protocol
shows routing protocols, eg rip, igrp etc
filters, period of update, routing type, which routes known

Cisco autoinstall procedure

Gets Ip thrugh BootP or RARP
Another router available with helper address fowards UDP TFTP broadcast to a TFTP server.
Helper also used to forward DHCP requests
New sends out BootP request & gets first address it is given
Uses TFTP server or DNS to resolve ip to hostname
TFTP send file named network-confg containing new hostname
network-confg file contains commands for all routers???
Requests config file from TFTP server called hostname-confg
If file doesn't exist TFTP server send generic file router-config
This file is used as running-config by router

SETUP routine

Get to this with either:
setup command within priv mode
write erase, erase startup-config then reboot
nvram invalid. posibly due to write errors - if new router, erased, or corrupt
Use Ctrl C to abort, enter initial config [yes] = enter
Would you like to see current interface summary [yes]=enter
list of interfacs. OK? column =no if no valid config
this proves the post found all the interfaces
Router name
enable secret password
enable password
vty password
snmp network management [yes]
configure ip [yes]
configure igrp routing [yes]
configure rip routing [no]
configurin interface paramaters:
int eth0:, is this int in use? [yes]
config ip on this int [yes]
ip addr: x.x.x.x
no. of bits in subnet field [0]
depends upon class.  eg class b, 8 bits = 255.255.255.0
int ser0:, is this in use? [yes]
config ip on this int.
ip addr x.x.x.x
bits in subnet field [0]
int ser1: is this in use [yes] : n
Use this configuration? [yes/no] :y - saves to nvram

Copy config files

config net - loads from tftp server to running ram only.
host or net config file [host]
ip addr of host
name of config file [router-confg]
confirm config [enter]
copy run tftp
backs up running config to tftp
enter ip addr
name of config file to write [host-confg]
confirm [enter]

copy tftp run
as above
copy tftp star
copy star tftp
Boot settings
Flash stores ios
copy flash tftp
lists files in flash
enter ip of tftp server
enter source filename
enter dest filename [enter] = same name
copy to server [y/n]
copy tftp flash
warning - routing stops, telnet stops
proceed enter to confirm
lists flash memory files
enter IP of TFTP server
source filename
dest filename [enter] for same#
erase flash before writing [enter] to confirm
contains file.  are you sure [enter] to confirm
copy xxx fom tfp into flash sure [y/n]
[e] erasing. [!] downloading.  May take 20 mins or more.
Reboots system

Use this to upgrade ios

boot command to choose multiple boot images:

enter in config mode, notconfig-in
boot system TFTP ios_filename tftp_ip_address
boot system flash
boot system TFTP filename 10.0.0.5
boot system rom
Will drop down to next in list if first not available - eg if flash corrupt then try tftp, if that fails try rom image.
IOS 11.3 oes not allow boot system rom, boot system flash bootflash
Manual config
config [network] or [terminal] or [memory]
config on own prompts for one of above
config mem
copies startup config to running config
config net
copies tftp image to running config
config t
(config)
int e0
(config-if)
description LAN link xyz etc.
ip address x.x.x.x subnet.s.s.s
no shutdown
int s0
description WAN link xyz
no shutdown
exit
(config)
hostname RouterABC
enable password xxxxx
enable secret yyyyy
line con 0
(config-line)
login
password vvvvvv
exit
(config)
line vty 0 4
(config-line)
login
password zzzzz
(config)
banner motd #
login message
more message
#
^z

DTE / DCE cable

if two routers connected directly by ser. then need clock
config t
int s0
clock rate 56000 [300-8000000]
bandwidth 56
int s1
clock rate 56000
bandwidth 56 [kbitsps]

Comments

Popular posts from this blog

Run Commands Either Works in the Windows XP or Windows 7 or Both Operating Systems