Sie sind auf Seite 1von 573

Introduction to Routing

and Packet Forwarding g

Chapter 1: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Identify
de y a router
ou e as a co
computer
pu e with aan OS aand
d
hardware designed for the routing process.
ƒ Demonstrate the ability to configure devices and
apply addresses.
ƒ Describe the structure of a routing table
table.
ƒ Describe how a router determines a path and
switches packets

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
Router as a Computer

ƒ Describe
esc be the
e bas
basicc purpose
pu pose o
of a router
ou e
-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
p that are found in other computers
p
including:
–CPU
–RAM
–ROM
–Operating System

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
Router as a Computer

ƒ Router components
p 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. RAM is used to store these components:
–Operating System: The Cisco IOS (Internetwork Operating System) is copied
g bootup.
into RAM during p
–Running Configuration File: This is the configuration file that stores the
configuration commands that the router IOS is currently using.
–IP Routing
g Table: This file stores information about directlyy connected and
remote networks. It is used to determine the best path to forward the packet.
–ARP Cache: This cache contains the IPv4 address to MAC address
mappings, similar to the ARP cache on a PC. The ARP cache is used on
routers that
h h have LAN iinterfaces
f such
h as E
Ethernet
h iinterfaces.
f
–Packet Buffer: Packets are temporarily stored in a buffer when received on an
interface or before they exit an interface.
RAM is volatile memory and loses its content when the router is powered down or
restarted.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
Router as a Computer

ƒ Router
ou e co
components
po e s aand
d their
e functions”
u c o s
ƒRead-only memory (ROM) - Holds diagnostic software used
when router is powered up. Stores the router’s bootstrap
p g
program.
–ROM is a form of permanent storage.
Cisco devices use ROM to store:
–The bootstrap instructions
–Basic diagnostic software
–Scaled-down version of IOS
ROM uses firmware, which is software that is embedded inside the
integrated circuit.
– Firmware includes the software that does not normally need to
be modified or upgraded, such as the bootup instructions.
– ROM does not lose its contents when the router loses power
or is restarted.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
R t as a C
Router Computer
t
ƒ Router components and their functions”
ƒNon-volatile RAM (NVRAM) - Stores startup configuration. This may include IP
addresses (Routing protocol
protocol, Hostname of router)
ƒNVRAM (Nonvolatile RAM) does not lose its information when power is turned off. This is in
contrast to the most common forms of RAM, such as DRAM, that requires continual power to
maintain its information.
ƒNVRAM is used by the Cisco IOS as permanent storage for the startup configuration file file.
ƒAll configuration changes are stored in the running-config file in RAM, and with few
exceptions, are implemented immediately by the IOS.
ƒTo save those changes in case the router is restarted or loses power, the running-config
must be copied to NVRAM
NVRAM, where it is stored as the startup-config file.
file NVRAM retains its
contents even when the router reloads or is powered off.
ƒFlash memory - Contains the operating system (Cisco IOS)
ƒIn most models of Cisco routers, the IOS is permanently stored in flash
memory and copied into RAM during the bootup process, where it is then
executed by the CPU.
ƒFlash consists of SIMMs or PCMCIA cards, which can be upgraded to
increase the amount of flash memory
memory.
ƒInterfaces - There exist multiple physical interfaces that are used to connect network.
Examples of interface types:
-Ethernet / fast Ethernet interfaces
-Serial interfaces
-Management interfaces
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
Router as a Computer

ƒ Router
ou e co
components
po e s

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
Internetwork Operating System

ƒ The operating system software used in Cisco routers is known as Cisco


Internetwork Operating System (IOS)
(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.
ƒ Although some routers provide a graphical user interface (GUI), the
command d liline iinterface
t f (CLI) iis a much
h more common method
th d off
configuring Cisco routers.
– The CLI is used throughout this curriculum.
ƒ Upon bootup
bootup, the startup
startup-config
config file in NVRAM is copied into RAM and
stored as the running-config file.
– IOS executes the configuration commands in the running-config. Any
changes entered by the network administrator are stored in the running-
config and are immediately implemented by the IOS.
IOS

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
Overview - Managing Cisco IOS Software (cont)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Router as a Computer

ƒ Major
ajo pphases
ases to
o the
e
router boot-up process
ƒTest router hardware
Power-On Self Test
(POST)
Execute bootstrap
p loader
ƒLocate & load Cisco IOS
software
-Locate
Locate IOS
-Load IOS
ƒLocate & load startup
configuration file or enter
setup mode
-Bootstrapppprogram
g looks
for configuration file

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
Stages of the router power-on boot sequence

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
R t as a C
Router Computer
t
ƒ Major phases to the router boot-up process
Step 1 and 2: Test router hardware
•Power-On
P O Self
S lf Test
T t (POST)
–During this self-test, the router executes
diagnostics from ROM on several hardware
components including the CPU, RAM, and
NVRAM
•Execute bootstrap loader
–The main task of the bootstrap program is
to locate the Cisco IOS and load it into
RAM.
–Note: At this point, if you have a console
connection to the router, you will begin to
see output on the screen.
Step 3 and 4: Locate & load Cisco IOS software
-Locate
Locate IOS and Load IOS
–The IOS is typically stored in flash
memory, but can also be stored in other
places such as a TFTP server.
–If a full IOS image
g can not be located,, a
scaled-down version of the IOS is copied
from ROM into RAM. This version of IOS is
used to help diagnose any problems and
can be used to load a complete version of
the IOS into RAM.
–Note: A TFTP server is usually used as a
backup server for IOS but it can also be
used as a central point for storing and
loading the IOS.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
R t as a C
Router Computer
t
Step 5 and 6: Locate & load startup configuration file or enter setup
mode
-After the IOS is loaded, the bootstrap program searches for
the startup configuration file, known as startup-config, in
NVRAM. This parameters including:
•interface
interface addresses
•routing information
•passwords
•any
y other configurations
g
–If the startup-config, is located in NVRAM, it is copied into
RAM as the running-config.
•The IOS loads the commands in the file, one line at a
time.
time
–If the startup configuration file does not exist in NVRAM, the
router may search for a TFTP server.
• If the router detects that it has an active link to another
configured router, it sends a broadcast searching for a
configuration file across the active link. You will eventually
see message like the following one:
•%Error
%Error opening tftp://255.255.255.255/network-confg
tftp://255.255.255.255/network confg
(Timed out)
•%Error opening tftp://255.255.255.255/cisconet.cfg
(Timed out)
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
Router as a Computer
ƒ Locate & load startup configuration file or enter setup
mode
–Enter Setup Mode (Optional). If the startup
configuration file can not be located,
located the router
prompts the user to enter setup mode.
•Setup mode is a series of questions prompting
the user for basic configuration information.
Setup mode is not intended to be used to enter
complex router configurations
configurations, and it is not
commonly used by network administrators.
–When booting a router that does not contain a
startup configuration file, you will see the following
question after the IOS has been loaded:
•Would you like to enter the initial configuration
dialog? [yes/no]: no
–Setup mode will not be used in this course
to configure the router. When prompted to
enter
e te setup mode,
ode, a
always
ays a
answer
s e no. o If you
answer yes and enter setup mode, you can
press Ctrl-C at any time to terminate the
setup process.
–When setup mode is not used, the IOS creates a
default running-config.
running config.
•The default running-config is a basic
configuration file that includes the router
interfaces, management interfaces, and certain
default information.
•The
Th default
d f lt running-config
i fi does
d nott contain
t i any
interface addresses, routing information,
passwords, or other specific configuration
information.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
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
(C2600-I-M), V i 12 12.2(28),
2(28)
RELEASE SOFTWARE (fc5).
ƒBootstrap version stored in ROM
ƒROM:
O System
S 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
flash:c2600 i mz.122
122-28
28.bin
bin"

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Router as a Computer
show version
ƒ Verify the router boot-up process:
ƒPlatform model number
ƒCPU
ƒAmount of RAM
ƒSome series of routers, like the
2600, use a fraction of DRAM as
packet memory. Packet memory is
used d ffor b
buffering
ff i packets.
k t
ƒTo determine the total amount of
DRAM on the router, add both
numbers. In this example, the Cisco
2621 router has 60,416 KB
(kilobytes) of free DRAM used for
temporarily storing the Cisco IOS
y
and other system p
processes. The
other 5,120 KB is dedicated for
packet memory. The sum of these
numbers is 65,536K, or 64
megabytes (MB) of total DRAM.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
Router as a Computer
show version
ƒ Verify the router boot-up process:
ƒNumber & type of interfaces
2 FastEthernet/IEEE 802.3
interface(s)
2 Low-speed serial(sync/async)
network interface(s)
ƒAmount of NVRAM
ƒ32K bytes of non-volatile
configuration memory.
ƒNVRAM is used to store the
startup config file.
startup-config file
ƒAmount of flash
ƒ16384K bytes of processor board
System flash (Read/Write)
ƒThis is the amount of flash memory
on the router. Flash is used to
permanently store the Cisco IOS.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
Router as a Computer
show version
ƒ Configuration register
ƒ Configuration register is 0x2102
–The last line of the show version
command displays the current
configured
fi d value
l off th the software
ft
configuration register in
hexadecimal. If there is a second
value displayed in parentheses, it
denotes the configuration register
value that will be used during the
next reload.
–The configuration
g register
g has
severall uses, iincluding
l di password d
recovery. The factory default setting
for the configuration register is
0x2102. This value indicates that
th router
the t will
ill attempt
tt t tto lload da
Cisco IOS software image from
flash memory and load the startup
configuration file from NVRAM.
–Note: The configuration register is
discussed in more detail in a later
course.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
C fi
Configuration
ti register
i t
ƒ The order in which the router looks for system
bootstrap depends on the boot field setting in the
g
configuration register.
g
The default configuration register setting can be
changed with the global configuration mode
command config-register.
Use a hexadecimal number as the argument for this
command.
ƒ The configuration register is a 16-bit register in
NVRAM.
The lowest four bits of the configuration register form
the boot field.
To ensure that the upper 12 bits are not changed,
first retrieve the current values of the configuration
register using the show version command.
Then use the config-register command, changing
only the value of the last hexadecimal digit.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Configuration register (cont.)
(cont )
ƒ To enter the ROM monitor mode, set the configuration
register value to 0xnnn0,
where nnn represents the previous value of the non-boot field
di it
digits.
This value sets the boot field bits to 0000 binary.
From ROM monitor, boot the operating system manually by
using the b command at the ROM monitor prompt.
ƒ To configure the system to boot automatically from ROM
ROM,
set the configuration register to 0xnnn1,
This value sets the boot field bits to 0001 binary.
ƒ To configure the system to use the boot system
commands in NVRAM
NVRAM, set the configuration register to
any value from 0xnnn2 to 0xnnnF,
These values set the boot field bits to a value between 0010
and 1111 binary.
Using boot system commands in NVRAM is the default.

Check Configuration Register value (NVRAM)


0 = ROM Monitor mode
1 = ROM IOS
2 - 15 = Boot system from Flash

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
How a Cisco device locates and loads IOS
The config-register can be Downloaded from:
ƒ Demo http://www.lilligren.com/cisco/downloads.htm
http:// lilligren com/cisco/do nloads htm
config-register

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
Configuration register: 0, 1, and 2 and above

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Configuration register: 2102 and 2142

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Configuration register
Router(config)#config-register value
1 2

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Stages of the router power-on boot sequence
1. ROM
1, 2
1. POST
2. Bootstrap code executed
3. Check Configuration Register value (NVRAM) 3
0 = ROM Monitor mode
1 = ROM IOS
2 - 15 = Boot system from flash
4
2. Check for IOS boot system commands in startup-config file (NVRAM)
If boot system commands in startup-config
a. Run boot system commands in order they appear in startup-config to locate the IOS
b If boot system commands fail, use default fallback sequence to locate the IOS (Flash, TFTP, ROM)

3. Locate and load IOS, Default fallback sequence: No IOS boot system commands in startup-config
a. Flash (sequential)
b. TFTP server (netboot) - The router uses the configuration register value to form a filename from which to boot a default system image stored
on a network server.
c. ROM (partial IOS) or keep retrying TFTP depending upon router model
- If no IOS located, get partial IOS version from ROM

4. Locate and load startup-config


a. If startup-config found, copy to running-config
b. If startup-config not found, prompt for setup-mode
c If setup-mode
c. setup mode bypassed
bypassed, create a “skeleton”
skeleton default running-config
running config (no startup
startup-config)
config)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
How a Cisco device locates and loads IOS
ƒ The router can use its own fallback
sequence
q to load the software.
The router looks to the boot system
commands saved in NVRAM.
(Tony) The router has its own default
fallback sequence
sequence. This default sequence
can be interrupted by using the boot
system command and/or config register.
ƒ The settings
g in the configuration
g register
g
enable the following alternatives:
Global configuration mode boot system
commands can be specified to enter
fallback sources.
If NVRAM lacks boot system commands
the system by default uses the Cisco IOS
software in flash memory.
(T
(Tony)
) No
N bboott system
t commands d
(Tony) IOS specified in the boot
system does not exist
If flash memory is empty, the router then
attempts to use TFTP to load an IOS
image from the network.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
How a Cisco device locates and loads IOS

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
U i the
Using th boot
b t system
t command
d
ƒ The three examples show boot system
entries which specify that a Cisco IOS
software
ft image
i will
ill lload
d
First from flash memory,
Flash memory – A system image from
flash memory can be loaded
loaded.
Then from a network server, and
Network server – In case flash
memory becomes corrupted, a system
i
image can bbe lloaded
d d ffrom a TFTP
server.
Finally from ROM:
ROM – If flash memory is corrupted
and the network server fails to load the
image, booting from ROM is the final
bootstrap option in software.
However the system image in ROM is
However,
a subset of the Cisco IOS that lacks the
protocols, features of the full Cisco IOS.
Also, if the software has been updated,
the router may have an older version
stored
•The command copy in ROM.
running-config startup-config saves the commands in NVRAM.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
How a Cisco device locates and loads IOS

• What happen when both config-register and boot


system both exist in the startup-config?
• Which one has the priority?
p y

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Management Ports

ƒ Routers have physical connectors that are


usedd tto manage the
th router.
t These
Th connectors
t
are known as management ports.
–Unlike Ethernet and serial interfaces,
management ports are not used for packet
f
forwarding.
di
ƒ The most common management port is the
console port.
–The
The console port is used to connect a terminal
terminal,
or most often a PC running terminal emulator
software, to configure the router without the
need for network access to that router.
–The
The console port must be used during initial
configuration of the router.
ƒ Another management port is the auxiliary port.
–Not all routers have auxiliaryy p
ports.
–At times the auxiliary port can be used in ways
similar to a console port. It can also be used to
attach a modem.
–Auxiliary
Auxiliary ports will not be used in this
curriculum.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
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
yp of networks, which means that different
types of media and connectors are required.
Types of router interfaces:
-Ethernet
Ethernet
-Fastethernet
-Serial
-DSL
-ISDN
-Cable
Cable

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
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
switch, straight-through
through cable is
used.
ƒWhen two routers are connected
directly through the Ethernet
interfaces or when a PC NIC is
interfaces,
connected directly to a router
Ethernet interface, a crossover
cable is used.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
Two major groups off Router Interfaces:
f LAN & WAN
ƒ WAN Interfaces- such as serial, ISDN, and
F
Frame Relay
R l
ƒAre used to connect routers to external
networks that interconnect LANs,
usually over a larger geographical
distance..
ƒDepending
p g on the WAN technology,
gy, a
layer 2 address may be used.
ƒUses a layer 3 IP address
ƒSimilar to LAN interfaces,
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,
y, and HDLC (High-
( g
Level Data Link Control).

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Two major groups off Router Interfaces:
f LAN & WAN
ƒ The router in the figure has four
i t f
interfaces.
–Each interface has a Layer 3 IP address
and subnet mask that configures it for a
different network.
–The Ethernet interfaces also have Layer 2
Ethernet MAC addresses.
ƒ The WAN interfaces are using different
Layer 2 encapsulations.
–Serial
S 0/0/0 is using HDLC
C
–Serial 0/0/1 is using PPP.
–Both
Both of these serial point-to-point
point to point
protocols use a broadcast address for the
Layer 2 destination address when
encapsulating the IP packet into a data link
frame.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
Routers determine the best path

ƒ A router connects multiple


p networks.
ƒThis means that it has multiple interfaces that each belong to a
different IP network.
ƒWhen a router receives an IP packet on one interface
interface, it
determines which interface to use to forward the packet onto its
destination.
ƒThe
The interface that the ro
router
ter uses
ses to for
forward
ard the packet ma may be
the network of the final destination of the packet (the network with
the destination IP address of this packet), or it may be a network
connected to another router that is used to reach the destination
network.
ƒ Routers are the network center
-Routers generally have 2 connections:
-WAN connection (Connection to ISP)
-LAN connection

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 35
Routers determine the best path

ƒ Routers
ou e s e
examine
a e a pac
packet’s
e s des
destination
a o IP add
address
ess a
andd
determine the best path by enlisting the aid of a routing
table

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 36
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.
ƒ It is very likely that a router will receive a packet that is encapsulated in
one type of data link frame, such as an Ethernet frame and when
forwarding the packet, the router will encapsulate it in a different type of
data link

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
Routers determine the best path

ƒ Routers
ou e s Ope
Operate
aea at Layers
aye s 1,, 2 & 3
–A router makes its primary forwarding
decision at Layer 3, but as we saw earlier, it
participates in Layer 1 and Layer 2
processes as well.
ƒRouter receives a stream of encoded bits
ƒBits are decoded and passed to layer 2
ƒRouter de-encapsulates the frame
ƒRemaining packet passed up to layer 3
-Routing decision made at this layer by
examining destination IP address
ƒPacket is then re-encapsulated & sent out
outbound interface

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
Routers determine the best path

ƒ PC1 operates at all seven layers, encapsulating the data and sending the frame out as a stream
of encoded bits to R1
R1, its default gateway
gateway.
ƒ R1 receives the stream of encoded bits on its interface. The bits are decoded and passed up to
Layer 2, where R1 decapsulates the frame. The router examines the destination address of the
data link frame to determine if it matches the receiving interface, including a broadcast or
multicast address. If there is a match with the data portion of the frame, the IP packet is passed
up to Layer 3, where R1 makes its routing decision. R1 then re-encapsulates the packet into a
new Layer 2 data link frame and forwards it out the outbound interface as a stream of encoded
bits.
ƒ R2 receives the stream of bits, and the process repeats itself. R2 decapsulates the frame and
passes the data portion of the frame, the IP packet, to Layer 3 where R2 makes its routing
decision. R2 then re-encapsulates the packet into a new Layer 2 data link frame and forwards it
out the outbound interface as a stream of encoded bits.
ƒ This process is repeated once again by router R3, which forwards the IP packet, encapsulated
inside a data link frame and encoded as bits, to PC2.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 39
Configure Devices and Apply Addresses

ƒ Implementing
pe e g Basic
as c Addressing
dd ess g Sc
Schemes
e es
ƒ When designing a new network or mapping an existing
network you must provide the following information in
the form of a document:
-Topology
p gy drawing
g that Illustrates p
physical
y connectivity
y
–Address table that provides the following information:
ƒDevice name
ƒInterfaces used
ƒIP addresses
ƒDefault gateway

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 40
Configure Devices and Apply Addresses

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
Configure Devices and Apply Addresses

ƒ Basic Router Configuration


ƒ A basic router configuration should contain the following:
-Router name - Host name should be unique
-Banner
Banner - At a minimum,
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

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 42
Configure Devices and Apply Addresses

brief review from CCNA1


Router>
Router>enable
Router#
Router#config t
Router(config)#enable secret class
Router(config)#enable password cisco
Router(config)#hostname R1
R1(config)#
R1(
R1(config)#line
fi )#li console
l 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
( g ) g
R1(config-line)#exit

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 43
Configure Devices and Apply Addresses

brief review from CCNA1


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!!
******************************************
#

Configuring an appropriate banner is part of a good


security plan. At a very minimum, a banner should
warn against unauthorized access. Never configure a
banner that "welcomes" an unauthorized user.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 44
Limiting Device Access – Enable and Enable Secret Passwords
ƒ To provide additional security, use enable password
or enable secret command to establish
authentication
h i i b before
f accessing
i privileged
i il d EXEC
(enable) mode.
Always use the enable secret command, not the older
enable
bl password d command,d if possible.
ibl
ƒ 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
set, a Telnet
session would appear this way:
Switch>enable
% No password set
Switch>
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 45
Limiting Device Access – Enable and Enable Secret Passwords
ƒ Example of enable password and enable secret:

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 46
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
b d 0 tto 44.
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
However
one line to provide a fall-back for administrative entry to the
device if the other connections are in use.
ƒ The following
g commands are used to set a p
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.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 47
Encrypting Password Display
ƒ Another useful command prevents passwords from
showing up as plain text when viewing the
configuration
fi i files.
fil
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
yp to all unencrypted
yp p
passwords.
This encryption does not apply to passwords as they are
sent over media only in the configuration.
The p purpose
p of this command is to keep
p unauthorized
individuals from viewing passwords in the configuration
file.
ƒ Once the encryption
yp has been applied,
pp , removing
g the
encryption service does not reverse the encryption.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 48
Configuring router passwords (cont.)
(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 !
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 49
Configuring
g g router passwords (cont.)
( )

Doesn’t work for enable secret!

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 50
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
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

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 51
Configure Devices and Apply Addresses

ƒ the
th FastEthernet
F tEth t interface
i t f needs
d to
t be
b configured
fi d
R1(config)#interface FastEthernet0/0
R1(
R1(config-if)#ip
fi if)#i address
dd 192
192.168.1.1
168 1 1 255
255.255.255.0
255 255 0
R1(config-if)#description R1 LAN
R1(config if)#no shutdown
R1(config-if)#no

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 52
Configure Devices and Apply Addresses

ƒ Each interface must belong to a different network.


–Although
Alth h th
the IOS allows
ll you to
t configure
fi an IP address
dd
from the same network on two different interfaces, the router
will not activate the second interface.
–For example, what if you attempt to configure the
FastEthernet 0/1 interface on R1 with an IP address on the
192 168 1 0/24 network?
192.168.1.0/24 t k? FastEthernet
F tEth t 0/0 has
h already
l d been
b
assigned an address on that same network. you will get the
following message:
R1(config)#interface FastEthernet0/1
R1(config-if)#ip address 192.168.1.2
192 168 1 2 255.255.255.0
255 255 255 0
192.168.1.0 overlaps with FastEthernet0/0
–If there is an attempt to enable the interface with the no
shutdown command, the following message will appear:
R1(config-if)#no shutdown
192.168.1.0 overlaps with FastEthernet0/0
FastEthernet0/1: incorrect IP address assignment

ƒ The output from the show ip interface brief command


shows that the second interface configured for the
192.168.1.0/24 network, FastEthernet 0/1, is still down.
ƒ R1#show ip interface brief
<output omitted>
FastEthernet0/1 192.168.1.2 YES manual administratively down down
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 53
Configure Devices and Apply Addresses

ƒ Verify
e y Basic
as c Router
ou e Co
Configuration
gu a o
-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
Show startup
startup-config
config - Displays configuration file NVRAM
ƒShow IP route - Displays routing table
ƒShow interfaces - Displays
p y all interface configurations
g
ƒShow IP int brief - Displays abbreviated interface
configuration information

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 54
Configure Devices and Apply Addresses

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 55
Configure Devices and Apply Addresses

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 56
Routing Table Structure
S
ƒ The primary function of a router is to forward a packet toward its
destination network
network, which is the destination IP address of the packet
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
R t l connected
t d networks
t k - this
thi iis a network
t k th
thatt iis nott di
directly
tl
connected to a particular router
ƒnetwork/next hop associations - about the networks include source of
i f
information,
ti network
t k address
dd & subnet
b t mask,k and
d Ip
I address
dd off next-hop
th
router
ƒ Show ip
p route command is used to view a routing
g table

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 57
Routing Table Structure
ƒ The network/exit-interface association can also represent the destination network
address of the IP packet.
This association occurs on the router's directly connected networks.
ƒ A directly connected network is a network that is directly attached to one of the
router interfaces.
When a router interface is configured with an IP address and subnet mask, the interface
becomes a host on that attached network. The network address and subnet mask of the
interface, along with the interface type and number, are entered into the routing table as a
directly connected network. When a router forwards a packet to a host, such as a web
server, that host is on the same network as a router's directly connected network.
ƒ A remote network is a network that is not directly connected to the router
router.
In other words, a remote network is a network that can only be reached by sending the
packet to another router. Remote networks are added to the routing table using either a
dynamic routing protocol or by configuring static routes. Dynamic routes are routes to
remote networks that were learned automatically by the router, using a dynamic routing
protocol.
t l Static
St ti routes
t are routes
t tot networks
t k that
th t a network
t k administrator
d i i t t manually ll
configured.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 58
Routing Table Structure

ƒ As shown in the figure the routing table is displayed with the show ip route
command. d At this
thi point,
i t th
there h have nott b
been any static
t ti routes
t configured
fi d
nor any dynamic routing protocol enabled. Therefore, the routing table for
R1 only shows the router's directly connected networks. For each network
listed in the routingg table,, the following
g information is included:
–C - The information in this column denotes the source of the route information,
directly connected network, static route or a dynamic routing protocol. The C
represents a directly connected route.
–192.168.1.0/24
192 168 1 0/24 - This
Thi iis th
the network
t k address
dd andd subnet
b t mask k off th
the di
directly
tl
connected or remote network. In this example, both entries in the routing table,
192.168.1./24 and 192.168.2.0/24, are directly connected networks.
–FastEthernet 0/0 - The information at the end of the route entryy represents
p the
exit interface and/or the IP address of the next-hop router. In this example, both
FastEthernet 0/0 and Serial0/0/0 are the exit interfaces used to reach these
networks.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 59
Routing Table Structure

ƒ PCs
Cs a
also
so have
a e a routing
ou g table.
ab e
In the figure, you can see the route print command output. The
command reveals the configured or acquired default gateway,
connected loopback
connected, loopback, multicast
multicast, and broadcast networks
networks.
The output from route print command will not be analyzed
duringg this course. It is shown here to emphasize
p the p
point that
all IP configured devices should have a routing table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 60
Routing Table Structure

ƒ The following analogies may help clarify


the concept of connected
connected, static
static, and
dynamic routes:
ƒ Directly Connected Routes - To visit a
neighbor,
g yyou onlyy have to ggo down the
street on which
hi h you already
l d lilive. Thi
This
path is similar to a directly-connected
route because the "destination" is
available directly through your
"
"connected
t d iinterface,"
t f " the
th street.
t t
ƒ Static Routes - A train uses the same
railroad tracks every time for a specified
route This path is similar to a static
route.
route because the path to the
destination is always the same.
ƒ Dynamic Routes - When driving a car,
you can "dynamically"
"d i ll " choose
h 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.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 61
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
In order for static and dynamic routes to exist in routing
table you must have directly connected networks

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 62
Routing Table Structure

ƒ Remote networks are added to the


routing table either by configuring
static routes or enabling a dynamic
routinggpprotocol.
ƒ 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

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 63
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
hub.
•Using dynamic routing would be
unnecessary because each branch has only
one path to a given destination-through the
central location
location.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 64
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 p 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
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)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 65
Routing Table Structure

•R1 has learned about two remote


networks:
•A route that dynamically used RIP
•In the figure,
figure R1 has automatically
learned about the 192.168.4.0/24
network from R2 through the dynamic
routing
gp protocol,, RIP ((Routing
g
Information Protocol).
•A static route that was configured
manually.
•This is an example of how routing
tables can contain routes learned
dynamically and configured
statically and is not necessarily
representative of the best
configuration
fi ti ffor thi
this network.
t k

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 66
Routing Table Structure

ƒ IP routing
gpprotocols. Example
p of routing
gpprotocols include:
–RIP (Routing Information Protocol) - - CCNA
–IGRP (Interior Gateway Routing Protocol) - - ignore it
–EIGRP (Enhanced Interior Gateway Routing Protocol) - - CCNA & NP
–OSPF (Open Shortest Path First) - - CCNA & CCNP
–IS-IS (Intermediate System-to-Intermediate System) - - CCNP
–BGP (Border Gateway Protocol) - - CCNP

RIP (versions 1 and 2), EIGRP, and OSPF are discussed in this course. EIGRP
and
d OSPF are also l explained
l i d iin more d
detail
t il iin CCNP
CCNP, along
l with
ith IS
IS-IS
IS and
d BGP.
BGP
IGRP is a legacy routing protocol and has been replaced by EIGRP. Both IGRP
and EIGRP are Cisco proprietary routing protocols, whereas all other routing
protocols listed are standard, non-proprietary
non proprietary protocols.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 67
Routing Table Structure
ƒ Routing Table Principles
-3 principles regarding routing tables:
ƒEvery router makes its decisions alone, based on the
information it has in its routing table
table.
ƒDifferent routing table may contain different information
ƒ A routing
g table can tell how to g
get to a destination but not
how to get back (Asymmetric Routing)
ƒRouting information about a path from one network to another
does not provide routing information about the reverse
reverse, or
return, path.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 68
Router Paths and Packet Switching

ƒ Internet
e e Protocol
o oco ((IP)) pac
packet
e format
o a cocontains
a s fields
e ds that
a
provide information about the packet and the sending
and receiving hosts
ƒ Fields that are importance for CCNA students:
-Version
-IP header length
L
Layer 3
-TTL
-Precedence & type of service
-Packet length
-Source
S IP address
-Destination IP address

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 69
Router Paths and Packet Switching
ƒ The Layer 2 data link frame usually contains header information with a data link
source and destination address, trailer information, and the actual transmitted
d t
data.
–The data link source address is the Layer 2 address of the interface that sent the data link frame.
ƒ MAC Layer Frame Format
As a packet
A k t is
i forwarded
f d d ffrom router
t tot router,
t theth Layer
L 3 source and
d destination
d ti ti IP
addresses will not change; however, the Layer 2 source and destination data link
addresses will change.
ƒ MAC Frames are also divided into fields. Theyy include:
-Preamble Layer 2
•Seven bytes of alternating 1s and 0s, used to synchronize signals
-Start of frame delimiter
•1
1bbyte
te signaling the beginning of the frame
-Destination MAC address
•6 byte
-Source MAC address
•6 byte
-Type/length
•2 byte
-Data
Data and pad
•46 to 1500 bytes of data; zeros used to pad any data packet less than 46 bytes
-Frame check sequence
•4 byte
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 70
Ethernet frame fields (cont.)
ƒ The original Ethernet standards defined the
minimum
i i fframe size
i as 64
64-bytes
b t and d th
the
maximum as 1518-bytes.
These numbers include all bytes from the A Start Frame Delimiter
Destination MAC Address field through
g the
Frame Check Sequence field. 10101011
10101011.
The Preamble and Start Frame Delimiter fields
are not included when quoting the size of a
frame. z
ƒ The IEEE 802.3ac standard released in 1998
extended the maximum allowable frame size
to 1522-bytes to allow a "VLAN tag" to be
i
inserted
t d iinto
t th
the Eth
Ethernett fframe format.
f t

http://www.techfest.com/networking/lan/ethernet2.htm
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 71
• Peer to Peer Communication is really communication between the headers at
each layer.
• Layers 2 and 3 are best effort or connectionless.
connectionless
• Layer 4 Transport is connection oriented. The ‘connection’ is in the header.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 72
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 73
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
network.
•Metrics can be based on either a single
characteristic or several characteristics of a path.
•Some routing gpprotocols can base route selection
on multiple metrics, combining them into a single
metric.
•The smaller the value of the metric, the better the
path.
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.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 74
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
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.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 75
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,
t i and d th
the router
t will
ill perform
f equall costt lload
dbbalancing.
l i
ƒ 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.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 76
Router Paths: Equal Cost
C Load Balancing
ƒ To solve this dilemma, a router will use Equal Cost Load
Balancing This means the router sends packets over the multiple
Balancing.
exit interfaces listed in the routing table.
–per-packet load balancing
•( Process Switching)
–per-destination load balancing.
•(Fast Switching)
Router(config-if)# ip route-cache Router(config-if)#no ip route-cache

ping 10.0.0.1 ping 10.0.0.2 ping 10.0.0.1


ping 10.0.0.2

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 77
Load balancing with RIP
per-packet
debug ip packet
load balancing
IP packet
k t debugging
d b i iis on
GAD#
*Mar 1 19:10:29.646: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), routed via RIB
*Mar 1 19:10:29.646: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), g=192.168.13.2, len 60, forward
*Mar 1 19:10:30.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:10:30.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), g=192.168.15.2, len 60, forward
*Mar 1 19:10:31.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), routed via RIB
*Mar 1 19:10:31.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), g=192.168.13.2, len 60, forward
*Mar 1 19:10:32.218: IP: s=0.0.0.0 (FastEthernet0/0), d=255.255.255.255, len 604, rcvd 2
*Mar 1 19:10:32.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:10:32.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), g=192.168.15.2, len 60, forward
*Mar 1 19:10:33.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), routed via RIB
*Mar 1 19:10:33.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), g=192.168.13.2, len 60, forward
*Mar 1 19:10:34.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:10:34.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), g=192.168.15.2, len 60, forward
*Mar 1 19:10:35.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), routed via RIB
*Mar 1 19:10:35.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), g=192.168.13.2, len 60, forward
*Mar 1 19:10:35.974: IP: s=192.168.13.1 (local), d=255.255.255.255 (Serial0/1), len 72, sending broad/multicast
*Mar 1 19:10:36.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:10:36.654: IP: s=192.168.14.2 ((FastEthernet0/0),
), d=192.168.16.2 (Serial0/0),
( ), g=192.168.15.2,
g , len 60,, forward

Router(config-if)#no ip route-cache
RIB:
http://www.cisco.com/en/US/products/ps5763/products_configuration_guide_chapter09186a00802a1fae.html#wp1045020
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 78
Load balancing with RIP
per-destination load balancing
debug ip packet
IP packet
k debugging
d b i iis on
GAD#
*Mar 1 19:14:36.006: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:14:36.006: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), g=192.168.15.2, len 60, forward
*Mar 1 19:14:36.026: IP: tableid=0, s=192.168.16.2 (Serial0/1), d=192.168.14.2 (FastEthernet0/0), routed via RIB
*Mar 1 19:14:36.026: IP: s=192.168.16.2 (Serial0/1), d=192.168.14.2 (FastEthernet0/0), g=192.168.14.2, len 60, forward
*Mar 1 19:14:37.978: IP: s=0.0.0.0 (FastEthernet0/0), d=255.255.255.255, len 604, rcvd 2
*Mar 1 19:14:44.122: IP: s=0.0.0.0 (FastEthernet0/0), d=255.255.255.255, len 604, rcvd 2
*Mar 1 19:14:46.562: IP: s=192.168.14.1 (local), d=255.255.255.255 (FastEthernet0/0), len 92, sending broad/multicast
*Mar 1 19:14:47.278: IP: s=192.168.15.1 (local), d=255.255.255.255 (Serial0/0), len 72, sending broad/multicast
*Mar 1 19:14:50.266: IP: s=0.0.0.0 (FastEthernet0/0), d=255.255.255.255, len 604, rcvd 2
*Mar 1 19:14:51.958: IP: s=192.168.13.2 (Serial0/1), d=255.255.255.255, len 72, rcvd 2
*Mar 1 19:14:51.962: IP: s=192.168.15.2 (Serial0/0), d=255.255.255.255

Router(config-if)# ip route-cache

RIB:
http://www.cisco.com/en/US/products/ps5763/products_configuration_guide_chapter09186a00802a1fae.html#wp1045020
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 79
Router Paths: Un-Equal Cost Load Balancing
ƒ Just in case y
you are wondering,g a router can send p 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
q cost load balancing.
g EIGRP ((as well as IGRP)) are the onlyy
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.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 80
ƒ Unequal Cost Load Balancing with EIGRP

What is unequal cost load balancing?


ƒ EIGRP Load Balancing
Every routing
E ti protocol
t l supports
t equall costt
path load balancing.
In addition to that, IGRP and EIGRP also
support unequal cost path load balancing.
Use the variance command to instruct
the router to include routes with a metric
less than n times the minimum metric
route for that destination, where n is the
number specified by the variance
command.
Example: E-C-A: 20 * 2 = 40. Therefore,
E-C-A and E-B-A will be used for load
balancing.
router eigrp 1
network x.x.x.x
variance 2
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a008009437d.shtml
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 81
Router Paths and Packet Switching

ƒ Packet forwarding
g 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
f the
for h bbest pathh
–Directly connected network
•The destination IP address of the packet is a host
address
dd on the
th same network
t k as thi
this router's
t '
interface
–Remote network
• If the
th destination
d ti ti IP address
dd off the
th packet
k t belongs
b l
to a remote network, then the packet is forwarded
to another router.
–No route determined
•the packet is discarded

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 82
R t P
Router Paths
th and
d Packet
P k tS Switching
it hi
ƒ 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
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.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 83
Router Paths and Packet Switching
ƒ As a packet travels from one networking device to another
-The Source and Destination IP addresses NEVER change
-The Source & Destination MAC addresses CHANGE as packet is forwarded from
one router to the next.
•The Layer 2 data link source address represents the Layer 2 address of the outbound
interface. The Layer 2 destination address represents the Layer 2 address of the next-hop
router. If the next hop is the final destination device, it will be the Layer 2 address of that
device.
It is very likely that the packet will be encapsulated in a different type of Layer 2 frame
•It
than the one in which it was received. For example, the packet might be received by the
router on a FastEthernet interface, encapsulated in an Ethernet frame, and forwarded out
a serial interface encapsulated in a PPP frame.
-TTL field decrement byy one until a value of zero is reached at which p
point router
discards packet (prevents packets from endlessly traversing the network)
•Demo

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 84
Router Paths and Packet Switching

ƒ Path
a dedetermination
e a o a and
d sswitching
c g function
u c o de
details.
a s PC1C
Wants to send something to PC 2 here is part of what
happens
Step 1 - PC1 encapsulates packet into a frame. Frame
contains R1’s destination MAC address Ethertypes
The 13th and 14th octets of an Ethernet
or IEEE802.3
IEEE802 3 packet (after the
preamble) consist of the "Ethernet
Type" or "IEEE802.3 Length" field. The
"Ethernet Type" values are managed by
XEROX. Some assignments are public
((see + below),
), others private.
p

http://www.cavebear.com/archive/cav
ebear/Ethernet/type.html
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 85
Router Paths and Packet Switching
Step 2 - R1 receives Ethernet frame.
ƒR1 sees that destination MAC address matches its own MAC.
ƒR1 then strips off Ethernet frame.
R1 ƒR1 Examines destination IP.
ƒR1 consults routing table looking for destination IP.
ƒAfter finding destination IP in routing table, R1 now looks up next hop IP address.
ƒR1 re-encapsulates IP packet with a new Ethernet frame.
ƒf the entry is not in the ARP cache, R1 sends an ARP request out its FastEthernet 0/1
interface. R2 sends back an ARP reply.
ƒR1 forwards Ethernet packet out Fa0/1 interface.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 86
Router Paths and Packet Switching
ƒ Path determination and switching function details. PC1 Wants to send something
to PC 2 here is part of what happens
Step 3 - Packet arrives at R2
ƒR2 receives Ethernet frame
R2 ƒR2 sees that destination MAC address matches its own MAC
ƒR2
R2 then strips off Ethernet frame
ƒR2 Examines destination IP
ƒR2 consults routing table looking for destination IP
ƒAfter
After finding destination IP in routing table, R2 now looks up next hop IP
address
ƒR2 re-encapsulates IP packet with a new data link frame
ƒR2 forwards Ethernet packet out S0/0 interface
ƒWhen the interface is a point-to-point serial connection, R2 encapsulates the IP packet into
the proper data link frame format used by the exit interface (HDLC, PPP, etc.). In this case,
the Layer 2 encapsulation is PPP; therefore, the data link destination address is set to a
broadcast. Remember, there are no MAC addresses on serial interfaces.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 87
Router Paths and Packet Switching
ƒ PC1 Wants to send something to PC 2 here is part of what happens
Step 4 - Packet arrives at R3
ƒR3 receives PPP frame
f
ƒR3 then strips off PPP frame
ƒR3 Examines destination IP
ƒR3 consults routing table looking for destination IP
ƒAfter finding destination IP in routing table, R3 is directly connected to
destination via its fast Ethernet interface
ƒIf the entry is not in the ARP cache,
cache R3 sends an ARP request out its
FastEthernet 0/0 interface. PC2 sends back an ARP reply with its MAC address.
ƒR3 re-encapsulates IP packet with a new Ethernet frame
ƒR3 forwards Ethernet p packet out Fa0/0 interface
Step 5 - IP packet arrives at PC2. Frame is decapsulated & processed by
upper layer protocols.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 88
Packet propagation and switching within a router
1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 89
2
Packet propagation and switching within a router

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 90
3
Packet propagation and switching within a router

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 91
Packet propagation and switching within a router

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 92
5
Packet propagation and switching within a router

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 93
P k t propagation
Packet ti and
d switching
it hi within
ithi a router
t
6

94
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 94
P k propagation
Packet i and
d switching
i hi within
i hi a router

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 95
Packet propagation and switching within a router

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 96
P k t propagation
Packet ti and
d switching
it hi within
ithi a router
t

97
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 97
Summary
ƒ Routers are computers that specialize in sending data over a network.
ƒ Routers are composed of:
-Hardware i.e. CPU, Memory, System bus, Interfaces
-Software
Software used to direct the routing process
ƒIOS
ƒConfiguration file
ƒ Routers need to be configured. Basic configuration consists of:
-Router name
-Router
Router banner
-Password(s)
-Interface configurations i.e. IP address and subnet mask
ƒ Routing tables contain the following information
-Directly connected networks
-Remotely
Remotely connected networks
-Network addresses and subnet masks
-IP address of next hop address
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 98
Summary

ƒ Routers determine a packets path to its destination by


doing the following
ƒReceiving an encapsulated frame & examining destination
MAC address.
address
ƒIf the MAC address matches then Frame is de-encapsulated
so that router can examine the destination IP address.
ƒIf destination IP address is in routing table or there is a static
route then Router determines next hop IP address. Router will
re-encapsulate
re encapsulate packet with appropriate layer 2 frame and send
it out to next destination.
ƒProcess continues until packet reaches destination.
ƒNote - only the MAC addresses will change the source and
destination IP addresses do not change.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 99
Static Routing

Chapter 2: Routing Protocols and Concepts

Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Define
e e the
e ge
general
e a role
o e a router
ou e pplays
ays in networks.
e o s
ƒ Describe the directly connected networks, different
router interfaces
ƒ Examine directly connected networks in the routing
table and use the CDP protocol
ƒ Describe static routes with exit interfaces
ƒ Describe summary and default route
ƒ Examine how packets get forwarded when using
static routes
ƒ Identify how to manage and troubleshoot static routes

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
General Role of the Router

ƒ Functions
u c o so of a Router
ou e
Best Path Selections
Forwarding packets to destination

ƒ Routers perform packet forwarding by learning about


remote networks and maintainingg routing
g information.
– The routers primary forwarding decision is based on Layer 3
information, the destination IP address.
– The router's routing table is used to find the best match
between the destination IP of a packet and a network address
in the routing table.
– The routing table will ultimately determine the exit interface to
forward the packet and the router will encapsulate that packet in
the appropriated data link frame for that outgoing interface
interface.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
General Role of the Router

ƒ Introducing
oduc g the
e Topology
opo ogy
– The figure shows the topology used in this chapter.
– 3 1800 series routers connected via WAN links
– Each router connected to a LAN represented by a switch and a PC

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
General Role of the Router

ƒ Connections of a Router for WAN


-A router has a DB-60 port that can support 5
different cabling standards
–Newer routers support
pp the smart serial
interface that allows for more data to be
forwarded across fewer cable pins.
ƒ Connections of a Router for Ethernet
-2 types of connectors can be used: Straight
through and Cross-over
ƒStraight
Straight through used to connect:
-Switch-to-Router, Switch-to-PC, Hub-to-
PC, Hub-to-Server
ƒCross-over
Cross-over used to connect (pin 1 connected
to pin 3, and pin 2 connected to pin 6):
-Switch-to-Switch, PC-to-PC, Switch-to-
Hub,, Hub-to-Hub,, Router-to-Router,, PC-
Router

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
General Role of the Router in COD

ƒS
Smart
a SeSerial
a cab
cables:
es DCE
C aand
d DTE
-Use straight cable to connect between
the DTE and DCE.. DCE and DTE Adapter

ƒ Ethernet cables:
ƒ Cross-over cable: RED cable
ƒ Roll-over cable: flat cables
ƒ Straight cable: all other cables

http://www.csdata.com/csdonline/customer/home.php

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
Serial Connectors

DTE
DCE

DCE
DTE DCE DTE

ƒ In our labs we will use serial DTE/DCE cables (no


CSU/DSU) with a DTE cable connected to one router and
a DCE cable
bl connectedt d tto th
the other
th router.
t
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
Interfaces

ƒ Examining
a g Router
oute Interfaces
te aces
-Show IP router command – used to view routing table
-Show Interfaces command – used to show status of an interface
-Show IP Interface brief command – used to show a portion of
the interface information on a condensed format
-Show
Sh running-config
i fi command
d – used d tto show
h configuration
fi ti
file in RAM

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
Interfaces

ƒ Co
Configuring
gu g a an Ethernet
t e et interface
te ace
-By default all serial and Ethernet interfaces are down
-To enable an interface use the No Shutdown command

•The show ip route


command is used to
display the routing table.
•Initially, the routing table is
empty if no interfaces have
b
been configured.
fi d
•Static routes and dynamic
routes will not be added to
th routing
the ti ttable
bl until
til th
the
appropriate local interfaces
have been configured on
the router
router.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Verifying Ethernet interface
- Show interfaces - command shows the status and gives a detailed
description
p for all interfaces on the router
– Show interfaces fastEthernet 0/0 – command used to show status of
fast Ethernet port
•R1#show
R1#show interfaces fastethernet 0/0
•FastEthernet0/0 is administratively down, line protocol is down
• Administratively down means that the interface is currently in the shutdown mode, or turned off.
•Line protocol is down means,
means in this case,
case that the interface is not receiving a carrier signal from
a switch or the hub. This condition may also be due to the fact that the interface is in shutdown
mode
• You will notice that the show interfaces command does not show any IP addresses on R1's
interfaces The reason for this is because we have not yet configured IP addresses on any of the
interfaces.
interfaces.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
Interfaces
ƒ Verifying Ethernet interface
– Show run –
• command displays the current configuration file that
the router is using. Configuration commands are
temporarily stored in the running configuration file
and implemented immediately by the router
router.
•However, using show running-config is not
necessarily the best way to verify interface
configurations.

-Show ip interface brief –


-can be used to see a portion of the interface
information in a condensed format.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Configuring an Ethernet interface
By default, all router interfaces are shutdown. To enable this
interface, use the no shutdown command, which changes the
interface from administratively down to upup.

R1(config)#interface fastethernet 0/0


R1(config-if)#ip address 172.16.3.1 255.255.255.0
R1(config-if)#no shutdown

The following message is returned from the IOS:

*Mar 1 01:16:08.212: %LINK-3-UPDOWN: Interface


FastEthernet0/0, changed state to up
*Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line
protocol on Interface FastEthernet0/0,, changed
p g state to up
p

–The first changed state to up message indicates that,


physically, the connection is good. If you do not get this first
message,
g , be sure that the interface is properly
p p y connected to
a carrier signal from switch or a hub.
–The second changed state to up message indicates that the
Data Link layer is operational.
• However,
However WAN interfaces in a lab environment require
clocking on one side of the link. If you do correctly set the
clock rate, then line protocol will not change to up.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Configuring an Ethernet interface
ƒ Unsolicited Messages
g from IOS
ƒ The IOS often sends unsolicited messages.
ƒ As you can see in the figure, sometimes these
messages will occur when you are in the middle
of typing a command, such as configuring a
description for the interface.
–The IOS message does not affect the command,
but it can cause you to lose your place when typing.

ƒ In order to keep the unsolicited output separate


from your input, enter line configuration mode
for the consoled port and add the logging
synchronous command, as shown. You will see
that messages returned by IOS no longer
interfere with your typing.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
Interfaces
ƒ Verifying Ethernet interface
-Show interfaces fastEthernet 0/0
ƒ Reading the Routing Table
–Now look at routing table shown in the figure.
Notice R1 now has a "directly connected"
FastEthernet 0/0 interface a new network.
–The interface was configured with the
172.16.3.1/24 IP address which makes it a
member of the 172.16.3.0/24 network.

ƒ 172.16.0.0/24 is subnetted, 1 subnets


ƒ C 172.16.3.0 is directly connected, FastEthernet0/0

–The C at the beginning of the route indicates


that this is a directly connected network. In other
words, R1 has an interface that belongs to this
network.
network
–The /24 subnet mask for this route is displayed
in the line above the actual route.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
Interfaces
ƒ Reading the Routing Table
ƒ 172.16.0.0/24 is subnetted, 1 subnets

–Having a single route represent an entire


network of host IP addresses makes the
routing table smaller, with fewer routes,
which results in faster routing table
lookups.
•It means that this route matches all
packets with a destination address
belonging to this network.
–The routing table could contain all 254
i di id l h
individual hostt IP addresses
dd ffor th
the
172.16.3.0/24 network, but that is an
inefficient way of storing addresses.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Interfaces
ƒ Verifying Ethernet interface
show interfaces fastethernet 0/0
show ip interface brief
ƒ The show interfaces fastethernet 0/0 command
in the figure now shows
–The interface is up, and the line protocol is up.
The no shutdown command changed the
interface from administratively down to up.
–Notice that the IP address is now displayed.
ƒ The command show ip interface brief in the
figure shows that the interface is up, and the
li protocol
line t l iis up. (i
(in a condensed
d d fformat)
t)
ƒ Typically, the router's Ethernet or FastEthernet
interface will be the default gateway IP address
for any devices on that LAN
LAN.
–For example, PC1 would be configured with a
IP address belonging to the 172.16.3.0/24
network, with the default g
gateway
y IP address
172.16.3.1.
–172.16.3.1 is router R1's FastEthernet IP
address.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
Ethernet Interfaces Participate in ARP
ƒ A router's Ethernet interface participates
in a LAN network just like any other
device on that network.
network
–This means that these interfaces have a
Layer 2 MAC address, as shown in the figure.
The show interfaces command displays the
MAC address
dd for
f the
th Ethernet
Eth t interfaces.
i t f
–If a router has a packet destined for a
device on a directly connected Ethernet
network,, it checks the ARP table for an entryy
with that destination IP address in order to
map it to the MAC address.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
Interfaces

ƒ Configuring a Serial interface


-Enter interface configuration mode
Enter in the ip address and subnet mask
-Enter
-Enter in the no shutdown command
ƒ Example:
-R1(config)#interface serial 0/0/0
( g ) p address 172.16.2.1 255.255.255.0
-R1(config-if)#ip
-R1(config-if)#no shutdown

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
Interfaces
ƒ R1(config)#interface serial 0/0/0
ƒ R1(config-if)#ip
R1(config if)#ip address 172
172.16.2.1
16 2 1 255
255.255.255.0
255 255 0
ƒ R1(config-if)#no shutdown

ƒ R2(config)#interface serial 0/0/0


ƒ R2(config-if)#ip address 172.16.2.2 255.255.255.0
ƒ R2(config-if)#no shutdown
–There is no requirement that both ends of the serial link use the same interface, (0/0/0, 0/0/1,
0/1/0, 0/1/1, ….)
–in this case, Serial 0/0/0. However, because both interfaces are members of the same
network, they both must have IP addresses that belong to the 172.16.2.0/24 network.
–If
If we now issue the show interfaces serial 0/0/0 command on either router
router, we still see that
the link is up/down.
ƒ R2#show interfaces serial 0/0/0
ƒ Serial0/0/0 is up,
p, line protocol
p is down
– The physical link between R1 and R2 is up because both ends of the serial link have been
configured correctly with an IP address/mask and enabled with the no shutdown command.
– However, the line protocol is still down. This is because the interface is not receiving a clock
signal.
– There is still one more command that we need to enter, the clock rate command, on the
router with the DCE cable. The clock rate command will set the clock signal for the link.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Interfaces
Step 1 Step 3

Nothing is configured Setup “no shut”

Step 2 Step 4

Setup IP but not “no shut” Configured the clock rate

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
ƒ Examining Router Interfaces
-Physically connecting a WAN Interface.
-A
A WAN Physical Layer connection has sides:
ƒData Circuit-terminating Equipment (DCE) – This is the service
provider. CSU/DSU is a DCE device.
ƒ The CSU/DSU (DCE device) is used to convert the data from the router (DTE
device) into a form acceptable to the WAN service provider.
ƒa DCE device such as a CSU/DSU will provide the clock.
ƒData Terminal Equipment (DTE) – Typically the router is the DTE
device.
Up-to-date technology

Cisco 1
1-Port
Port T1/Fractional T1
DSU/CSU WAN Interface Card
(WIC-1DSU-T1-V2=)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
- What is the significant of the information 1?

Interfaces

ƒ For serial links that are directly interconnected, as in a


lab environment, one side of a connection must be
considered a DCE and provide a clocking signal.

ƒ You can also distinguish DTE from DCE


–1) by looking at the connector between the two cables.
The DTE cable has a male connector,
connector whereas the DCE
cable has a female connector.
–2) If a cable is connected between the two routers, you
can use the show controllers command to determine
which end of the cable is attached to that interface.
R1#show controllers serial 0/0/0
Interface Serial0/0/0
Hardware is PowerQUICC MPC860
DCE V.35, no clock
<output omitted>

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Interfaces

ƒ Once the cable is attached, the clock can now be set with
the clock rate command
command.
–The available clock rates, in bits per second, are
1200, 2400, 9600, 19200, 38400, 56000, 64000,
72000, 125000, 148000, 500000, 800000,
1000000 1300000
1000000, 1300000, 2000000
2000000, and 4000000
4000000.
–Some bit rates might not be available on certain
serial interfaces.

ƒ R1(config)#interface serial 0/0


ƒ R1(config-if)#clock rate 64000
ƒ 01:10:28:
01 10 28 %LINEPROTO-5-UPDOWN:
%LINEPROTO 5 UPDOWN Li Line protocol
t l on
Interface Serial0/0, changed state to up

ƒ Note: If a router
router's
s interface with a DTE cable is configured
with the clock rate command, the IOS will disregard the
command and there will be no ill effects.
–Use the “show controllers serial 0/0/0” to
find out whether it is a DTE or DCE cable
cable.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Testing
Verifying the Serial Interface Configuration
R1#show interfaces
R1#show ip interface brief
R1#ping 172.16.2.2
R1#show ip route

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
R ti T
Routing Table
bl Concepts
C t
ƒ The show ip route command reveals the content of the routing table.
–The
Th main i purpose off a routing
ti ttable
bl iis tto provide
id th
the router
t with
ith paths
th tto
different destination networks.
ƒ The routing table consists of a list of "known" network addresses
–directly
di tl connected,
t d
–configured statically,
–learned dynamically.
ƒ POP Quiz:
– Can R1 ping R2?
– Can PC1 p
ping
g PC2?

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Routing Table Concepts
ƒ Purpose of the debug ip routing command
ƒAllows
Allows you to view changes that the router performs when adding or
removing routes in real time 3 disable interfaces with the shutdown command.
1 enable debugging with the debug ip routing command
Configuring
g g the IP address and Subnet Mask

4 Check the routing table

2 Check the routing table

Disable debug ip
5 routing by using
either the “undebug
ip routing” command
Never use the debug all command on the production router. or the “undebug all”
command.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Routing Table and CDP Protocol

ƒ When a router only has its interfaces configured &


no other routing protocols are configured then:
-The routing table contains only the directly connected
networks
-Only devices on the directly connected networks are
reachable
The output
p in this figure
g verifies that all POP Quiz:
configured interfaces are "up" and "up". Why
pings
failed?

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Routing Table and CDP Protocol

ƒ When a router only has its interfaces configured, and the


routing
ti ttable
bl contains
t i ththe di
directly
tl connected
t d networks
t k bbutt
no other routes, only devices on those directly connected
networks are reachable.
–R1
R1 can communicate with any device on the 172
172.16.3.0/24
16 3 0/24
and 172.16.2.0/24 networks.
–R2 can communicate with any device on the 172.16.1.0/24,
172.16.2.0/24, and 192.168.1.0/24 networks.
–R3 can communicate with any device on the 192.168.1.0/24
/
and 192.168.2.0/24 networks.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
Routing Table and CDP Protocol
ƒ Checking each route in turn
–The ping command is used to
check end to end connectivity
–Ping 172.16.3.1 failed
•Route does not match any
route in the routing table
–Ping 192.168.1.1 succeed
•192.168.1.0/24, matches the
first 24 bits of the destination IP
address

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Routing Table and CDP Protocol
ƒ Purpose of CDP
–Cisco Discovery Protocol (CDP) is a powerful
network monitoring and troubleshooting tool.
•CDP runs at the Data Link layer connecting the physical
media
di tto th
the upper-layer
l protocols
t l (ULP
(ULPs).
)
•Because CDP operates at the Data Link layer, two or more
Cisco network devices, such as routers that support different
Network layer
y protocols
p ((for example,
p , IP and Novell IPX),
), can
learn about each other.
–A layer 2 cisco proprietary tool used to gather information
about other directly connected Cisco devices.
•enables you to access a summary of protocol and address
information about Cisco devices that are directly connected.
–the types of devices that are connected,
–the
th interfaces
i t f they
th are connectedt d to,
t
–the interfaces used to make the connections,
–the model numbers of the devices.
–……..

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
Routing Table and CDP Protocol
ƒ Concept of neighbors
-2 types of neighbors
ƒLayer 3 neighbors
ƒ At Layer 3, routing protocols consider neighbors to be
d i
devices th
thatt share
h th
the same network
t k address
dd space.
ƒ R1 and R2 are neighbors. Both are members of the
172.16.1.0/24 network.
ƒ R2 and R3 are also neighbors because they both share
the 192.168.1.0/24 network.
ƒ But R1 and R3 are not neighbors because they do not
share any network address space.
ƒLayer 2 neighbors
ƒCDP operates at Layer 2 only. Therefore, CDP
neighbors are Cisco devices that are directly
connected physically and share the same data link.
»R1 and S1 are CDP neighbors.
Notice the difference between Layer 2 and
»R1 and R2 are CDP neighbors. Layer 3 neighbors. The switches are not
»R2 and S2 are CDP neighbors. neighbors to the routers at Layer 3, because
»R2
R2 and
d R3 are CDP neighbors.
i hb the switches are operating at Layer 2 only
only.
»R3 and S3 are CDP neighbors. However, the switches are Layer 2 neighbors
to their directly connected routers.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
Routing Table and CDP Protocol
ƒ CDP is on by default.
–CDP exchanges hardware and software
device information with its directly connected
CDP neighbors.
ƒ CDP show commands
ƒShow cdp neighbors command
-Displays the following information:
ƒNeighbor device ID
ƒLocal interface
ƒHoldtime value, in seconds
ƒNeighbor device capability code
ƒNeighbor hardware platform
ƒNeighbor remote port ID
ƒShow cdp neighbors detail command
-It can also reveals the IP address of a
neighboring device
–knowing the IP address of the CDP neighbor is
often allows you to telnet into that device.
• and a lot more
– IOS version
– Platform
– …………

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
Routing Table and CDP Protocol

ƒ Disabling
sab g C CDP
– CDP be a security risk
• Because some IOS versions send out CDP advertisements
by default, it is important to know how to disable CDP.
–If you need to disable CDP globally, for the entire device, use
this command:
• Router(config)#no cdp run

–If you want to use CDP but need to stop CDP advertisements
on a particular interface, use this command:

• Router(config-if)#no cdp enable

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Static Routes

ƒ A router can learn about remote networks in one of two ways:


y
–Manually, from configured static routes
–Automatically, from a dynamic routing protocol
•Dynamic
D i routing
ti protocols
t l are introduced
i t d d in
i the
th nextt chapter.
h t

ƒ Purpose of a static route


–A
A manually configured route used when routing from a network to a stub
network
•A stub network is a network accessed by a single route.
•For an example, here we see that any
network attached to R1 would only have
one way to reach other destinations,
whether to networks attached to R2 or
to destinations beyond R2.
•Therefore, network 172.16.3.0 is a
stub network and R1 is a stub router.
•Running
Running a routing protocol between R1
and R2 is a waste of resources

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
Static Routes

ƒ IP route
oute co
command
a d
ƒTo configure a static route use the following command: ip route
ƒExample:
-Router(config)# ip route network-address subnet-mask {ip-
address | exit-interface }

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 35
Static route operation Example: Fly from Chicago to LA

Chicago

O’Hare

Los
Angeles

Chi
Chicago Æ O’Hare
O’H Ai Airport Æ Los
L Angeles
A l
( g) ip
RTR(config)# p route pprefix
f mask {{address | interface}
f }
Los
Angeles O’Hare
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 36
Static Routes

ƒ Remember R1 knows about its directly


y
connected networks.
–These are the routes currently in its
routing table.
ƒ The remote networks that R1 does not
know about are:
–172.16.1.0/124 - The LAN on R2
–192.168.1.0/24 - The serial network
between R2 and R3
–192.168.2.0/24 - The LAN on R3

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
Static Routes

ƒR1(config)#ip route 172


172.16.1.0
16 1 0 255.255.255.0
255 255 255 0 172
172.16.2.2
16 2 2
ƒ Dissecting static route syntax
ƒip route - Static route command
ƒ172.16.1.0
172 16 1 0 – Destination
D ti ti networkt k address
dd
ƒ255.255.255.0 - Subnet mask of destination
network
ƒ172.16.2.2 - Serial 0/0/0 interface IP address
on R2, which is the "next-hop" to this network
ƒ show ip route output
–S - Routing table code for static route
–172.16.1.0
172 16 1 0 - Network
N t k address
dd ffor th
the route
t
–/24 - Subnet mask for this route; this is
displayed in the line above, known as the parent
route, and discussed in Chapter 8
–[1/0] - Administrative distance and metric for
the static route (explained in a later chapter)
–via 172.16.2.2 - IP address of the next-hop
router, the IP address of R2's Serial 0/0/0
interface

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
Static Routes

ƒR1(config)#ip route 172


172.16.1.0
16 1 0 255.255.255.0
255 255 255 0 172
172.16.2.2
16 2 2
ƒ show ip route output
–S - Routing table code for static route
–172.16.1.0
172 16 1 0 - Network
N t k address
dd ffor th
the route
t
–/24 - Subnet mask for this route; this is
displayed in the line above, known as the parent
route, and discussed in Chapter 8
–[1/0] - Administrative distance and metric for
the static route (explained in a later chapter)
–via 172.16.2.2 - IP address of the next-hop
router, the IP address of R2's Serial 0/0/0
interface

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 39
Static Routes

ƒ Co
Configuring
gu g routes
outes to 2 or
o more
o e remote
e ote networks
et o s
Use the following commands for R1
-R1(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2
-R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 40
Static Routes

ƒ Zinin’s 3 routing principles


ƒPrinciple 1: "Every router makes its decision alone, based on the information
f it has
in its own routing table.“
ƒ R1 has three static routes in its routing table and makes forwarding decisions
based solely upon the information in the routing table.
ƒ R1 does not consult the routing tables in any other routers.
ƒ Making each router aware of remote networks is the responsibility of the
network administrator.
ƒPrinciple 2: "TheThe fact that one router has certain information in its routing table does
not mean that other routers have the same information.“
ƒ The network administrator would be responsible for ensuring that the next-hop
router also has a route to this network
ƒ Using Principle 22, we still need to configure the proper routing on the other
routers (R2 and R3) to make sure that they have routes to these three networks.
ƒPrinciple 3: "Routing information about a path from one network to another does not
provide routing information about the reverse, or return path.“
ƒ Most
M off the
h communication
i i over networks k iis bidi
bidirectional.
i l Thi
This means that
h
packets must travel in both directions between the end devices involved.
ƒ Using Principle 3 as guidance, we will configure proper static routes on the other
routers to make sure they have routes back to the 172.16.3.0/24 network.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
Static Routes

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 42
Static Routes with next-hop IP address

ƒ Resolving to an Exit Interface


-Recursive route lookup - Occurs when the router has to perform multiple
lookups in the routing table before forwarding a packet. A static route that
forwards all packets to the next-hop IP address goes through the following
process (reclusive route lookup)
ƒ (Step 1) The router first must match static route’s destination IP
address with the Next hop p address
ƒ The packet's destination IP address is matched to the static route
192.168.2.0/24 with the next-hop IP address 172.16.2.2.
ƒ (Step 2) The next hop address is then matched to an exit interface
ƒThe next-hop IP address of the static route, 172.16.2.2, is matched to the
directly connected network 172.16.2.0/24 with the exit interface of Serial 0/0/0.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 43
Static Routes with Exit Interfaces
ƒ Configuring a Static route with an Exit
Interface
-Static
S i routes configured
fi d with
i h an exiti iinterface
f
are more efficient because the routing
–The routing table can resolve the exit interface
in a single search instead of 2 searches
ƒ If the static route cannot be resolved to an
exit interface, the static route is removed from
th routing
the ti ttable
bl
–Notice from the debug output that all three
static routes were deleted when the Serial 0/0/0
interface was shut down
down.
–They were deleted because all three static
routes were resolved to Serial 0/0/0.
–However,
However the static routes are still in the R1's
R1 s
running configuration. If the interface comes
back up (is enabled again with no shutdown),
the IOS routing table process will reinstall these
static
t ti routes
t back
b k into
i t the
th routing
ti table.
t bl

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 44
Static Routes with Exit Interfaces
ƒ Modifying Static routes
ƒExisting static routes cannot be modified. The old static route
must be deleted by placing no in front of the ip route
ƒExample:
Example:
-no ip route 192.168.2.0 255.255.255.0 172.16.2.2
ƒA new static route must be rewritten in the configuration
R1(config)# no ip route 192.168.2.0 255.255.255.0 172.16.2.2
R1(config)#ip route 192.168.2.0 255.255.255.0 serial 0/0/0

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 45
Static Routes with Exit Interfaces

ƒ Verifying the Static Route Configuration


-Use the following commands
ƒStep 1 show running-config
ƒStep
Step 2 verify static route has been entered correctly
ƒStep 3 show ip route
ƒStep 4 verify route was configured in routing table
ƒStep
St 5 issue
i ping
i command d tto verify
if packets
k t can
reach destination and that Return path is working

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 46
Static route operation

Both types of the routes


all have distance of 1
and metric of 0.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 47
Static Routes with Exit Interfaces
ƒ Ethernet interfaces and ARP.
– If a static route is configured on an Ethernet link
•If the packet is sent to the next-hop router then…
–the destination MAC address will be the address of the next
hop’s Ethernet interface
–This is found by the router consulting the ARP table.
»If an entry isn’t found then an ARP request will be sent out

R1(config)#ip route 192


192.168.2.0
168 2 0 255
255.255.255.0
255 255 0 fa 0/1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 48
Static Routes with Exit Interfaces
R1(config)#ip route 192.168.2.0 255.255.255.0 fastethernet 0/1
ƒ Best
B t nott tto use only
l an exit
it interface
i t f with
ith Ethernet
Eth t interfaces.
i t f
ƒ Router will have difficulty determining the destination MAC address.
ƒ With Ethernet networks,
networks many different devices can be sharing the
same multiaccess network, including hosts and even multiple routers.
ƒ Router will not have sufficient information to determine which device
is the next-hop
next hop device.
device
ƒ Use both the next-hop interface and the exit interface for
Ethernet exit interfaces.
ƒ Only
O l a single
i l route
t lookup
l k now needed.
d d
R1(config)#ip route 192.168.2.0 255.255.255.0 fastethernet 0/1 172.16.2.2

The routing table entry for this route would be:

S 192.168.2.0/24 [1/0] via 172.16.2.2 FastEthernet0/1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 49
Summary and Default Route

ƒ Summarizing
g routes reduces the size of the routing
g
table.
ƒ Route summarization is the process of combining a
number off static routes into a single static route.
–For example, the networks 10.0.0.0/16, 10.1.0.0/16,
10.2.0.0/16,
0 0 0/ 6, 10.3.0.0/16,
0 3 0 0/ 6, 10.4.0.0/16,
0 0 0/ 6, 10.5.0.0/16,
0 5 0 0/ 6, a
all the
e way
ay
through 10.255.0.0/16 can be represented by a single network
address: 10.0.0.0/8.
ƒ Multiple static routes can be summarized into a single
static route if:
–The destination networks can be summarized into a single g
network address, and
–The multiple static routes all use the same exit-interface or
next-hop
e t op IP add
address
ess

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 50
Calculating a summary route

ƒ Here's the process of creating the summary route


172 16 1 0/22 as sho
172.16.1.0/22, shown n in the fig
figure:
re
1. Write out the networks that you want to summarize in
binary.
2. To find the subnet mask for summarization, start with
the left-most bit.
bit
3. Work your way to the right, finding all the bits that
match consecutively.
4. When you find a column of bits that do not match,
p You are at the summary
stop. y boundary.y
5. Now, count the number of left-most matching bits,
which in our example is 22. This number becomes
your subnet mask for the summarized route, /22 or
255.255.252.0
6 To find the network address for summarization
6. summarization, copy
the matching 22 bits and add all 0 bits to the end to
make 32 bits.
ƒ By following these steps, we can discover that the 3
static routes on R3 can be summarized into a single
static route, using the summary network address of
172.16.0.0 255.255.252.0:
ip route 172.16.0.0 255.255.252.0 Serial0/0/1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 51
Example: Calculating a summary route

ƒ Which address can be used to


summarize networks 172.168.0.0 /24
g 172.168.7.0 /24?
through
ƒ 10101100 10101000 00000000 00000000
ƒ 10101100 10101000 00000001 00000000
ƒ 10101100 10101000 00000010 00000000
ƒ 10101100 10101000 00000011 00000000
ƒ 10101100 10101000 00000100 00000000
ƒ 10101100 10101000 00000101 00000000
ƒ 10101100 10101000 00000110 00000000
ƒ 10101100 10101000 00000111 00000000

ƒ Answer:
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 52
Example: Calculating a summary route

ƒ Which address can be


used to summarize
networks ƒ 11000000 00000001 00000001 00000000
• 192.1.1.0/27 ƒ 11000000 00000001 00000001 00100000
• 192.1.1.32/27 ƒ 11000000 00000001 00000001 01000000
• 192 1 1 64/28
192.1.1.64/28 ƒ 11000000 00000001 00000001 01010000
• 192.1.1.80/28 ƒ 11000000 00000001 00000001 01100000
• 192.1.1.96/29 ƒ 11000000 00000001 00000001 01101000
• 192.1.1.104/29 ƒ 11000000 00000001 00000001 01110000
• 192.1.1.112/29
ƒ 11000000 00000001 00000001 01111000
• 192 1 1 120/29
192.1.1.120/29

ƒ Answer:
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 53
Summary Route
ƒ Configuring a summary route
–Step 1: Delete the current static route
R3(config)#no ip route 172.16.1.0 255.255.255.0 serial0/0/1
R3(config)#no ip route 172.16.2.0 255.255.255.0 serial0/0/1
R3(config)#no ip route 172.16.3.0 255.255.255.0 serial0/0/1

–Step 2: Configure the summary static route


•R3(config)#ip
R3(config)#ip route 172.16.0.0
172 16 0 0 255.255.252.0
255 255 252 0 serial0/0/1

–Step 3: Verify the new static route


•show ip route ping

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 54
Summary Route

ƒ Static routes and subnet masks


–The routing table lookup process will use the most specific match
when comparing destination IP address and subnet mask
–For
For example,
example what if we had the following two static routes in the
routing table
•172.16.0.0/24 is subnetted, 3 subnets
•S
S 172.16.1.0
172 16 1 0 iis di
directly
tl connected,
t d SSerial0/0/0
i l0/0/0 and
d
•S 172.16.0.0/16 is directly connected, Serial0/0/1
–Consider a packet with the destination IP address 172.16.1.10. This
IP address matches both routes.
•The routing table lookup process will use the most-specific match.
Because 24 bits match the 172.16.1.0/24
•Because 172 16 1 0/24 route
route, and only 16 bits of
the 172.16.0.0/16 route match, the static route with the 24 bit match
will be used.
•This is the longest match
match.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 55
Default Route

ƒ Default Static Route


ƒThis is a route that will match all packets.
ƒLike route summarization this will help reduce
the size of the routing table
ƒ Default static routes are used:
–When no other routes in the routing table match the
packet's destination IP address. A common use is
when connecting a company's
company s edge router to the ISP
network.
–When a router has only one other router to which it
is connected. This condition is known as a stub
router.
ƒ Configuring a default static route
ƒSimilar to configuring a static route. Except
that destination IP address and subnet mask
are all zeros
ƒExample:
-Router(config)#ip route 0.0.0.0 0.0.0.0
[ it i t f
[exit-interface | ip-address
i dd ]

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 56
Summary and Default Route
ƒ R1 is a stub router.
–It
It is
i only
l connectedt d tto R2.
R2
–Currently R1 has three static routes,
which are used to reach all of the remote
networks in our topology.
–All three static routes have the exit
interface Serial 0/0/0,, forwarding
g packets
p
to the next-hop router R2.
ƒ R1 is an ideal candidate to have all
off its
it static
t ti routes
t replaced
l d by
b a
single default route.
–First,, delete the three static routes
–Next, configure the single default static
route using the same Serial 0/0/0 exit
interface
R1(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0/0
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 57
Static Routes and Packet Forwarding
ƒ Verify
y the change
g to the routing
g table
with the show ip route command
ƒ S* 0.0.0.0/0 is directly connected, Serial0/0/0
–Note the * or asterisk next to the S
S.
•As you can see from the Codes table in
the figure, the asterisk indicates that this
static route is a candidate default route.
–The key to this configuration is the /0
mask.
•We previously said that it is the subnet
mask in the routing table that determines
how many bits must match between the
destination IP address of the packet and
th route
the t in
i the
th routing
ti table.
t bl
•A /0 mask indicates that zero or no bits
are needed to match.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 58
S lf ttest:
Self t St
Static
ti and
d static
t ti default
d f lt route
t
ƒ Can
Ca you use bo both sstatic
a ca andd
static default route to
configure the communication
b t
between b th LANS and
both d th
the
communication to the
Internet.
-Only 3 statement of static route
needed to setup the network.
-1
1 static
t ti route
t
-2 default static route

WinterPark(config)# ip route 0.0.0.0 0.0.0.0 192.168.146.1


Altamonte(config)# ip route 10.0.234.0 255.255.255.0 192.168.146.2
Alt
Altamonte(config)#
t ( fi )# ip
i route
t 0.0.0.0
00000 0.0.0.0
0 0 0 s0/1
0/1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 59
Static Routes and Packet Forwarding

ƒ Troubleshooting
oub es oo g a Missing
ss g Route
ou e
ƒ Tools that can be used to isolate routing problems
include:
-Ping– tests end to end connectivity
Layer 3
-Traceroute– used to discover all of the hops
p ((routers)) along
g the
path between 2 points
-Show IP route– used to display routing table & ascertain
forwarding process
-Show ip interface brief- used to show status of router interfaces
Layer 2
Show cdp neighbors detail–
-Show detail used to gather configuration
information about directly connected neighbors

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 60
Static Routes and Packet Forwarding

ƒ So
Solving
g a Missing
ss g Route
ou e
ƒ Finding a missing or mis-configured route requires
methodically using the correct tools
-Start with PING. If ping fails then use traceroute to determine
where packets are failing to arrive
- Than trace route

ƒ Issue: show ip route to examine routing table.


-If there is a problem with a mis-configured static route remove
the static route then reconfigure the new static route

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 61
Summary
ƒ Routers
-Operate
p at layer
y 3
-Functions include best path selection & forwarding packets
ƒ Connecting Networks
WANs
Serial cables are connected to router serial ports.
In tthe
e lab
ab environment
e o e t clock
c oc rates
ates must
ust be co
configured
gu ed for
o DCE
C
LANs
Straight through cables or cross over cables are used to
connect to fastethernet port
port. (The type of cable used depends
on what devices are being connected)
ƒ Cisco Discovery Protocol
A layer 2 proprietary protocol
Used to discover information about directly connected Cisco
devices

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 62
Summary
ƒ Static Routes
This is a manually configured path that specifies how the router
-This
will get to a certain point using a certain path.
ƒ Summary static routes
-This is several static routes that have been condensed into a
single static route.
ƒ Default route
-It
It is the route packets use if there is no other possible match for
their destination in the routing table.
ƒ Forwarding of packets when static route is used
-Zinin’s
Zi i ’ 3 routing
ti principles
i i l describe
d ib h how packets
k t are fforwarded
d d
ƒ Troubleshooting static routes may require some of the following
commands:
-Ping
-Traceroute
-Show IP route
-Show ip interface brief
-Show cdp neighbors detail
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 63
Introduction to Dynamic
Routingg Protocol

Chapter 3: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Describe
esc be the
e role
oeo of dy
dynamic
a c routing
ou g p protocols
o oco s a
and
d
place these protocols in the context of modern
network design.
ƒ Identify several ways to classify routing protocols.
ƒ Describe how metrics are used by routing protocols
and identify the metric types used by dynamic routing
protocols.
ƒ Determine the administrative distance of a route and
describe its importance in the routing process.
ƒ Identify the different elements of the routing table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
Dynamic Routing Protocols

ƒ Dynamic
y a c routing
ou g p protocols
o oco s a
are
e usua
usually
y
used in larger networks to ease the
administrative and operational overhead
off using
i onlyl static
t ti routes.
t
ƒ Typically, a network uses a combination
off both
b th a d
dynamic
i routing
ti protocol
t l andd
static routes.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
The Evolution of Dynamic Routing Protocols

ƒ One of the earliest routing protocols was Routing Information Protocol (RIP).
–RIP
RIP has
h evolved
l d into
i t a newer version
i RIPv2.
RIP 2 H However,
–The newer version of RIP still does not scale to larger network implementations.
ƒ To address the needs of larger networks, two advanced routing protocols were
developed: Open Shortest Path First (OSPF) and Intermediate System-to-
I t
Intermediate
di t System
S t (IS-IS).
(IS IS)
ƒ Cisco developed Interior Gateway Routing Protocol (IGRP) and Enhanced IGRP
(EIGRP), which also scales well in larger network implementations.
ƒ Additionally,
Additionally there was the need to interconnect different internetworks and provide
routing among them. Border Gateway Routing (BGP) protocol is now used between
ISPs as well as between ISPs and their larger private clients to exchange routing
information.
ƒ With the advent of numerous consumer devices using IP, IP the IPv4 addressing space
is nearly exhausted. Thus IPv6 has emerged. To support the communication based
on IPv6, newer versions of the IP routing protocols have been developed (see the
IPv6 row in the table).

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
Dynamic Routing Protocols

ƒ Function(s) of Dynamic Routing Protocols:


-Dynamically share information between routers.
-Automatically update routing table when topology changes.
Determine best path to a destination
-Determine destination.
–Compared to static routing, dynamic routing protocols require less administrative
overhead.
•However,
However, the expense of using dynamic routing protocols is dedicating part of a router's
router s
resources for protocol operation including CPU time and network link bandwidth.
– One of the primary benefits to using a dynamic routing protocol is that routers
exchange routing information whenever there is a topology change. This exchange
allows
ll routers
t tto automatically
t ti ll llearn about
b t new networks
t k and
d also
l tto fifind
d alternate
lt t
paths when there is a link failure to a current network.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
Dynamic Routing Protocols

ƒ Despite
esp e the e be
benefits
e so of dy
dynamic
a c routing,
ou g, sstatic
a c routing
ou g sstill
has its place.
ƒ There are times when static routing is more appropriate and
other times when dynamic routing is the better choice.
ƒ More often than not,
not you will find a combination of both
types of routing in any network that has a moderate level of
complexity.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
Dynamic Routing Protocols

ƒ A routing
gpprotocol
–is a set of processes, algorithms, and messages that are used to
exchange routing information and populate the routing table with the
routing
gpprotocol's choice of best p
paths
ƒ The purpose of a dynamic routing protocol is to:
-Discover remote networks
-Maintaining up-to-date routing information
-Choosing the best path to destination networks
-Ability
Abilit tto find
fi d a new b
bestt path
th if th
the currentt path
th is
i no llonger available
il bl

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
Dynamic Routing Protocols
ƒ Components of a routing protocol
–Data
Data structures
•Some routing protocols use tables and/or databases for its operations.
This information is kept in RAM
–Algorithm
Al ith
•Algorithm is a finite list of steps used in accomplishing a task
•Algorithms
Algorithms are used for facilitating routing information and best path
determination
–Routing protocol messages
•These
Th are messages forf discovering
di i neighbors
i hb and
d exchange
h off
routing information , and other tasks to learn and maintain accurate
information about the network.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
Dynamic Routing Protocol Operation
ƒ All routing protocols have the same purpose - to learn about remote networks
and to quickly adapt whenever there is a change in the topology.
ƒ The method that a routing protocol uses to accomplish this depends upon the
algorithm it uses and the operational characteristics of that protocol.
ƒ In general,
general the operations of a dynamic routing protocol can be described as
follows:
–The router sends and receives routing messages on its interfaces.
–The router shares routing messages and routing information with other routers that
are using the same routing protocol.
–Routers exchange routing information to learn about remote networks.
–When a router detects a topology change the routing protocol can advertise this
change to other routers.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Dynamic Routing Protocols

ƒ Advantages of static routing ƒ Advantages of dynamic routing


-It
It can backup
b k multiple
lti l -Administrator has less work
interfaces/networks on a router maintaining the configuration when
-Minimal CPU processing adding or deleting networks.
-Easier
Easier for administrator to -Protocols automatically react to the
understand
topology changes.
-Easy to configure
-No
No extra resources are needed -Configuration
g is less error-prone.
-More secure -More scalable, growing the network
usually does not present a problem
ƒ Disadvantages of static routing
-Network changes require manual ƒ Disadvantages of dynamic routing
reconfiguration -Router resources are used (CPU
-Configuration and maintenance is cycles, memory and link bandwidth).
time-consuming
time consuming
-More administrator knowledge is
-Does not scale well in large
topologies required for configuration,
-Configuration
g is error-prone,
p , verification, and troubleshooting.
especially in large networks

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
Dynamic Routing Protocols

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Classifying Routing Protocols

ƒ Dynamic
y routingg protocols
p are g
grouped
p according
g to
characteristics. Examples include:
-RIP
-IGRP
IGRP
-EIGRP
-OSPF
OSPF
-IS-IS
BGP
-BGP

ƒ Autonomous System is a group of routers under the control of


a single
g authority.
y

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Classifying Routing Protocols

ƒ Dynamic routing protocols:


–RIP
•A distance vector interior routing protocol
–IGRP
•The distance vector interior routing
developed by Cisco (deprecated from 12.2
IOS and later)
–EIGRP
•The advanced distance vector interior
routing protocol developed by Cisco
–OSPF
OSPF
•A link-state interior routing protocol
–IS-IS
•A link-state interior routing protocol
–BGP
•A p
path vector exterior routing
gpprotocol

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
Classifying Routing Protocols
ƒ An autonomous system (AS) - otherwise known as a
routing domain - is a collection of routers under a
common administration.
ƒ Because the Internet is based on the ASs concept, two
types of routing protocols are required: interior and
exterior routing protocols.
-Interior
Interior Gateway Protocols (IGP)
•are used for intra-autonomous system routing - routing
inside an autonomous system
•IGPs are used for routing within a routing domain, those
g organization.
networks within the control of a single g
–An autonomous system is commonly comprised of many
individual networks belonging to companies, schools, and
other institutions.
• IGPs for IP include RIP, IGRP, EIGRP, OSPF, and IS-IS
-Exterior
Exterior Gateway Protocols (EGP)
•are used for inter-autonomous system routing - routing
between autonomous systems that are under the control
of different administrations
At the ISP level, there are often more important issues
•At
than just choosing the fastest path.
•BGP is typically used between ISPs and sometimes
between a company and an ISP

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
A t
Autonomous systems
t
ƒ An autonomous system (AS) is a collection of
networks under a common administration
sharing a common routing strategy.
To the outside world, an AS is viewed as a single
entity. The AS may be run by one or more
operators while presenting a consistent view of
routing to the external world.
ƒ The American Registry of Internet Numbers
(ARIN), a service provider, or an administrator
assigns
g an identifying
y g number to each AS. This
autonomous system number is a 16 bit number.
Routing protocols, such as Cisco’s IGRP,
require assignment of a unique, autonomous
system number.

American Registry for Internet Numbers


http://www.arin.net/registration/asn/index.html
A t
Autonomous S
System
t number
b (ASN) resource guide id
http://www.apnic.net/services/asn_guide.html
IS-IS
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Autonomous systems
ƒ Cisco system AS number:
ƒ http://ws.arin.net/cgi-bin/whois.pl

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
Autonomous systems
ƒ http://arin.net/education/asn_process/index.html
RFC 1930
ƒ AS just like IP, it needs
to apply from ARIN or
the appropriate region
and be unique on the
i t
internet.
t

ƒ The Internet Assigned


Numbers Authority
(IANA) has reserved the
following block of AS
numbers for private use
(not to be advertised on
the global Internet):
64512 through 65535

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
Classifying Routing Protocols
ƒ IGP: Comparison of Distance Vector & Link
State Routing Protocols
Distance vector
– routes are advertised as vectors of distance &
direction.
•Distance is defined in terms of a metric such as hop
count (RIP)
•Direction is simply the next-hop router or exit
interface
•Distance vector protocols typically use the Bellman-
Ford algorithm for the best path route determination
– incomplete view of network topology
topology.
•Distance vector protocols use routers as sign posts
along the path to the final destination.
•Distance vector routinggpprotocols do not have an
actual map of the network topology
– Generally, periodic updates.
•Some distance vector protocols periodically send
complete routing tables to all connected neighbors.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
Classifying Routing Protocols
ƒ IGP: Comparison of Distance Vector &
Link State Routing Protocols
Link state
– complete
p view of network topology
p gy is created.
•The sign posts along the way from source to
destination are not necessary, because all link-
state routers are using an identical "map"
map of the
network.
– updates are not periodic.
•After the network has converged, a link-state
update only sent when there is a change in the
topology.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Classifying Routing Protocols
ƒ Comparison of Distance Vector & Link State Routing Protocols

ƒ Di
Distance
t vector
t protocols
t l workk ƒ Link-state protocols work best in
best in situations where: situations where:
–The network is simple
p and flat –The network designg is hierarchical,,
and does not require a special usually occurring in large networks.
hierarchical design.
–The administrators have a good
–The administrators do not have knowledge of the implemented link-
link
enough knowledge to configure state routing protocol.
and troubleshoot link-state
–Fast convergence of the network is
protocols.
crucial
crucial.
–Specific types of networks, such
as hub-and-spoke networks, are
being implemented.
–Worst-case convergence times
in a network are not a concern.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
Classifying Routing Protocols
ƒ Classful routing protocols
–Do
Do NOT send subnet mask in routing updatesupdates,
–Do NOT support VLSM,
–Classful routing protocols cannot be used when
a network is subnetted using g more than one
subnet mask,
• Tony: This does not mean you can not
subnet the clasasfull network. You can still
subnet itit, but can only do it once and all
network needs to have the identical mask.
– Routing protocols such as RIPv1 and IGRP.

ƒ Classless routing
g protocols
p
–Do send subnet mask in routing updates.
–support variable length subnet masks (VLSM).
•In the figure,
g , the classless version of the network is
using both /30 and /27 masks in the same topology.
•Tony: It means you can create the network
with all different sizes of subnets. They don’t
need to have the same mask.
•Classless routing protocols are RIPv2, EIGRP,
OSPF, IS-IS, BGP.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
Classifying Routing Protocols

ƒ Convergence
Co e ge ce iss de defined
ed as when
e aall routers’
ou e s routing
ou g
tables are at a state of consistency
– The network has converged when all routers have complete and
accurate information
f about the network

ƒ Convergence time is the time it takes routers to share


i f
information,
ti calculate
l l t b bestt paths,
th and
d update
d t th
their
i routing
ti
tables.
ƒ R
Routing
ti protocols
t l can bbe rated
t dbbasedd on
the speed to convergence; the faster the
convergence, the better the routing
protocol.
t l
–RIP and IGRP are slow to converge
–EIGRP
EIGRP and OSPF are faster to converge.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Routing Protocols Metrics

ƒ To select the best path, the routing


protocoll must be
b able
bl to evaluate
l and
d
differentiate between the available paths.
For this purpose a metric is used.
ƒ Metric
–A value used by a routing protocol to
determine which routes are better than others.
ƒ Each routing protocol uses its own metric.
–RIP uses hop count,
•The
The hop count refers to the number of routers
a packet must cross to reach the destination
network.
•For R3 in the figure, network 172.16.3.0 is two
hops or two routers away
hops, away.
–EIGRP uses a combination of bandwidth and
delay,
–OSPF
OSPF uses bandwidth (cost).

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Routing Protocols Metrics

ƒ Metrics used in IP routing protocols


–Bandwidth
•Influences path selection by preferring the path
with the highest bandwidth
–Cost
Cost
•A value determined either by the IOS or by the
network administrator to indicate preference for a OSPF
route. Cost can represent a metric, a combination
of metrics or a p
policy.
y
–Delay RIP
•Considers the time a packet takes to traverse a
path
–Hop
Hop count
•A simple metric that counts the number of routers
a packet must traverse
–Load
•Considers the traffic utilization of a certain link
–Reliability
•Assesses the probability of a link failure,
calculated from the interface error count or
previous link failures

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Routing Protocols Metrics
ƒ The Metric Field in the Routing Table
ƒ Metric used for each routing protocol
-RIP - hop count
-IGRP & EIGRP - Bandwidth (used by
default), Delay (used by default), Load,
Reliability
-IS-IS & OSPF – Cost, Bandwidth
(Cisco’s implementation)
ƒ Refer to the example in the figure The
routers are using the RIP routing
protocol.
–The metric associated with a certain
route
t can be
b b bestt viewed
i d using
i ththe
show ip route command.
–The metric value is the second value in
the brackets for a routing table entry.
–In the figure, R2 has a route to the
192.168.8.0/24 network that is 2 hops
away.
•R
R 192
192.168.8.0/24
168 8 0/24 [120/2] via
192.168.4.1, 00:00:26, Serial0/0/1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Routing Protocols Metrics

ƒ Load
oad balancing
ba a c g
–when two or more routes to the same
destination have identical metric values
–This is the ability of a router to
distribute packets among multiple same
cost paths
p

Load balancing does not


automatically means the interfaces
will get use equally.
R2 load balances
?????? traffic to PC5 over two
equal cost paths.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Routing Protocols Metrics

ƒ Load
oad ba
balancing
a c g cacan be do
doneeeeither
e
per packet or per destination.
–How a router actually load balances
packets between the equal-cost paths is
governed by the switching process.

Example R2 load balances


traffic to PC5 over two
equal cost paths.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Router Paths: Equal Cost
C Load Balancing
ƒ To solve this dilemma, a router will use Equal Cost Load
Balancing This means the router sends packets over the multiple
Balancing.
exit interfaces listed in the routing table.
–per-packet load balancing
•( Process Switching)
–per-destination load balancing.
•(Fast Switching)
Router(config-if)# ip route-cache Router(config-if)#no ip route-cache

ping 10.0.0.1 ping 10.0.0.2 ping 10.0.0.1


ping 10.0.0.2

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
Load balancing with RIP
per-packet
debug ip packet
load balancing
IP packet
k t debugging
d b i iis on
GAD#
*Mar 1 19:10:29.646: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), routed via RIB
*Mar 1 19:10:29.646: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), g=192.168.13.2, len 60, forward
*Mar 1 19:10:30.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:10:30.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), g=192.168.15.2, len 60, forward
*Mar 1 19:10:31.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), routed via RIB
*Mar 1 19:10:31.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), g=192.168.13.2, len 60, forward
*Mar 1 19:10:32.218: IP: s=0.0.0.0 (FastEthernet0/0), d=255.255.255.255, len 604, rcvd 2
*Mar 1 19:10:32.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:10:32.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), g=192.168.15.2, len 60, forward
*Mar 1 19:10:33.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), routed via RIB
*Mar 1 19:10:33.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), g=192.168.13.2, len 60, forward
*Mar 1 19:10:34.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:10:34.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), g=192.168.15.2, len 60, forward
*Mar 1 19:10:35.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), routed via RIB
*Mar 1 19:10:35.654: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/1), g=192.168.13.2, len 60, forward
*Mar 1 19:10:35.974: IP: s=192.168.13.1 (local), d=255.255.255.255 (Serial0/1), len 72, sending broad/multicast
*Mar 1 19:10:36.654: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:10:36.654: IP: s=192.168.14.2 ((FastEthernet0/0),
), d=192.168.16.2 (Serial0/0),
( ), g=192.168.15.2,
g , len 60,, forward

Router(config-if)#no ip route-cache
RIB:
http://www.cisco.com/en/US/products/ps5763/products_configuration_guide_chapter09186a00802a1fae.html#wp1045020
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Load balancing with RIP
per-destination load balancing
debug ip packet
IP packet
k debugging
d b i iis on
GAD#
*Mar 1 19:14:36.006: IP: tableid=0, s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), routed via RIB
*Mar 1 19:14:36.006: IP: s=192.168.14.2 (FastEthernet0/0), d=192.168.16.2 (Serial0/0), g=192.168.15.2, len 60, forward
*Mar 1 19:14:36.026: IP: tableid=0, s=192.168.16.2 (Serial0/1), d=192.168.14.2 (FastEthernet0/0), routed via RIB
*Mar 1 19:14:36.026: IP: s=192.168.16.2 (Serial0/1), d=192.168.14.2 (FastEthernet0/0), g=192.168.14.2, len 60, forward
*Mar 1 19:14:37.978: IP: s=0.0.0.0 (FastEthernet0/0), d=255.255.255.255, len 604, rcvd 2
*Mar 1 19:14:44.122: IP: s=0.0.0.0 (FastEthernet0/0), d=255.255.255.255, len 604, rcvd 2
*Mar 1 19:14:46.562: IP: s=192.168.14.1 (local), d=255.255.255.255 (FastEthernet0/0), len 92, sending broad/multicast
*Mar 1 19:14:47.278: IP: s=192.168.15.1 (local), d=255.255.255.255 (Serial0/0), len 72, sending broad/multicast
*Mar 1 19:14:50.266: IP: s=0.0.0.0 (FastEthernet0/0), d=255.255.255.255, len 604, rcvd 2
*Mar 1 19:14:51.958: IP: s=192.168.13.2 (Serial0/1), d=255.255.255.255, len 72, rcvd 2
*Mar 1 19:14:51.962: IP: s=192.168.15.2 (Serial0/0), d=255.255.255.255

Router(config-if)# ip route-cache

RIB:
http://www.cisco.com/en/US/products/ps5763/products_configuration_guide_chapter09186a00802a1fae.html#wp1045020
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
ƒ Unequal Cost Load Balancing with EIGRP

What is unequal cost load balancing?


ƒ EIGRP Load Balancing
Every routing
E ti protocol
t l supports
t equall costt
path load balancing.
In addition to that, IGRP and EIGRP also
support unequal cost path load balancing.
Use the variance command to instruct
the router to include routes with a metric
less than n times the minimum metric
route for that destination, where n is the
number specified by the variance
command.
Example: E-C-A: 20 * 2 = 40. Therefore,
E-C-A and E-B-A will be used for load
balancing.
router eigrp 1
network x.x.x.x
variance 2
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a008009437d.shtml
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
Administrative Distance of a Route

ƒ In fact,, a router might


g learn of a
route to the same network from
more than one source.
– For example,
example a static route might have
been configured for the same
network/subnet mask that was learned
dynamically by a dynamic routing
protocol, such as RIP. The router must
choose which route to install.
ƒ Purpose
P off a metric
ti
–It’s a calculated value used to determine
the best path to a destination
ƒ Purpose of Administrative Distance For equal cost routes to be
installed they both must be static
–It’s a numeric value that specifies the routes or they both must be RIP
preference of a particular route source. routes.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
Administrative Distance of a Route

ƒ Administrative distance is an integer


g value from 0 to 255.
ƒ The lower the value the more preferred the route source.
–An administrative distance of 0 is the most preferred.
–Only a directly connected network has an administrative distance
of 0, which cannot be changed
–An
An administrative distance of 255 means the router will not believe
the source of that route and it will not be installed in the routing
table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Administrative Distance of a Route
ƒ Identifying the Administrative Distance (AD) in a routing
table
It is the first number in the brackets in the routing table

•R2 is running both RIP and EIGRP routing


protocols.
•R2 has learned of the 192.168.6.0/24 route from
R1 through EIGRP updates and from R3 through
RIP updates.
•RIP has an administrative distance of 120, but This show ip rip database command
EIGRP has a lower administrative distance of 90. shows all RIP routes learned by R2,
•So,
S R2 addsdd ththe route
t llearned
d using
i EIGRP tto h th or nott the
whether th RIP route
t is
i installed
i t ll d iin
the routing table and forwards all packets for the the routing table.
192.168.6.0/24 network to router R1.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
Administrative Distance of a Route
ƒ The AD value can also
be verified with the
show ip protocols
command.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 35
Administrative Distance of a Route

ƒ Directly
ect y co
connected
ected routes
outes
-Immediately appear in the routing table as soon as the
interface is configured

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 36
Administrative Distance of a Route

ƒ Directly
y connected routes
Have a default AD of 0
ƒ Static Routes
Administrative distance of a static route has a default value of 1
ƒ A static route using either a next-hop IP address or an exit
interface has a default AD value of 1
1.
–However, the AD value is not listed in show ip route when you
configure a static route with the exit interface specified. When a static
route
t iis configured
fi d with
ith an exit
it interface,
i t f the
th output
t t shows
h the
th network
t k
as directly connected via that interface.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
Administrative Distance of a Route

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
Summary
ƒ Dynamic routing protocols fulfill the following functions
-Dynamically share information between routers
-Automatically update routing table when topology changes
-Determine best path to a destination
ƒ Routing protocols are grouped as either
-Interior gateway protocols (IGP)Or
-Exterior gateway protocols(EGP)
ƒ Types of IGPs include
-Classless
Cl l routing
ti protocols
t l - these
th protocols
t l iinclude
l d subnet
b t maskk
in routing updates
-Classful routing protocols - these protocols do not include subnet
mask k in
i routing
ti update
d t

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 39
Summary
ƒ Metrics are used by dynamic routing protocols to calculate the
best path to a destination.
destination
ƒ Administrative distance is an integer value that is used to
indicate a router’s
router s “trustworthiness”
trustworthiness
ƒ Components of a routing table include:
Route source
-Route
-Administrative distance (The smaller the better)
-Metric ((The smaller the better))

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 40
Distance Vector Routing
Protocols

Chapter 4: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Identify
y the characteristics of distance vector routing
gpprotocols.
ƒ Describe the network discovery process of distance vector
routing protocols using Routing Information Protocol (RIP).
ƒ Describe the processes to maintain accurate routing tables used
by distance vector routing protocols.
ƒ Identify
Id tif th
the conditions
diti lleading
di tto a routing
ti lloop and
d explain
l i th
the
implications for router performance.
ƒ Recognize that distance vector routing protocols are in use today

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
Distance Vector Routing Protocols

ƒ Dynamic routing protocols help the network administrator overcome the time-
consuming and exacting process of configuring and maintaining static routes
routes.
ƒ Examples of Distance Vector routing protocols:
ƒRouting Information Protocol (RIP)
–RFC
RFC 1058.
1058
–Hop count is used as the metric for path selection.
–If the hop count for a network is greater than 15, RIP cannot supply a route to that
network.
–Routing
R ti updatesd t are b broadcast
d t or multicast
lti t every 30 seconds,
d b by d
default.
f lt
ƒInterior Gateway Routing Protocol (IGRP)
–proprietary protocol developed by Cisco.
–Bandwidth,
Bandwidth, delay, load and reliability are used to create a composite metric.
–Routing updates are broadcast every 90 seconds, by default.
–IGRP is the predecessor of EIGRP and is now obsolete.
ƒEnhanced Interior Gatewayy Routing
g Protocol ((EIGRP))
–Cisco proprietary distance vector routing protocol.
–It can perform unequal cost load balancing.
–It uses Diffusing Update Algorithm (DUAL) to calculate the shortest path.
–There are no periodic updates as with RIP and IGRP
IGRP. Routing updates are sent only
when there is a change in the topology.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
Distance Vector Routing Protocols

ƒ The Meaning of Distance Vector:


–A router using distance vector routing protocols knows 2 things:
ƒDistance to final destination
ƒThe distance or how far it is to the destination network
ƒVector or direction
ƒVector, direction, traffic should be directed
ƒThe direction or interface in which packets should be forwarded

For example, in the figure,


R1 knows that the distance
to reach network
172.16.3.0/24 is 1 hop and
that the direction is out the
i t f
interface S0/0/0 ttowardd R2
R2.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
Distance Vector Routing Protocols
ƒ Characteristics of Distance Vector routing protocols:
ƒ Periodic updates
p
•Periodic Updates sent at regular intervals (30 seconds for
RIP). Even if the topology has not changed in several days,
ƒ Neighbors
ƒThe router is only aware of the network addresses of its
own interfaces and the remote network addresses it can
reach through its neighbors.
ƒIt has no broader knowledge of the network topology
ƒ Broadcast updates
ƒBroadcast Updates are sent to 255.255.255.255.
ƒSome distance vector routing protocols use multicast
addresses instead of broadcast addresses
addresses.
ƒ Entire routing table is included with routing update
ƒEntire Routing Table Updates are sent, with some
exceptions to be discussed later, periodically to all
neighbors.
ƒNeighbors receiving these updates must process the entire
update to find pertinent information and discard the rest.
ƒSome distance vector routing protocols like EIGRP do not
send periodic routing table updates.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
Distance Vector Routing Protocols
ƒ Routing Protocol Algorithm:
–The
Th algorithm
l ith isi used d to
t calculate
l l t the
th best
b t paths
th and
d th
then send
d
that information to the neighbors.
–Different routing
gpprotocols use different algorithms
g to install routes
in the routing table, send updates to neighbors, and make path
determination decisions.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
Distance Vector Routing Protocols
Routing Protocol Characteristics
–Criteria
Criteria used to compare routing protocols includes
ƒTime to convergence
ƒTime to convergence defines how quickly the routers in the network topology share
routing information and reach a state of consistent knowledge.
ƒThe faster the convergence, the more preferable the protocol.
ƒScalability
ƒScalability defines how large a network can become based on the routing protocol that is
deployed.
deployed
ƒThe larger the network is, the more scalable the routing protocol needs to be.
ƒResource usage
ƒResource usageg includes the requirements
q of a routing
gpprotocol such as memory
y space,
p ,
CPU utilization, and link bandwidth utilization.
ƒHigher resource requirements necessitate more powerful hardware to support the routing
protocol operation
ƒClassless ((Use of VLSM)) or Classful
ƒClassless routing protocols include the subnet mask in the updates.
ƒThis feature supports the use of Variable Length Subnet Masking (VLSM) and better route
summarization.
ƒImplementation & maintenance
ƒImplementation and maintenance describes the level of knowledge that is required for a
network administrator to implement and maintain the network based on the routing protocol
deployed.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
Distance Vector Routing Protocols

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
Network Discovery
Cold Starts
ƒ Router initial start up (Cold Starts)
When a router cold starts or powers up, it knows nothing about the
network topology. It does not even know that there are devices on
the other end of its links. The only information that a router has is
from its own saved configuration file stored in NVRAM.
-Initial
Initial network discovery
ƒDirectly connected networks are initially placed in
routing table

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Network Discovery Initial
I iti l E
Exchange
h
ƒ Initial Exchange of Routing Information
–If
If a routing protocol is configured then
•Routers will exchange routing information
•Initially, these updates only include information
about their directly connected networks.
ƒ Routing updates received from other routers
–Router checks update for new information
•If there is new information:
–Metric is updated
–New information is stored in routing table
ƒ After this first round of update exchanges, each
router
t knows
k about
b t the
th connected
t d networks
t k off their
th i
directly connected neighbors.
ƒ However, did you notice that R1 does not yet know
about 10
10.4.0.0
4 0 0 and that R3 does not yet know about
10.1.0.0?
–Full knowledge and a converged network will not take
place until there is another exchange of routing
information
information.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
Network Discovery Next Update
ƒ Next Update of Routing Information
–At
At this
thi point
i t the
th routers
t have
h knowledge
k l d about
b t
their own directly connected networks and
about the connected networks of their
immediate neighbors
neighbors.
–Continuing the journey toward convergence,
the routers exchange the next round of periodic
updates Each router again checks the updates
updates.
for new information.
ƒ Routing updates received from other routers
–Router checks update for new information
•If there is new information:
–Metric is updated
–New information is stored in routing
table

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Network Discovery Split horizon
ƒ Distance vector routing protocols
typically implement a technique
known as split horizon.
–Split horizon prevents information
from being sent out the same
interface from which it was
received.
–For
For example,
example R2 would not send
an update out Serial 0/0/0
g the network 10.1.0.0
containing
because R2 learned about that
network through Serial 0/0/0.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Network Discovery
ƒ Exchange of Routing Information Next Update
–Router convergence is reached when
•All routing tables in the network contain the same network
information,
information
•[Tony]: The above statement is trying to tell you, the routing tables
contains the same network information, BUT, each router has it’s own
variation
i i off the
h routing
i table.
bl
–Routers continue to exchange routing information
-If no new information is found then Convergence is
reached

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
Network Discovery and convergence
ƒ The amount of time it takes for a network to converge is
directly proportional to the size of that network.
ƒ Convergence must be reached before a network is considered
completely operable
ƒ Speed of achieving convergence consists of 2 interdependent
categories
–How quickly the routers propagate a change in the topology in a
routing update to its neighbors
–The speed of calculating best path routes using the new routing
information collected
5
4

For example: It takes five rounds 3


of periodic update intervals
before most of the branch 2
routers in Regions 11, 2
2, and 3
1
learn about the new routes
advertised by B2-R4.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
Routing Table Maintenance

ƒ Periodic Updates: RIPv1 & RIPv2


–These are time intervals in which a router sends out its entire routing
table.
•RIPv1: updates are sent every 30 seconds as a broadcast
(255.255.255.255) whether or not there has been a topology
change
•RIPv2: updates are sent every 30 seconds as a multicast
(224.0.0.9) whether or not there has been a topology change

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Routing Table Maintenance

ƒ Periodic Updates: distance vector protocols


employ periodic updates to exchange routing
information with their neighbors and to maintain up-
to-date routing information in the routing table.
–Failure
Failure of a link
–Introduction of a new link
–Failure of a router
–Change of link parameters

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
R ti T
Routing Table
bl Maintenance
M i t
ƒ RIP uses 4 timers
–Update
p timer
• interval is a route sends an update
–Invalid timer
•If an update has not been received after 180
seconds (the default),
default) the route is marked as
invalid by setting the metric to 16.
•The route is retained in the routing table until
the flush timer expires.
–Holddown timer
•This timer stabilizes routing information and
helps prevent routing loops during periods
when the topology is converging on new
information.
•By
B default,
d f lt th
the h
holddown
ldd ti
timer iis sett ffor 180
seconds.
–Flush timer
•By default, the flush timer is set for 240
seconds which is 60 seconds longer than the
seconds,
invalid timer.
•When the flush timer expires, the route is
removed from the routing table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
Routing Table Maintenance

ƒ EIGRP
–Unlike other distance vector routing protocols,
EIGRP does not send periodic updates.
–Instead,, EIGRP sends bounded updates
p about a
route when a path changes or the metric for that
route changes.
ƒ EIGRP routing updates are
–Partial updates
•Updates sent only when there is a change in
topology that influences routing information
–Triggered
Ti dbby ttopology
l changes
h
–Bounded
•Propagation of partial updates are automatically
bounded so that only those routers that need the
information are updated
–Non periodic
•Updates
Updates are not sent out on a regular basis.
More details on how EIGRP operates will be presented in Chapter 9.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
Routing Table Maintenance
ƒ RIP Triggered Updates
–Routing table update that is sent immediately to adjacent
routers in response to a routing change
– The receiving routers
routers, in turn
turn, generate triggered updates
that notify their neighbors of the change.

ƒ Conditions in which triggered updates are sent


–Interface changes state
–Route becomes unreachable
–Route is placed in routing table

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Routing Table Maintenance
problems
ƒ RIP Triggered Updates (problems)
–Using only triggered updates would be
sufficient if there were a guarantee that the
wave of updates would reach every
appropriate router immediately.
ƒ However, there are two problems with
triggered updates:
–Packets containing the update message can
be dropped or corrupted by some link in the
network.
network
–The triggered updates do not happen
instantaneously. It is possible that a router that
has not yyet received the triggered
gg update
p will
issue a regular update at just the wrong time,
causing the bad route to be reinserted in a
neighbor that had already received the
triggered update
update.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
Triggered Extensions to RIP
Problems and Prerequisites
ƒ Prerequisites
P i it
–RIP must be enabled for this feature to
function.
–This feature runs on a point-to-point,
serial interface only
–Triggered extensions to IP RIP
increase efficiency of RIP on point-to-
point,, serial interfaces.
p
•interface serial 0
• ip rip triggered
http://cisco.com/en/US/docs/ios/12_0t/12_0t1/feature/guide/trigrip.html

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
Routing Table Maintenance
ƒ Random Jitter
Synchronized updates
A condition where multiple routers on multi access LAN
segments transmit routing updates at the same time.
ƒProblems
P bl with
ith synchronized
h i d updates
d t
-Bandwidth consumption
-Packet
Packet collisions (with hubs and not with switches)
ƒSolution to problems with
synchronized updates
- Used of random variable
called RIP_JITTER
•A good reference is : Routing TCP/IP (Jeff
Doyle) page 193-196.
Update timers : timer for periodic update
•Update
(default 30s) - RIP_JITTER (random to
prevent colision - 15% of the update timers)
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Routing Table Maintenance
ƒ Random Jitter
•Figure 5.1.
5 1 RIP adds a small random variable to the update timer
at each reset to help avoid routing table synchronization. The
RIP updates from Cisco routers vary from 25.5 to 30 seconds, as
shown
h in
i the
th delta
d lt times
ti off these
th updates.
d t

Routing TCP/IP,
Volume I (CCIE
Professional
Development)

http://www.ubookcase.com/book/Cisco/Routing.TCP.IP.Volume.I.CCIE.Professional.De
velopment/source/1578700418/ch05lev1sec1.html#ch05fig1
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
R ti L
Routing Loops

ƒ Routing loops are


A condition in which a
packet is continuously
transmitted within a
series
i off routers
t
without ever reaching
its destination.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Routing Loops

ƒ Routing loops may be caused by:


-Incorrectly configured static routes
-Incorrectly configured route redistribution
-Slow convergence
-Incorrectly
Incorrectl config
configured
red discard ro
routes
tes
ƒ Routing loops can create the following issues
-Excess
Excess use of bandwidth
-CPU resources may be strained
-Network
Network convergence is degraded
-Routing updates may be lost or not processed in a timely
manner

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Routing Loops

ƒ Routing loops can eliminate


–Defining
g a maximum metric to p
prevent count to infinity
y
–Holddown timers
–Split horizon
–Route poisoning or poison reverse
–Triggered updates

ƒ Note: The IP protocol has its own mechanism to


prevent the possibility of a packet traversing the
network endlessly. IP has a Time-to-Live (TTL)
( ) field
f
and its value is decremented by 1 at each router.
–If
If the TTL is zero,
zero the router drops the packet
packet.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Preventing loops with Count to Infinity

ƒ Count
C t tto IInfinity
fi it
–It is a condition that exists when inaccurate routing
updates
d t increase
i the
th metric
t i value
l tot "infinity"
"i fi it " for
f a
network that is no longer reachable.
–This
This is a routing loop whereby packets bounce
infinitely around a network.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Preventing loops by Setting a maximum
ƒ Setting
g a maximum
ƒ Distance Vector routing protocols set a specified
metric value to indicate infinityy
Once a router “counts to infinity” it marks the
route as unreachable
ƒ RIP defines infinity as 16 hops - an "unreachable"
metric.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
P
Preventing
ti loops
l ith holddown
with h ldd timers
ti
ƒ Holddown timers are used to prevent regular
update messages from inappropriately reinstating a
route that may have gone bad.
-Holddown
H ldd ti
timers allow
ll a router
t tto nott acceptt any changes
h to
t a
route for a specified period of time.
- Do not appept the update when the route is flapping
-Point of using holddown timers
ƒAllows routing updates to propagate through network with
the most current information
information.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Holddown timers work in the following
f way
1. A router receives an update from a neighbor indicating that a network that previously
was accessible
ibl is
i now no longer
l accessible.
ibl
2. The router marks the network as possibly down and starts the holddown timer.
3. If an update with a better metric for that network is received from any neighboring
router during the holddown period,
period the network is reinstated and the holddown timer
is removed.
4. If an update from any other neighbor is received during the holddown period with the
same or worse metric for that network, that update is ignored. Thus, more time is
allowed for the information about the change to be propagated.
5. Routers still forward packets to destination networks that are marked as possibly
down. This allows the router to overcome any issues associated with intermittent
connectivity. If the destination network truly is unavailable and the packets are
forwarded, black hole routing is created and lasts until the holddown timer expires.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
P
Preventing
ti loops
l ith holddown
with h ldd timers
ti

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
P
Preventing
ti loops
l ith Split Horizon
with
ƒ The Split Horizon Rule is used to prevent routing loops
ƒ Split Horizon rule:
A router should not advertise a network through the
interface from which the update came.

Because of split
horizon, R1 also
does not advertise
the information
about network
10 4 0 0 back to
10.4.0.0
R2
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
Preventing loops with Route Poisoning

ƒ Split horizon with Route


poisoning
–Route
Route poisoning is used to
mark the route as
unreachable in a routing
update that is sent to other
routers.
–Unreachable is interpreted
as a metric
t i th
thatt is
i sett to
t the
th 16 16
maximum.
–For RIP,, a poisoned
p route
has a metric of 16.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Preventing loops with poison reverse

ƒ Split horizon with poison


reverse
–The
The rule states that once a
router learns of an
unreachable route through an
interface advertise it as
interface,
unreachable back through
the same interface
–Poison
P i reverse iis a specific
ifi
circumstance that overrides
split horizon. It occurs to
ensure that
th t R3 iis nott
susceptible to incorrect
updates about network
10 4 0 0
10.4.0.0.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
Preventing loops with TTL
ƒ IP & TTL
–Purpose
P off th
the TTL field
fi ld
The TTL field is found in an IP header and
i used
is d tto preventt packets
k t from
f endlessly
dl l
traveling on a network
ƒ How
H th
the TTL field
fi ld works
k
-TTL field contains a numeric value
The numeric value is decreased by one by
every router on the route to the destination.
If numeric value reaches 0 then
Packet is discarded.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 35
Preventing loops with TTL

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 36
Routing Protocols Today
ƒ Factors used to determine whether to use RIP or EIGRP
include
-Network size
Co pat b ty between
-Compatibility bet ee models
ode s o
of routers
oute s
-Administrative knowledge

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
Routing Protocols Today

ƒ RIP
ƒFeatures of RIP:
-Supports split horizon & split horizon with
poison reverse
-Capable of load balancing
-Easy to configure
-Works
Works in a multi vendor router environment

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
Routing Protocols Today

ƒ RIP V2
ƒFeatures
F t off RIP:
RIP
•Includes the subnet mask in the routing updates,
making it a classless routing protocol.
•Has authentication mechanism to secure routing
t bl updates.
table d t
•Supports variable length subnet mask (VLSM).
•Uses multicast addresses instead of broadcast.
•Supports manual route summarization.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 39
Routing Protocols Today

ƒ EIGRP
ƒFeatures
Features of EIGRP:
-Triggered updates
-EIGRP
EIGRP hello
h ll protocol
t l used
d tto establish
t bli h
neighbor adjacencies
-Supports
Supports VLSM & route summarization
-Use of topology table to maintain all routes
-Classless distance vector routing protocol
-Cisco proprietary protocol

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 40
Summary

ƒ Characteristics of Distance Vector routing


protocols
–Periodic updates
p
–RIP routing updates include the entire routing table
–Neighbors are defined as routers that share a link and are
configured to use the same protocol
ƒ The network discovery process for D.V. routing
protocol
–Directly connected routes are placed in routing table 1st
–If a routing protocol is configured then
•Routers will exchange routing information
–Convergence is reached when all network routers have the
same network
t k information
i f ti

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
Summary

ƒ D.V. routing
g protocols
p maintains routing
g tables by
y
–RIP sending out periodic updates
–RIP using 4 different timers to ensure information is accurate
and convergence is achieved in a timely manner
–EIGRP sending out triggered updates

ƒ D.V. routing protocols may be prone to routing loops


– routing loops are a condition in which packets continuously
traverse a network
–Mechanisms used to minimize routing loops include defining
maximum hop count, holddown timers, split horizon, route
poisoning and triggered updates

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 42
Summary
ƒ Conditions that can lead to routing
g loops include
–Incorrectly configured static routes
–Incorrectly configured route redistribution
–Slow convergence
–Incorrectly configured discard routes

ƒ How routing loops can impact network performance


includes:
–Excess use of bandwidth
–CPU resources may be strained
–Network
N t k convergence is
i ddegraded
d d
–Routing updates may be lost or not processed

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 43
Summary

ƒ Routing Information Protocol (RIP)


A distance vector protocol that has 2 versions
RIPv1 – a classful routing protocol
RIPv2 - a classless routing protocol

ƒ Enhanced Interior Gateway Routing Protocol


(EIGRP)
–A distance vector routing protocols that has some features of
link state routing protocols
–A
A Cisco proprietary routing protocol

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 44
RIP version 1

Chapter 5: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Describe
esc be the
e functions,
u c o s, ccharacteristics,
a ac e s cs, a and
d ope
operation
a o
of the RIPv1 protocol.
ƒ Configure a device for using RIPv1.
ƒ Verify proper RIPv1 operation.
ƒ Describe how RIPv1 performs
f automatic
summarization.
ƒ Configure, verify, and troubleshoot default routes
propagated in a routed network implementing RIPv1.
ƒ Use recommended techniques to solve problems
related to RIPv1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
RIP Historical Impact

ƒ RIP evolved from an earlier protocol


p
developed at Xerox, called Gateway
Information Protocol (GWINFO).
ƒ With the development of Xerox Network
System (XNS),
(XNS) GWINFO evolved into
RIP.
ƒ It later gained popularity because it was
implemented
p in the Berkeley
y Software
Distribution (BSD) as a daemon named
routed (pronounced "route-dee", not
"rout-ed").
ƒ Recognizing the need for standardization
of the protocol, Charles Hedrick wrote
RFC 1058 in 1988, in which he
documented the existing protocol and
specified some improvements
improvements.
ƒ Since then, RIP has been improved with
RIPv2 in 1994 and with RIPng in 1997. IPv6 form of RIP called
RIPng (next generation) is
now available
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
RIPv1

ƒ RIP Characteristics
–A classful, Distance Vector
(DV) routing protocol
–Metric = hop count
–Routes with a hop p count > 15
are unreachable
–Updates are broadcast every
30 seconds
–The data portion of a RIP
message is encapsulated into
a UDP segment,
segment with both
source and destination port
numbers set to 520.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
RIPv1
ƒ RIP Message Format
ƒ RIP header - divided into 3 fields
–Command field
•REQUEST (1)- Request either a partial
or full table update from another RIP
router.
•RESPONSE (2) - A response to a
request.
–Version field
•1 or 2
–Must be zero
•Must be zero" fields provide room
p
for future expansion of the
protocol.

ƒ Route Entry - composed of 3


fields
–Address family identifier
•CLNS, IPX, IP etc.
–IP address
–Metric

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
RIPv1

ƒ RIP Operation
–RIP uses 2 message types:
ƒRequest message
-This is sent out on startup by each RIP
enabled interface
-Requests
Requests all RIP enabled neighbors to send
routing table
ƒResponse
Response message
-Message sent to requesting router
containing routing table

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
RIP 1
RIPv1
ƒ IP addresses initiallyy divided
into classes
Class A
-Class
-Class B
-Class
C C
ƒ RIP is a classful routing
protocol
-Does not send subnet
masks in routing updates

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
Common RIP configuration
g issues

RIP and IGRP:


ƒ Classful network statements only
ƒ IOS will take subnetted networks but will translate it into
the classful network for the running-config.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
RIPv1
ƒ Administrative Distance
–RIP’s default administrative distance is 120

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Basic RIPv1 Configuration

ƒ A typical topology suitable for


use by RIPv1 includes:
-Three
Three router set up
-No PCs attached to LANs
-Use
U off 5 diff
differentt IP
subnets

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
B i RIPv1
Basic RIP 1 C
Configuration
fi ti
ƒ Router RIP Command
–To enable RIP enter:
-Router rip at the global configuration prompt
-Prompt will look like R1(config-router)#

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Basic RIPv1 Configuration
ƒ Specifying
p y g Networks
–Use the network
command to:
-Enable RIP on all
interfaces that
belong to this
network
-Advertise this
network in RIP
updates
sent to other
routers
every 30 seconds
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Verification and Troubleshooting

ƒ Show ip Route
ƒ To verify and
troubleshoot routing
-Use the following
commands:
-show ip route
-show
show ip protocols
-debug ip rip

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
V ifi ti and
Verification d Troubleshooting
T bl h ti
ƒ show ip protocols
command
-Displays
routing
protocol
t l
configured
on router
t
POP QUIZ:
What is the different
between the output of the
command “show ip p route”
and “show ip protocol”?

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
Verification and Troubleshooting
ƒ Debug ip rip command
-Used
Used to display RIP routing updates as they are
happening

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Verification and Troubleshooting

ƒ Passive interface command


Used to prevent a router from sending updates through
-Used
an interface
-Example:
Router(config-router)#passive-interface interface-type interface-number

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
Verification and Troubleshooting

ƒ Passive interfaces

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
Preventing
g routing
g updates
p through
g an interface
ƒ Route filtering works by regulating the
routes that are entered into or advertised
out of a route table.
As a result, a route filter influences which L b
Lab:
routes the router advertises to its
neighbors.
ƒ On the other hand,
hand routers running link
state protocols determine routes based
on information in the link-state database.
Route filters have no effect on link-state
advertisements or the link-state
link state database.
database
(Tony) Route filtering could have negative
effect on the link-state routing protocol.
ƒ Using the passive interface command
can prevent routers from sending routing
updates through a router interface, but
the router continues to listen and use
routing updates from that neighbor.
neighbor
Keeping routing update messages from
being sent through a router interface
prevents other systems on that network
from learning about routes dynamically.
dynamically

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
Preventing routing updates
It will break the rip update
through an interface 1
ƒ Again,
Again this is only half the
story.
When you use “passive
interface” on a distance
vector routing
gpprotocol,, you
y
need to complement it with You can use the “ip route”
“ip route” command. 2 command to send route update
b k to establish
back bli h the
h 2 way
communication

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Automatic Summarization
Modified Topology
ƒ The original scenario has been 172.30.3.0
modified such that:
Three classful networks are used:
172.30.0.0/16 172.30.2.0

192.168.4.0/24 172.30.1.0

192 168 5 0/24


192.168.5.0/24
The 172.30.0.0/16 network is
subnetted into three subnets:
172.30.1.0/24
172.30.2.0/24
172.30.3.0/24
The following devices are part of the
172.30.0.0/16 classful network address:
All interfaces on R1
S0/0/0 and Fa0/0 on R2
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
Automatic Summarization

ƒ Configuration
C fi ti Details
D t il
-To remove the RIP routing
process use the
th ffollowing
ll i
command
N router
No t rip
i
-To check the configuration
use the following command
Show run

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
Automatic Summarization
ƒ Boundary Routers
–RIP
RIP automatically summarizes classful networks
–Boundary routers summarize RIP subnets from one
major network to another
another.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Automatic Summarization
Processing RIP Updates
ƒ 2 rules govern RIPv1 updates:
-If a routing
g update
p and the interface it’s
received on belong to the same
network then
The subnet mask of the
interface is applied to the
network in the routing update
-If
If a routing update and the interface it’s
it s
received on belong to a different
network then
The classful
Th l f l subnet
b maskk off the
h
network is applied to the
network in the routing update.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Automatic Summarization

ƒ Sending RIP Updates


–RIP uses automatic summarization to reduce the
size of a routing table
table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
A
Automatic
i Summarization
S i i
ƒ Advantages of automatic
summarization:
-The size of
routing updates is
reduced
-Single routes are
used to represent
multiple routes
which results in
faster lookup in the
routing table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Automatic Summarization
ƒ Disadvantage of Automatic Summarization:
-Does not support discontiguous networks

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Automatic Summarization

ƒ Discontiguous
Topologies do not
converge with
i h RIP
RIPv1
1
ƒ A router will only
advertise major
network addresses
out interfaces that do
not belong to the
advertised route.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Automatic Summarization

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
Default Route and RIPv1
ƒ Modified Topology:
p gy Scenario C
ƒ Default routes
Packets
P k that
h are not d defined
fi d specifically
ifi ll iin a routing
i
table will go to the specified interface for the default
route
Example: Customer routers use default routes to
connect to an ISP router.
Command used to configure a default route is
ip route 0
0.0.0.0
0000 0.0.0.0
0 0 0 s0/0/1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Default Route and RIPv1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
D f lt R
Default Route
t and
d RIP
RIPv1
1
ƒ Propagating the Default Route in RIPv1
ƒ Default-information originate command
-This
This command is used to specify that the router is to originate
default information, by propagating the static default route in
RIP update.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
Default route with RIP

Centre#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,

Gateway of last resort is not set M bil # h iip route


Mobile#sho t
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
R 192.168.4.0/24 [120/1] via 192.168.2.1, 00:00:11, Serial0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:11, Serial0 Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, Serial0
C 192.168.3.0/24 is directly connected, Ethernet0 R 192
192.168.4.0/24
168 4 0/24 [120/1] via
i 192
192.168.1.1,
168 1 1 00
00:00:04,
00 04 SSerial0
i l0
C 192.168.5.0/24 is directly connected, Ethernet0
Setup up a default route on the Centre router
C 192.168.1.0/24 is directly connected, Serial0
Centre(config)#ip route 0.0.0.0 0.0.0.0 loopback0 R 192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:04, Serial0
Centre(config)#router rip R 192
192.168.3.0/24
168 3 0/24 [120/2] via 192
192.168.1.1,
168 1 1 00:00:04
00:00:04, Serial0

Centre(config-router)#default-information originate
Mobile#sho ip route
Centre#sh ip route
Codes: C - connected, S - static, * - candidate default - RIP,
Codes: C - connected,, S - static,, * - candidate default

Gateway of last resort is 192.168.1.1 to network 0.0.0.0


Gateway of last resort is 0.0.0.0 to network 0.0.0.0

R 192.168.4.0/24 [120/1] via 192.168.1.1, 00:00:09, Serial0


C 172.16.1.1 is directly connected, Loopback0
C 192.168.5.0/24 is directly connected, Ethernet0
R 9 68 0/ [[100/8576]
192.168.4.0/24 00/85 6] via
a 192.168.2.1,
9 68 , 00
00:00:22,
00 , SeSerial0
a0
C 192.168.1.0/24 is directly connected, Serial0
R 192.168.5.0/24 [120/2] via 192.168.2.1, 00:00:22, Serial0
R 192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:04, Serial0
S* 0.0.0.0/0 is directly connected, Loopback0
R 192.168.3.0/24 [120/2] via 192.168.1.1, 00:00:09, Serial0
R* 0.0.0.0/0 [120/2] via 192.168.1.1, 00:00:09, Serial0
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
Summary

ƒ RIP characteristics include:


Cl
Classful,
f l di
distance
t vector
t routing
ti protocol
t l
Metric is Hop Count
Does not support VLSM or discontiguous subnets
Updates every 30 seconds
ƒ Rip messages are encapsulated in a UDP segment
with source and destination ports of 520

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Summary: Commands used by RIP
Command Command’s purpose

Rtr(config)#router rip Enables RIP routing process

Rtr(config-router)#network Associates a network with a RIP routing process

Rtr#debug ip rip used to view real time RIP routing updates

Rtr(config-router)#passive-interface fa0/0 Prevent RIP updates from going out an interface

Rtr(config-router)#default-information originate Used by RIP to propagate default routes

Rtr#show ip
ppprotocols Used to display
p y timers used byy RIP

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
VLSM and CIDR

Chapter 6: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Co pa e a
Compare andd co
contrast
as cclassful
ass u aand
d cclassless
ass ess IP
addressing.
ƒ Review VLSM and explain the benefits of classless IP
addressing.
ƒ Describe the role of the Classless Inter-Domain
Inter Domain
Routing (CIDR) standard in making efficient use of
scarce IPv4 addresses
ƒ In addition to subnetting, it became possible to
summarize a large collection of classful networks into
an aggregate route, or supernet.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
Introduction
ƒ Prior to 1981, IP addresses used only the first 8 bits to specify the
network p portion of the address
ƒ In 1981, RFC 791 modified the IPv4 32-bit address to allow for three
different classes
•Class A addresses used 8 bits for the network portion of the address,
•Class B used 16 bits,
•Class C used 24 bits
bits.
–This format became known as classful IP addressing.
ƒ IP address space was depleting rapidly
the Internet Engineering Task Force (IETF) introduced Classless
Inter-Domain Routing (CIDR)
–CIDR uses Variable Length Subnet Masking (VLSM) to help
conserve address space.
-VLSM is simply subnetting a subnet

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
Introduction
ƒ With the introduction of CIDR and VLSM, ISPs
co ld no
could now assign one part of a classf
classfull net
network
ork to
one customer and different part to another
customer.
customer
ƒ This discontiguous address assignment by ISPs
was paralleled by the development of classless
routing protocols.
–Classless routing protocols do include the subnet
mask in routing updates and are not required to perform
summarization.
i ti
–The classless routing protocols discussed in this
course are RIPv2,
RIPv2 EIGRP and OSPF
OSPF.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
Classful and Classless IP Addressing
ƒ Classful IP addressing
–When
When the ARPANET was commissioned in 1969 1969, no one
anticipated that the Internet would explode.
–1989, ARPANET transformed into what we now call the Internet.
–As
As of January 2007,
2007 there are over 433 million hosts on internet
ƒ Initiatives to conserve IPv4 address space include:
-VLSM
VLSM & CIDR notation (1993
(1993, RFC 1519)
-Network Address Translation (1994, RFC 1631)
-Private
Private Addressing (1996
(1996, RFC 1918)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
Classful and Classless IP Addressing
ƒ Classes of IP addresses are identified by the decimal number
of the 1st octet
Class A address begin with a 0 bit
Range of class A addresses = 0.0.0.0
0 0 0 0 to 127
127.255.255.255
255 255 255
Class B address begin with a 1 bit and a 0 bit
Range of class B addresses = 128
128.0.0.0
0 0 0 to 191
191.255.255.255
255 255 255
Class C addresses begin with two 1 bits & a 0 bit
R
Range off class
l C addresses
dd = 192
192.0.0.0
0 0 0 tto 223
223.255.255.255.
255 255 255

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
Classful and Classless IP Addressing
ƒ Multicast addresses beging with three 1s and a 0 bit.
Multicast addresses are used to identify a group of
hosts that are part of a multicast group.
ƒ IP addresses that begin with four 1 bits were reserved for
future use.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
Classf l and Classless IP Addressing
Classful
ƒ The IPv4 Classful Addressing Structure (RFC 790)
A IP address
An dd h
has 2 parts:
-The network portion
Found on the left side of an IP address
-The host portion
Found on the right side of an IP address

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
Classf l and Classless IP Addressing
Classful
ƒ As shown in the figure, class A networks used the first octet
for network assignment,
assignment which translated to a 255
255.0.0.0
000
classful subnet mask.
–Because
Because only 7 bits were left in the first octet (remember
(remember, the first bit
is always 0), this made 2 to the 7th power or 128 networks.
–With 24 bits in the host portion, each class A address had the
potential
t ti l ffor over 16 million
illi iindividual
di id l hhostt addresses.
dd

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Classf l and Classless IP Addressing
Classful
ƒ With 24 bits in the host portion, each class A address had
the potential for over 16 million individual host addresses
addresses.
ƒ What was one organization going to do with 16 million
addresses?
ƒ Now you can understand the tremendous waste of address
space
p that occurred in the beginning
g g days
y of the Internet,
when companies received class A addresses.
ƒ Some companies and governmental organizations still have
class
l A addresses.
dd
–General Electric owns 3.0.0.0/8,
–Apple
Apple Computer owns 1717.0.0.0/8,
0 0 0/8
–U.S. Postal Service owns 56.0.0.0/8.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
Classf l and Classless IP Addressing
Classful
ƒ Class B: RFC 790 specified the first two octets as
network.
network
–With the first two bits already established as 1 and 0, 14 bits
remained in the first two octets for assigning networks, which
resulted in 16,384
16 384 class B network addresses
addresses.
–Because each class B network address contained 16 bits in the
host portion, it controlled 65,534 addresses. (Remember, 2
addresses were reserved for the network and broadcast
addresses.)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Classf l and Classless IP Addressing
Classful
ƒ class C: RFC 790 specified the first three octets
as network
network.
–With the first three bits established as 1 and 1 and 0,
21 bits remained for assigning networks for over 2
million class C networks.
–But, each class C network onlyy had 8 bits in the host
portion, or 254 possible host addresses.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Classf l and Classless IP Addressing
Classful
ƒ Classful Routing Updates
–Recall that classful routing protocols (i.e. RIPv1) do not send
subnet masks in their routing updates
–This is because the router receiving the routing update could
determine the subnet mask simply by examining the value of
the first octet in the network address, or by applying its ingress
interface mask for subnetted routes
routes. The subnet mask was
directly related to the network address.

/24 /16

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
Classf l and Classless IP Addressing
Classful
ƒ In the example,
–R1
R1 knows that subnet 172
172.16.1.0
16 1 0 belongs to the same major classful
network as the outgoing interface. Therefore, it sends a RIP update to R2
containing subnet 172.16.1.0.
•When
When R2 recei
receives
es the update,
pdate it applies the recei
receiving
ing interface ssubnet
bnet
mask (/24) to the update and adds 172.16.1.0 to the routing table
–When sending updates to R3, R2 summarizes subnets 172.16.1.0/24,
172 16 2 0/24 and
172.16.2.0/24, d 172
172.16.3.0/24
16 3 0/24 iinto
t th
the major
j classful
l f l network
t k 172
172.16.0.0.
16 0 0
•Because R3 does not have any subnets that belong to 172.16.0.0, it will
apply the classful mask for a class B network, /16

/24 /16

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
Classful and Classless IP Addressing
ƒ Classless Inter-domain Routing
g ((CIDR – RFC 1517))
ƒAdvantage of CIDR :
ƒMore efficient use of IPv4 address space
ƒRoute summarization
ƒ(Æ reduce routing table size)
ƒ(Æ reduce routing update traffic)
ƒRequires subnet mask to be included in routing update because
address class is meaningless
ƒ The network portion of the address is determined by the network
subnet mask, also known as the network prefix, or prefix length (/8,
/19, etc.).
ƒThe network address is no longer determined by the class of the
address
ƒBlocks
Blocks of IP addresses could be assigned to a network based on the
requirements of the customer, ranging from a few hosts to hundreds or
thousands of hosts.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Classful and Classless IP Addressing
ƒ Classless IP Addressing
ƒ CIDR & Route Summarization
–Variable Length Subnet Masking (VLSM)
–Allows a subnet to be further sub-netted
•according to individual needs
–Prefix Aggregation a.k.a. Route Summarization
–CIDR allows for routes to be summarized as a single route

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
Classful and Classless IP Addressing
ƒ Route Summarization
– In the figure, notice that ISP1 has four customers, each with a
variable amount of IP address space.
–However,
However all of the customer address space can be summarized
into one advertisement to ISP2.
–The 192.168.0.0/20 summarized or aggregated route includes all
the networks belonging to Customers A, B, C, and D.
•This type of route is known as a supernet route.
•A
A supernett summarizes
i multiple
lti l network
t k addresses
dd with
ith a mask
k
less than the classful mask.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
Classful and Classless IP Addressing
ƒ Route Summarization
– Propagating VLSM and supernet routes requires a
classless routing protocol, because the subnet mask can
no longer be determined by the value of the first octet.
•Classless routing protocols include the subnet mask
with
ith th
the network
t k address
dd iin th
the routing
ti update.
d t
•RIPv2, EIGRP, IS-IS, OSPF and BGP.
•Interior:
I i
•RIPv2
•EIGRP
EIGRP
•IS-IS
•OSPF
•Exterior:
Exterior:
•BGP
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
Classful and Classless IP Addressing
ƒIs there any difference
between the terms CIDR and
VLSM??

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Classful and Classless IP Addressing

ƒ For example,
p the networks 172.16.0.0/16, 172.17.0.0/16, 172.18.0.0/16
and 172.19.0.0/16 can be summarized as 172.16.0.0/14.
–If R2 sends the 172.16.0.0 summary route without the /14 mask, R3 only
knows to apply the default classful mask of /16.
–In a classful routing protocol scenario, R3 is unaware of the
172.17.0.0/16, 172.18.0.0/16 and 172.19.0.0/16 networks
–With a classless routingg protocol,
p R2 will advertise the 172.16.0.0
network along with the /14 mask to R3. R3 will then be able to install the
supernet route 172.16.0.0/14 in its routing table giving it reachability to the
172.16.0.0/16, 172.17.0.0/16, 172.18.0.0/16 and 172.19.0.0/16 networks.

172.16.0.0 /14

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
Classful and Classless IP Addressing

ƒ Classless Routing Protocol

Routing Routing Supports Ability to


Protocol updates VLSM send
Include
c ude Supernet
Supe e
subnet routes
Mask
Classful No No No
(RIPv1)
Classless Yes Yes Yes

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
VLSM
ƒ Classful routing
-only
only allows for one
subnet mask for all
networks
ƒ VLSM & classless routing
-This
This is the process
of subnetting a subnet
-More than one
subnet mask can be
used
-More efficient use of IP
addresses as compared
to classful IP
addressing
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
VLSM
ƒ VLSM – the process of
sub netting a subnet to fit
sub-netting
your needs
-Example:
Example:
Subnet 10.1.0.0/16, 8
more
oebbits
ts a
are
e bo
borrowed
o ed
again, to create 256
subnets with a /24 mask.
-Mask
M k allows
ll ffor 254 h
hostt
addresses per subnet
-Subnets range from:
10 1 0 0 / 24 tto
10.1.0.0
10.1.255.0 / 24
* Same process for Subnet
10.2.0.0/16
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
VLSM
ƒ Subnet 10.3.0.0/16, 12
more bits are borrowed
again, to create 4,096
subnets with a /28 mask.
–Mask allows for 14 host
addresses per subnet
–Subnets
Subnets range from: 10.3.0.0
/ 28 to 10.3.255.240 / 28
ƒ Subnet 10.4.0.0/16, 4 more
bit are b
bits borrowed
d again,
i tto
create 16 subnets with a
/20 mask.
–Mask allows for 2,046 host
addresses per subnet
–Subnets
Subnets range from: 1010.4.0.0
400
/ 20 to 10.4.240.0 / 20
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Classless Inter
Inter-Domain
Domain Routing (CIDR)
ƒ Route summarization done by CIDR
-Routes are summarized with masks that are less
than that of the default classful mask (supernetting)
-Example:
172.16.0.0 / 13 is the summarized
route for the 172.16.0.0 / 16 to
172.23.0.0 / 16 classful networks
Although 172.22.0.0/16 and
172.23.0.0/16 are not shown in
the graphic, these are also
included in the summary route
route.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Classless Inter
Inter-Domain
Domain Routing (CIDR)
ƒ Note: You may recall that a supernet is always a route summary, but
a route summary is not always a supernet.
–It is possible that a router could have both a specific route entry and a
summary route entry covering the same network.
–Let
L t us assume that
th t router
t X has
h a specific
ifi route
t for
f 172.22.0.0/16
172 22 0 0/16 using
i
Serial 0/0/1 and a summary route of 172.16.0.0/13 using Serial0/0/0.
–Packets with the IP address of 172.22.n.n match both route entries.
–These packets destined for 172.22.0.0 would be sent out the
Serial0/0/1 interface because there is a more specific match of 16 bits,
than with the 13 bits of the 172.16.0.0/13 summary route.

ip route 172.22.0.0
255.255.0.0 s 0/0/1
Router X

s 0/0/1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Classless Inter-Domain Routing (CIDR)

ƒ Steps to calculate a route


summary
1. Li
1 Listt networks
t k iin bi
binary
format
2. Count number of left
2
most matching bits to
determine summary
route’s
t ’ maskk
3. Copy the matching
bits and add zero bits
to determine the
summarized
network address
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Example: Calculating a summary route

ƒ Which address can be used


to summarize networks
ƒ A:
• 192.168.0.0/30 ƒ 11000000 10101000 00000000 00000000
• 192.168.0.4/30 ƒ 11000000 10101000 00000000 00000100
• 192 168 0 8/30
192.168.0.8/30 ƒ 11000000 10101000 00000000 00001000
• 192.168.0.16/29 ƒ 11000000 10101000 00000000 00010000
• B
• 192.168.4.0/30 ƒ 11000000 10101000 00000100 00000000
• 192.168.5.0/30 ƒ 11000000 10101000 00000101 00000000
• 192 168 6 0/30
192.168.6.0/30 ƒ 11000000 10101000 00000110 00000000
• 192.168.7.0/29 ƒ 11000000 10101000 00000111 00000000

ƒ Answer:
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
Example: Calculating a summary route

ƒ Reverse process of summary route:


ƒ Can you figure what networks are
included in 192.168.32.0 /20
ƒ 11000000 10101000 00100000 00000000

ƒ 11000000 10101000 00100000 00000000


ƒ 11000000 10101000 00100001 00000000
ƒ 11000000 10101000 00100010 00000000
ƒ …..
ƒ …..
ƒ 11000000 10101000 00101101 00000000
ƒ 11000000 10101000 00101110 00000000
ƒ 11000000 10101000 00101111 00000000
ƒ Answer:
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Designing VLSM Addressing 6.4.1

ƒ In this activity, you will


use the network
address 192.168.1.0/24
192 168 1 0/24
to subnet and provide
the IP addressing g for a
given topology.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
Designing VLSM Addressing 6.4.2

ƒ In this activity, you will


use the network
address 172
172.16.0.0/16
16 0 0/16
to subnet and provide
the IP addressing g for a
given topology.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
Designing VLSM Addressing 6.4.2

ƒ The
Th network
t k has
h the
th following
f ll i addressing
dd i requirements:
i t
ƒ East Network Section
–The N-EAST (Northeast) LAN1 will require 4000 host IP addresses.
–The N-EAST (Northeast) LAN2 will require 4000 host IP addresses.
–The SE-BR1 (Southeast Branch1) LAN1 will require 1000 host IP addresses.
–The SE-BR1 (Southeast Branch1) LAN2 will require 1000 host IP addresses.
–The SE-BR2 (Southeast Branch2) LAN1 will require 500 host IP addresses.
–The SE-BR2 (Southeast Branch2) LAN2 will require 500 host IP addresses.
–The
The SE
SE-ST1
ST1 (Southeast Satellite1) LAN1 will require 250 host IP addresses
addresses.
–The SE-ST1 (Southeast Satellite1) LAN2 will require 250 host IP addresses.
–The SE-ST2 (Southeast Satellite2) LAN1 will require 125 host IP addresses.
–The SE-ST2 (Southeast Satellite2) LAN2 will require 125 host IP addresses.
ƒ West Network Section
–The S-WEST (Southwest) LAN1 will require 4000 host IP addresses.
–The S-WEST (Southwest) LAN2 will require 4000 host IP addresses.
–The NW-BR1 (Northwest Branch1) LAN1 will require 2000 host IP addresses.
–The
The NW-BR1
NW BR1 (Northwest Branch1) LAN2 will require 2000 host IP addresses
addresses.
–The NW-BR2 (Northwest Branch2) LAN1 will require 1000 host IP addresses.
–The NW-BR2 (Northwest Branch2) LAN2 will require 1000 host IP addresses.
ƒ Central Network Section
–The
The Central LAN1 will require 8000 host IP addresses
addresses.
–The Central LAN2 will require 4000 host IP addresses.
ƒ The WAN links between each of the routers will require an IP address for each end of the link.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
Troubleshooting VLSM Addressing 6.4.3

ƒ In this activity, the network


address 172.16.128.0/17
was used to provide the IP
addressing for a network.
VLSM has been used to
subnet the address spacep
incorrectly.
ƒ You will need to troubleshoot
the addressing that was
assigned to each subnet to
determine where errors are
present and determine the
correct addressing
assignments where needed.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Basic Route Summarization 6.4.4

ƒ In this activity, you are


given a network with
subnetting and address
assignments already
completed.
ƒ Your task is to
determine summarized
routes that can be used
to reduce the number of
entries in routing tables

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
Challenge Route Summarization 6.4.5

ƒ In this activity, you are


given a network with
subnetting and address
assignments already
completed.
ƒ Your task is to
determine summarized
routes that can be used
to reduce the number of
entries in routing tables

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 35
Challenge Route Summarization 6.4.5

Add
Addressing
i Table
T bl
Addressing Table
ƒ Subnet Network Address
ƒ Subnet Network Address
ƒ S-WEST LAN1 192.168.7.0/27
ƒ N-EAST LAN1 192.168.5.0/27
ƒ S-WEST LAN2 192.168.7.32/27
ƒ N-EAST
N EAST LAN2 192 168 5 32/27
192.168.5.32/27
ƒ Link from WEST to N-WEST 192.168.7.64/30
ƒ Link from EAST to N-EAST 192.168.5.192/30
ƒ Link from WEST to S-WEST 192.168.7.68/30
ƒ Link from EAST to S-EAST 192.168.5.196/30
ƒ Link from HQ to WEST 192.168.7.72/30
ƒ Link from HQ to EAST 192.168.5.200/30
ƒ NW-BR1 LAN1 192.168.7.128/27
ƒ SE BR1 LAN1
SE-BR1 192 168 4 0/26
192.168.4.0/26
ƒ NW-BR1 LAN2 192.168.7.160/27
ƒ SE-BR1 LAN2 192.168.4.64/26
ƒ NW-BR2 LAN1 192.168.7.192/28
ƒ SE-BR2 LAN1 192.168.4.128/27
ƒ NW-BR2 LAN2 192.168.7.208/28
ƒ SE-BR2 LAN2 192.168.4.160/27
ƒ Link from N-WEST
N WEST to NW-BR1
NW BR1 192.168.7.224/30
ƒ SE-ST1 LAN1 192.168.4.192/29
ƒ Link from N-WEST to NW-BR2 192.168.7.228/30
ƒ SE-ST1 LAN2 192.168.4.200/29
ƒ CENTRAL LAN1 192.168.6.0/25
ƒ SE-ST2 LAN1 192.168.4.208/29
ƒ CENTRAL LAN2 192.168.6.128/26
ƒ SE-ST2 LAN2 192.168.4.216/29
ƒ Link from HQ to CENTRAL 192 168 6 192/30
192.168.6.192/30
ƒ Link from SE-BR2 to SE-ST1 192.168.4.224/30
ƒ Link from SE-BR2 to SE-ST2 192.168.4.228/30
ƒ Link from S-EAST to SE-BR2 192.168.4.232/30
ƒ Link from S-EAST
S EAST to SE
SE-BR1
BR1 192 168 4 236/30
192.168.4.236/30

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 36
Troubleshooting Route Summarization 6.4.6

ƒ In this activity, the LAN IP


addressing is already
completed for the network.
VLSM was used to subnet
the address space. The
summary y routes are
incorrect.
ƒ You will need to troubleshoot Addressing Table
the summary routes that Router Summary Route Network Address
have been assigned to HQ WEST LANs 172.16.52.0/21
determine where errors are HQ EAST LANs 172.16.56.0/23

present and determine the WEST HQ LANs


LAN 172 16 32 0/19
172.16.32.0/19

correct summary routes. WEST EAST LANs 172.16.58.0/23


EAST HQ LANs 172.16.30.0/20
EAST WEST LANs 172 16 48 0/21
172.16.48.0/21
ISP HQ, WEST, and EAST LANs 172.16.32.0/18

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
Summary
ƒ Classful IP addressing
ƒIPv4 addresses have 2 parts:
-Network portion found on left side of an IP
address
-Host portion found on right side of an IP
address
ƒClass A, B, & C addresses were designed to provide IP
addresses for different sized organizations
ƒThe class of an IP address is determined by the decimal
value found in the 1st octet
ƒIP addresses are running out so the use of Classless Inter
Domain Routing (CIDR) and Variable Length Subnet Mask
(VLSM) are used to try and conserve address space

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
Summary
ƒ Classful Routing Updates
–Subnet masks are not sent in routing updates
ƒ Classless IP addressing
–Benefit of classless IP addressing
ƒCan create additional network
addresses using a subnet mask
that fits yyour needs
–Uses Classless Interdomain Routing (CIDR)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 39
Summary

ƒ CIDR
ƒ Uses IP addresses more efficiently through
use of VLSM
-VLSM is the process of
subnetting a subnet
ƒ Allows for route summarization
-Route
Route summarization is
representing multiple contiguous
g route
routes with a single

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 40
Summary

ƒ Classless Routing Updates


Subnet masks are included in updates

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
RIPv2

Chapter 7: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Encounter
cou e a and
d desc
describe
be the
e limitations
a o so of RIPv1’s
s
limitations.
ƒ Apply the basic Routing Information Protocol Version
2 (RIPv2) configuration commands and evaluate
RIPv2 classless routing updates.
ƒ Analyze router output to see RIPv2 support for VLSM
and CIDR
ƒ Identify RIPv2 verification commands and common
RIPv2 issues.
ƒ Configure, verify, and troubleshoot RIPv2 in “hands-
on” labs

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
Introduction
ƒ Difference between RIPv1 & RIPv2
ƒRIPv1
•A classful distance vector routing protocol
Does not support discontiguous subnets
•Does
•Does not support VLSM
•Does not send subnet mask in routing update
•Routing updates are broadcast

ƒRIPv2
•A classless distance vector routing protocol that is an
enhancement of RIPv1’s
RIPv1 s features.
features
http://www.cisco.com/univercd/cc/t
•Next hop address is included in updates d/doc/cisintwk/ito_doc/rip.htm
•Routing updates are multicast (224.0.0.9 vs. 255.255.255.255)
•The use of authentication is an option

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
Introduction

ƒ Similarities between RIPv1 & RIPv2


– Use of timers to prevent routing loops
– Use of split horizon or split horizon with poison reverse to
also help prevent routing loops.
– Use of triggered updates when there is a change in the
topology for faster convergence.
– Maximum hop count of 15,
15 with the hop count of 16 signifying
an unreachable network.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
RIP 1 Li
RIPv1 Limitations
it ti
ƒ Lab Topology
3 router
ƒ3 t sett up
ƒTopology is discontiguous
ƒThere exists a static summary route
ƒStatic route information can be
injected into routing table updates
using redistribution.
Routers 1 & 3 contain VLSM
ƒRouters
networks
ƒRemember that both the R1 and R3
routers have subnets that are part of
the 172.30.0.0/16
172 30 0 0/16 major classful
network (class B).
ƒAlso remember that R1 and R3 are
connected to R2 using g subnets of the
209.165.200.0/24 major classful
network (class C).
ƒThis topology is discontiguous and
will not converge because
172.30.0.0/16 is divided by the
209.165.200.0/24.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
RIP 1 Li
RIPv1 Limitations
it ti

ƒ The topology shows that


R2 has a static
summary route to the
192.168.0.0/16 network.
The configuration of this
summaryy route will be
displayed later in this
section.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
RIP 1 Li
RIPv1 Limitations
it ti
ƒ Review the VLSM addressing
scheme in the figure
figure. As shown
in the top chart, both R1 and R3
have had the 172.30.0.0/16
network subnetted into /24
subnets.
subnets
–Four of these /24 subnets are
assigned:
–two to R1 ((172.30.1.0/24 and
172.30.2.0/24)
–two to R3 (172.30.100.0/24 and
172.30.110.0/24).
ƒ IIn the
th bottom
b tt chart,
h t we have
h
taken the 172.30.200.0/24
subnet and subnetted it again,
using g the first four bits for
subnets and the last four bits for
hosts. The result is a
255.255.255.240 mask or /28.
Subnet 1 and Subnet 2 are
assigned to R3.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
RIP 1 Limitations
RIPv1
ƒ Scenario Continued
ƒ VLSM
S
-Recall this is sub netting the
subnet
ƒ Private IP addresses are on
LAN links
ƒ Public IP addresses are used
on WAN links (through an
ISP, or when inside users
needd tto access outside
t id sites,
it
a public IP address must be
used.)
ƒ Loopback interfaces
-These are virtual interfaces
that can be pinged and
added to routing table
Cisco has set these addresses aside for educational purposes.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
RIPv1 Limitations

ƒ Loopback interfaces
ƒNotice that R3 is using loopback interfaces (Lo0,
Lo1, and Lo2).
ƒA loopback interface is a software-only interface that
is used to emulate a physical interface
interface.
ƒLike other interfaces, it can be assigned an IP address.
ƒLoopback interfaces are also used by other routing
protocols,, such as OSPF,, for different purposes.
p p p
ƒThese uses will be discussed in Chapter 11 OSPF.
ƒIn a lab environment, loopback interfaces are useful
in creating additional networks without having to add
more physical interfaces on the router
router.
ƒA loopback interface can be pinged and the subnet
can be advertised in routing updates.
Therefore, loopback interfaces are ideal for
ƒTherefore,
simulating multiple networks attached to the same
router.
ƒIn our example, R3 does not need four LAN
interfaces to demonstrate multiple subnets and
VLSM. Instead, we use loopback interfaces.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
RIPv1 Limitations
ƒ Route redistribution
– Redistribution involves taking the routes from one routing
source and sending those routes to another routing source.
• In our example topology, we want the RIP process on R2 to
redistribute our static route (192.168.0.0/16) by importing the route
into RIP and then sending it to R1 and R3 using the RIP process.

-R2(config-router)#redistribute
R2( fi t )# di t ib t static
t ti

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
RIPv1 Limitations
ƒ R2(config)#ip route 192.168.0.0 255.255.0.0 Null0
–The
The address space represented by the static summary route
192.168.0.0/16 does not actually exist.
–In order to simulate this static route, we use a null interface as
the exit interface.
– You do not need to enter any commands to create or
configure the null interface.
interface
–It is always up but does not forward or receive traffic. Traffic
sent to the null interface is discarded.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Static routes and null interfaces

ƒ Stat
Static
c routes
outes a
and
d null
u interfaces
te aces
R2(config)#ip route 192.168.0.0 255.255.0.0 Null0
a static route must have an active exit interface
ƒa
before it will be installed in the routing table.
ƒUsingg the null interface will allow R2 to advertise the
static route in RIP even though networks belonging
to the summary 192.168.0.0/16 do not actually exist.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
V if i and
Verifying d Testing
T ti Connectivity
C ti it
ƒ show ip interfaces brief
–To
T test
t t whether
h th or nott the
th topology
t l has
h full
f ll
connectivity, we first verify that both serial
links on R2 are up using the show ip
interface brief
ƒ Ping
ƒWhenever R2 pings any of the 172.30.0.0 subnets
on R1 or R3, only about 50% of the ICMP are
successful.
ƒR1 is able to ping 10.1.0.1 but is unsuccessful
when attempting to ping the 172.30.100.1 on R3
ƒR3 is able to ping 10
10.1.0.1
1 0 1 but is unsuccessful
when attempting to ping the 172.30.1.1 on R1.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
RIP 1 Li
RIPv1 Limitations
it ti
ƒ RIPv1 – a classful routing protocol
–Subnet
Subnet mask are not sent in updates
–Summarizes networks at major network boundaries
–RIPv1 cannot support discontiguous networks, VLSM, or CIDR.
–if
if network
t k iis di
discontiguous
ti and
d RIP
RIPv1
1 configured
fi d convergence willill nott b
be
reached
–RIPv1 on both the R1 and R3 routers will summarize their 172.30.0.0
subnets to the classful major network address of 172
172.30.0.0
30 0 0 when sending
routing updates to R2.
–From the perspective of R2, both updates have an equal cost of 1 hop to
reach network 172172.30.0.0/16.
30 0 0/16 As you will see
see, R2 installs both paths in the
routing table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
RIP 1 Li
RIPv1 Limitations
it ti
ƒExamining the routing tables
-To examine the contents of
routing updates use the
debug ip rip command

R2 is
i receiving
i i two
t 172.30.0.0
172 30 0 0 equall costt
routes with a metric of 1 hop. R2 is R2 has two equal cost routes to the
receiving one route on Serial 0/0/0 from R1 172.30.0.0/16 network.
and the other route on Serial 0/0/1 from R3.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
RIP 1 Li
RIPv1 Limitations
it ti
•R1 has its own 172
172.30.0.0
30 0 0 routes:
172.30.2.0/24 and 172.30.1.0/24.
•But R1 does not send R2 those subnets.
•R3 has a similar routing table.
•Both
B th R1 and d R3 are bboundary
d routers
t and
d
are only sending the summarized •R2 that it is not including the 172.30.0.0 network
172.30.0.0 network to R2 in their RIPv1 in its updates to either R1 or R3.
routing updates. •Because the split horizon rule is in effect.
•As
A a result,
lt R2 only
l kknows about
b t th
the •R2 learned about 172172.30.0.0/16
30 0 0/16 on both the
172.30.0.0/16 classful network and is Serial 0/0/0 and Serial 0/0/1 interfaces, it does not
unaware of any 172.30.0.0 subnets. include that network in updates it sends out these
same interfaces.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
RIPv1 Limitations
ƒ Because RIPv1 does not send the
subnet mask in routing
g updates,
p it R4 is added to
cannot support VLSM.
the topology
ƒ R3 router is configured with VLSM connected to R3
subnets all of which are members
subnets,
of the class B network
172.30.0.0/16:
–172.30.100.0/24
172.30.100.0/24 (FastEthernet 0/0)
–172.30.110.0/24 (Loopback 0)
–172.30.200.16/28 (Loopback 1)
–172.30.200.32/28
172 30 200 32/28 (L
(Loopback
b k 2)
ƒ As we saw with the 172.30.0.0/16
updates
p to R2 by
y R3,
–RIPv1 either summarizes the
subnets to the classful boundary
–or
o uses tthe
e subnet
sub et mask
as of
o the
t e
outgoing interface to determine
which subnets to advertise.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
RIPv1 Limitations
ƒ Why is RIPv1 on R3 not including
the other subnets,
172 30 200 16/28 and
172.30.200.16/28 R4 is added to
172.30.200.32/28, in updates to the topology
R4? connected to R3
– Those subnets do not have the
same subnet mask as
FastEthernet 0/0.
– R3 will only include those
172 30 0 0 routes in its routing
172.30.0.0
table with the same mask as the
exit interface.
– Since the interface is 172.30.100.1
with
ith a /24 mask,
k it will
ill only
l iinclude
l d
172.30.0.0 subnets with a /24
mask. The only one that meets
this condition is 172.30.110.0.
– The other 172.30.0.0 subnets,
172.30.200.16/28 and
172.30.200.32/28, are not
included because the /28 masks
do not match the /24 mask of the
outgoing interface.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
RIP 1 Li
RIPv1 Limitations
it ti
ƒ No CIDR Support
R2(config)#ip route 192
192.168.0.0
168 0 0
255.255.0.0 Null0
–the static route is included in
R2's routing table, but R2 will
not include the static route in its
update
–R1 is not receiving this
192.168.0.0/16 route in its RIP
updates from R2,
ƒ Reason: Classful routing
protocols do not support
p pp
CIDR routes that are
summarized with a smaller
mask than the classful
subnet
b t mask k
–If the 192.168.0.0 static route
were configured with a /24 mask
or g
greater,, this route would be
included in the RIP updates.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Config ring RIPv2
Configuring RIP 2
ƒ Comparing RIPv1 & RIPv2 Message Formats
–RIPv2 Message
g format is similar to RIPv1 but has 2 extensions
1st extension is the subnet mask field
ƒallows a 32 bit mask to be included in the RIP route entry.
the receiving router no longer depends upon the subnet mask of the
ƒthe
inbound interface or the classful mask when determining the subnet
mask for a route
2nd extension is the addition of next hop address
ƒThe Next Hop address is used to identify a better next-hop address - if
one exists - than the address of the sending router.
ƒIf the field is set to all zeros (0.0.0.0), the address of the sending router
is the best next-hop address.
address

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
Configuring RIPv2

ƒ Enabling and Verifying RIPv2


ƒ Configuring RIP on a Cisco router
–By default it is running RIPv1
–Even though the router only sends RIPv1 messages, it can
interpret both RIPv1 and RIPv2 messages
messages.
–A RIPv1 router will just ignore the RIPv2 fields in the route
entry.
RIPv1 RIPv2

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
Configuring RIPv2
ƒ Configuring RIPv2 on a
Cisco router
-Requires using the
version 2 command
-RIPv2
RIPv2 ignores RIPv1
updates
ƒ To verify RIPv2 is
configured use the
show ip protocols
command

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Comparing RIP v1 and v2
ƒ RIP v2 Æ send and receive v2
ƒ RIP v1 Æ send v1 but can receive both v1 and v2

RIP network is broken


I can only
l sendd No. I can not
No
version 1 take version 1

Version 1 Version 2

Yes. I can take


I can only send
version 1 or 2
version 2

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
POP Quiz
ƒ How do you make the RIPv2 back to the default “send 1” and
receive 1 or 2”?
- Hint: Gad(config-router)#version 1 is not the answer.

Version 1 Version 2

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
C fi
Configuring
i RIPv2
RIP 2
ƒ Auto
Auto-Summary
Summary & RIPv2
ƒ RIPv2 will automatically
summarize routes at major
network boundaries and
can also summarize routes
with a subnet mask that is
smaller than the classful
subnet mask

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Configuring RIPv2

ƒ Disabling Auto-
Summary in RIPv2
ƒ To disable automatic
summarization issue
th no auto-summary
the t
command

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Configuring RIPv2
ƒ Verifying RIPv2 Updates
ƒ When using RIPv2 with automatic summarization turned off
Each subnet and mask has its own specific entry, along
with the exit interface and next-hop address to reach that
subnet.
ƒ To verifyy information being
g sent by
y RIPv2 use the
debug ip rip command

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
VLSM & CIDR

ƒ RIPv2 and VLSM


ƒ Networks using a VLSM IP
addressing scheme
Use classless
routing protocols (i.e.
RIPv2) to
disseminate
network addresses
and their subnet
masks

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
VLSM & CIDR

ƒ CIDR uses Supernetting


Supernetting
S tti is
i ab bunch
h off contiguous
ti classful
l f l
networks that is addressed as a single
network.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
VLSM & CIDR

ƒ To verify that
supernets are
being sent and
received use the
following commands
-Show ip route
-Debug
Debug ip rip

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
Verifying & Troubleshooting RIPv2
ƒ Basic Troubleshooting steps
-Check the status of all links
Check cabling
-Check
-Check IP address & subnet mask configuration
-Remove any unneeded configuration commands
ƒ Commands used to verify proper operation of RIPv2
–Show ip interfaces brief
–Show ip
ppprotocols
–Debug ip rip
–Show ip route

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
Verifying & Troubleshooting RIPv2

ƒ Common
C RIP
RIPv2
2 IIssues
ƒ When trouble shooting RIPv2 examine the following issues:
ƒVersion
Check to make sure you are using version 2
ƒNetwork statements
Network statements mayy be incorrectlyy typed
yp
or missing
ƒAutomatic summarization
If summarized routes are not needed then disable
automatic summarization

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
V if i & Troubleshooting
Verifying T bl h ti RIPv2
RIP 2
ƒ Reasons why
y it’s good
g to authenticate routing
g information
-Prevent the possibility of accepting invalid routing updates
-Contents of routing
g updates
p are encrypted
yp
ƒ Types of routing protocols that can use authentication
-RIPv2
RIPv2
-EIGRP
-OSPF
OSPF
-IS-IS
-BGP

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Summary

Routing Distance Classless Uses Use of Max Auto Support Supports Uses
Protocol Vector Routing Hold- Split Hop Summary CIDR VLSM Authen-
Protocol Down Horizon count tication
Timers or = 15
Split
Horizon
w/
Poison
Reverse
RIPv1 Yes No Yes Yes Yes Yes No No No

RIPv2 Yes Yes Yes Yes Yes Yes Yes Yes Yes

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
The Routing Table: A
Closer Look

Chapter 8: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Describe
esc be thee various
a ous route
ou e types
ypes found
ou d in the
e routing
ou g
table structure
ƒ Describe the routing table lookup process.
ƒ Describe routing behavior in routed networks.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
Introduction

ƒ Chapter Focus
– Structure of the routing table
•Will examine the format of the routing table and learn about
level 1 and level 2 routes.
– Lookup process of the routing table
– Classless and classful routing behaviors

Cisco IP Routing
Routing, by Alex Zinin (ISBN 0-201-60473-6)
0 201 60473 6).

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
Routing Table Structure
ƒ Lab Topology
ƒ 3 router setup
-R1 and R2 share a common 172.16.0.0/16 network with
172 16 2 0/24 subnets
172.16.2.0/24 subnets.
-R2 and R3 are connected by the 192.168.1.0/24 network.
R3 also has a 172
-R3 172.16.4.0/24
16 4 0/24 subnet
subnet, which is disconnected,
disconnected or
discontiguous, from the 172.16.0.0 network that R1 and R2
share.

In a later section, we will configure


the interfaces for R2
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
Routing Table Structure

ƒ The figure shows routing table entries come from the


following sources
-Directly connected networks
-Static routes
-Dynamic
Dynamic routing protocols

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
Routing Table Structure
ƒ The figure shows what happens as the Serial 0/0/1 interface for R2 is
configured with the 192.168.1.1/24 address.
– R1 and R3 already have their interfaces configured with the appropriate
IP addresses and subnet masks.
–We will now configure the interfaces for R2 and use debug ip routing to
view the routing table process that is used to add these entries.
ƒ As soon as the “no shutdown” command is issued the route is added
to routing
g table

debug ip routing

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
Routing Table Structure

ƒ Cisco
Ci IP routing
ti ttable
bl
is a hierarchical
structure
–The reason for this is
to speed up lookup
process
–The
The hierarchy
includes several
levels.
•level 1
•level
level 2

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
Routing Table Structure
ƒ Level 1 Routes
–Have a subnet mask equal
q to or less than the classful
mask of the network address.
–192.168.1.0/24 is a level 1 network route, because the
subnet mask is equal to the network's classful mask. /24
f class
for l C networks,
t k such h as th
the 192
192.168.1.0
168 1 0 network.
t k
ƒ Level 1 route can function as
–Default route
•A default route is a static route with the address
0.0.0.0/0.
–Supernet
Supe e route
ou e
•A supernet route is a network address with a mask
less than the classful mask.
–Network
Network route
•A network route is a route that has a subnet mask
equal to that of the classful mask.
ƒ The source of the level 1 route can be a directly
connected network, static route, or a dynamic routing
protocol.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
Routing Table Structure
ƒ The level 1 route 192.168.1.0/24 can be further defined as an
ultimate route.
ƒultimate route includes either:
-A next-hop ip address (another path)
OR
-An exit interface
ƒ The directly connected network 192.168.1.0/24
–It
It is
i a level
l l 1 network
t k route
t bbecause it has
h a subnet
b t maskk that
th t is
i the
th same as
its classful mask.
–This same route is also an ultimate route because it contains the exit interface
Serial 0/0/1
0/0/1.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Parent and Child Routes
ƒ A parent route is a level 1 route
–A parent route does not contain
any next-hop IP address or exit
interface information
ƒ When the 172.16.3.0 subnet was
added to the routing table, another
route,, 172.16.0.0,, was also added.
–The first entry, 172.16.0.0/24, does
not contain any next-hop IP address
or exit interface information.
–This route is known as a level 1
parent route.
–AA parentt route
t is
i actually
t ll a heading
h di
that indicates the presence of level 2
routes, also known as child routes.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
Routing Table Structure
ƒ A level 1 parent route is automatically
created any time a subnet is added to
the routing table.
–In other words, a parent route is
created whenever a route with a mask
greater than the classful mask is
entered into the routing table.
–172.16.0.0/24
172 16 0 0/24 iis subnetted,
b tt d 1 subnets
b t
ƒ A level 2 route is a route that is a
subnet of a classful network address.
– Child routes are level 2 routes
– Child routes are a subnet of a
classful
l f l network
t k address
dd
–C 172.16.3.0 is directly connected,
FastEthernet0/0

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Routing Table Structure
ƒ The parent route contains the 172.16.0.0 - The classful network
address for our subnet.
ƒ Level 2 child routes contain 172.16.3.0, route source & the
network address of the route
–Notice that the subnet mask is not included with the subnet
subnet, the level
2 child route. The subnet mask for this child route (subnet) is the /24
mask included in its parent route, 172.16.0.0
ƒ Level 2 child routes are also considered ultimate routes
–Reason: they contain the next hop address &/or exit interface

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Routing Table Structure
ƒ The figure shows the
configuration of the Serial
0/0/0 interface on R2.
–The
The routing table shows
two child routes for the
same 172.16.0.0/24 parent
route.
route
•Both 172.16.2.0 and
172.16.3.0 are members
of the same parent route,
•because they are both
members
b off the
th
172.16.0.0/16 classful
network

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
Routing Table Structure

ƒ Both child routes have the same subnet mask


-This means the parent route maintains the /24 mask

Note: If there is only a


single level 2 child route
and that route is
removed, the level 1
parent route will be
automatically deleted. A
level 1 parent route
exists only when there
is at least one level 2
child route
route.

The role of the parent route will be examined when we discuss the route lookup process.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
Routing Table Structure
ƒ In classless networks, child routes do not have to share
the same subnet mask
–Whenever there are two or more child routes with different
subnet masks belonging to the same classful network
network, the
routing table presents a slightly different view, which states that
this parent network is variably subnetted.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
R ti T
Routing Table
bl Structure
St t
ƒ Parent & Child Routes: Classless Networks

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
Routing Table Structure

ƒ Parent & Child Routes: classful and classless Networks


classful
Network Parent Term Includes Subnet
Type route’s variably the # of mask
Classful subnetted different included
mask is is seen in masks of with each
Displayed parent child child route
route in routes entry
routing
table
Class- No No No No
ful
classless

Class- Yes Yes Yes Yes


l
less

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
Routing Table Lookup Process
ƒ The Route Lookup Process
1. Examine level 1 routes
• If best match a level 1 ultimate route
and is not a parent route this route is
used to forward packet
• If the best match is a level 1 parent
route, proceed to Step 2
2. Router examines level 2 (child) routes
• If there is a match with level 2 child
route then that subnet is used to
forward packet
• If no match then proceed to Step 3
3
3. R t d
Router determines
t i classful
l f l or
classless routing behavior
• If classful then packet is dropped
• If classless then router searches level
one supernet and default routes
4. If there exists a level 1 supernet or
default route match then Packet is
f
forwardedd d
5. If not packet is dropped
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
R ti Table
Routing T bl Lookup
L k Process
P
ƒ Longest Match: Level 1 Network Routes
–Best
Best match is also known as the longest match
–The best match is the one that has the most number of left
most bits matching between the destination IP address and the
route in the routing table.
ƒ For example, in the figure we have a packet destined for
172 16 0 10 Many possible routes could match this packet
172.16.0.10. packet. Three
possible routes are shown that do match this packet: 172.16.0.0/12,
172.16.0.0/18, and 172.16.0.0/26. Of the three routes,
172 16 0 0/26 has the longest match
172.16.0.0/26 match.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Routing Table Lookup Process
ƒ Finding the subnet mask
used to determine the
longest match
Scenario:
–PC1 pings 192.168.1.2
–Router examines level 1
route
t for
f best
b t match
t h
–There exist a match
between192.168.1.2 &
192.168.1.0 / 24
–Router forwards packets out
s0/0/0

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
Routing Table Lookup Process
ƒ The process of matching
–1st there must be a match made between the parent route &
destination IP
•If a match is made then an attempt at finding a match
between the destination IP and the child route is made.
•Do at least 16 of the left-most bits of the p
parent route match the
first 16 bits of the packet's destination IP address of 192.168.1.2?
–The answer, no,

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
Routing Table Lookup Process

ƒ Fi
Finding
di a matcht h between
b t packet’s
k t’ destination
d ti ti IP address
dd
and the next route in the routing table
–The
The figure shows a match between the destination IP of 192
192.168.1.0
168 1 0
and the level one IP of 192.168.1.0 / 24 then packet forwarded out
s0/0/0
–Not only does the minimum of 24 bits match, but a total of 30 bits
match, as shown in the figure.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Routing Table Lookup Process
ƒ In the example
p in the figure,
g , PC1 sends a p
ping
g to PC2
at 172.16.3.10. What happens when there is a match
with a level 1 parent route?
ƒ Before
B f level
l l 2 child
hild routes
t are examined
i d
-There must be a match between classful level one
parent route and destination IP address.
address

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Routing Table Lookup Process
ƒ After the match with parent route has been made Level 2 child
routes will be examined for a match
-Route lookup process searches for child
routes with a match with destination IP

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Routing Table Lookup Process
ƒ How a router finds a match with one of the level 2
child routes
–First router examines parent routes for a match
–If a match exists then:
•Child
Child routes are examined
•Child route chosen is the one with the
longest match
ƒ First, the router examines the parent route for a
match.
ƒ The router checks the last child route for
172.16.3.0/24 and finds a match. The first 24 bits
do match. The routing table process will use this
route, 172.16.3.0/24, to forward the packet with
the destination IP address of 172.16.3.10 out the
exit interface of Serial 0/0/0.
ƒ R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25,
Serial0/0/0

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Routing Table Lookup Process
ƒ Example: Route Lookup
Process with VLSM
-The
The use of VLSM does not
change the lookup process
If there is a match between
-If
destination IP address and the
level 1 parent route then
-Level 2 child routes will be
searched

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Routing Behavior
ƒ Classful & classless routing protocols
Influence how routing table is populated
ƒ Classful & classless routing behaviors
Determines how routing table is searched after it is
filled

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Routing Behavior
ƒ Classful Routing
Behavior: no ip
classless
ƒ What happens
pp if there is
not a match with any
level 2 child routes of the
parent?
-Router must determine if
the routing
g behavior is
classless or classful
-If router is utilizing classful
routing behavior then
-Lookup process is
terminated and ip classless and no ip classless
packet is dropped
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
Using
g the ip classless command (cont.)
( )
http://www.networkking.net/out/IPClassless.htm
What is IP Classless?
ƒ The "ip
p classless" command prevents
p the existence of a single
g "subnet" route from blockingg access via the
default route to other subnets of the same old-style network. Default only works with single-homed ISPs.
ƒ RFC 1879
ƒ IP classless command is not easy to understand, we know that. But I bet, after you read the following lines, you will
understand what it is all about.
ƒ First, you must understand a very simple logic. Here is the logic: Me and you are on a journey. If you break my leg,
then you must carry me all the way! If you understand this logic, you will understand "IP classless".
ƒ RIP is telling you: I am classful, if you break my class, then you have to show me every route there is, or I will drop
your packet. I will drop it even though there is a default route (0.0.0.0).
ƒ What is classful? Classful means that a class A subnet should be shown as x.0.0.0
x 0 0 0 such as 10.0.0.0
10 0 0 0 255.0.0.0
255 0 0 0
ƒ If you show it as 10.44.0.0 255.255.0.0, you are breaking its class.
ƒ Or, a class B subnet should be shown as x.x.0.0 255.255.0.0 such as 172.29.0.0 255.255.0.0
ƒ If you show it as 172.29.26.0 255.255.255.0, you are breaking its class.
ƒ Let’s assume RIP knows about 10.0.0.0
ƒ If you break 10.0.0.0 into three, for example to 10.1.0.0 and 10.2.0.0 and 10.3.0.0, and then give RIP a packet with a
destination of 10.4.0.1, RIP will drop it. Why? Why doesn’t RIP send the packet to the default route?
ƒ Because RIP told you, if you break my class, then you have to show me every damn route, otherwise I will drop it.
Here you broke RIP
Here, RIP'ss class so you must show him the way to 10.4.0.1
10 4 0 1 and every other 10
10.x.x.x
x x x route in the universe
universe.
Otherwise RIP will drop the packet, even if there is a default route. RIP will not care about your default route or last
resort gateway; it will drop your packet.
ƒ How do you ask RIP not to drop your packet and send the unknown destinations to the default route, although you
have been so mean to him and have broken its class? You tell him: please, please, ip classless!
ƒ If no ip
i classless,
l l drop
d the
th packet
k t
If ip classless, send the packet to the default.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Routing Behavior
ƒ ip Classless
ƒ Beginning with IOS 11.3, “ip classless”
was configured by default
–The command “no ip classless” means that the
route lookup process uses classful routing table
lookups by default
default.

ƒ Classless routing behavior works for


-Discontiguous
Di ti networks
t k
And
-CIDR
CIDR supernetst

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
Routing Behavior “no
no ip classless”
classless
ƒ Classful Routing Behavior – Search Process
–when classful routing g behavior is in effect ((no ip
p
classless) the process will not continue searching
level 1 routes in the routing table. If a packet doesn't
match a child route for the parent network route, then
the router drops the packet.
packet
ƒ R2 receives a packet destined for PC3 at
172.16.4.10.
–Even with the default route configured.
–The destination’s subnet mask is a /24 and none of
the child routes left most bits match the first 24 bits.
Thi means packet
This k t iis d
dropped
d

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
R ti B
Routing Behavior
h i “no ip classless”
ƒ Classful Routing Behavior – Search
P
Process
ƒ The reason why the router will not search
beyond
y the child routes
ƒAt the beginning of the Internet's
growth, networks were all classful
ƒThis meant an organization could
subnet a major network address and
“enlighten” all the organization’s
routers about the subnetting
ƒTherefore, if the subnet was not in the
routing table, the subnet did not exist
and packet was dropped
ƒ The routing table process will not use the
default route, 0.0.0.0/0, or any other
route
route.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
R ti B
Routing Behavior
h i “no ip classless”
ƒ The routing
g table p
process will not
use the default route, 0.0.0.0/0, or
any other route.
ƒA common error is to assume that a
default route will always be used if the
router does not have a better route.
ƒIn our example, R2's default route is
not examined nor used, although it is a
match.
match
ƒ This is often a very surprising result
when a network administrator does not
understand
d t d th the diff
difference b
between
t
classful and classless routing
behavior.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Ro ting Behavior
Routing Beha ior “ip classless”
ƒ Classless Routing
g Behavior-
ip lassless
ƒ Step 3: If classless routing behavior in
effect then, continue searching level 1
supernet routes in the routing table for a
match including the default route
match, route, if there is
one.
ƒ Step 4: Match with supernet or default
ƒSupernet routes Checked first
–If a match exists then forward packet
ƒDefault routes Checked second
ƒ Step 5: If there is no match or no default
route
t then
th theth Packet is dropped

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
R ti B
Routing Behavior
h i “ip classless”
ƒ Classless Routing
g Behavior – Search Process
ƒ Router begins search process by finding a match between
destination IP and parent route
After finding the above mentioned match, then
there is a search of the child route
ƒ There is no match with the level 2 child routes
routes.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 35
Routing Behavior “ip classless”
ƒ If no match is found in child routes of
previous slide then
–Router continues to search the
routing table for a match that may
h
have f
fewer than
th 16 bitbits in
i th
the match
t h
ƒ The 192.168.1.0/24 route does not
have 24 left-most bits that match the
destination IP address.

C 192.168.1.0/24 is directly connected, Serial0/0/1

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 36
Routing Behavior “ip classless”
S* 0.0.0.0/0 is directly connected, Serial0/0/1

ƒ The mask is /0, which means


that zero or no bits need to
match.
ƒ A default route will be the
lowest-bit match. In classless
routing behavior, if no other
route matches
matches, the default route
will match.
–In
In this case the router will use the
default route, because it is the best
match. The packet will be forwarded
out the Serial 0/0/1 interface.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
Routing Behavior

ƒ What does R3 do with return


traffic back to PC2 at
172 16 2 10?
172.16.2.10?

ƒ In this case, R3 uses the


172.16.0.0/16 child route and
f
forwards
d th
the ttraffic
ffi outt Serial
S i l
0/0/1 back to R2.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
R ti B
Routing Behavior
h i
ƒ Classful vs. Classless Routing Behavior
-It is recommended to use classless routing
behavior
ƒReason: so supernet and default routes can
be used whenever needed

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 39
Longest Match
POP
O QUIZ
Q
p pp
http://www.cisco.com/warp/public/105/21.html
ƒ Let's look at the three routes we just installed in the routing table, and see
how they look on the router.
ƒ router# show ip route
....
D 192.168.32.0/26 [[90/25789217]] via 10.1.1.1 ----Æ ((192.168.32.0 to 192.168.32.63))
R 192.168.32.0/24 [120/4] via 10.1.1.2 ----Æ (192.168.32.0 to 192.168.32.255)
O 192.168.32.0/19 [110/229840] via 10.1.1.3 ----Æ (192.168.32.0 to 192.168.63.255)
....

ƒ If a packet arrives on a router interface destined for 192.168.32.1, which


route would the router choose?
ƒ If a packet arrives on a router interface destined for 192.168.32.100,
which route would the router choose?
Answers are on the next page
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 40
Longest Match
http://www.cisco.com/warp/public/105/21.html
ƒ Let's look at the three routes we jjust installed in the routing
g table,, and see how
they look on the router.
ƒ router# show ip route
....
D 192.168.32.0/26 [90/25789217] via 10.1.1.1 ----Æ (192.168.32.0 to 192.168.32.63)
R 192.168.32.0/24 [120/4] via 10.1.1.2 ----Æ (192.168.32.0 to 192.168.32.255)
O 192.168.32.0/19 [110/229840] via 10.1.1.3 ----Æ (192.168.32.0 to 192.168.63.255)
....
ƒ If a packet destined to 192.168.32.1 is directed toward 10.1.1.1, because
192.168.32.1 falls within the 192.168.32.0/26 network (192.168.32.0 to
192 168 32 63) It also falls within the other two routes available
192.168.32.63). available, but the
192.168.32.0/26 has the longest prefix within the routing table (26 bits verses 24
or 19 bits).
ƒ if a ppacket destined for 192.168.32.100 arrives on one of the router's interfaces,
it's forwarded
f to 10.1.1.2, because 192.168.32.100 doesn't fall
f within
192.168.32.0/26 (192.168.32.0 through 192.168.32.63), but it does fall within the
192.168.32.0/24 destination (192.168.32.0 through 192.168.32.255). Again, it also
falls into the range covered by 192.168.32.0/19, but 192.168.32.0/24 has a longer
prefix
fi llength
th

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
Summary

Content/str ct re of a ro
Content/structure routing
ting table
ƒ Routing table entries
-Directly
Directly connected networks
-Static route
Dynamic routing protocols
-Dynamic
ƒ Routing tables are hierarchical
-Level 1 route
Have a subnet mask that is less than or equal to
classful subnet mask for the network address
-Level
L l 2 route
t
These are subnets of a network address

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 42
Summary
Routing table lookup process
ƒ Begins with examining level 1 routes for best match with packet’s
packet s destination IP
ƒ If the best match = an ultimate route then
-Packet is forwarded -Else-
-Parent route is examined
If parent route & destination IP match then Level 2 (child)
routes are examined
Level 2 route examination
ƒ If a match between destination IP and child route found then
Packet forwarded -Else
ƒ If Router is using
g classful routing
g behavior then
Packet is dropped -Else

ƒ If router is using classless routing behavior then


Router searches Level 1 supernet & default routes for a
match
ƒ If a match is found then Packet if forwarded -Else
ƒ Packet is dropped

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 43
Summary

ƒ Routing behaviors
-This refers to how a routing table is searched
ƒ Classful routing behavior
-Indicated byy the use of the no ip
p classless command
-Router will not look beyond child routes for a lesser
match
ƒ Classless routing behavior
-Indicated
Indicated by the use of the ip classless command
-Router will look beyond child routes for a lesser match

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 44
EIGRP

Chapter 9: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Introduction

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
EIGRP

ƒ Roots of EIGRP: IGRP


-Developed in 1985 to overcome
RIPv1’s limited hop count
-Distance vector routing protocol
-Metrics
M t i used
dbby IGRP
ƒbandwidth (used by default)
ƒDelay (used by default)
ƒReliability (not used by default)
ƒLoad
Load (not used by default)
-Discontinued support starting with
IOS 12.2(13)T & 12.2(R1s4)S

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
EIGRP

ƒ EIGRP is a distance vector, classless routing protocol that was


released in 1992 with IOS 9 9.21.
21
ƒ As its name suggests, EIGRP is an enhancement of Cisco
IGRP (Interior Gateway Routing Protocol).
ƒ Both are Cisco proprietary protocols and only operate on Cisco
routers.
ƒ The main purpose in Cisco's development of EIGRP was to
create a classless version of IGRP. EIGRP includes several
features that are not commonly found in other distance vector
routing protocols like RIP (RIPv1 and RIPv2) and IGRP. These
features include:
–Reliable Transport Protocol (RTP)
–Bounded Updates
p
–Diffusing Update Algorithm (DUAL)
–Establishing Adjacencies
–Neighbor and Topology Tables
ƒ Alth
Although h EIGRP may actt lik
like a lilink-state
k t t routing
ti protocol,
t l it is
i
still a distance vector routing protocol.
–Note: The term hybrid routing protocol is sometimes used to define
EIGRP. However, this term is misleading because EIGRP is not a
hybrid between distance vector and link-state
link state routing protocols - it is
solely a distance vector routing protocol. Therefore, Cisco is no
longer using this term to refer to EIGRP.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
EIGRP

ƒ The Algorithm
–EIGRP uses the Diffusing Update
Algorithm (DUAL).
–EIGRP does not send periodic
updates and route entries do not age
out.
out
–Only changes in the routing
information, such as a new link or a
li k b
link becoming
i unavailable
il bl cause a
routing update to occur.
–EIGRP routing g updates
p are still
vectors of distances transmitted to
directly connected neighbors.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
EIGRP
ƒ Path Determination
–EIGRP's
G DUAL maintains a topology
table separate from the routing table,
which includes both the best path to a
destination network and any backup
paths that DUAL has determined to be
loop-free.
–If
If a route becomes unavailable,
unavailable DUAL
will search its topology table for a valid
backup path.
•If
If one exists,
i t that
th t route
t is
i
immediately entered into the routing
table.
•If
If one does
d nott exist,
i t DUAL performs
f
a network discovery process to see if
there happens to be a backup path
that did not meet the requirement of
the feasibility condition.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
EIGRP
ƒ Convergence
–EIGRP does not use holddown
timers.
–Instead,
Instead loop
loop-free
free paths are
achieved through a system of route
calculations (diffusing computations)
that are performed in a coordinated
fashion among the routers.
–The detail of how this is done is
beyond the scope of this course, but
the result is faster convergence than
traditional distance vector routing
protocols.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
EIGRP
EIGRP Message Format
ƒ EIGRP Header
ƒData link frame header - contains
source and destination MAC
address
ƒIP packet header - contains source
& destination IP address
ƒEIGRP packet header - contains
AS number
ƒType/Length/Field - data portion of
EIGRP message
ƒIn the IP ppacket header,,
ƒthe protocol field is set to 88 to
indicate EIGRP
ƒthe destination address is set to
th multicast
the lti t 224
224.0.0.10.
0 0 10
ƒIf the EIGRP packet is
encapsulated in an Ethernet frame,
ƒthe destination MAC address is
also a multicast address: 01-00-
5E-00-00-0A.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
ƒ
EIGRP
All fields are shown to provide an accurate picture of the
EIGRP message format. However, only the fields
relevant to the CCNA candidate are discussed.

ƒ EIGRP packet header contains


–Opcode field
•Update
Query
•Query
•Reply
•Hello
–Autonomous System number
• The AS
S number is used to track multiple
instances of EIGRP.
ƒ EIGRP Parameters contains
–Weights
Weights
•EIGRP uses for its composite metric.
•By default, only bandwidth and delay
are weighted. Both are set to 1.
•The other K values are set to zero.
–Hold time
•The amount of time the EIGRP
neighbor receiving this message
should wait before considering the
advertising router to be down.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
EIGRP
ƒ TLV: IP internal contains (EIGRP routes
within an autonomous system)
–Metric field (Delay and Bandwidth)
•Delay is calculated as the sum of delays from
source to destination in units of 10
microseconds.
g
•Bandwidth is the lowest configured bandwidth
of any interface along the route.
–Subnet mask field
•The subnet mask is specified as the prefix
length or the number of network bits in the
subnet
b t mask.k
•255.255.255.0 is 24
–Destination field
•the
t e address
add ess of
o the
t e destination
dest at o network.
et o
•Although only 24 bits are shown in this figure.
•If a network address is longer than 24 bits,
then the Destination field is extended for
another 32 bits
ƒ TLV: IP external contains
–Fields used when external
routes are imported into
EIGRP routing process
– import or redistribute a route into EIGRP.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
EIGRP
Protocol Dependent Modules (PDM)
ƒ EIGRP uses PDM to t routet severall
different protocols i.e. IP, IPX & AppleTalk
ƒ PDMs are responsible for the specific
routing task for each network layer
protocol
–As you can see in the figure, EIGRP
uses different EIGRP packets and
maintains
i t i separate t neighbor,
i hb topology,
t l
and routing tables for each Network
layer protocol.
•The
The IP-EIGRP
IP EIGRP module is responsible
for sending and receiving EIGRP
packets that are encapsulated in IP
and for using DUAL to build and
maintain the IP routing
g table. How do people route
•The IPX EIGRP module is IPX or Appletalk today
responsible for exchanging routing
information about IPX networks with if they still get either
other IPX EIGRP routers.
routers
IPX or Appletalk?
A l t lk?
•Apple-Talk EIGRP is for Apple-talk

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
EIGRP
Reliable Transport Protocol (RTP)
ƒ Purpose
P rpose of RTP
–Used by EIGRP to transmit and receive EIGRP
packets
– EIGRP was designed
g as a Network layer
y
independent routing protocol; therefore, it cannot
use the services of UDP or TCP because IPX and
Appletalk do not use protocols from the TCP/IP
protocol suite.
ƒ Characteristics of RTP
–Involves both reliable & unreliable delivery of
EIGRP packet
ƒReliable delivery requires acknowledgment
from destination
ƒUnreliable delivery does not require an
acknowledgement from destination
–Packets
P k t can be b sentt
ƒUnicast
ƒMulticast
–Using address 224
224.0.0.10
0 0 10

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
EIGRP •Hello
•Update
EIGRP’s 5 Packet Types •ACK
ACK
ƒ Hello packets •Query
–Used
•Reply
Used to discover & form adjacencies with neighbors
–EIGRP hello packets are multicasts and use unreliable
delivery.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
EIGRP •Hello
ƒ Update packets •Update
–Update
Update packets are used to propagate
routing information
•ACK
ACK
–Update packets are sent only when
•Query
necessary. •Reply
–EIGRP
G updates are sent only to those
routers that require it.
–When a new neighbor is discovered,
unicast update
p p
packets are sent so that the
neighbor can build up its topology table.
–In other cases, such as a link-cost
change, updates are multicast.
–Updates
U d t always
l are ttransmitted
itt d reliably
li bl
ƒ Acknowledgement packets
–Used to acknowledge receipt of update,
query & reply packets •R2 has lost connectivity to the LAN
–An acknowledgment packet is a hello attached to its FastEthernet interface.
packet that has no data. •R2 immediately sends an unicast Update
to R1 and R3 noting g the downed route.
–EIGRP
EIGRP acknowledgement packets are
always sent as an unreliable unicast •R1 and R3 respond with an unicast
acknowledgement.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
EIGRP
•Hello
•Update
ƒ Query
Q &R
Reply
l packets
k t •ACK
ACK
•Query
ƒUsed by DUAL for searching for
networks
•Reply
ƒQueries and replies use reliable
delivery.
ƒQuery packets can use
ƒMulticast
ƒReply
R l packet
k t use only
l
ƒunicast
•R2 has lost connectivity to the LAN
and it sends out queries to all
EIGRP neighbors.
•All neighbors must send a reply
regardless of whether or not they
have a route to the downed network.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
EIGRP

Query Update Reply Hello Acknowledge

Reliable Reliable Reliable Unreliable Unreliable


(not require (a hello packet that
acknowledgment ) has no data )

multicast Multicast & unicast multicast unicast


unicast

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
EIGRP
ƒ Purpose of Hello Protocol
–To
To discover neighbors & establish adjacencies with neighbor routers

ƒ Characteristics of hello protocol


–Time
Time interval for sending hello packet
ƒ5 seconds - high bandwidth (greater than T1)
ƒ60 seconds - multipoint
p circuits T1 bandwidth or slower

-Holdtime
ƒThis is the maximum time
router should wait before
declaring a neighbor down
ƒDefault holdtime
–3 times hello interval
»15 seconds
»180 seconds
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
EIGRP
EIGRP Bounded Updates
ƒ EIGRP only sends update when there is a change in route status
ƒ Partial update
–A partial update includes only the route information that has changed
– the whole routing table is NOT sent
ƒ Bounded update
–When a route changes, only those devices that are impacted will be
notified of the change
ƒ EIGRP’s use of partial bounded updates minimizes use of
bandwidth

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
EIGRP
Diffusing Update Algorithm (DUAL)
–Purpose
•EIGRP’s primary method for preventing routing loops
•And also hold-down timers and split horizon, too.
–Advantage of using DUAL
•Provides
P id ffor ffastt convergence timeti by
b keeping
k i a lilistt off lloop-
free backup routes
–DUAL maintains a list of backup routes it has already determined
to be loop-free. If the primary route in the routing table fails, the
best backup route is immediately added to the routing table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
EIGRP

ƒ Administrative Distance (AD)


–Defined as the trustworthiness of the source route

ƒ EIGRP default administrative distances


–Summary
Summary routes = 5
–Internal routes = 90
–Imported routes = 170

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
EIGRP

A th ti ti
Authentication
ƒ EIGRP can
– Encrypt routing information
– Authenticate routing information
ƒ It is good practice to authenticate
transmitted routing information.
– This practice ensures that routers will
only accept routing information from
other routers that have been
configured with the same password or
authentication information.
ƒ Note: Authentication does not encrypt
the router's routing table.

http://www.ciscopress.com/articles/article.asp?p=1171169&seqNum=3
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
EIGRP
Network Topology
ƒ Topology used is the same as
previous chapters with the addition
of an ISP router
–ISP router does not physically
exist
ƒ EIGRP will automatically
summarizes at classful boundaries,
similar to RIP.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Basic EIGRP Configuration
ƒ Autonomous System (AS) & Process IDs
–This is a collection of networks under the control of a
single authority (reference RFC 1930)
–AS Numbers are assigned by IANA
ÆÆ ARIN not IANA
–Entities needing AS numbers
ƒISP
ƒInternet
Internet Backbone prodiers
ƒInstitutions connecting to other institutions using
AS numbers
ƒThese ISPs and large institutions use the exterior
gateway routing protocol or BGP, to propagate
routing information.

16-bit and 32-bit AS Numbers


Commencing 1 January 2007,
"16-bit
16 bit only AS Numbers
Numbers" refers to AS numbers in the range 0 - 65535
"32-bit only AS Numbers" refers to AS Numbers in the range 65,536 - 4,294,967,295
"32-bit AS Numbers" refers to AS Numbers in the range 0 - 4,294,967,295
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Basic EIGRP Configuration
ƒ EIGRP autonomous system
number actually functions as a
process ID
–The vast majority of companies
and institutions with IP networks
do not need an AS number
–The ISP is responsible for the
routing
ti off packets
k t within
ithi it
its
autonomous system and between
other autonomous systems.
ƒ Process ID represents an instance
of the routing protocol running on
a router
ƒ Example
Router(config)#router eigrp autonomous-system

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Basic EIGRP Configuration

The router eigrp command


ƒ The global command that enables eigrp is
router
t eigrp
i autonomous-system
t t
-All routers in the EIGRP routing domain must use
th same process ID number
the b (autonomous-system
number)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
B i EIGRP C
Basic Configuration
fi ti
The Network Command
ƒ Functions of the network command
–Enables interfaces to transmit & receive EIGRP updates
–Includes network or subnet in EIGRP updates

ƒ Example
p
–Router(config-router)#network network-address
The network-address is the
classful network address
for this interface.
a single classful network statement is used on R1 to include both
172.16.1.0/24 and 172.16.3.0/30 subnets:

When EIGRP is configured on R2, DUAL sends a notification


message to the console stating that a neighbor relationship with
another EIGRP router has been established.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Basic EIGRP Configuration
ƒ The network Command with a Wildcard Mask
-This option is used when you want to configure EIGRP
to advertise specific subnets
-Example
Router(config-router)#network network-address [wildcard-mask]

192.168.10.8 – 192.168.10.11

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Basic EIGRP Configuration
ƒ Router(config-router)#network network-address [wildcard-mask]
ƒ Think of a wildcard mask as the inverse of a subnet mask.
ƒ The inverse of subnet mask 255.255.255.252 is 0.0.0.3.
ƒ To calculate the inverse of the subnet mask, subtract the subnet mask from
255.255.255.255:

255.255.255.255
- 255.255.255.252
---------------
0. 0. 0. 3
Wildcard mask

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
B i EIGRP C
Basic Configuration
fi ti
Verifying EIGRP
ƒ EIGRP routers must establish adjacencies with their
g
neighbors before any
y updates
p can be sent or received
ƒ Command used to view neighbor table and verify that
EIGRP has established adjacencies
j with neighbors
g is
show ip eigrp neighbors
H column - Lists SRTT (Smooth
(S th Round
R dTTrip
i Ti
Timer))
the neighbors in
the order they Queue Count - Should always be
were learned. zero.

RTO (Retransmit Interval) - Used


by RTP to manage reliable
EIGRP packets.

Sequence Number - Used to


track updates, queries, and
reply packets.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
EIGRP
ƒ The show ip protocols command is
also used to verify that EIGRP is
enabled

ƒ Remember,, the process


p ID must be
the same on all routers for EIGRP to
establish neighbor adjacencies and
share routing information.

ƒ EIGRP's internal and external


administrative distances are also
displayed:
–Distance: internal 90 external 170

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
Basic EIGRP Configuration We will
configure the
bandwidth later.

Examining
g the Routing
g
Table
ƒ The show ip route
command is also used to
verify EIGRP
–EIGRP routes are denoted
in a routing table by the letter
“D”
–EIGRP is a classless
routing
ti protocol
t l (includes
(i l d th the
subnet mask in the routing
update), it supports VLSM
and CIDR.
ƒ By default , EIGRP
automatically summarizes
routes at major network
boundary
–We can disable the
automatic summarization
with the no auto-
summary command. We
will examine this in more
detail in a later
later.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
EIGRP Null0 Summary Route
ƒ EIGRP has automatically included a summary route to Null0
(192 168 10 0/24 and 172
(192.168.10.0/24 172.16.0.0/16)
16 0 0/16)
–Null0 is not a physical interface
–In the routing table summary routes are sourced from Null0
ƒReason: routes are used for advertisement purposes
–EIGRP will automatically include a null0 summary route as child route when
2 conditions are met
ƒAt least one subnet is learned via EIGRP
ƒAutomatic summarization is enabled
ƒIf the packet matches the level 1 parent - the classful network
address - but none of the subnets, the packet is discarded.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
Basic EIGRP Configuration

ƒ R3’s routing table shows that


the 172.16.0.0/16 network is
automatically
y summarized byy
R1 & R3
–R1 and R2 are not
propagating the individual
subnets because of automatic
summarization.

ƒ [Tony] We will configure the


bandwidth
ba d dt later.
ate O Once
ce tthe
e
bandwidth is reconfigured,
you will not see the equal-cost
route on R3.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
EIGRP Metric Calculation
EIGRP Composite Metric & the K Values
ƒ EIGRP uses the
th following
f ll i values
l iin itits composite
it metric
ti
-Bandwidth, delay, reliability, and load (reliability and load are not used)
ƒ The composite metric used by EIGRP
– formula used has values K1 ÆK5
K1 & K3 =1
K2, K4, K5 =0

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
EIGRP Metric Calculation

ƒU
Use th
the sh
h ip
i protocols
t l command
d tto verify
if the
th K
values

Again, changing
these values to other
than the default is
not recommended
unless the network
administrator has a
very good reason to
do so.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 35
EIGRP Metric Calculation
EIGRP Metrics
ƒ U
Use th
the show
h interfaces
i t f
command to view metrics
ƒ EIGRP Metrics
–Bandwidth – EIGRP uses
a static bandwidth to
calculate metric
–Most
Most serial interfaces use
a default bandwidth value of
1.544Mbos (T1)
–The value of the
b d idth may or may
bandwidth
not reflect the actual
SPEED of the interface.
–If actual SPEED of the
link differs from the
default bandwidth value,
then you should modify
the bandwidth value,

The default bandwidth for ethernet is 10,000 Kbits. The default bandwidth for fastethernet is 100,000 Kbits.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 36
EIGRP Metric Calculation

EIGRP Metrics
ƒ Delay is the defined as the
measure of time it takes for a
packet to traverse a route
–itit is a static value based on
link type to which interface is
connected
–The delay value, much like the
bandwidth value, is a default value
that can be changed by the
network administrator manually.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
EIGRP Metric
M t i Calculation
C l l ti
ƒ Reliability (not a default EIGRP metric)
–A measure of the likelihood that a link will fail or how often the link has
experienced errors.
–Measure dynamically & expressed as a fraction of 255
•the higher the fraction the better the reliability
–Reliability is calculated on a 5-minute weighted average to avoid the sudden
impact of high (or low) error rates.
ƒ Load ((not a default EIGRP metric))
– A number that reflects how much traffic is using a link
– Number is determined dynamically and is expressed as a fraction of 255
ƒThe lower the fraction the less the load on the link
ƒThis value is calculated on a 5-minute weighted average to avoid the sudden
impact of high (or low) channel usage.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
EIGRP Metric Calculation
Using
g the Bandwidth Command
ƒ Modifying the interface bandwidth
-Router(config-if)#bandwidth kilobits

ƒ Verifying bandwidth
–Use
U ththe show
h interface
i t f command
d
ƒ Note – bandwidth command does
not change the link
link’s
s physical
bandwidth
–The bandwidth command only
modifies the bandwidth metric used by
y
routing protocols such as EIGRP and
OSPF.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 39
EIGRP Metric Calculation
ƒ The EIGRP metric can be determined byy examining
g the
bandwidth delay

The value
before change
the bandwidth is
2172416

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 40
EIGRP Metric Calculation

ƒ EIGRP uses the lowest bandwidth (BW)in its metric


calculation
Calculated BW = reference BW / lowest BW(kbps)
ƒ Delay – EIGRP uses the cumulative sum of all outgoing
interfaces
Calculated Delay = the sum of outgoing interface delays
ƒ EIGRP Metric = calculated BW + calculated delay

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
EIGRP Metric Calculation

10,000,000 is divided by 1024. If the result is not a


whole number, then the value is rounded down. In this
case, 10,000,000 divided by 1024 equals 9765.625.
The .625 is dropped before multiplying by 256. The
bandwidth portion of the composite metric is 2 2,499,840.
499 840

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 42
DUAL Concepts

ƒ The Diffusing Update Algorithm (DUAL) is used to


prevent looping
p p g
–Successor
–Feasible Distance (FD)
–Feasible Successor (FS)
–Reported Distance (RD) or Advertised Distance (AD)
–Feasible Condition or Feasibility Condition (FC)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 43
DUAL Concepts
ƒ Successor
The best least cost route
to a destination found in
the routing table
ƒ Feasible distance
The lowest calculated
metric along a path to a
destination network
ƒ 2 commands can be
used to find the
successor and “feasible
“successor” feasible
distance”:
–show ip route
–show ip eigrp topology
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 44
DUAL Concepts
ƒ EIGRP
Topology
Table
dissected

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 45
DUAL Concepts
Feasible Successors, Feasibility Condition & Reported
Distance
ƒ Feasible Successor
–This is a loop free backup
route to the same destination
as successor route
–If the link between R2 and
R3 failed, the R1 will become
the successor for sending
traffic to 192
192.168.1.0
168 1 0

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 46
EIGRP technologies (cont.)
(cont )
Feasible Successor, FC: RD30 < FD31

172 30 1 0
172.30.1.0

FD to 172.30.1.0 is
31 via Router Y

Current Successor = 31
RTZ is NOT Feasible
RD of RTY= 21 Successor, FC:
RD220 not< FD31
Advertised
Ad i d or
Destination Feasible Dist. Reported. Dist. Neighbor
172.30.1.0 40 30 X In Topology Table
172.30.1.0 31 21 Y In Routing Table
172.30.1.0 230 220 Z Not in Topology Table
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 47
Verifying basic EIGRP

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 48
Verifying basic EIGRP

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 49
What if the successor fails?
1) If feasible successor exists:
ƒ If current successor route fails, feasible successor becomes the current
successor, i.e. the current route.
ƒ Routing
g of p
packets continue with little delay.
y

2) If no feasible successor exists:


ƒ This may be because the Reported Distance is greater than the Feasible
Distance.
ƒ B
Before
f this
thi route
t can be
b installed,
i t ll d it mustt b
be placed
l d iin th
the active
ti state
t t and
d
recomputed.
ƒ Routing of packets continue but with more of a delay.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 50
DUAL Concepts

ƒ Feasibility Condition (FC)


–Met when a
neighbor’s reported
distance (RD) is less
than the local router’s
router s
FD to the same
destination network
–The
Th reported
t d distance
di t iis
simply an EIGRP neighbor's
feasible distance to the
same destination network
network.
–The reported distance is
the metric that a router
reports to a neighbor about
its own cost to that network.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 51
DUAL Concepts
ƒ Reported distance (RD)
–The
The metric that a router
reports to a neighbor about
its own cost to that network
–R2
R2 examines the reported
distance (RD) of 2172416 from
R1. Because the reported
distance (RD) of R1 is less than
R2's own feasible distance (FD)
( )
of 3014400, R1 meets the
feasibility condition. R1 is now a
feasible successor for R2 to the
192.168.1.0/24 network.
ƒ Why isn't R1 the successor if its
reported distance (RD) is less
than R2's feasible distance (FD)
t 192.168.1.0/24?
to 192 168 1 0/24?
–Because the total cost for R2,
its feasible distance (FD), to
reach 192
192.168.1.0/24
168 1 0/24 is greater
through R1 than it is through R3.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 52
DUAL Concepts
ƒ EIGRP Topology table
–Viewed using the show ip
eigrp topology command
ƒContents of table include:
– all successor routes
– all feasible successor
routes

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 53
DUAL Concepts
ƒ EIGRP Topology
Table dissected
P - This route is in the
passive state. When DUAL
is not performing its
diffusing computations to
d t
determine
i a pathth ffor a
network, the route will be in
a stable mode, known as
the passive state.
A - If DUAL is recalculating
or searching for a new
path, the route will be in an
active
ti state.
t t

All routes in the topology


table should be in the
passive state for a stable if there is not a second entry, then there are
routing domain. no feasible successors
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 54
DUAL Concepts
ƒ To view detailed
information about the
metrics of a specific
entry in the topology
table, add the optional
parameter [network] to
the show ip eigrp
topology command
ƒ Remember that EIGRP
is a distance vector
routing protocol.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 55
DUAL Concepts
Topology Table: No Feasible
Successor
ƒ The topology table for R1 to the
network
et o 192.168.1.0
9 68 0 o only
y sshows
o s tthe
e
successor 192.168.10.6. There are
no feasible successors.
–By
By looking at the actual physical
topology or network diagram, it is
obvious that there is a backup route
to 192.168.1.0/24 through R2.
ƒ Why isn't R2 listed as a feasible
successor?
–R2 is not a feasible successor
because it does not meet the
feasibility condition.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 56
DUAL Concepts
No Feasible Successor
show ip eigrp topology all-links
ƒ Looking at the topology it is obvious that
R2 is a backup route
route,
–The command shows all possible paths
to a network including successors,
feasible successors
successors, and even those
routes that are not feasible successors.
–For R2 to be considered a feasible
successor it must meet the feasibility
successor,
condition. R2's feasible distance to reach
192.168.1.0/24 must be less the R1's
current feasible distance (FD)
(FD). As we can
see in the figure, R2's feasible distance is
3014400, which is higher than R1's
feasible distance of 2172416.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 57
DUAL Concepts
ƒ Does this mean R2 cannot be
used if the successor fails?
–No, R3 can be used, but there will
be a longer delay before adding it to
the routing table.
–Before this can happen, DUAL will
need to do some further processing.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 58
DUAL Concepts

ƒ The centerpiece of EIGRP is DUAL


andd itits EIGRP route-calculation
t l l ti
engine. The actual name of this
technology is DUAL Finite State
Machine (FSM).
ƒ Finite Sate Machine (FSM)
–An abstract machine that defines
a set of possible states something
can go through, what event causes
those states and what events result
form those states
–FSMs are used to describe how a
device, computer program, or
routing algorithm will react to a set
of input events
–Selects a best loop-free path to a
destination
–Selects
Selects alternate routes by using
information in EIGRP tables
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 59
DUAL Concepts
Finite State Machines (FSM)
ƒ To examine output from EIGRP’s finite state machine
us the debug eigrp fsm command

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 60
More EIGRP Configurations
The Null0 Summary Route
ƒ By default, EIGRP uses the Null0 interface to discard any packets that
match the parent route but do not match any of the child routes
ƒ EIGRP automatically includes a null0 summary route as a child route
whenever both of the following conditions exist
–One
One or subnets exists that was learned via EIGRP
–Automatic summarization is enabled

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 61
More EIGRP Configurations
ƒ Regardless of whether classful or classless
routing behavior is being used
used, the null0
summary will potentially be used and
denying the use of any supernet or default
route.
route
ƒ Disabling Automatic Summarization
–The
The no auto-summary command is used
to disable automatic summarization
•This causes all EIGRP neighbors to
send updates that will not be
automatically summarized
ƒthis will cause changes
g in both
-routing tables
-topology tables

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 62
More EIGRP Configurations
ƒ The no auto-summary command

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 63
More EIGRP Configurations
ƒ The no auto-summary command
ƒ Witho
Withoutt automatic
a tomatic summarization,
s mmari ation R3's
routing table now includes the three subnets,
172.16.1.0/24, 172.16.2.0/24, and
172.16.3.0/24. Why y does R3's routing
g table
now have two equal cost paths to
172.16.3.0/24? Shouldn't the best path only
be through R1 with the 1544 Mbps link?
–Remember
Remember that EIGRP only uses the link with
the slowest bandwidth when calculating the
composite metric.
–The slowest link is the 64 Kbps link that
contains the 192.168.3.0/24 network. In this
example, the 1544 Mbps link and the 1024 Kbps
link are irrelevant in the calculation as far as the
bandwidth metric is concerned.
–Because both paths have the same number
and types of outgoing interfaces, the delay
values end up being the same.
–As
As a result
result, the EIGRP metric for both paths is
the same, even though the path through R1
would actually be the "faster" path.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 64
M
Manual
l Summarization
S i i
ƒ EIGRP can be configured to
summarize routes, whether or
not automatic summarization
(auto-summary) is enabled.
–EIGRP is a classless routing
protocol & include subnet
mask in update
p
ƒ Command used to configure
manual summarization
–Router(config-if)#ip
summary-address eigrp as-
number network-address
subnet-mask
b t k

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 65
More EIGRP Configurations

EIGRP Default Routes


ƒ “quad zero” static default route
-Can
Can be used with any currently
supported routing protocol
-Is usually configured on a router that is
connected a network outside the EIGRP
domain (for example, to an ISP. )
ƒ EIGRP & the “Quad
Quad zero
zero” static default route
–Requires the use of the redistribute
static command to include the static
default route in EIGRP routing updates to
other routers.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 66
More EIGRP Configurations

ƒ In the routing tables for R1


and R3, notice the routing
source and administrative
distance for the new static
default route. The entry for
the static default route on R1
is the following:

ƒ D*EX 0.0.0.0/0 [170/3651840]


[ ]
via 192.168.10.6, 00:01:08,
Serial0/1
–D: This static route was
learned from an EIGRP
routing update.
update
–*: The route is a candidate
for a default route.
–EX: The route is an external
EIGRP route,
route in this case a
static route outside of the
EIGRP routing domain.
–170: This is the
administrative distance of an
external EIGRP route.
route

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 67
Fi T i EIGRP
Fine-Tuning
ƒ EIGRP bandwidth utilization
–By default, EIGRP uses only up to 50% of interface bandwidth
for EIGRP information
•This
Thi prevents
t th
the EIGRP process ffrom over-utilizing
tili i a link
li k and
d nott
allowing enough bandwidth for the routing of normal traffic.
–The command to change the percentage of bandwidth used by
EIGRP is
Router(config-if)#ip bandwidth-percent eigrp as-
number percent
In our example, we are limiting
EIGRP to no more than 50
percentt off the
th link's
li k' b
bandwidth.
d idth
Therefore, EIGRP will never use
more the 32kbps of the link's
bandwidth for EIGRP packet
traffic.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 68
More EIGRP Configurations
ƒ Configuring Hello Intervals and Hold Times
-Hello
Hello inter
intervals
als and hold times are config
configurable
rable on a per
per-interface
interface
basis
-The command to configure hello interval is
Router(config-if)#ip hello-interval eigrp as-number seconds

ƒ Changing the hello interval also requires changing the hold


time to a value greater than or equal to the hello interval
-The command to configure hold time value is
Router(config-if)#ip hold-time eigrp as-number seconds
Defaults
For low-speed, NBMA networks: 60 seconds
F allll other
For th networks:
t k 5 seconds
d

Defaults
For low-speed, NBMA networks: 180 seconds
For all other networks: 15 seconds

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 69
Summary
ƒ Background & History
–EIGRP
EIGRP is a derivative of IGRP
ƒEIGRP is a Cisco proprietary distance vector routing
protocol released in 1994

ƒ EIGRP terms and characteristics


–EIGPR uses RTP to transmit & receive EIGRP p
packets
–EIGRP has 5 packet type:
ƒHello packets
ƒUpdate packets
ƒAcknowledgement packets
ƒQuery packets
ƒReply packets
–Supports VLSM & CIDR

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 70
Summary

ƒ EIGRP terms and characteristics


–EIGRP
EIGRP uses a hello protocol
ƒPurpose of hello protocol is to discover & establish
j
adjacencies
–EIGRP routing updates
ƒAperiodic
Aperiodic
ƒPartial and bounded
ƒFast
Fast convergence

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 71
Summary

ƒ EIGRP commands
–The
The following commands are used for EIGRP
configuration
ƒRtrA(config)#router eigrp [autonomous-system #]
ƒRtrA(config-router)#network network-number
–The following commands can be used to verify EIGRP
ƒShow
Sh iip protocols
l
ƒShow ip eigrp neighbors
ƒShow
Sho ip ro route
te

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 72
Summary

ƒ EIGRP metrics include


–Bandwidth
Bandwidth (default)
–Delay (default)
–Reliability
R li bili
–Load

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 73
Summary
ƒ DUAL
–Purpose
P off DUAL
ƒTo prevent routing loops
–Successor
ƒPrimary route to a destination
–Feasible successor
ƒBackup route to a destination
–Feasible distance
ƒLowest calculated metric to a destination
–Reported distance
ƒThe distance towards a destination as advertised
b an upstream
by t neighbor
i hb
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 74
Summary
ƒ Choosing the best route
–After
Aft router
t hhas received
i d allll updates
d t ffrom didirectly
tl
connected neighbors, it can calculate its DUAL
ƒ1
1st metric is calculated for each route
ƒ2nd route with lowest metric is designated
successor & is placed in routing table
ƒ3rd feasible successor is found
–Criteria
C i i ffor ffeasible
ibl successor: iit must h
have
lower reported distance to the destination than
the installed route’s
route s feasible distance
–Feasible routes are maintained in topology
table

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 75
Summary

ƒ Automatic summarization
–On
On by default
–Summarizes routes on classful boundary
–Summarization
S i i can b
be di
disabled
bl d using
i the
h ffollowing
ll i
command
ƒRtrA(config-if)#no
Rt A( fi if)# auto-summary
t

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 76
Link-State Routing
Protocols

Chapter 10: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives

ƒ Describe the basic features & concepts


p of link-state
routing protocols.
– Distance vector routing protocols are like road signs
because routers must make preferred path decisions based
on a distance or metric to a network.
– Link-state routing protocols are more like a road map
because they create a topological map of the network and
each router uses this map to determine the shortest path to
each network.
– The ultimate objective is that every router receives all of the
link-state information about all other routers in the routing
area. With this link-state information, each router can create
its own topological map of the network and independently
calculate the shortest path to every network.
ƒ List the benefits and requirements of link-state routing
protocols.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
Link-State Routing

ƒ Link state routing protocols


-Also known as shortest path first algorithms
-These protocols built around Dijkstra’s SPF

OSPF will
ill be
b discussed
di d iin Ch
Chapter
t 1111, and
d IS
IS-IS
IS will
ill be
b discussed
di d iin CCNP
CCNP.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
Link-State Routing

ƒ Dikjstra’s algorithm also known as the shortest path first


(SPF) algorithm
–This
Thi algorithm
l ith accumulates
l t costs
t along
l each
h path,
th from
f
source to destination.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
Link-State Routing

ƒ The shortest path to a destination is not necessarily the


path with the least number of hops

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
Link-State Routing Process
ƒ How routers using Link State Routing Protocols reach convergence
1 Each routers learns about its own directly connected networks
1.
– interface is in the up state
2. Each router is responsible for meeting its neighbors on directly
connected
t d networks
t k
– exchange hello packet to other directly connected link state routers.
3. Each router builds a Link-State Packet ((LSP)) containing
g the state of
each directly connected link
– recording all the pertinent information about each neighbor, including
neighbor ID, link type, and bandwidth.
4. Each router floods the LSP to all neighbors, who then store all LSPs
received in a database.
– Each router stores a copy of each LSP received from its neighbors in
a local database
database.
5. Each router uses the database to construct a complete map of the
topology and computes the best path to each destination network.
– The SPF algorithm
Th l ith iis usedd tto construct
t t ththe map off th
the ttopology
l and
d
to determine the best path to each network.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
Link-State Routing:
Step 1 – Learn about directly connected Networks
ƒ Link
Thiss iss a
an interface
te ace oon a
router
ƒ Link state
This is the information
about the state of the
links

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
Link-State Routing:
step 2 - Sending Hello Packets to Neighbors

ƒ Link state routing protocols use a hello protocol


Purpose of a hello protocol:
-To
T discover
di neighbors
i hb (th
(thatt use th
the same
link state routing protocol) on its link

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
Link-State Routing:
step 2 - Sending Hello Packets to Neighbors
ƒ Connected interfaces that are
using the same link state
routing protocols will exchange
hello packets.
ƒ Once routers learn it has
neighbors they form an
adjace cy
adjacency
– 2 adjacent neighbors will
exchange hello packets
– These packets will serve as a
keep alive function

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Link-State Routing:
step 3 - Building the Link State Packet (LSP)
ƒ Contents of LSP:
– State of each directly connected link
– Includes information about
neighbors such as neighbor IDID, link
type, & bandwidth.

ƒ A simplified version of the LSPs from


R1 is:
1. R1; Ethernet network 10.1.0.0/16;
Cost 2
2. R1 -> R2; Serial point-to-point
network; 10.2.0.0/16; Cost 20
3. R1 -> R3; Serial point-to-point
network; 10.3.0.0/16; Cost 5
4. R1 -> R4; Serial point-to-point
network; 10.4.0.0/16;
/ Cost
C 20

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
Link-State Routing:
step 4 - Flooding LSPs to Neighbors
ƒ Once LSP are created they are
forwarded out to neighbors.
–Each
ac router
ou e floods
oods its
s link-state
sae
information to all other link-state
routers in the routing area.
–Whenever
Whenever a router receives an LSP
from a neighboring router, it
immediately sends that LSP out all
other interfaces except the interface
that received the LSP.
–This p
process creates a floodingg effect
of LSPs from all routers throughout
the routing area.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Link-State Routing:
step 4 - Flooding LSPs to Neighbors
ƒ LSPs
LSP are sentt outt under
d the
th following
f ll i conditions
diti
– Initial router start up or routing process
– When
Wh th there is
i a change
h iin ttopology
l
• including a link going down or coming up, or a neighbor
j
adjacency y beingg established or broken

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Link-State Routing:
step 5 - Constructing a link state data base
ƒ Routers use a database to
construct a topology map of the
network
–After each router has propagated its
own LSPs using the link-state
flooding process,
process each router will
then have an LSP from every link-
state router in the routing area.
–These LSPs are stored in the link-
state database.
–Each
Each router in the routing area can
now use the SPF algorithm to
construct the SPF trees that you saw
earlier
earlier.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
Link-State Routing:
step 5 - Constructing a link state data base

router R1 has learned the link-state


information for each router in its
routing area.

With a complete
p link-state database, R1
can now use the database and the
shortest path first (SPF) algorithm to
calculate the preferred path or shortest
path to each network.
p

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
Link-State Routing:
Example - How R1 constructs its SPF tree.
ƒ Process begins by examining R2’s
R2 s LSP information
–R1 can ignore the first LSP, because R1 already knows that it is
connected to R2 on network 10.2.0.0/16 with a cost of 20.
–R1
R1 can use the
th second d LSP andd create
t a lilink
k ffrom R2 tto another
th
router, R5, with the network 10.9.0.0/16 and a cost of 10. This
information is added to the SPF tree.
–Using
Using the third LSP
LSP, R1 has learned that R2 has a network
10.5.0.0/16 with a cost of 2 and with no neighbors. This link is
added to R1's SPF tree.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Link-State Routing:
Example - How R1 constructs its SPF tree.
ƒ Process begins by examining R3’s
R3 s LSP information
–R1 can ignore the first LSP, because R1 already knows that it is
connected to R3 on network 10.3.0.0/16 with a cost of 5.
–R1
R1 can use the
th second d LSP andd create
t a lilink
k ffrom R3 tto th
the
router R4, with the network 10.7.0.0/16 and a cost of 10. This
information is added to the SPF tree.
–Using
Using the third LSP
LSP, R1 has learned that R3 has a network
10.6.0.0/16 with a cost of 2 and with no neighbors. This link is
added to R1's SPF tree.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
Link-State Routing:
Example - How R1 constructs its SPF tree.
ƒ Process begins by examining R4’s
R4 s LSP information
–R1 can ignore the first LSP because R1 already knows that it is
connected to R4 on network 10.4.0.0/16 with a cost of 20.
–R1
R1 can also ignore the second LSP because SPF has already learned
about the network 10.6.0.0/16 with a cost of 10 from R3.
–However, R1 can use the third LSP to create a link from R4 to the router
R5, with the network 10.10.0.0/16 and a cost of 10. This information is
added
dd d tto th
the SPF tree.
t
–Using the fourth LSP, R1 learns that R4 has a network 10.8.0.0/16 with a
cost of 2 and with no neighbors. This link is added to R1's SPF tree.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
Link-State Routing:
Example - How R1 constructs its SPF tree.
ƒ Process begins by examining R5’s
R5 s LSP information
–R1 can ignore the first two LSPs (for the networks 10.9.0.0/16 and
10.10.0.0/16), because SPF has already learned about these links
and added them to the SPF tree.
–R1 can process the third LSP learning that R5 has a network
10.11.0.0/16 with a cost of 2 and with no neighbors. This link is
added to the SPF tree for R1.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
Link-State Routing

ƒ Determining the shortest path


–The shortest path to a destination
determined by adding the costs & finding the
lowest cost
•Network 10.5.0.0/16 via R2 serial 0/0/0
at a cost of 22
•Network 10.6.0.0/16 via R3 serial 0/0/1
at a cost of 7
•Network 10.7.0.0/16 via R3 serial 0/0/1
at a cost of 15
•Network 10.8.0.0/16 via R3 serial 0/0/1
at a cost of 17
•Network 10.9.0.0/16 via R2 serial 0/0/0
at a cost of 30
•Network
N t k 10.10.0.0/16
10 10 0 0/16 via
i R3 serial
i l 0/0/1
at a cost of 25
Only the LANs are shown in
•Network 10.11.0.0/16 via R3 serial 0/0/1 the table, but SPF can also be
at a cost of 27 used to determine the
shortest path to each WAN
link network.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Link-State Routing

ƒO
Once the
th SPF algorithm
l ith h has
determined the shortest path
routes, these routes are placed in
the routing table.
ƒ The routing table will also include
all directly connected networks
and routes from any other
sources, such as static routes.
Packets will now be forwarded
according to these entries in the
routing table.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
Link-State Routing Protocols

Advantages of a Link
Link-State
State Routing Protocol

Routing Builds Router can Event driven Use


protocol Topological independently Convergence routing of
map determine the updates LSP
shortest path
to every
network.

Distance No No Slow Generally No No


vector

Link State Yes Yes Fast Generally Yes Yes

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
Link-State Routing Protocols

ƒ There are several advantages of link-state routing protocols compared to distance vector routing
protocols.
t l
ƒ Builds a Topological Map
• Link-state routing protocols create a topological map, or SPF tree of the network topology.
•Using
Using the SPF tree,
tree each router can independently determine the shortest path to every network
network.
• Distance vector routing protocols do not have a topological map of the network.
•Routers implementing a distance vector routing protocol only have a list of networks, which includes
the cost (distance) and next-hop routers (direction) to those networks.
ƒ Fast Convergence
• When receiving a Link-state Packet (LSP), link-state routing protocols immediately flood the LSP out all
interfaces except for the interface from which the LSP was received.
• A router using a distance vector routing protocol needs to process each routing update and update its
routing
ti table
t bl b
before
f fl
flooding
di ththem outt other
th iinterfaces,
t f even with
ith ttriggered
i d updates.
d t
ƒ Event-driven Updates
• After the initial flooding of LSPs, link-state routing protocols only send out an LSP when there is a change
in the topology. The LSP contains only the information regarding the affected link.
• Unlike some distance vector routing protocols, link-state routing protocols do not send periodic updates.
ƒ Hierarchical Design
• Link-state routing protocols such as OSPF and IS-IS use the concept of areas. Multiple areas create a
hierarchical design to networks
networks, allowing for better route aggregation (summarization) and the isolation of
routing issues within an area.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Link-State Routing Protocols

R
Requirements
i t ffor using
i a lilink
k state
t t routing
ti protocol
t l
ƒ Memory requirements
– Typically
T i ll lilink
k state
t t routing
ti protocols
t l use more memory
ƒ Processing Requirements
– More
M CPU processing
i iis required
i d off lilink
k state
t t routing
ti
protocols
ƒ Bandwidth Requirements
q
– Initial startup of link state routing protocols can consume lots
of bandwidth
– This should only occur during initial startup of routers
routers, but can
also be an issue on unstable networks.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Link-State Routing Protocols
ƒ Modern link-state routing protocols are designed to
minimize
i i i theh effects
ff on memory, CPU
CPU, and d
bandwidth.
• The use and configuration of multiple areas can reduce
the size of the link-state
link state databases. Multiple areas can
also limit the amount of link-state information flooding in
a routing domain and send LSPs only to those routers
that need them.
• For example,
example when there is a change in the topology
topology,
only those routers in the affected area receive the LSP
and run the SPF algorithm.
• This can help isolate an unstable link to a specific area
in the routing domain
domain.
ƒ In the figure, If a network in Area 51 goes down, the
LSP with the information about this downed link is
only flooded to other routers in that area.
• Routers in other areas will learn that this route is down,
but this will be done with a type of link-state packet that Note: Multiple areas
does not cause them to rerun their SPF algorithm. with OSPF and IS-IS
are discussed in
CCNP
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Link-State Routing Protocols

ƒ 2 link state routing protocols used for routing IP


-Open Shortest Path First (OSPF)
-Intermediate System-Intermediate System (IS-IS)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Summary

ƒ Link State Routing protocols are also known as


Shortest Path First protocols
ƒ Summarizing the link state process
-Routers
Routers 1ST learn of directly connected networks
-Routers then say “hello” to neighbors
-Routers then build link state packets
-Routers then flood LSPs to all neighbors
-Routers
Routers use LSP database to build a network topology
map & calculate the best path to each destination

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Summary

ƒ Link
An interface on the router
ƒ Link State
Information about an interface such as
-IP address
-Subnet
Subnet mask
-Type of network
-Cost
C t associated
i t d with
ith lilink
k
-Neighboring routers on the link

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Summary

ƒ Link State Packets


After iinitial
Aft iti l flflooding,
di additional
dditi l LSP are sentt outt
when a change in topology occurs

ƒ Examples of link state routing protocols


-Open shortest path first
-IS-IS

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
OSPF (Single Area OSPF)

Chapter 11: Routing Protocols and Concepts


Modified by Hasimi Sallehudin

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Introduction

•In this chapter, you will learn basic, single-area OSPF implementations
and configurations.
configurations
•More complex OSPF configurations and concepts (multi-areas OSPF)
are reserved for CCNP-level courses.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 2
Introduction to OSPF
Background of OSPF
ƒ Began in 1987
ƒ 1989 OSPFv1 released in RFC 1131
This version was experimental & never deployed
ƒ 1991 OSPFv2 released in RFC 1247
ƒ 1998 OSPFv2 updated in RFC 2328
ƒ 1999 OSPFv3 p published in RFC 2740

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
Introduction to OSPF
OSPF Message Encapsulation
ƒ OSPF packet type
– There exist 5 types (next slide)
ƒ OSPF packet header
–Contains - Router ID an area ID
and Type code for OSPF packet
type
ƒ IP packet header
– Contains - Source IP address,
Destination
es a o IP add address,
ess, & Protocol
o oco
field set to 89. the destination
address is set to one of two
multicast addresses: 224.0.0.5 or
224 0 0 6
224.0.0.6.
ƒ Data Link Frame Header
–Contains - destination MAC address is
also a multicast address: 01-00-5E-00-
00-05 or 01-00-5E-00-00-06.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
I t d ti to
Introduction t OSPF
5 OSPF Packet Types:
ƒ 1. Hello - Hello packets are used to establish and
maintain adjacency with other OSPF routers.
ƒ 2. DBD - The Database Description (DBD) packet
contains an abbreviated
abbre iated list of the sending ro
router's
ter's
link-state database and is used by receiving
routers to check against the local link-state
database.
ƒ 3. LSR - Receiving routers can then request more
information about any entry in the DBD by sending
a Link-State Request (LSR).
ƒ 4. LSU - Link-State Update (LSU) packets are
used to reply to LSRs as well as to announce new
information.
–LSUs contain 7 different types of Link-State
Advertisements (LSAs).
–LSUs and LSAs are discussed in a later topic.
ƒ 5
5. LSA
LSAckk - When
Wh an LSU is i received,
i d ththe router
t
sends a Link-State Acknowledgement (LSAck) to
confirm receipt of the LSU.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 5
OSPF: Hello Protocol
ƒ Purpose of Hello Packet
ƒ Discover OSPF neighbors & establish adjacencies
ƒ Advertise parameters on which routers must agree to become
neighbors
ƒ Used by multi-access networks to elect a Designated Router and
a Backup Designated Router
ƒ Type: OSPF Packet Type: Hello (1), DD (2), LS
Request (3), LS Update (4), LS ACK (5)
ƒ Router ID: ID of the originating router
ƒ Area ID: area from which the packet originated
ƒ Network Mask: Subnet mask associated with the
sending interface
ƒ Hello Interval: number of seconds between the
sending router's hellos
ƒ Router Priority: Used in DR/BDR election (discussed
l t )
later)
ƒ Designated Router (DR): Router ID of the DR, if any
ƒ Backup Designated Router (BDR): Router ID of the
BDR, if any
ƒ List of Neighbors: lists the OSPF Router ID of the
neighboring router(s)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 6
OSPF: Hello Protocol Also need to have the
same Area ID.
ƒ Establish adjacencies:
– Theyy must agree
g on three values: Hello Why 10 second hello interval
interval, Dead interval, and network type.
communications consider better than
ƒ OSPF Hello Intervals the 30 second routing update for RIP?
–Hello interval indicates how often an OSPF
router transmits its Hello packets
–Usually multicast (224.0.0.5) for
ALLSPFRouters
–sent everyy 10 seconds on multiaccess and
point-to-point segments
–Sent every 30 seconds for NBMA segments
ƒ OSPF Dead Intervals
–This is the time that must transpire before the
neighbor is considered down
–Default time is 4 times the hello interval
–For
For multiaccess and point-to-point
point to point segments,
segments
this period is 40 seconds.
–For NBMA networks, the Dead interval is 120
seconds.
–If
If the Dead interval expires before the routers
receive a Hello packet, OSPF will remove that
neighbor from its link-state database.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 7
OSPF: Hello Protocol

ƒ To reduce the amount of OSPF traffic on


multiaccess networks, OSPF elects a
Designated Router (DR) and Backup
Designated
g Router ((BDR).
)
ƒ Hello protocol packets contain information that
is used in electing DR and BDR
–The
The DR is responsible for updating all other
OSPF routers (called DROthers) when a change
occurs in the multiaccess network.
–The
The BDR monitors the DR and takes over as
DR if the current DR fails.
ƒ In the figure, R1, R2, and R3 are connected
through point
point-to-point
to point links.
links Therefore
Therefore, no More detail discussion
DR/BDR election occurs. on the DR, BDR,
–The DR/BDR election and processes will be DROther later. You
discussed in a later topic and the topology will need to know this for
be changed to a multiaccess network. CCNA exam.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 8
Introduction to OSPF
OSPF Link-state Updates
ƒ Purpose of a Link State Update (LSU)
–Used to deliver link state advertisements
ƒ Purpose of a Link State Advertisement (LSA)
–Contains information about neighbors & path costs
–An LSU packet can contain 11 different types of LSAs,

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 9
Introduction to OSPF
OSPF Algorithm
ƒ OSPF routers build &
maintain link-state
d t b
database containing
t i i LSA
received from other
routers
1. Information found in
database is utilized upon
e ec tion of Dijkstra SPF
execution
algorithm
2. SPF algorithm
g used to
create SPF tree
3. SPF tree used to populate
routing table

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 10
Introduction to OSPF
Administrative Distance
ƒ Default Administrative Distance for OSPF is 110

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 11
Introduction to OSPF
ƒ OSPF Authentication
–It
It is good practice to authenticate transmitted
routing information.
–This is an interface specific
p configuration
g
–This practice ensures that routers will only accept
routing information from other routers that have been
configured with the same password or authentication
information
MD5 authentication
uses a key
k ID ththatt
Note: Authentication allows the router to
does not encrypt the reference multiple
router's
router s routing table.
table passwords,, making
p g
password migration
easier and more

? secure.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Basic OSPF Configuration

Lab Topology
ƒ Topology used for this chapter
–Discontiguous IP addressing
scheme
–Since OSPF is a classless
routing protocol the subnet mask
is will be configured as part of our
OSPF configuration.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 13
Basic OSPF Configuration
The router ospf command
ƒ To enable OSPF on a router use the following
command
R1(config)#router ospf process-id
ID cannot be 0
Process id
ƒ A locally significant number between 1 and 65535

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 14
Basic OSPF Configuration
ƒ OSPF network command
–Requires
q entering:
g
•network address
•wildcard mask - the inverse of the subnet mask
•area-id - area-id refers to the OSPF area
area. OSPF area
is a group of routers that share link state information

Router(config-router)#network
Router(config router)#network network
network-address
address wildcard
wildcard-ask
ask area area
area-id
id

255.255.255.255 Subtract the


subnet mask
- 255.255.255.240
--------------------
Wildcard mask
0 0
0. 0. 0 0. 15
255.255.255.255 Subtract the
subnet mask
- 255.255.255.252
--------------------
Wildcard mask
0. 0. 0. 03
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Basic OSPF Configuration
ƒ Cisco IOS now properly handles overlapping network ... area configuration commands.
ƒ Consider the following
g example:
p
fw#conf t
Enter configuration commands, one per line. End with CNTL/Z.
fw(config)#router ospf 100
fw(config router)#network 0
fw(config-router)#network 0.0.0.0
0 0 0 255
255.255.255.255
255 255 255 area 0
fw(config-router)#network 10.0.0.0 0.0.3.255 area 1
13:06:57: %OSPF-6-AREACHG: 10.0.0.0 255.255.252.0 changed from area 0 to area 1
fw(config-router)#network 10.0.0.0 0.0.0.7 area 2
13:07:10: %OSPF-6-AREACHG: 10.0.0.0 255.255.255.248 changed from area 1 to area 2
fw(config-router)#^Z

ƒ I've entered overlapping network statements, each one with a smaller address range. Not
only
l ddoes IOS d
detect
t t th
thatt th
they overlap,
l it also
l prints
i t nice
i syslog
l messages and d reorders
d
the commands in the running configuration. Well done !
fw#show run | begin router ospf
router ospf
p 100
log-adjacency-changes
network 10.0.0.0 0.0.0.7 area 2
http://blog.ioshints.info/2006/11/
network 10.0.0.0 0.0.3.255 area 1 network-statements-in-ospf-
network 0
0.0.0.0
0 0 0 255
255.255.255.255
255 255 255 area 0
process-are.html
ht l

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 16
Basic OSPF Configuration
ƒ ospf network definition for adding all interfaces / default route
What’s the difference?
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
vs.
vs
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

ƒ Both add all existing interfaces into area 0 and all later added interfaces
also. Both statements are valid.

http://blog.sazza.de/?p=427

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 17
B i OSPF Configuration
Basic C fi ti
ƒ Area area
area-id
id
ƒAn OSPF area is a group of routers that share link-state
information.
ƒ In this chapter, we will configure all of the OSPF routers within a
single area. This is known as single-area OSPF.
ƒMulti-area OSPF is covered in CCNP.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 18
B i OSPF Configuration
Basic C fi ti
ƒ Router ID
– This is an IP address used to identify a router
– 3 criteria for deriving the router ID
1 U
1. Use IP address
dd configured
fi d with
ith OSPF router-id
t id command d
-Takes precedence over loopback and physical interface
addresses
2. If router-id command not used then router chooses highest
IP address of any loopback interfaces
3 If no loopback interfaces are configured then the highest IP
3.
address on any active physical interface is used
ƒ The interface does not need to be enabled for OSPF,
meaning that it does not need to be included in one of the
OSPF network commands.
ƒ However, the interface must be active - it must be in the
up state.
state
However!!!!!!
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
B i OSPF Configuration
Basic C fi ti

ƒ Router
R t ID
– If you are the
th king
ki when
h the
th
kingdom is built, you are the
KING for life
– It means when ID is elected, it
i th
is the ID ffor th
the router,
t unless
l
…………..
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 20
Basic OSPF Configuration
OSPF Router ID
ƒ Commands used to verify current router ID
–Show ip protocols
–Show ip ospf
–Show ip ospf interface

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 21
Basic OSPF Configuration
OSPF Router ID
ƒ Router ID (not configured) & Loopback addresses
(configured)
–Highest
Highest loopback address will be used as router ID
–Advantage of using loopback address the loopback
interface cannot fail Æ OSPF stability
ƒ The OSPF router
router-id
id command
–Introduced in IOS 12.0
–OSPF router-id command, which is a fairly recent
addition to IOS,, it is more common to find loopback
p
addresses used for configuring OSPF router IDs.
–Command syntax
ƒRouter(config)#router ospf process-id
ƒRouter(config-router)#router-id ip-address
ƒ Modifying the Router ID
–Use
Use the command Router#clear ip ospf process

This command does not work in PT.


© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Basic OSPF Configuration
Modifying
y g the Router ID
ƒ The router ID is selected when OSPF is
configured with its first OSPF network command.
– If the OSPF router-id
router id command or the loopback
address is configured after the OSPF network
command, the router ID will be derived from the
interface with the highest active IP address.
ƒ Modifying
f the Router ID
The router ID can be modified with
1. the IP address from a subsequent OSPF router-id
command b by reloading the ro
router
ter or
2. by using the following command:
Router#clear ip ospf process

3. Modifying a router ID with a new loopback or


physical interface IP address may require
reloading the router

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Basic OSPF Configuration
Duplicate Router IDs
ƒ When two routers have the same router ID in
an OSPF domain, routing may not function
properly.
– If the router ID is the same on two
neighboring routers, the neighbor
establishment may not occur.
ƒ When duplicate OSPF router IDs occur, IOS
will display a message similar to:
– %OSPF-4-DUP_RTRID1: Detected router
with
ith d
duplicate
li t router
t ID
ƒ To correct this problem, configure all routers
so that they have unique OSPF router IDs.
¾ Because some IOS versions do not support
the router-id command, we will use the
loopback address method for assigning
router IDs
IDs.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Quick Review
We just went over 3 different types of ID
ƒ ospf process-id.
– OSPF process.
process
– Cannot be 0
ƒ Area ID:
– OFPS area
– If it is the first,, and the backbone area,, it is 0
ƒ Router ID
– Router ID
– 1 IP address is elected per router,
• Highest physical address (or)
• Highest logical address (loopback)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Basic OSPF Configuration
Verifying OSPF
ƒ U
Use th
the show
h iip ospff command
d tto verify
if &
trouble shoot OSPF networks:
ƒ Neighbor adjacency
ƒAdjacency indicated by
ƒThe OSPF state of the interface is
“full
full state”
state
ƒNo adjacency indicated by -
ƒNeighboring router’s Router ID is not
displayed
ƒA state of full is not displayed
•Neighbor ID - The router ID of the neighboring router.
•Pri - The OSPF priority of the interface..
-Consequence
Consequence of no adjacency-
adjacency •State
St t - The
Th OSPF state t t off the
th interface.
i t f FULL state
t t
means that the router and its neighbor have identical
ƒNo link state information exchanged OSPF link-state databases.
•Dead Time - The amount of time remaining that the
ƒInaccurate SPF trees & routing tables router will wait to receive an OSPF Hello packet from the
neighbor before declaring the neighbor down. This value
is reset when the interface receives a Hello packet.
packet
•Address - The IP address of the neighbor's interface to
which this router is directly connected.
•Interface - The interface on which this router has formed
adjacency with the neighbor.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 26
Basic OSPF Configuration
Note:
ƒ On multiaccess networks such as Ethernet,
two routers that are adjacent may have their
states displayed as 2WAY.
2WAY
–This will be discussed in a DR and BDR
section.

ƒ Two routers may not form an OSPF


adjacency
dj ifif:
–The subnet masks do not match, causing
•Neighbor ID - The router ID of the neighboring router.
the routers to be on separate networks. •Pri - The OSPF priority of the interface..
•State
St t - The
Th OSPF state t t off the
th interface.
i t f FULL state
t t
–OSPF Hello or Dead Timers do not match. means that the router and its neighbor have identical
OSPF link-state databases.
•Dead Time - The amount of time remaining that the
–OSPF Network Types do not match. router will wait to receive an OSPF Hello packet from the
neighbor before declaring the neighbor down. This value
is reset when the interface receives a Hello packet.
packet
–There
Th is
i a missing
i i or iincorrectt OSPF •Address - The IP address of the neighbor's interface to
which this router is directly connected.
network command. •Interface - The interface on which this router has formed
adjacency with the neighbor.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Verifying OSPF
ƒ Show ip protocols
–OSPF p
process ID,,
–the router ID,
–networks the router is advertising,
–the default administrative distance, 110 for OSPF.
ƒ Show ip ospf
–OSPF process ID
–router
router ID
ID.
–OSPF area information
–the last time the SPF algorithm was calculated.
•R1 has participated in during the past 11 and a half hours is to
send small Hello packets to its neighbors.
–SPF schedule delay
•The router waits 5000 msecs after receiving an LSU before
running the SPF algorithm.
•There is an additional Hold Time of 10000 msecs between 2
SPF calculations.

ƒ Show ip ospf interface


–The quickest way to verify Hello and Dead intervals
• for OSPF routers to become neighbors, their OSPF Hello and
Dead intervals must be identical.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
Configuring OSPF loopback address and router priority
The command show ip ospf interface will display the
interface ppriorityy value as well as other key
y information.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Basic OSPF Configuration
Examining the routing table
ƒ Use the show ip route command to display the routing table
-An “O’ at the beginning of a route indicates that the router source is
OSPF
-OSPF does not automatically summarize at major network
boundaries

•Loopback
interface counts
as a network.
•These loopback
interfaces are
not advertised in
OSPF.
•They function as
router
t ID.
ID

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
OSPF Metric
M ti
ƒ OSPF uses cost as the metric for determining the
best route
–A cost is associated with the output side of each
router interface.
–The
Th lower
l the
th cost,
t the
th more likely
lik l th
the iinterface
t f iis
to be used to forward data traffic
ƒ The Cisco IOS uses the cumulative
b d idth off the
bandwidths th outgoing
t i interfaces
i t f from
f
the router to the destination network as the
cost value.
-Cost
C i b
is based
d on bbandwidth
d id h off an iinterface
f
ƒCost is calculated using the formula
108 / bandwidth
-Reference bandwidth
ƒThe 100Mbps (FastEthernet) and higher will have the
same OSPF cost of 1.
ƒThis reference bandwidth can be modified using
ƒauto-cost reference-bandwidth command
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 31
OSPF Metric
ƒ COST of an OSPF route is the accumulated value from
one router to the destination network
•For example, in the figure,
the routing table on R1 shows
64 + 1 = 65
a cost of 65 to reach the
10.10.10.0/24 network on R2.
•Because 10.10.10.0/24
is attached to a
FastEthernet interface,
R2 assigns the value 1 as
the cost for 10.10.10.0/24.
•R1 then adds the
additional cost value of 64
to senddddata across the
h
default T1 link between
R1 and R2.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
OSPF Metric
ƒ Sometimes the actual speed of a link is different than
the default bandwidth
–This
Thi makesk it imperative
i ti that
th t the
th bbandwidth
d idth value
l reflects
fl t
link’s actual speed
ƒReason: so routing table has best path information
ƒ The show interface command will display interface’s
interface s
bandwidth
–Most serial link default to 1.544Mbps
–However,
However, some serial interfaces may default to 128 kbps.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
M dif i OSPF costt metric
Modifying ti
ƒ OSPF uses cost as the metric for determining the
best route.
Cost is calculated using the formula 108/bandwidth,
where bandwidth is expressed in bps. (Cost =
100,000,000/Bandwidth)
ƒ The Cisco IOS automatically determines cost based
on the bandwidth of the interface.
ƒ It is essential for proper OSPF operation that the
correct interface bandwidth is set.
Router(config)#interface serial 0/0
Router(config-if)#bandwidth 64
The default bandwidth for Cisco serial interfaces is
1 544 Mbps
1.544 Mbps, or 1544 kbps.
kbps
COD has these 2 types
2A/S 2T of serial cards in the lab

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
OSPF Metric: Bandwidth
ƒ Remember, this bandwidth value
does not actually affect the speed of
the link; it is used by some routing
protocols to compute the routing
metric.
–It is important that the bandwidth
value
l reflect
fl t th
the actual
t l speed d off th
the
link so that the routing table has
accurate best path information.
ƒ The figure
g displays
p y the routing
g table
for R1.
–R1 believes that both of its serial
interfaces are connected to T1 links,
•one off the
th links
li k iis a 64 kb
kbps lilink
k
•the other one is a 256 kbps link.
–This results in R1's routing table
having two equal-cost
equal cost paths to the
192.168.8.0/30 network, when Serial
0/0/1 is actually the better path.

How to modify the cost of all the links?

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 35
Basic OSPF Configuration
Modifying the Cost of a link
ƒB
Both
th sides
id off a serial
i l lilink
k should
h ld bbe
configured with the same bandwidth
–Commands
Commands used to modify bandwidth value
ƒBandwidth command
–Example: Router(config-if)#bandwidthbandwidth-kbps
ƒip ospf cost command – allows you to directly specify
interface cost
-Example:R1(config)#interface serial 0/0/0
R1(config-if)#ip ospf cost 1562

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 36
M dif i the
Modifying th Cost
C t off the
th link
li k
ƒ Difference between bandwidth command & the ip ospf
costt commandd
–Ip ospf cost command
ƒSets cost to a specific value
–Bandwidth command
ƒLink cost is calculated

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
OSPF and
dMMultiaccess
lti Networks
N t k
Challenges in Multiaccess Networks
ƒ OSPF defines five network types:
–Point-to-point
•network there are only two devices on
the network,, one at each end.
–Broadcast Multiaccess
•a network with more than two devices on
the same shared media.
•all devices on the network see all
broadcast frames.
–Nonbroadcast Multiaccess (NBMA)
•networks include Frame Relay
Relay, ATM
ATM,
and X.25 networks.
–Point-to-multipoint
•networks include Frame Relay, ATM,
and
d X.25
X 25 networks.
t k
–Virtual links
•Virtual links are a special type of link that
can be used in multi-area
multi area OSPF.
OSPF

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
OSPF in Multiaccess Networks
ƒ 2 challenges presented by
multiaccess networks
–Multiple adjacencies
–Extensive
Extensive LSA flooding
ƒ The creation of an adjacency between
every pair of routers in a network
would create an unnecessary number
of adjacencies.
–This would lead to an excessive
number of LSAs passing between
routers on the same network.
•5 routers in the figure will need 10
adjacencies,
j ,
•10 routers would require 45
adjacencies.
•20
20 routers would require 190
adjacencies

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 39
OSPF iin M
Multiaccess
lti Networks
N t k
ƒ Extensive flooding
g of LSAs
For every LSA sent out there must be an acknowledgement of
receipt sent back to transmitting router.
consequence: lots of bandwidth consumed and chaotic traffic

Solution:
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 40
Steps in the operation of OSPF
ƒ OSPF routers send Hello packets on OSPF enabled interfaces.
ƒ On multi-access
multi access networks
networks, the routers elect a DR and BDR
BDR. On these networks other routers
become adjacent to the DR.

To reduce the number of adjacencies traffics


To reduce the number of adjacencies each router must form, OSPF calls
one of the routers the designated router. A designated router is elected as
routers are forming
f i adjacencies,
dj i andd then
h all ll other
h routers establish
bli h
adjacencies only with the designated router. This simplifies the routing
table update procedure and reduces the number of link-state records in the
database. The designated router plays other important roles as well to
reduce the overhead of a OSPF link-state procedures. For example, other
routers send link-state advertisements it to the designated
g router only
y by
y
using the all-designated-routers multicast address of 224.0.0.6.

http://www.chebucto.ns.ca/Chebucto/Technical/M
anuals/Max/max6000/isptele/maxospf.htm
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
Steps in the operation of OSPF
ƒ OSPF routers send Hello
packets on OSPF enabled
interfaces.
ƒ On multi-access networks, the
routers elect a DR and BDR. On
these networks other routers
become adjacent to the DR.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 42
Steps in the operation of OSPF
ƒ To reduce the number of adjacencies traffics

http://www.cisco.com/warp/public/104/11.html
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 43
OSPF iin M
Multiaccess
lti Networks
N t k
ƒ Solution to LSA flooding issue is the use of
–Designated router (DR)
–Backup designated router (BDR)
•this solution is analogous to electing
someone in i th
the room tto go around d andd llearn
everyone's names and then announce these
names to everyone in the room at once.
–DROther
• All other routers become DROthers (this
indicates a router that is neither the DR or the
BDR).
•DROthers
DROth only
l fform ffullll adjacencies
dj i with
ith th
the
DR and BDR in the network.
ƒ DR & BDR
–On
O multiaccess
lti networks,
t k OSPF elects
l t a
Designated Router (DR) to be the collection and
distribution point for LSAs sent and received.
–A Backup p Designated
g Router ((BDR)) is also
elected in case the Designated Router fails.
–DR & BDR are elected to send & receive LSA
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 44
OSPF iin M
Multiaccess
lti Networks
N t k
ƒ DR & BDR & DROther
–Routers on a multiaccess network
elect a DR and BDR.
–DR
DR & BDR are elected to send &
receive LSA
–DROthers only form full
adjacencies with the DR and BDR in
the network.
ƒ Sending & Receiving LSA
–DRothers send LSAs via multicast
224.0.0.6 to DR & BDR
(ALLDRouters - All DR routers)
–DR forward LSA via multicast
address 224.0.0.5 to all other routers
(AllSPFRouters - All OSPF routers).
routers)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 45
OSPF in Multiaccess Networks

DR/BDR Election Process


ƒ DR/BDR elections DO ƒ DR/BDR elections will take
NOT occur in point-to-
point to place on multiaccess
point networks networks as shown below

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 46
OSPF in Multiaccess Networks
ƒ Criteria for g
getting
g elected DR/BDR
1. DR: Router with the highest OSPF
interface priority.
2 BDR: Router with the second highest
2.
OSPF interface priority.
3. If OSPF interface priorities are equal, the
highest router ID is used to break the tie.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 47
ƒ Criteria for getting elected DR/BDR
1. DR: Router with the highest OSPF interface
p
priority.
y
2. BDR: Router with the second highest OSPF
interface priority.
3. If OSPF interface priorities are equal, the
highest router ID is used to break the tie.
ƒ Example:
– The OSPF for all interface priority is 1
1.
– The OSPF router ID is used to elect the DR
and BDR.
• RouterC with the highest
g router ID,,
becomes the DR
• RouterB, with the second highest router
ID, becomes the BDR.
• Because
B R
RouterA
t A iis nott elected
l t d as
either the DR or BDR, it becomes the
DROther.
DROthers only form FULL adjacencies with the DR and BDR, but will still form
a neighbor adjacency with any DROthers that join the network. You need 4 routers
When two DROther routers form a neighbor adjacency, the neighbor state is topology to see this
displayed as 2WAY. “2way” adjacency.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 48
OSPF network types (cont.)

Real DR and BDR election process


The first router up on the network is the
DR
DR.
The second router up on the network is the
BDR.
If the DR fails then the BDR becomes DR
and another router is elected the BDR.
The DR does not change just because
another router comes on line with a higherg
priority or a higher router id.
If both the existing DR and BDR fail and a
new DR must be elected, the router with
the highest priority is elected DR
DR.
If there's a tie, the router with the highest
router id is elected DR.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 49
Timing of DR/BDR Election
(This is really of how the election works)

ƒ Election occurs as soon as 1st router has its OSPF


enabled on multiaccess network. This can happen
when
1 When the routers are powered-on
1. powered on
• it is possible that a router with a lower router ID
will become the DR. This could be a lower-end
router that took less time to boot
boot.
2. when the OSPF network command for that
interface is configured.
ƒ When a DR is elected it remains as the DR until
one of the following occurs
-The
The DR fails.
fails
-The OSPF process on the DR fails.
-The multiaccess interface on the DR fails.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 50
Timing of DR/BDR Election
(This is really of how the election works)

ƒ DR Fails
–If the DR fails, the BDR assumes the role of
DR and an election is held to choose a new
BDR.
BDR
–In the figure, RouterC fails and the former
BDR, RouterB, becomes DR. The only other
router available to be BDR is RouterA.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 51
Timing of DR/BDR Election
(This is really of how the election works)

ƒ New Router
–If a new router enters the network after
the DR and BDR have been elected, it will
nott become
b the
th DR or ththe BDR even if it
has a higher OSPF interface priority or
router ID than the current DR or BDR.
•If the current DR fails, the BDR will
become the DR, and the new router
can be elected the new BDR.
•After the new router becomes the
BDR, if the DR fails, then the new
router
t will
ill b
become th
the DR
DR.
•The current DR and BDR must both
fail before the new router can be
elected DR or BDR.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 52
Timing of DR/BDR Election
(This is really of how the election works)

ƒ Old DR Returns
–A previous DR does not regain DR status
if it returns to the network.
•In the figure, RouterC has finished a
reboot and becomes a DROther even
though its router ID, 192.168.31.33, is
higher than the current DR and BDR.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 53
Timing of DR/BDR Election
(This is really of how the election works)

ƒ BDR Fails
–If the BDR fails, an election is held
among the DRothers to see which router
will
ill b
be th
the new BDR
BDR.
•In the figure, the BDR router fails.
•An election is held between RouterC
and RouterD.
•RouterD wins the election with the
higher router ID.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 54
Timing of DR/BDR Election
(This is really of how the election works)

ƒ New DR Fails
–In the figure, RouterB fails. Because
RouterD is the current BDR, it is promoted
to DR
DR. RouterC becomes the BDR BDR.
ƒ So, how do you make sure that the
routers yyou want to be DR and BDR
win the election? Without further
configurations, the solution is to
either:
–Boot up the DR first, followed by the
BDR, and then boot all other routers, or
–Shut down the interface on all routers,
followed by a no shutdown on the DR,
then the BDR, and then all other routers.
OR: use the priority command set
not desired DR and BDR to 0
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 55
OSPF in Multiaccess Networks
OSPF Interface Priority
ƒ Manipulating the DR/BDR election process continued
–Use the ip ospf priority interface command.
–Example:Router(config-if)#ip ospf priority {0 - 255}
ƒPriority number range 0 to 255
–0 means the router cannot become the DR or BDR
–1 is the default priority value
»router ID determined the DR and BDR

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 56
OSPF in Multiaccess Networks
OSPF Interface Priority
ƒ Modify Priority
–Router(config-if)#ip ospf priority {0 - 255}
ƒ Force Election
–After
Aft ddoing
i a shutdown
h td andd a no shutdown
h td
on the FastEthernet 0/0 interfaces of all three
routers, we see the result of the change of
OSPF interface priorities.
–The show ip ospf neighbor command on
RouterC now shows that RouterA (Router ID
192.168.31.11) is the DR with the highest
OSPF interface p priority
y of 200 DR
–RouterB (Router ID 192.168.31.22) is still
the BDR with the next highest OSPF
interface priority of 100.
–Notice
N ti ffrom R RouterA's
t A' output
t t off show
h ip
i
BDR
ospf neighbor that it does not show a DR,
because RouterA is the actual DR on this
network.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 57
More OSPF Configuration
Redistrib ting an OSPF Defa
Redistributing Default
lt Ro
Route
te
ƒ Topology includes a link to ISP
–Router
R t connected t d to
t ISP
ƒCalled an autonomous system border router In this topology, the
Loopback1 (Lo1) simulate
ƒUsed
Used to propagate a default route the connection to another
router.
–Example of static default route
R1(config)#ip route 0.0.0.0 0.0.0.0 loopback 1

–Requires the use of the default-information originate


command
–Example of default-information originate command
R1(config-router)#default-information originate

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 58
Redistributing an OSPF Default Route

The default route in R2 and R3 with the routing


source OSPF, but with the additional code, E2. For
R2, the route is:

O*E2 0.0.0.0/0 [110/1] via 192.168.10.10, 00:05:34,


Serial0/0/1

E2 denotes that this route is an OSPF External


Type 2 route. the cost of an E2 route is always the
external cost, irrespective of the interior cost to
reach that route. (CCNP)

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 59
More OSPF Configuration
Fine-Tuning OSPF
ƒ Since link speeds are getting
faster it may be necessary to
change reference
f bandwidth
values
–Do
Do this using the auto-cost
auto cost
reference-bandwidth command
–Example:
ƒ R1(config-router)#auto-cost
reference-bandwidth 10000

•the default value is equivalent to 100. To


increase it to 10GigE
g speeds,
p , yyou would need
to change the reference bandwidth to 10000.
•Again, make sure you configure this command
on all routers in the OSPF routing domain.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 60
More OSPF Configuration
Fine-Tuning OSPF
ƒ R1(config-router)#auto-
cost reference-bandwidth
10000

•the default value is equivalent to 100. To


increase it to 10GigE speeds
speeds, you would need
to change the reference bandwidth to 10000.

R1 Before, the cost to 10.10.10.0/24 is 1172.


Aft configuring
After fi i a new reference
f b
bandwidth,
d idth
the cost for the same route is now 117287.

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 61
More OSPF Configuration

Fine-Tuning OSPF
ƒ Modifying OSPF timers
–Reason to modify timers
ƒFaster detection of network failures
–Manually modifying Hello & Dead intervals
ƒRouter(config-if)#ip ospf hello-interval seconds
ƒRouter(config-if)#ip
R t ( fi if)#i ospff dead-interval
d di t l seconds
d
–Point to be made
ƒHello & Dead intervals must be the same between
neighbors

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 62
The End

ƒ Questions?

What will be the result of the DR and BDR elections for this single area
OSPF network? (Choose three.) *. Decision process:
1. Which segment will have election?
HQ will
ill be
b DR for
f 10.4.0.0/16.
10 4 0 0/16
2. Priority?
Router A will be DR for 10.4.0.0/16. 3. Router ID (each router will only has 1
HQ will be BDR for 10.4.0.0/16.
10 4 0 0/16 ID)?
1. Set using “router-ID” command
Router A will be DR for 10.5.0.0/16.
2. Highest Loopback IP address?
Remote will be DR for 10.5.0.0/16.
10 5 0 0/16
3. Highest physical IP address
Remote will be BDR for 10.5.0.0/16. (include serial interface)?
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 63
The End

ƒ Questions?

The routers in the diagram are configured as shown.


shown The loopback interface on
router R1 is labeled as lo0. All OSPF priorities are set to the default except for
Ethernet0 of router R2, which has an OSPF priority of 2. What will be the result of
the OSPF DR/BDR elections on the 192.1.1.0 network? (Choose two.)

*. Decision process:
R1 will be the DR
1
1. Which segment will have election?
R1 will be the BDR
2. Priority?
R2 will be the DR
3. Router ID (each router will only has 1 ID)?
R2 will be the BDR 1. Set using “router-ID” command
R3 will be the DR 2. Highest Loopback IP address?
R3 will be the BDR 3. Highest physical IP address (include
serial interface)?
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 64
ƒ Questions?

*. Decision process:
1
1. Which segment will have election?
2. Priority?
3. Router ID (each router will only has 1 ID)?
1. Set using “router-ID” command
2. Highest Loopback IP address?
3. Highest physical IP address (include serial
interface)?
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 65
ƒ Questions?
Answer?????

*. Decision process:
1. Which segment will have election?
2
2. Priority?
i i ?
3. Router ID (each router will only has 1 ID)?
1. Set using “router-ID”
router ID command
2. Highest Loopback IP address?
3. Highest physical IP address (include
serial
i l interface)?
i f )?

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 66
ƒ Questions?
Answer?????
ƒ HQ will be DR for
10.4.0.0/16
ƒ Router A will be DR for
10.4.0.0/16.
ƒ HQ will
ill b
be BDR ffor
10.4.0.0/16. *. Decision process:
ƒ Router A will be DR for 1
1. Which segment will have election?
10.5.0.0/16 2. Priority?
ƒ Remote will be DR for 3. Router ID (each router will only has 1 ID)?
10.5.0.0/16. 1. Set using “router-ID” command
ƒ Remote will be BDR for 2. Highest Loopback IP address?
10 5 0 0/16
10.5.0.0/16 3. Highest physical IP address (include
serial interface)?
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 67
Summary
ƒ RFC 2328 describes OSPF link state concepts and
operations
ƒ OSPF Characteristics
–A commonly deployed link state routing protocol
–Employs DRs & BDRs on multi-access networks
ƒDRs & BDRs are elected
ƒDR & BDRs are used to transmit and receive LSAs
–Uses
Uses 5 packet types:
1: HELLO
2: DATABASE DESCRIPTION
3: LINK STATE REQUEST
4: LINK STATE UPDATE
5: LINK STATE ACKNOWLEDGEMENT

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 68
Summary

ƒ OSPF Characteristics
–Metric = cost
ƒLowest cost = best path

ƒ Configuration
–Enable
E bl OSPF on a router
t using
i the
th following
f ll i command
d
ƒR1(config)#router ospf process-id
–use
use the network command to define which interfaces will
participate in a given OSPF process
ƒR1(config-router)#network network-address
wildcard-mask area area-id

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 69
Summary

ƒ Verifying OSPF configuration


–Use the following commands
ƒshow ip protocol
ƒshow ip route
ƒshow
h iip ospff iinterface
t f
ƒshow ip ospf neighbor

© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 70