Computer Network Lab: Presented By: Md. Fahad Bin Zamal

You are on page 1of 62

Computer Network Lab

PRESENTED BY: MD. FAHAD BIN ZAMAL


Router (Hardware)
Cisco IOS

Cisco technology is built around the Cisco Internetwork Operating


System (IOS), which is the software that controls the routing and
switching functions of internetworking devices.

A solid understanding of the IOS is essential for a network


administrator.
Introduction to Routers
A router is a special type of computer. It has the same basic components as a standard desktop PC. However, routers are
designed to perform some very specific functions. 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:
Router Memory Components

ROM - Read Only Memory – Bootstrap/POST

FLASH Memory- IOS Images are kept here


- Erasable reprogrammable ROM
- Contents are kept on Power down or reload

RAM - Random Access memory


- Routing Tables
- Running Configuration
- Contents are lost on reboot

NVRAM - Start up configuration


- Configuration Register
- Contents are kept on reload
ROM

Read-Only Memory

ROM has the following characteristics and functions:

 Maintains instructions for power-on self test (POST) diagnostics


 Stores bootstrap program and basic operating system software
 Mini IOS
RAM

Random Access Memory, also called dynamic RAM (DRAM)

RAM has the following characteristics and functions:

 Stores routing tables


 Holds ARP cache
 Performs packet buffering (shared RAM)
 Provides temporary memory for the configuration file of the router while the
router is powered on
 Loses content when router is powered down or restarted
NVRAM

Non-Volatile RAM

NVRAM has the following characteristics and functions:

Provides storage for the startup configuration file


Retains content when router is powered down or restarted
Configuration Register – 16 bit register which decides boot sequence
Flash

Flash memory has the following characteristics and functions:


 Holds the operating system image (IOS)
 Allows software to be updated without removing and replacing
chips on the processor
 Retains content when router is powered down or restarted
 Can store multiple versions of IOS software
 Is a type of electronically erasable, programmable ROM (EEPROM)
Interfaces
Interfaces have the following characteristics and functions:

 Connect router to network for frame entry and exit


 Can be on the motherboard or on a separate module

Types of interfaces:

 Ethernet
 Fast Ethernet
 Serial
 ISDN BRI
 Loopback
 Console
 Aux
Router Power-On/Bootup Sequence:
1. Perform power-on self test (POST).
2. Load and run bootstrap code.
3. Find the Cisco IOS software.
4. Load the Cisco IOS software.
5. Find the configuration.
6. Load the configuration.
7. Run the configured Cisco IOS software.
External Components of a 2600 Router
Internal Components of a 2600 Router
Computer/Terminal Console Connection
HyperTerminal Session Properties
Establishing a HyperTerminal Session:

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 or RJ-45 to DB-25
adapter.

Then, configure the terminal or PC terminal emulation software for 9600 baud, 8 data bits, no parity, 1 stop bit,
and no flow control.
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. The privileged EXEC mode is also known as enable mode.
Overview of Router Modes
Router Modes
CLI Command Modes
All command-line interface (CLI) configuration changes to a Cisco router are made from the global configuration
mode. Other more specific modes are entered depending upon the configuration change that is required.

Global configuration mode commands are used in a router to apply configuration statements that affect the
system as a whole.

The following command moves the router into global configuration mode

Router#configure terminal (or config t)


Router(config)#

When specific configuration modes are entered, the router prompt changes to indicate the current configuration
mode.

Typing exit from one of these specific configuration modes will return the router to global configuration mode.
Pressing Ctrl-Z returns the router to all the way back privileged EXEC mode.
Router Command Line Interface:
LAB – Interface Configuration
20.0.0.1 30.0.0.2
20.0.0.2 30.0.0.1
S0
10.0.0.1 S0 S0 S1
E0 E0 40.0.0.1

10.0.0.2
A B 40.0.0.2
Configuring Interfaces
An interface needs an IP Address and a Subnet Mask to be configured.
All interfaces are “shutdown” by default.
The DCE end of a serial interface needs a clock rate.
R1#config t
R1(config)#int e0
R1(config)#Description Connoted to Host
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 0
R1(config-if)#ip address 20.0.0.1 255.255.255.0
R1(config-if)# bandwidth 64
R1(config-if)#clock rate 64000 (required for serial DCE only)
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#exit
R1#
On new routers, Serial 1 would be just Serial 0/1 and e0 would be f0/0.
s = serial e = Ethernet f = fast Ethernet
Viewing Configuration:

 To Check the status of interface


#Show IP interface brief
or
#Sh IP int brief
Saving and Erasing Configurations:

 To copy RAM to NVRAM


# copy run startup-config

 To remove all configuration


# erase startup-config
# reload
28

1/20/2019
Self Assessment…
Form the following diagram configures IP address for Corp, Router1 (R1), Router2 (R2), and
Router3 (R3). Remember that, by default, these routers know only about networks that are
directly connected to them.

The Corp router is a 2811 with four serial interfaces and a switch module, and routers 1 and 2
are 1841 routers. Router3 (R3) is another 2811 with a wireless interface card. The first step for
this project is to correctly configure each router with an IP address on each interface. Table 1
shows the IP address scheme you are going to use to configure the network. Each network in
the table has a 24-bit subnet mask (255.255.255.0).
Self Assessment…
Self Assessment:
Router Network Address Interface Address

CORP
Corp 10.1.1.0 Vlan1 (Switch Card) 10.1.1.#
Corp 10.1.2.0 S0/0/0 10.1.2.#
Corp 10.1.3.0 S0/0/1 10.1.3.#
Corp 10.1.4.0 S0/1/0 10.1.4.#
Corp 10.1.5.0 f0/0 10.1.5.#
R1
R1 10.1.2.0 S0/0/0 10.1.2.#(+1)
R1 10.1.3.0 S0/0/1 10.1.3.# (+1)
R1 192.168.10.0 f0/0 192.168.10.#
R1 192.168.20.0 f0/1 192.168.20.#
R2
R2 10.1.4.0 S0/0/0 10.1.4.#
R2 192.168.30.0 f0/0 192.168.30.#
R2 192.168.40.0 f0/1 192.168.40.#
R3
R3 10.1.5.0 f0/0 10.1.5.#
R3 172.16.10.0 Dot 1 Radio0/0/0 172.16.10.#
32
Routing
Routing:
 The process of transferring data from one local area network to another
 Layer 3 devices
 Routed protocol Enables to forward packet from one router to another. Ex: IP,
IPX
 Routing protocol sends and receives routing information packets to and from
other routers. Ex: RIP, OSPF , IGRP
 Routing protocols gather and share the routing information used to maintain
and update routing tables.
 That routing information is in turn used to route a routed protocol to its final
destination
Routing:
From To
X Y
House #21, Road # 10 House #45, Road# 15
Chandigarh Mohali
What is Routing?
10.120.2.0 172.16.1.0

 To route, a router needs to know:


 Destination addresses
 Sources it can learn from
 Possible routes
 Best route
Route Types
 Static routing - network administrator configures information about remote
networks manually. They are used to reduce overhead and for security.

 Dynamic routing - information is learned from other routers, and routing


protocols adjust routes automatically.

 Because of the extra administrative requirements, static routing does not have
the scalability of dynamic routing.
Static Routes
 Benefits
 No overhead on the router CPU
 No bandwidth usage between routers
 Adds security

 Disadvantage
 Administrator must really understand the inter-network
 If a network is added to the inter-network, the administrator has to add a route to it on
all routers
 Not feasible in large networks
LAB : Routing Implementation
20.0.0.1 30.0.0.2
20.0.0.2 30.0.0.1
S0
10.0.0.1 S0 S0 S1
E0 E0 40.0.0.1

10.0.0.2
A B 40.0.0.2

•Host A can ping router R1 and R2


•To enable Host A to Ping Host B we need to configure
Routes
Static Route Configuration
ip route [Destination network] [mask] [next-hop address or exit interface]

 ip route The command used to create the static route.


 Destination network The network you’re placing in the routing table.
 mask The subnet mask being used on the network.
 next-hop address The address of the next-hop router that will receive the packet and
forward it to the remote network. This is a router interface that’s on a directly connected
network.
 Exit interface You can use it in place of the next-hop address if you want, but it’s got to
be on a point-to-point link, such as a WAN

R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2


LAB :Static Route Configuration

20.0.0.1 30.0.0.2
20.0.0.2 30.0.0.1
S0
10.0.0.1 S0 S0 S1
E0 E0 40.0.0.1
R2# config t
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#ip route 40.0.0.0 255.0.0.0 30.0.0.2

10.0.0.2
A B 40.0.0.2

R1# config t
R3# config t
R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2
R3(config)#ip route 10.0.0.0 255.0.0.0 30.0.0.1
R1(config)#ip route 40.0.0.0 255.0.0.0 20.0.0.2
R3(config)#ip route 20.0.0.0 255.0.0.0 30.0.0.1
Verifying Static
Route Configuration
After static routes are configured it is important to verify that they are present in
the routing table and that routing is working as expected.

The command show running-config is used to view the active configuration in


RAM to verify that the static route was entered correctly.

The show ip route command is used to make sure that the static route is
present in the routing table.
Default Routes
 Can only use default routing on stub networks
 Stub networks are those with only one exit path out of the network
 The only routers that are considered to be in a stub network are R1 and
R3

20.0.0.1 30.0.0.1 30.0.0.2

S0 S1
10.0.0.1 E0 S0 S0 E0 40.0.0.1
20.0.0.2

10.0.0.2 A B 40.0.0.2
Default Routes
Stub Network

172.16.1.0
SO
Network
10.0.0.0 A BB
172.16.2.2 172.16.2.1

ip route 0.0.0.0 0.0.0.0 172.16.2.2

This route allows the stub network to reach all known networks beyond router A.
Configuring Default Routes
Default routes are used to route packets with destinations that do not match any of the other routes
in the routing table.

A default route is actually a special static route that uses this format:

ip route 0.0.0.0 0.0.0.0 [next-hop-address | outgoing interface]

This is sometimes referred to as a “Quad-Zero” route.

Example using next hop address:

Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.4.1

Example using the exit interface:

Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0


LAB Configuration

20.0.0.1 30.0.0.1
30.0.0.2
S0 S1
10.0.0.1 E0 S0 S0
40.0.0.1
E0
20.0.0.2

A B 40.0.0.2
10.0.0.2
Default Route LAB Configuration

20.0.0.1 30.0.0.1
30.0.0.2
S0 S1
10.0.0.1 E0 S0 S0
40.0.0.1
E0
20.0.0.2

A B 40.0.0.2
10.0.0.2
R2# config t
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#ip route 40.0.0.0 255.0.0.0 30.0.0.2

R1# config t R3# config t


R1(config)#ip route 0.0.0.0 0.0.0.0 20.0.0.2 R3(config)#ip route 0.0.0.0 0.0.0.0 30.0.0.1
Routing Information Protocol (RIP)
 Routing Information Protocol (RIP) is a true distance-vector routing protocol.
 It sends the complete routing table out to all active interfaces every 30 seconds
 RIP only uses hop count to determine the best way to a remote network
 It has a maximum allowable hop count of 15
 AD is 120
 Bellman-ford algorithm
 Works well in small networks, but it’s inefficient on large networks
 RIP version 1 uses only classfull routing, which means that all devices in the network must
use the same subnet mask
 RIP version 2 does send subnet mask information with the route updates. This is called
classless routing.
Router Configuration
The router command starts a routing process.

The network command is required because it enables the routing process to


determine which interfaces participate in the sending and receiving of routing
updates.

An example of a routing configuration is:

Gates(config)#router rip
Gates(config-router)#network 172.16.0.0

The network numbers are based on the network class addresses, not subnet
addresses or individual host addresses.
RIP Configuration

192.168.20.1 192.168.30.1
S0
S0 S1
192.168.10.1 E0 S0
192.168.30.2 E0 192.168.40.1
192.168.20.2

R2# config t
R2(config)#router rip 192.168.40.2
A R2(config)#network 192.168.20.0 B
192.168.10.2 R2(config)#network 192.168.30.0

R1# config t R3# config t


R1(config)# )#router rip R3(config)# )#router rip
R1(config)#network 192.168.10.0 R3(config)#network 192.168.30.0
R1(config)#network 192.168.20.0 R3(config)#network 192.168.40.0
Verifying RIP Configuration
Displaying the
IP Routing Table
debug ip rip Command
Passive Interface

 Passive-interface command prevents RIP update broadcasts from


being sent out a defined interface, but same interface can still
receive RIP updates
R1#config t
R1(config)#router rip
R1(config-router)#network 192.168.10.0
R1(config-router)#passive-interface serial 0
 Passive-interface command depends upon the routing protocol
 RIP router with a passive interface will still learn about the networks
advertised by other routers
 EIGRP, a passive-interface will neither send nor receive updates.
RIP Version 2 (RIPv2)

R1# config t
R1(config)# )#router rip
R1(config)#network 192.168.10.0
R1(config)#network 192.168.20.0
R1(config)#version 2
Exercise - RIP Version 2 Configuration

192.168.0.4/30 192.168.0.8/30

S0
S0 S1
E0 S0
E0

192.168.0.16/29 192.168.0.32/28

A B

1. Find out the IP Address and SNM of each interfaces


Exercise - RIP Version 2 Configuration

192.168.0.5 192.168.0.9
255.255.255.252 255.255.255.252
S0
S0 S1
E0 S0 192.168.0.33
192.168.0.10 E0 255.255.255.240
192.168.0.17 192.168.0.6 255.255.255.252
255.255.255.248 255.255.255.252

192.168.0.34
A B 255.255.255.240

192.168.0.18
255.255.255.248
Exercise - RIP Version 2 Configuration

192.168.0.4/30 192.168.0.8/30

S0
S0 S1
E0 S0
E0
R2# config t
192.168.0.16/29 R2(config)#router rip 192.168.0.32/28
R2(config)#network 192.168.0.4
R2(config)#network 192.168.0.8
R2(config)#version 2
A B

R1# config t R3# config t


R1(config)# )#router rip R3(config)# )#router rip
R1(config)#network 192.168.0.4 R3(config)#network 192.168.0.8
R1(config)#network 192.168.0.16 R3(config)#network 192.168.0.32
R1(config)#version 2 R3(config)#version 2
60

1/20/2019
Self Assessment:
62
Thank You…

You might also like