Tuesday, May 06, 2008

Cisco Routers - Basic notes

I am playing with Cisco routers now, this are be my notes:

Internal Components:
  • RAM. Random access memory. This is the working buffer memory.
  • ROM. Read only memory. contains bootstrap process and basic (most of times) IOS for basic functionality (as recover password)
  • FLASH MEMORY. Stores full image of IOS.--
  • NVRAN. non valitle RAM. Does not loose power when turn off.
  • - start up configuration file

Boot process:
  • a. Power on
  • b. Power on Self Test (POST) (check memory, and cards).
  • c. bootstrap from ROM
  • d. looks in FLASH for IOS
  • e. loads the IOS into RAM from FLASH
  • f. IOS looks for configuration in NVRAM
  • f.1 If found it load the IOS into FLASH Memory
  • f.2 If not found executes teh auto setup mode (menu driven system).

router> ----> user mode (show config, telnet, basic)
router# ----> priviliged mode (show commands, pings, save config, backup)
router(config)# ----> global configuraiton mode (configuration interfaces, security, hostname)
Control - Z is to move from global configuration mode to priviliged mode.

console port password -----> line con 0
auxiliary port password ---> line aux 0
telnet password -----------> line vty 0 4

Set up a passwords:
On the glboal configuration mode run the following commands to set up a password for the enable command:

router(config)# enable password xxxxxxxxxxx (sets the password but it is shown on screen)
router(config)# enable secret xxxxxxxxxxxxx (sets an encrypted enable password, once secret is enabled password by itself don't work anymore)

To set up password for different access:

router(config)#line console 0 | line auxiliary 0 | line vty 0 4
router(config-line)# login (to ask for prompt)
router(config-line)# password xxxxxxxxxxxxx (to set up the passwod)

To encrypt all passwords runt the following command:
router(config)service password-encryption

To set up a banner:
router(config)#banner motd $ message message message $
(Note $ is the delimeter and can be anything, just check to have spaces at the end and beginning)

Setting up an IP on an ehternet port:
A show running-config shows that I have one fastethernet port not configured, set as:
interface FastEthernet0
no ip address
speed auto

I will change it to:

interface FastEthernet0
no ip address
speed auto

To do this run:

1721-router#config t ---------> to enter global configuraiton mode
Enter configuration commands, one per line. End with CNTL/Z.
1721-router(config)#interface f0 ----> to enter configuration of fastethernet 0
1721-router(config-if)#ip address
1721-router(config-if)#no shutdown ----> to activate
*Mar 1 07:56:30.838: %LINK-3-UPDOWN: Interface FastEthernet0, changed state top ----> that means I have physical connectivity
*Mar 1 07:56:31.838: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEther,change to up ------> shows I have encapsulation. Connections to another host.
1721-router#ping ----> to test that is working I ping a pc on the network
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

To save the configuration:
router#copy running-config start-config ----> for IOS version 12 and above
router#write memmory ---------> before IOS version 12

1721-router#copy run star
Destination filename [startup-config]?
Building configuration...

To backup config:
router#copy run tftp --> this copy the running configuration TO the tftp server (will ask for details)
router#copy tftp run/start --> this copy the running configuration FROM the tftp server (will ask for details)

my passwords:
enable password/secret
console console
aux aux
telnet1-4 telnet
telnet0 telnet0

1 comment:

sher said...

its realy nice n so easy...