Beruflich Dokumente
Kultur Dokumente
© 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
© 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
© 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.
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 29
Management Ports
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
Routers determine the best path
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 42
Configure Devices and Apply Addresses
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 43
Configure Devices and Apply Addresses
R1(config)#banner motd #
Enter TEXT message. End with the character '#'.
******************************************
WARNING!! Unauthorized Access Prohibited!!
******************************************
#
© 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.)
( )
© 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
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.
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 63
Routing Table Structure
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 64
Routing Table Structure
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 65
Routing Table Structure
© 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
© 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
© 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
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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 99
Static Routing
© 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
© 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
© 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
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
© 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.
© 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.
© 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.
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 19
Interfaces
Step 1 Step 3
Step 2 Step 4
© 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
© 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.
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
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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 27
Routing Table and CDP Protocol
© 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:
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Static Routes
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
Static Routes
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 38
Static Routes
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 46
Static route operation
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 51
Example: Calculating a summary route
Answer:
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 52
Example: Calculating a summary route
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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 54
Summary Route
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 55
Default Route
© 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
© 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
© 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
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 12
Classifying Routing Protocols
© 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.
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 22
Routing Protocols Metrics
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 23
Routing Protocols Metrics
© 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
© 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.
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 32
Administrative Distance of a Route
© 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
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 15
Routing Table Maintenance
© 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.
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Routing Loops
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Routing Loops
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Preventing loops with poison reverse
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 43
Summary
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 44
RIP version 1
© 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 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.
© 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
© 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
© 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
© 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
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
© 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,
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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Summary: Commands used by RIP
Command Command’s purpose
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
© 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
© 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)
Answer:
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
Example: Calculating a summary route
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 30
Designing VLSM Addressing 6.4.2
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 33
Basic Route Summarization 6.4.4
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 34
Challenge Route Summarization 6.4.5
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
RIPv2
© 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
© 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
© 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
© 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
Version 1 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
VLSM & CIDR
© 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
© 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.
© 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
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
© 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.
© 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.
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 37
Routing Behavior
© 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)
....
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 3
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.
© 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
© 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
-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
© 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.
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 24
Basic EIGRP Configuration
© 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:
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.
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 41
EIGRP Metric Calculation
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 42
DUAL Concepts
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 50
DUAL Concepts
© 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
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 66
More EIGRP Configurations
© 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
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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 70
Summary
© 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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 1
Objectives
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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 4
Link-State Routing
© 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
© 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.
© 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
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
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
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 25
Summary
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 28
OSPF (Single Area OSPF)
© 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
© 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
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
© 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.
© 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.
© 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.
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
© 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.)
© 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)
© 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 58
Redistributing an OSPF Default Route
© 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
© 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?
*. 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
© 2010 Cisco Systems, Inc. All rights reserved. Institut Tadbiran Awam Negara 70