ccna routing commands

33
Router

Upload: vsatheesh

Post on 15-Jul-2015

273 views

Category:

Education


9 download

TRANSCRIPT

Router

Routers A device that forwards data packets along networks. A router is connected to at least two networks, commonly

two LANs or WANs or a LAN and its ISP’s network.

Routers are located at gateways, the places where two or more networks connect.

In a LAN Router are Used for Connecting 2 different Logical Network

WAN

Simple WAN

Building WAN

Router

WAN link from service provider

Connect WAN link and LAN link with Router

Assign IP address to each interface of Router

Add Routing table to each Router

Add IP and gateway address to PCs

Check connectivity using ping

Simple WAN

S0 192.168.20.1 S1 192.168.20.2

e0 192.168.10.1 e0 192.168.30.1

pc1 ip 192.168.10.2

Pc1 gw 192.168.10.1 pc4 ip 192.168.30.2

Pc4 gw 192.168.30.1

router1 router2

switch1 switch2

Building routing table

S0 S0 E0 10.0.0.1

IP:10.0.0.2 G/w:10.0.0.1

IP:30.0.0.2 G/w:30.0.0.1

20.0.0.1 20.0.0.2

30.0.0.1

S0

E0

IP:50.0.0.2 G/w:50.0.0.1

50.0.0.1

S1

E0

40.0.0.1

Routing table R1

10.0.0.0/8 --- e0

20.0.0.0/8 --- s0

30.0.0.0/8 --- s0

40.0.0.0/8 --- s0

50.0.0.0/8 --- s0

Routing table R2

10.0.0.0/8 --- s0

20.0.0.0/8 --- s0

30.0.0.0/8 --- e0

40.0.0.0/8 --- s1

50.0.0.0/8 --- s1

Routing table R3

10.0.0.0/8 --- s0

20.0.0.0/8 --- s0

30.0.0.0/8 --- s0

40.0.0.0/8 --- s0

50.0.0.0/8 --- e0

40.0.0.2

Interface – interface id

Ethernet 0

Serial 0

Introduction to Routers

A router is a special type of computer. It has the same basic components as a standard desktop PC.

Just as computers need operating systems to run software applications, routers need the Internetwork Operating

System software (IOS) to run configuration files. These configuration files contain the instructions and parameters

that control the flow of traffic in and out of the routers.

The many parts of a router are shown below:

Function Of a Router: The function of router is to route packets to the destination network That is when a packet come in to the Router, it will check the destination ip address of packet and search for that entry on its routing table. If the entry is found, then it will place packet to corresponding interface. Interconnection between different logical networks

The major router manufacturers include:

Alcatel-Lucent

Asus

Avaya

Belkin

Brocade

Buffalo

Cisco Systems

D-link

Extreme Networks

Fujitsu

Huawei

Juniper Networks

Netgear

TP-Link

UTStarcom

ZTE

ZyXEL

Cisco ASR 9000 Series Aggregation Services Routers

2 Categories of Router

1. Fixed Router

2. Modular Router

Router’s Interface

LAN Interface AUI [15Pins]

RJ-45[10/100/1000Mbps]

WAN Interface Serial

Normal Serial[60 Pins]

Smart Serial [20 Pins]

BRI [RJ-45]

Administrative Interface

Console (CON) - Local Administration

Auxiliary (AUX) - Remote Administration

External Components of a Router

Internal Components of Router

Router components Router is a device which is similar to a PC.It consist of

1. Processor: Process information.

2. Mother Board: It is circuit interconnecting all the peripherals.

3. Memory: Router has 3 types of memory.

*ROM(Read Only Memory)

- Bootstrap/POST

*RAM(Random Access memory)

- Running Configuration

- Contents are lost on reboot

*NVRAM (Non Volatile RAM)

- Contents are kept on Power down or reload

(Erasable reprogrammable ROM)

NVRAM : Start up configuration

Configuration Register

FLASH Memory : IOS Images are kept here

4. Network Interfaces:

5. SMPS: Switch Mode Power Supply.

6. CHASIS: Cabinet to protect all peripherals.

But router has no hard disk, floppy drive, CD rom, Sound card display card etc.

Operating System: Cisco router runs on Cisco’s developed OS known as IOS(internetwork operating system).

Boot Sequence

ROMMonitor RXBoot FLASH

Configuration Register

C-File NVRAM

Y

N

Running

Setup Mode

Checks All interfaces

RAM

14 15 13 12 10 11 9 8 6 7 5 4 2 3 1 0

4 8 2 1 4 8 2 1 4 8 2 1 4 8 2 1

0 0 0 0

0 0 0 1

0 0 1 0

ROMMonitor

RxBoot

Flash 1 1 1 1

0

1

2-15

Boot Process… Step 1:Perform power-on self test (POST).

Checks all the components are working properly or not

Step 2: Load and run bootstrap code

The generic bootstrap loader in ROM executes. A bootstrap is a simple set of instructions that tests hardware and initializes the IOS for operation.

Step 3:Find the Cisco IOS software.

The IOS can be found in several places. The boot field of the configuration register determines the location to be used in loading the IOS.

Step 4:Load the Cisco IOS software.

The operating system image is loaded.

Step 5:Find the configuration.

The configuration file saved in NVRAM is loaded into main memory and executed one line at a time. The configuration commands start routing processes, supply addresses for interfaces, and define other operating characteristics of the router.

Step 6: Run/skip the initial configuration

If no valid configuration file exists in NVRAM, the operating system searches for an available TFTP server. If no TFTP server is found, the setup dialog is initiated.

Methods to Access/Manage a Router

Console

Aux (Auxiliary)

Telnet

SSH(Secure Shell)

SNMP(Simple Network Management Protocol)

SDM(Secure Device Manager)

Console Connection for configuration

Take the following steps to connect a terminal to the console port on the router:

First, connect the terminal using the RJ-45 to RJ-45 rollover cable and an RJ-45 to DB-9

Then, configure the terminal or PC using terminal emulation software

You can install Windows Hyper Terminal, Vandyke SecureCRT, TeraTerm

Configure the COM Port Settings:

Router configuration Router User Interface Modes

The Cisco command-line interface (CLI) uses a hierarchical structure. This structure requires entry into different modes to accomplish particular tasks.

Each configuration mode is indicated with a distinctive prompt and allows only commands that are appropriate for that mode.

As a security feature the Cisco IOS software separates sessions into two access levels, user EXEC mode and

privileged EXEC mode. (Also known as enable mode)

Router modes

Router >

Router #

Router(config)#

Router(config-if) Router(config-subif) Router(config-line) Router(config-router)

ROUTER SUB CONIFGURATION MODES OR SPECIFIC CONFIG MODES

USER MODE

PRIVILEGE MODE

GLOBAL CONFIG

MODE

Routers Mode

Privilege mode commands

Router#

show flash shows content in flash

show version shows Router, IOS, memory, Register infn..

show interface lists all the physical interface and its details

show interface ethernet 0 lists information about a specific physical interface

show ip interface brief shows the IP address that’s assigned to the physical interface

show ip route lists its Routing Table

show controllers serial 0 It shows the cable details, like whether its connected or not, n the end is DTE or DCE

Router#

show running-config Displays the config in RAM

show startup-config Displays the config in NVRAM

erase startup-config erase content in NVRAM

reload to reload the router

copy running-config startup-config copy content from RAM to NVRAM

write copy content from RAM to NVRAM

copy startup-config running-config copy content from NVRAM to RAM

ping 192.168.1.1

telnet 192.168.1.1

traceroute 192.168.1.1

Configuration mode commands Router(config)#

hostname calicut

banner motd # welcome to ipsr #

enable password cisco stored as clear text

service password-encryption This encrypts the password., but

its breakable

[level 7 password]

enable secret cisco1 Encrypts using MD5 Algorithm

so, its difficult to break

[level 5 password]

Interface mode commands

Router(config)#interface serial 0

Router(config-if)# ip address 10.0.0.1 255.0.0.0

no shutdown

description wan link to ekm

clock rate 64000 clock rate is only applied @ DCE end

bandwidth 128

Line mode commands

Router(config)#line console 0

Router(config-line)# password cisco

login

exec-timeout 30 30

Context Sensitive Help

Cisco IOS CLI offers context sensitive help. At any time during an EXEC session, a user can type a question

mark (?) to get help.

Two types of context sensitive help are available:

Word help and

Command syntax help.

Word help: Word help can be used to obtain a list of commands that begin with a given character string. To use

word help, type in the characters in question followed immediately by the question mark (?). The following is

an example of word help:

Router# co?

configure connect copy

Command syntax help: Command syntax help can be used to obtain a list of commands, keyword, or argument

options that are available starting with the keywords that the user had already entered. To use command syntax

help, enter a question mark (?) after hitting a space. The router will then display a list of available command

options with <cr> standing for carriage return. The following is an example of command syntax help:

Router# configure ?

memory Configure from NV memory

network Configure from a TFTP network host

terminal Configure from the terminal

<cr>

Work locations

Thanks...

vineethv2