You are on page 1of 42

Routing Protocols

Introduction to Routing and Packet Forwarding


and Concepts

Internetworking 1
CISCO CCNA BOOTCAMP

Routing Protocols
and Concepts
Router as a Computer
• Describe the basic purpose of a router
–Computers that specialize in sending packets over the data
network.
–They are responsible for interconnecting networks by
selecting the best path for a packet to travel and forwarding
packets to their destination
• Routers have many of the same hardware and software
components that are found in other computers including:
–CPU
–RAM
–ROM
–Operating System

Internetworking 3
Router as a Computer
• Router components and their functions”
CPU - Executes operating system instructions
 such as system initialization, routing functions, and switching
functions.
Random access memory (RAM) -RAM stores the instructions and data
needed to be executed by the CPU.
Read-only memory (ROM) - Holds diagnostic software used when router
is powered up. Stores the router’s bootstrap program.
Non-volatile RAM (NVRAM) - Stores startup configuration. This may
include IP addresses (Routing protocol, Hostname of router)
Flash memory - Contains the operating system (Cisco IOS)

Internetworking 4
Router as a Computer
• Router components

Internetworking 5
Internetwork Operating System
• The operating system software used in Cisco
routers is known as Cisco Internetwork Operating
System (IOS).
– Cisco IOS is a multitasking operating system
that is integrated with routing, switching,
internetworking, and telecommunications
functions.
• Although the Cisco IOS may appear to be the same
on many routers, there are many different IOS
images.
– An IOS image is a file that contains the entire
IOS for that router. Cisco creates many different
types of IOS images, depending upon the model
of the router and the features within the IOS.
– Typically the more features in the IOS, the larger
the IOS image, and therefore, the more flash and
RAM that is required to store and load the IOS.
Internetworking 6
Router as a Computer

• Major phases to the


router boot-up
process
Test router hardware
• Power-On Self Test (POST)
• Execute bootstrap loader
Locate & load Cisco IOS
software
• Locate IOS
• Load IOS
Locate & load startup
configuration file or enter setup
mode

Internetworking 7
Stages of the router power-on boot sequence

Internetworking 8
Router as a Computer
show version
• Verify the router boot-up process:
–-The show version command is used to view
information about the router during the bootup
process. Information includes:
 Image name & IOS version
–IOS (tm) C2600 Software (C2600-I-M),
Version 12.2(28), RELEASE SOFTWARE
(fc5).
 Bootstrap version stored in ROM
ROM: System Bootstrap, Version
12.1(3r)T2, RELEASE SOFTWARE (fc1)
 Image file name & where it was loaded from
System image file is "flash:c2600-i-
mz.122-28.bin"

Internetworking 9
Management Ports
• Routers have physical connectors that are
used to manage the router. These
connectors are known as management
ports.
–Unlike Ethernet and serial interfaces,
management ports are not used for packet
forwarding.
• The most common management port is the
console port.
–The console port is used to connect a
terminal, or most often a PC running terminal
emulator software, to configure the router
without the need for network access to that
router.
–The console port must be used during initial
configuration of the router.
• .

Internetworking 10
Routers determine the best path

• Router Interface is a physical connector that enables a


router to send or receive packets
–Each interface connects to a separate network
• different IP network
• Typically, the interfaces connect to various types of
networks, which means that different types of media and
connectors are required. Types of router interfaces:
–-Ethernet
–-Fastethernet
–-Serial
–-DSL
–-ISDN
–-Cable

Internetworking 11
Two major groups of Router Interfaces: LAN & WAN

• LAN Interfaces: such as Ethernet and FastEthernet


 Are used to connect router to LAN network
 Has a layer 2 MAC address
a router Ethernet interface participates
in the ARP process for that LAN.
 Can be assigned a Layer 3 IP address
 Usually consist of an RJ-45 jack
When a router is connected to a
switch, a straight-through cable is
used.
When two routers are connected
directly through the Ethernet
interfaces, or when a PC NIC is
connected directly to a router Ethernet
interface, a crossover cable is used.

Internetworking 12
Two major groups of Router Interfaces: LAN & WAN

• WAN Interfaces- such as serial, ISDN, and


Frame Relay
 Are used to connect routers to
external networks that interconnect
LANs, usually over a larger
geographical distance..
 Depending on the WAN technology, a
layer 2 address may be used.
 Uses a layer 3 IP address
Similar to LAN interfaces, each
WAN interface has its own IP
address and subnet mask, which
identifies it as a member of a
specific network.
 The Layer 2 encapsulation can be of
different types,
PPP, Frame Relay, and HDLC
(High-Level Data Link Control).

Internetworking 13
Routers determine the best path

• Routers examine a packet’s destination IP address and


determine the best path by enlisting the aid of a routing table

Internetworking 14
Routers determine the best path

• The primary responsibility of a router is to direct packets destined for


local and remote networks by:
–Determining the best path to send packets
–Forwarding packets toward their destination
• The router uses its routing table to determine the best path to forward
the packet.
–When the router receives a packet, it examines its destination IP address
and searches for the best match with a network address in the router's
routing table.
–The routing table also includes the interface to be used to forward the
packet. Once a match is found, the router encapsulates the IP packet into
the data link frame of the outgoing or exit interface, and the packet is then
forwarded toward its destination.

Internetworking 15
Configure Devices and Apply
Addresses
• Implementing Basic Addressing Schemes
• When designing a new network or mapping an existing network you
must provide the following information in the form of a document:
–-Topology drawing that Illustrates physical connectivity
–Address table that provides the following information:
 Device name
 Interfaces used
 IP addresses
 Default gateway

Internetworking 16
Configure Devices and Apply
Addresses
• Basic Router Configuration
• A basic router configuration should contain the following:
–-Router name - Host name should be unique
–-Banner - At a minimum, banner should warn against unauthorized use
–-Passwords - Use strong passwords
–-Interface configurations –
• Specify interface type,
• IP address and subnet mask.
• Describe purpose of interface.
• Issue no shutdown command.
• If DCE serial interface issue clock rate command.
• After entering in the basic configuration the following tasks should be completed
–-Verify basic configuration and router operations.
–-Save the changes on a router

Internetworking 17
Configure Devices and Apply
Addresses
Router>
Router>enable
Router#
Router#config t
Router(config)#enable secret class
Router(config)#enable password cisco
Router(config)#hostname R1
R1(config)#
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
Internetworking 18
Configure Devices and Apply
Addresses
Configuring a Banner

From the global configuration mode, configure the


message-of-the-day (motd) banner. A delimiting
character, such as a "#" is used at the beginning and
at the end of the message. The delimiter allows you to
configure a multiline banner, as shown here.

R1(config)#banner motd #
Enter TEXT message. End with the character '#'.
******************************************
WARNING!! Unauthorized Access Prohibited!!
******************************************

Internetworking 19
Limiting Device Access – Enable and Enable Secret Passwords

• To provide additional security, use enable password or


enable secret command to establish authentication before
accessing privileged EXEC (enable) mode.
–Always use the enable secret command, not the older
enable password command, if possible.
• The following commands are used to set the passwords:
–Router(config)#enable password password
–Router(config)#enable secret password
• If no enable password or enable secret password is set,
the IOS prevents privileged EXEC access from a Telnet
session.
–Without an enable password having been set, a Telnet
session would appear this way:
• Switch>enable
• % No password set
• Switch>

Internetworking 20
Limiting Device Access – VTY Password

• The vty lines allow access to a router via Telnet.


–By default, many Cisco devices support 5 VTY lines
that are numbered 0 to 4.
–A password needs to be set for all available vty lines.
–The same password can be set for all connections.
–However, it is often desirable that a unique password
be set for one line to provide a fall-back for
administrative entry to the device if the other
connections are in use.
• The following commands are used to set a password:
–Router(config)#line vty 0 4
–Router(config-line)#password password
–Router(config-line)#login
• By default, the IOS includes the login command on the
VTY lines. This prevents Telnet access to the device
without first requiring authentication.
–If, by mistake, the no login command is set, which
removes the requirement for authentication,
unauthorized persons could connect to the line using
Telnet. This would be a major security risk.

Internetworking 21
Encrypting Password Display

• Another useful command prevents passwords from


showing up as plain text when viewing the
configuration files.
–This is the service password-encryption
command.
–This command causes the encryption of
passwords to occur when a password is
configured.
• The service password-encryption command
applies weak encryption to all unencrypted
passwords.
–This encryption does not apply to passwords
as they are sent over media only in the
configuration.
–The purpose of this command is to keep
unauthorized individuals from viewing
passwords in the configuration file.
• Once the encryption has been applied, removing
the encryption service does not reverse the
encryption.

Internetworking 22
Configuring router passwords (cont.)

WARNING
 service password-encryption uses a Cisco Level 7 encryption which is very
easy to decrypt.
 For the GetPass! software www.boson.com
 However, the enable secret <password> uses a stronger encryption method
and cannot be easily hacked.

and !
Internetworking 23
Doesn’t work for enable secret!

Internetworking 24
Configure Devices and Apply
Addresses
R1(config)#interface Serial0/0/0
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#description Ciruit#VBN32696-123 (help desk:1-800-555-1234)
R1(config-if)#no shutdown
R1(config-if)#clock rate 64000
–Note: When cabling a point-to-point serial link in our lab environment, one
end of the cable is marked DTE and the other end is marked DCE.
–The router that has the DCE end of the cable connected to its serial interface
will need the additional clock rate command configured on that serial interface.
–This step is only necessary in a lab environment

Internetworking 25
Configure Devices and Apply
Addresses
• The FastEthernet interface needs to be
configured
–R1(config)#interface FastEthernet0/0
–R1(config-if)#ip address 192.168.1.1
255.255.255.0
–R1(config-if)#description R1 LAN
–R1(config-if)#no shutdown

Internetworking 26
Configure Devices and Apply
Addresses
• Verify Basic Router Configuration
–-Issue the show running-config command
• displays the current running configuration that is stored in RAM.
–-Issuing the copy running-config startup-config command
• Save the basic router configuration
–-Additional commands that will enable you to further verify router
configuration are:
 Show startup-config - Displays configuration file NVRAM
 Show IP route - Displays routing table
 Show interfaces - Displays all interface configurations
 Show IP int brief - Displays abbreviated interface configuration
information

Internetworking 27
Configure Devices and Apply
Addresses

Internetworking 28
Configure Devices and Apply
Addresses

Internetworking 29
Routing Table Structure
• The primary function of a router is to forward a packet toward its
destination network, which is the destination IP address of the
packet.
–To do this, a router needs to search the routing information stored in its routing
table.
• Routing Table is stored in ram and contains information:
Directly connected networks - this occurs when a device is connected to
another router interface
Remotely connected networks - this is a network that is not directly
connected to a particular router
network/next hop associations - about the networks include source of
information, network address & subnet mask, and Ip address of next-hop
router
• Show ip route command is used to view a routing table

Internetworking 30
Routing Table Structure

• The following analogies may help clarify the


concept of connected, static, and dynamic
routes:
• Directly Connected Routes - To visit a
neighbor, you only have to go down the
street on which you already live. This path
is similar to a directly-connected route
because the "destination" is available
directly through your "connected interface,"
the street.
• Static Routes - A train uses the same
railroad tracks every time for a specified
route. This path is similar to a static route
because the path to the destination is
always the same.
• Dynamic Routes - When driving a car, you
can "dynamically" choose a different path
based on traffic, weather, or other
conditions. This path is similar to a
dynamic route because you can choose a
new path at many different points on your
way to the destination.

Internetworking 31
Routing Table Structure

• Adding a connected network to the routing table


–-Router interfaces
 Each router interface is a member of a different network
 Activated using the no shutdown command
 In order for static and dynamic routes to exist in routing table you must
have directly connected networks

Internetworking 32
Routing Table Structure

• Remote networks are added to the


routing table either by configuring
static routes or enabling a dynamic
routing protocol.
• Static routes in the routing table
–-Includes: network address and
subnet mask and IP address of
next hop router or exit interface
–-Denoted with the code S in the
routing table
–-Routing tables must contain
directly connected networks
used to connect remote
networks before static or
dynamic routing can be used

Internetworking 33
Routing Table Structure
• When to use static routes
–-When network only consists of a few routers
• Using a dynamic routing protocol in such a
case does not present any substantial
benefit.
–-Network is connected to internet only through
one ISP
• There is no need to use a dynamic routing
protocol across this link because the ISP
represents the only exit point to the
Internet.
–-Hub & spoke topology is used on a large
network
• A hub-and-spoke topology consists of a
central location (the hub) and multiple
branch locations (spokes), with each spoke
having only one connection to the hub.
• Using dynamic routing would be
unnecessary because each branch has only
one path to a given destination-through the
central location.

Internetworking 34
Routing Table Structure
• Dynamic routing protocols
–-Are used to add remote networks to a routing table
–-Are used to discover networks
–-Are used to update and maintain routing tables
• Automatic network discovery
–-Network discovery is the ability of a routing protocol to share information
about the networks that it knows about with other routers that are also using
the same routing protocol.
–Instead of configuring static routes to remote networks on every router, a
dynamic routing protocol allows the routers to automatically learn about
these networks from other routers.
–These networks - and the best path to each network - are added to the
router's routing table and denoted as a network learned by a specific
dynamic routing protocol.
• Maintaining routing tables
–-Dynamic routing protocols are used to share routing information with
other router & to maintain and up date their own routing table.
–Dynamic routing protocols not only make a best path determination to
various networks, they will also determine a new best path if the initial path
becomes unusable (or if the topology changes)
Internetworking 35
Router Paths: Best Path
• Whenever multiple paths to reach the same network exist, each
path uses a different exit interface on the router to reach that
network.
– The best path is selected by a routing protocol based on
the value or metric it uses to determine the distance to
reach a network.
• Metrics can be based on either a single characteristic
or several characteristics of a path.
• Some routing protocols can base route selection on
multiple metrics, combining them into a single metric.
• The smaller the value of the metric, the better the path.
–Routing protocols, such as RIP, use simple hop-count,
which the number of routers between a router and the
destination network.
• For example, a router will prefer a path that is 5 hops
away over a path that is 10 hops away.
–Other routing protocols, such as OSPF, determine the
shortest path by examining the bandwidth of the links, and
using the links with the fastest bandwidth from a router to
the destination network.

Internetworking 36
Router Paths and Packet Switching
• A Metric is a numerical value used by routing protocols help determine the best path to a destination
–The smaller the metric value the better the path
• 2 types of metrics used by routing protocols are:
–-Hop count - this is the number of routers a packet must travel through to get to its destination
• Hop count of four indicates that a packet must pass through four routers to reach its destination.
• If multiple paths are available to a destination, the routing protocol, such as RIP, picks the path
with the least number of hops.
–-Bandwidth - this is the “speed” of a link also known as the data capacity of a link
• OSPF routing protocol uses bandwidth as its metric. The best path to a network is determined by
the path with an accumulation of links that have the highest bandwidth values, or the fastest links.

Internetworking 37
Router Paths: Equal Cost Load
Balancing
• You may be wondering what happens if a routing table has two or
more paths with the same metric to the same destination network.
–When a router has multiple paths to a destination network and the value of that
metric (hop count, bandwidth, etc.) is the same, this is known as an equal cost
metric, and the router will perform equal cost load balancing.
• Equal cost metric is a condition where a router has multiple paths to
the same destination that all have the same metric
–The router will forward
packets using the multiple
exit interfaces listed in the
routing table.

Internetworking 38
Router Paths: Un-Equal Cost Load Balancing
• Just in case you are wondering, a router can send packets over
multiple networks even when the metric is not the same if it is
using a routing protocol that has this capability. This is known
as unequal cost load balancing. EIGRP (as well as IGRP) are
the only routing protocols that can be configured for unequal
cost load balancing.
• Unequal cost load balancing in EIGRP is not discussed in this
course but is covered in CCNP.

Internetworking 39
Router Paths and Packet Switching
• Packet forwarding involves two functions:
–Path determination function
–Switching function
• Path determination is a process used by a router to pick
the best path to a destination
• One of 3 path determinations results from searching for
the best path
–Directly connected network
• The destination IP address of the packet is a host
address on the same network as this router's
interface
–Remote network
• If the destination IP address of the packet
belongs to a remote network, then the packet is
forwarded to another router.
–No route determined
• the packet is discarded

Internetworking 40
Router Paths and Packet
Switching
• Switching Function of Router is the process used by a
router to switch a packet from an incoming interface to
an outgoing interface on the same router.
• What does a router do with a packet received from one
network and destined for another network?
–-A packet received by a router will do the following:
Strips off layer 2 headers.
Examines destination IP address located in
Layer 3 header to find best route to destination.
Re-encapsulates layer 3 packet into layer 2
frame.
Forwards frame out exit interface.

Internetworking 41
-- End of presentation --

Internetworking 42

You might also like