You are on page 1of 119

CCNA

www.saigonlab.vn

Bringing a True-long Stand Vocation

Module 4: Router and Routing


www.saigonlab.vn

Cisco IOS

Configuring a Router

Routing Protocol

Distance Vector Routing

LS & Balanced Hybrid Routing

RIP

EIGRP

OSPF

Bringing a True-long Stand Vocation

Lesson 1: Cisco IOS


www.saigonlab.vn

Stages of the Router Power-On/Boot Up Sequence


Internal Router Components
How a Cisco Device Locates and Loads Cisco IOS
and Configuration Files
Configuration Register

Bringing a True-long Stand Vocation

Lesson 1: Cisco IOS


www.saigonlab.vn

Router Power-On Bootup Sequence

Perform power-on self test (POST)


Load and run bootstrap code
Find the Cisco IOS software
Load the Cisco IOS software
Find the configuration
Load the configuration
Run the configured Cisco IOS software

Bringing a True-long Stand Vocation

Lesson 1: Cisco IOS


www.saigonlab.vn

Router Internal Components


Bringing a True-long Stand Vocation

Lesson 1: Cisco IOS


www.saigonlab.vn

ROM Functions

Contains microcode for basic functions


Bringing a True-long Stand Vocation

Lesson 1: Cisco IOS


www.saigonlab.vn

Finding the Cisco IOS Image

Bringing a True-long Stand Vocation

Lesson 1: Cisco IOS


www.saigonlab.vn

Loading the Cisco IOS Image from Flash Memory

The flash memory file is decompressed into RAM


Bringing a True-long Stand Vocation

Lesson 1: Cisco IOS


www.saigonlab.vn

Loading the Configuration

Load and execute the configuration from NVRAM


If no configuration is present in NVRAM, enter
setup mode
Bringing a True-long Stand Vocation

Lesson 1: Cisco IOS


www.saigonlab.vn

Determining the Current Configuration Register


Value

Configuration register value in show version command


Bringing a True-long Stand Vocation

10

Lesson 1: Cisco IOS


www.saigonlab.vn

Configuration Register Values

Check the configuration register value with the


show version command
Bringing a True-long Stand Vocation

11

Lesson 1: Cisco IOS


www.saigonlab.vn

show version Command

Bringing a True-long Stand Vocation

12

Lesson 1: Cisco IOS


www.saigonlab.vn

show flash Command

Bringing a True-long Stand Vocation

13

Lesson 1: Cisco IOS


www.saigonlab.vn

show running-config and show startupconfig Commands

Displays the current and saved


configuration
Bringing a True-long Stand Vocation

14

Lesson 2: Configuring a Router


www.saigonlab.vn

Router Configuration Modes


Configuring a Router from the Command
Line
Configuring Router Interfaces
Configuring the Router IP Address
Verifying the Interface Configuration

Bringing a True-long Stand Vocation

15

Lesson 2: Configuring a Router


www.saigonlab.vn

Initial Startup of the Cisco Router


System startup routines initiate router software
Router falls back to startup alternatives if needed

Bringing a True-long Stand Vocation

16

Lesson 2: Configuring a Router


www.saigonlab.vn

Bootup Output from the Router

Unconfigured vs. Configured Router


Bringing a True-long Stand Vocation

17

Lesson 2: Configuring a Router


www.saigonlab.vn

Router Modes
User EXEC Mode

Router>enable

Privilrged EXEC Mode

Router#configure terminal

Global Configuration Mode

Router(config)#

Prompt

Configuration Mode
Interface
Subinterface

Router(config-if)#
Router(config-subif)#

Controller

Router(config-controller)#

Line

Router(config-line)#

Router

Router(config-router)#

Bringing a True-long Stand Vocation

18

Ctrl-z (end)

Lesson 2: Configuring a Router


www.saigonlab.vn

Router User-Mode Command List

You can abbreviate a command to the


fewest characters that make a unique
character string

Bringing a True-long Stand Vocation

19

Lesson 2: Configuring a Router


www.saigonlab.vn

Router Privileged-Mode Command List

You can complete a command string by


entering the unique character string, then
pressing the Tab key
Bringing a True-long Stand Vocation

20

Lesson 2: Configuring a Router


www.saigonlab.vn

Router Context-Sensitive Help


Router# clok
Translating CLOK
% Unknown command or computer name, or unable to find computer address
Router# cl ?
Clear clock
Router# clock
% Incomplete command.
Router# clock ?
Set Set the time and date
Router# clock set
% Incomplete command.
Router# <Ctrl clock set ?
hh:mm:ss Current Time

Bringing a True-long Stand Vocation

21

Lesson 2: Configuring a Router


www.saigonlab.vn

Router Context-Sensitive Help (Cont.)


Router# clock set 19:56:00
% Incomplete command.
Router# clock set 19:56:00 ?
<1-31>
Day of month
MONTH

Month of the year

Router# clock set 19:56:00 ? 04 8


^
% Invalid input detected at the ^ marker
Router# clock set 19:56:00 ? 04 August
% Incomplete command.
Router# clock set 19:56:00 ? 04 August ?
<1993-2035>

Year

Bringing a True-long Stand Vocation

22

Lesson 2: Configuring a Router


www.saigonlab.vn

Enhanced Editing Commands


Router?$ value for customers, employees, and partners.

(Automatic scrolling of long lines)


Ctrl-A

Move to the beginning of the command line.

Ctrl-E

Move to the end of the command line.

Esc-B

Move back one word.

Esc-F

Move forward one word.

Ctrl-B

Move back one character.

Ctrl-F

Move forward one character.

Ctrl-D

Delete a single character.

Bringing a True-long Stand Vocation

23

Lesson 2: Configuring a Router


www.saigonlab.vn

Configuring Router Identification


Router Name
Router (config)#hostname wg_ro_c
wg_ro_s(config)#

Message-of-the_Day Banner
wg_ro_c(config)#banner motd #
Enter TEXT message. End with the
character #. You have entered a
secured system. Authorized access
only ! #

Interface Description
wg_ro_c (config)#interface ethernet 0

wg_ro_c(config-if)#description Engineering LAN, Bldg. 18

Sets the local identity or message for the


accessed router or interface
Bringing a True-long Stand Vocation

24

Lesson 2: Configuring a Router


www.saigonlab.vn

Configuring a Router Password


Console Password
Router(config)#line console 0

Router(config-line)#login
Router(config-line)#password cisco

Virtual Terminal Password


Router(config)#line vty 0 4

Router(config-line)#login
Router(config-line)#password sanjose

Enable Password
Router(config)#enable password cisco

Secret Password
Router(config)#enable secret sanfran

Service Password-Encryption Commands


Router(config)#service password encryption

Router(config-line)#no service password-encryption


Bringing a True-long Stand Vocation

25

Lesson 2: Configuring a Router


www.saigonlab.vn

Configuring an Interface
Router(config)#interface type number
Router(config-if)#
type includes serial, ethernet, token ring, fddi, hssi,
loopback, dialer, null, async, atm, bri, tunnel, and so on
number is used to identify individual interfaces
Router(config)#interface type slot/port
Router(config-if)#
For modular routers, selects an interface
Router(config-if)#exit
Quits from current interface configuration mode
Bringing a True-long Stand Vocation

26

Lesson 2: Configuring a Router


www.saigonlab.vn

Configuring a Serial Interface


Enter Global
Configuration
Mode
Specify
Interface
Set Clock Rate
(on DCE
interfaces only)
Set
Bandwidth
(recommen
ded)

Router#configure terminal
Router(config)#
Router(config)#interface serial 0/0
Router(config-if)#
Router(config-if)#clock rate 64000
Router(config-if)#
Router(config-if)#bandwidth 64
Router(config-if)#exit
Router(config)#exit
Router#

Bringing a True-long Stand Vocation

27

Lesson 2: Configuring a Router


www.saigonlab.vn

Disabling or Enabling an Interface

#configure terminal
(config)#interface serial 0
(config-if)#shutdown
-5-CHANGED: Interface Serial0, changed state to administratively down
PROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down

Administratively turns off an interface

ter#configure terminal
ter(config)#interface serial 0
ter(config-if)#no shutdown
NK-3-UPDOWN: Interface Seria0, changed state to up
NEPROTO-5-UPDOWN: Line Protocol on Interface Serial0, changed state to up

Enables an interface that is administratively


shut down
Bringing a True-long Stand Vocation

28

Lesson 2: Configuring a Router


www.saigonlab.vn

Configuring IP Addresses
Unique addressing allows communication
between end stations
Path choice is based on destination address

10.13.0.0
10.13.0.0

Router#configure terminal
Router(config)#interface serial slot/port
Router(config-if)#ip address <ip address> <netmask>
Bringing a True-long Stand Vocation

29

Lesson 2: Configuring a Router


www.saigonlab.vn

Saving Configurations
wg_ro_c#
wg_ro_c# copy running-config startup-config
Destination filename [startup-config]?
Building configuration.
wg_ro_c#
Copies the current configuration to NVRAM

Bringing a True-long Stand Vocation

30

Lesson 2: Configuring a Router


www.saigonlab.vn

Interpreting the Interface Status


Router#show interface serial 0/1

Hardware is HD64570
Description : 64kbline to San Jose
Carrier Detect

Keepalives

Operational...Serial0/1 is up, line protocol is up


Connection problem.. Serial0/1 is up, line protocol is up
Interface problem.Serial0/1 is up, line protocol is down
Disabled. Serial0/1 is administratively down, line
protocol is down

Bringing a True-long Stand Vocation

31

Lesson 2: Configuring a Router


www.saigonlab.vn

Serial Interface show controller Command


Router#show controller serial 0/0
HD unit 0, idl = 0x121C04, driver structure at 0x127078
buffer size 1524 HD unit 0, V.35 DTE cable
.
.
.

Shows the cable type of serial cables

Bringing a True-long Stand Vocation

32

Lesson 2: Configuring a Router


www.saigonlab.vn

Cisco Discovery Protocol

CDP is a proprietary utility that gives you a summary


of directly connected switches, routers, and other
Cisco devices.
CDP discovers neighboring devices regardless of
which protocol suite they are running.
Bringing a True-long Stand Vocation

33

Lesson 2: Configuring a Router


www.saigonlab.vn

CDP runs on routers with Cisco IOS


software Release 10.3 or later and on
Cisco switches and hubs.
Summary information
includes:

Device identifiers
Address list
Port identifier
Capabilities list
Platform
Bringing a True-long Stand Vocation

34

Lesson 2: Configuring a Router


www.saigonlab.vn

Using CDP

Bringing a True-long Stand Vocation

35

Lesson 3: Routing Protocol


www.saigonlab.vn

Routing Overview
Static and Dynamic Route Comparison
Static Route Configuration
Default Route Forwarding Configuration
Static Route Configuration Verification
The ip classless Command

Bringing a True-long Stand Vocation

36

Lesson 3: Routing Protocol


www.saigonlab.vn

Router Operations

To route, a router needs to do the following:


Know the destination address
Identify the sources from which the router can learn
Discover possible routes to the intended destination
Select the best route
Maintain and verify routing information
Bringing a True-long Stand Vocation

37

Lesson 3: Routing Protocol


www.saigonlab.vn

Router Operations (Cont.)

Routers must learn destinations that are


not directly connected
Bringing a True-long Stand Vocation

38

Lesson 3: Routing Protocol


www.saigonlab.vn

Identifying Static and Dynamic Routes


Dynamic Route
Uses a route that
a network routing
protocol adjusts
automatically for
topology or traffic
changes

Static Route
Uses a route that
a network
administrator
enters into the
router manually

Bringing a True-long Stand Vocation

39

Lesson 3: Routing Protocol


www.saigonlab.vn

Static Routes

Configure unidirectional static routes to and from a


stub network to allow communications to occur
Bringing a True-long Stand Vocation

40

Lesson 3: Routing Protocol


www.saigonlab.vn

Static Route Configuration


Router(config)#ip route network [mask]
{address | interface}[distance] [permanent]

Defines a path to an IP destination network or


subnet or host

Bringing a True-long Stand Vocation

41

Lesson 3: Routing Protocol


www.saigonlab.vn

Static Route Example

This is a unidirectional route. You must have a


route configured in the opposite direction
Bringing a True-long Stand Vocation

42

Lesson 3: Routing Protocol


www.saigonlab.vn

Default Routes

Router(config)# ip route

This route allows the stub network to reach all


known networks beyond Router A
Bringing a True-long Stand Vocation

43

Lesson 3: Routing Protocol


www.saigonlab.vn

Verifying the Static Route Configuration


Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
C
S*

10.0.0.0/8 is subnetted, 1 subnets


10.1.1.0 is directly connected, Serial0
0.0.0.0/0 is directly connected, Serial0

Bringing a True-long Stand Vocation

44

Lesson 3: Routing Protocol


www.saigonlab.vn

What Is a Routing Protocol?


Routing protocols are used between routers to
determine paths and maintain routing tables.
After the path is determined, a router can route a
routed protocol.

Routed Protocol: IP
Routing Protocol: RIP,IGRP
Bringing a True-long Stand Vocation

45

Lesson 3: Routing Protocol


www.saigonlab.vn

Autonomous Systems: Interior or Exterior


Routing Protocols

An autonomous system is a collection of


networks under a common administrative domain
IGPs operate within an autonomous system
EGPs connect different autonomous systems
Bringing a True-long Stand Vocation

46

Lesson 3: Routing Protocol


www.saigonlab.vn

Classes of Routing Protocols

Bringing a True-long Stand Vocation

47

Lesson 3: Routing Protocol


www.saigonlab.vn

Administrative Distance: Ranking Routes


I need to send a packet to
Network E. Router B and C
will each get it there.Which
route is best?

RIP
Administrative
Distance=120

Bringing a True-long Stand Vocation

48

Lesson 3: Routing Protocol


www.saigonlab.vn

Classful Routing Overview


Classful routing protocols do not include the subnet
mask with the route advertisement.
Within the same network, consistency of the subnet
masks is assumed.
Summary routes are exchanged between foreign
networks.
These are examples of classful routing protocols:
RIP version 1 (RIPv1)
IGRP

Bringing a True-long Stand Vocation

49

Lesson 3: Routing Protocol


www.saigonlab.vn

Classless Routing Overview


Classless routing protocols include the subnet
mask with the route advertisement.
Classless routing protocols support variable-length
subnet mask (VLSM).
Summary routes can be manually controlled within
the network.
These are examples of classless routing protocols:
RIP version 2 (RIPv2)
EIGRP
OSPF
IS-IS
Bringing a True-long Stand Vocation

50

Lesson 3: Routing Protocol


www.saigonlab.vn

Routing Protocol Comparison Chart


Characteristic

RIPv1

RIPv2 IGRP EIGRP*

IS-IS OSPF

Distance vector
Link state
Automatic route summarition
Manual route summarition
VLSM support
Proprietary
Convergence time

Show

Show

Show

Very
Fast

Fast

Fast

* EIRP is an advanced distance vector protocol with some link features


Bringing a True-long Stand Vocation

51

Lesson 3: Routing Protocol


www.saigonlab.vn

Using the ip classless Command


172.16.3.0

10.2.2.0
Router(config)# ip route
Router(config)# ip classless
Bringing a True-long Stand Vocation

52

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Distance Vector Route Selection


Routing Information Maintenance
Routing Inconsistencies with Distance
Vector Routing Protocols
Count to Infinity Prevention
Techniques to Eliminate Routing Loops
Implementation of Techniques to Eliminate
Routing Loops
Bringing a True-long Stand Vocation

53

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Distance Vector Routing Protocols

Routers pass periodic copies of their routing


table to neighboring routers and accumulate
distance vectors

Bringing a True-long Stand Vocation

54

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Sources of Information and Discovering Routes

Routers discover the best path to destinations from each


neighbor
Bringing a True-long Stand Vocation

55

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Selecting the Best Route with Metrics

Bringing a True-long Stand Vocation

56

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Maintaining Routing Information

Updates proceed step by step from router to router

Bringing a True-long Stand Vocation

57

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Inconsistent Routing Entries

Each node maintains the distance from


itself to each possible destination network
Bringing a True-long Stand Vocation

58

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Inconsistent Routing Entries (Cont.)

Slow convergence produces inconsistent routing


Bringing a True-long Stand Vocation

59

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Inconsistent Routing Entries (Cont.)

Router C concludes that the best path to network


10.4.0.0 is through Router B
Bringing a True-long Stand Vocation

60

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Inconsistent Routing Entries (Cont.)

Router A updates its table to reflect the new but


erroneous hop count
Bringing a True-long Stand Vocation

61

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Routing Loops

Packets for network 10.4.0.0 bounce (loop)


between Routers B and C
Bringing a True-long Stand Vocation

62

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Count to Infinity

The hop count for network 10.4.0.0 counts to


infinity
Bringing a True-long Stand Vocation

63

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Defining a Maximum

A limit is set on the number of hops to prevent


infinite loops
Bringing a True-long Stand Vocation

64

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Split Horizon

It is never useful to send information about a


route back in the direction from which the original
information came

Bringing a True-long Stand Vocation

65

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Route Poisoning

Routers advertise the distance of routes that have


gone down to infinity
Bringing a True-long Stand Vocation

66

Lesson 4: Distance Vector Routing


www.saigonlab.vn

Poison Reverse

Poison reverse overrides split horizon


Bringing a True-long Stand Vocation

67

Lesson 4: Distance Vector


Routing

www.saigonlab.vn

Holddown Timers

The router keeps an entry for the possibly down


state in the network, allowing time for other
routers to recompute for this topology change
Bringing a True-long Stand Vocation

68

Lesson 4: Distance Vector


Routing
www.saigonlab.vn

Triggered Updates

The router sends updates when a change in its routing


table occurs
Bringing a True-long Stand Vocation

69

Lesson 5: Link-State and Balanced


Hybrid Routing
www.saigonlab.vn

How Routing Information Is Maintained with Link State


Link-State Routing Protocol Algorithms
Benefits and Limitations of Link-State Routing
When to Use Link-State Routing Protocols
Balanced Hybrid Routing

Bringing a True-long Stand Vocation

70

Lesson 5: Link-State and Balanced Hybrid


Routing
www.saigonlab.vn

Link-State Routing Protocols

Topological
database

Link-State Packets

SPF
Algorithm
Shortest Path First Tree

After initial flood of LSAs, link-state routers pass


small event-triggered link-state updates to all
other routers
Bringing a True-long Stand Vocation

71

Lesson 5: Link-State and Balanced Hybrid


Routing
www.saigonlab.vn

Link-State Network Hierarchy Example

Minimizes routing table entries


Localizes impact of a topology change within an area
Bringing a True-long Stand Vocation

72

Lesson 5: Link-State and Balanced


Hybrid Routing
www.saigonlab.vn

Link-State Routing Protocol Algorithms

Bringing a True-long Stand Vocation

73

Lesson 5: Link-State and Balanced


Hybrid Routing
www.saigonlab.vn

Benefits of Link-State Routing


Fast convergence:
Changes are reported immediately by the
affected source.
Robustness against routing loops:
Routers know the topology.
Link-state packets are sequenced and
acknowledged.
Through careful (hierarchical) network design,
resources can be optimized.

Bringing a True-long Stand Vocation

74

Lesson 5: Link-State and Balanced


Hybrid Routing
www.saigonlab.vn

Caveats to Link-State Routing


Significant demands for resources:
Memory (three tables: adjacency, topology, forwarding).
CPU (Dijkstras algorithm can be intensive, especially
when many instabilities are present).
Requires very strict network design.
Problems with partitioning of areas.
Configuration generally simple, but can be complex when
tuning various parameters and when design is complex.
Troubleshooting easier than in distance vector routing.

Bringing a True-long Stand Vocation

75

Lesson 5: Link-State and Balanced Hybrid


Routing
www.saigonlab.vn

Balanced Hybrid Routing

Shares attributes of both distance vector


and link-state routing
Bringing a True-long Stand Vocation

76

Lesson 6: RIP
www.saigonlab.vn

RIP Features
RIPv1 and RIPv2 Comparison
Dynamic Routing Configuration Tasks
Dynamic Routing Configuration
RIP Configuration
RIP Configuration Verification
RIP Configuration Troubleshooting

Bringing a True-long Stand Vocation

77

Lesson 6: RIP
www.saigonlab.vn

RIP

Maximum is six paths (default = 4)


Hop-count metric selects the path
Routes update every 30 seconds
Bringing a True-long Stand Vocation

78

Lesson 6: RIP
www.saigonlab.vn

RIPv1 and RIPv2 Comparison


RIPv1

RIPv2

Classful

Classless

Supports variable-length subnet


mask?

No

Yes

Sends the subnet mask along with the


routing update?

No

Yes

Broadcast

Multicast

RFC 1058

RFCs 1721,
1722, and
2453

No

Yes

No

Yes

Routing protocol

Addressing type
Defined in
Supports manual route
summarization?

Authentication support?
Bringing a True-long Stand Vocation

79

Lesson 6: RIP
www.saigonlab.vn

IP Routing Configuration Tasks

Select routing protocols


Specify networks or interfaces
Bringing a True-long Stand Vocation

80

Lesson 6: RIP
www.saigonlab.vn

Dynamic Routing Configuration


Router(config)#router protocol [keyword]
Defines an IP routing protocol
Router(config-router)#network network-number
Mandatory configuration command for each
IP routing process
Identifies the physically connected network to
which routing updates are forwarded
Bringing a True-long Stand Vocation

81

Lesson 6: RIP
www.saigonlab.vn

RIP Configuration
Router(config)#router rip
Starts the RIP routing process
Router(config-router)#network network-number

Selects participating attached networks


Requires a major classful network number
Bringing a True-long Stand Vocation

82

Lesson 6: RIP
www.saigonlab.vn

RIP Configuration Example

Bringing a True-long Stand Vocation

83

Lesson 6: RIP
www.saigonlab.vn

Verifying the RIP Configuration

RouterA# show ip protocols


Routing Protocol is rip
Sending updates every 30 seconds, next due in 12 seconds
Invalid after 180 seconds, hold down 180,flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Default version control: send version 1, receive every any version
Interface
Send
Recv
Triggered
RIP
Ethernet0
1
1
2
Serial2
1
1
2
Routing for Networks:
10.0.0.0
172.16.0.0
Routing Information Sources:
Gateway Distance
(this router)
120
10.1.1.2 120

Last Update
02:12:15
01:09:01

Distance : (default is 120)

Bringing a True-long Stand Vocation

84

Key-chain

Lesson 6: RIP
www.saigonlab.vn

Displaying the IP Routing Table

Bringing a True-long Stand Vocation

85

Lesson 6: RIP
www.saigonlab.vn

debug ip rip Command

Bringing a True-long Stand Vocation

86

Lesson 7: EIGRP
www.saigonlab.vn

EIGRP Features
EIGRP and IGRP Comparison
EIGRP Configuration
EIGRP Configuration Verification
EIGRP Configuration Troubleshooting

Bringing a True-long Stand Vocation

87

Lesson 7: EIGRP
www.saigonlab.vn

EIGRP

Rapid convergence
Reduced bandwidth usage
Multiple network-layer protocols
Bringing a True-long Stand Vocation

88

Lesson 7: EIGRP
www.saigonlab.vn

EIGRP 2446

IGRP 2446
192.168.1.0/24

RTA
10.1.1.0/24

RTC

RT
B
RTD

172.16.1.0/24

EIGRP and IGRP automatically redistribute routes


between autonomous systems with same
autonomous system (AS) number.
IGRP has a maximum hop count of 255. EIGRP
has a maximum hop count limit of 224.
Bringing a True-long Stand Vocation

89

Lesson 7: EIGRP
www.saigonlab.vn

EIGRP Terminology
Neighbor Table-AppletTalk
Neighbor Table-IPX
Neighbor Table-IPv6
Neighbor Table-IPv4

Next-Hop
Router

Interface

Bringing a True-long Stand Vocation

90

Lesson 7: EIGRP
www.saigonlab.vn

Successors and Feasible successor


I have a route
to Z, with a
metric of 5

RTB is successor to Net


Z

RTB
RT
A
Network Z

Bringing a True-long Stand Vocation

91

Lesson 7: EIGRP
www.saigonlab.vn

Successors and Feasible successor


I have a
route to Z,
with a metric
of 5

I have a route
to Z, with a
metric of 5

RTB is successor to Net


Z
RTC is successor to Net
Z

RTB
RT
A
Network Z

Bringing a True-long Stand Vocation

RTC

92

Lesson 7: EIGRP
www.saigonlab.vn

I have a
route to Z,
with a metric
of 5

I have a route
to Z, with a
metric of 5

RTB is successor to Net


Z
RTC is successor to Net
Z
RTX is feasible
successor to Net Z

RTB
RT
A
Network Z

RTC
RT
X
I have a route
to Z, with a
metric of 6

RTY

Bringing a True-long Stand Vocation

93

Lesson 7: EIGRP
www.saigonlab.vn

Diffusing Update Algorithm (DUAL) is EIGRP's


route-calculation engine.
Finite-state machine

Tracks all routes advertised by neighbors


Select loop-free path using a successor
and remember any feasible successors
If successor lost, use feasible successor
If no feasible successor, query neighbors
and recomputed new successor
Bringing a True-long Stand Vocation

94

Lesson 7: EIGRP
www.saigonlab.vn

DUAL Discovery Route


A

Neighbor TableIP
Router B information
Router C information

C
DUAL
?

Routing Table
IP

Topology TableIP

Successor (primary route)

Router B information
Router C information
Successor (primary
route)
Feasible successor

Bringing a True-long Stand Vocation

95

Lesson 7: EIGRP
www.saigonlab.vn

Configuring EIGRP
Router(config)#router eigrp autonomous-system

Defines EIGRP as the IP routing protocol


Router(config-router)#network network-number

Selects participating attached networks


Bringing a True-long Stand Vocation

96

Lesson 7: EIGRP
www.saigonlab.vn

EIGRP Configuration Example

Bringing a True-long Stand Vocation

97

Lesson 7: EIGRP
www.saigonlab.vn

Verifying the EIGRP Configuration


Displays current EIGRP entries in the routing table
Router#show ip route eigrp
Displays the parameters and current state of the
active process
Router#show ip protocols
Displays information about interfaces configured
for EIGRP
Router#show ip eigrp interfaces
Bringing a True-long Stand Vocation

98

Lesson 7: EIGRP
www.saigonlab.vn

Verifying the EIGRP Configuration (Cont.)


Router#show ip eigrp neighbors
Displays the neighbors discovered by IP EIGRP
Router#show ip eigrp neighbors detail
IP-EIGRPneighborsforprocess101
HAddressInterfaceHoldUptimeSRTTRTOQ
SeqTye
(sec)(ms)Cnt
Num
31.1.1.3Et0/01200:04:4818325000014
Version12.2/1.2,Retrans:0,Retries:0
Restarttime00:01:05
010.4.9.5Fa0/01100:04:07768460804
S
Version12.2/1.2,Retrans:0,Retries:0
210.4.9.10Fa0/0131w0d1300006
S
Version12.2/1.2,Retrans:1,Retries:0
110.4.9.6Fa0/0121w0d1300004
S
Version12.2/1.2,Retrans:1,Retries:0

Bringing a True-long Stand Vocation

99

Lesson 7: EIGRP
www.saigonlab.vn

Verifying the EIGRP Configuration (Cont.)


Router#show ip eigrp topology
Displays the IP EIGRP topology table
Router# show ip eigrp topology
IP-EIGRPTopologyTableforprocess77
Codes:P-Passive,A-Active,U-Update,Q-Query,R-
Reply,
r-Replystatus
P172.16.90.0255.255.255.0,2successors,FDis0
via172.16.80.28(46251776/46226176),Ethernet0
via172.16.81.28(46251776/46226176),Ethernet1
via172.16.80.31(46277376/46251776),Serial0
P172.16.81.0255.255.255.0,1successors,FDis307200
viaConnected,Ethernet1
via172.16.81.28(307200/281600),Ethernet1
via172.16.80.28(307200/281600),Ethernet0
via172.16.80.31(332800/307200),Serial0

Bringing a True-long Stand Vocation

100

Lesson 7: EIGRP
www.saigonlab.vn

debug ip eigrp Command


Router# debug ip eigrp
IP-EIGRP: Processing incoming UPDATE packet
IP-EIGRP: Ext 192.168.3.0 255.255.255.0 M 386560 - 256000 130560 SM
360960 - 256000 104960
IP-EIGRP: Ext 192.168.0.0 255.255.255.0 M 386560 - 256000 130560 SM
360960 - 256000 104960
IP-EIGRP: Ext 192.168.3.0 255.255.255.0 M 386560 - 256000 130560 SM
360960 - 256000 104960
IP-EIGRP: 172.69.43.0 255.255.255.0, - do advertise out Ethernet0/1
IP-EIGRP: Ext 172.69.43.0 255.255.255.0 metric 371200 - 256000 115200
IP-EIGRP: 192.135.246.0 255.255.255.0, - do advertise out Ethernet0/1
IP-EIGRP: Ext 192.135.246.0 255.255.255.0 metric 46310656 - 45714176
596480
IP-EIGRP: 172.69.40.0 255.255.255.0, - do advertise out Ethernet0/1
IP-EIGRP: Ext 172.69.40.0 255.255.255.0 metric 2272256 - 1657856 614400
IP-EIGRP: 192.135.245.0 255.255.255.0, - do advertise out Ethernet0/1
IP-EIGRP: Ext 192.135.245.0 255.255.255.0 metric 40622080 - 40000000
622080
IP-EIGRP: 192.135.244.0 255.255.255.0, - do advertise out Ethernet0/1
Bringing a True-long Stand Vocation

101

Lesson 8: OSPF
www.saigonlab.vn

OSPF Features
OSPF and Distance Vector Routing
Protocol Comparison
Hierarchical Routing
Shortest Path First Algorithm
Single-Area OSPF Configuration
Loopback Interfaces
OSPF Configuration Verification
OSPF Configuration Troubleshooting
Bringing a True-long Stand Vocation

102

Lesson 8: OSPF
www.saigonlab.vn

OSPF

Open standard
Shortest path first (SPF) algorithm
Link-state routing protocol (vs. distance vector)
Bringing a True-long Stand Vocation

103

Lesson 8: OSPF
www.saigonlab.vn

OSPF Terminology

Bringing a True-long Stand Vocation

104

Lesson 8: OSPF
www.saigonlab.vn

OSPF as a Link-State Protocol


OSPF propagates link-state advertisements
rather than routing table updates.
Link = router interface
State = description of an interface and its
relationship to neighboring routers
LSAs are flooded to all OSPF routers in the area
The OSPF link-state database is pieced together
from the LSAs generated by the OSPF routers
OSPF uses the SPF algorithm to calculate the
shortest path to a destination
Bringing a True-long Stand Vocation

105

Lesson 8: OSPF
www.saigonlab.vn

OSPF Hierarchical Routing

Consists of areas and autonomous systems


Minimizes routing update traffic
Bringing a True-long Stand Vocation

106

Lesson 8: OSPF
www.saigonlab.vn

DR

Token
Ring

BDR

Designated router (DR) and backup designated


router (BDR):
A router that is elected by all other routers on the
same LAN to represent all the routers.
Each network has a DR and BDR.

Bringing a True-long Stand Vocation

107

Lesson 8: OSPF
www.saigonlab.vn

P=3

P=2

DR

BDR

Hello

P=1

P=1

P=0

The router with the highest priority value is the DR.


The router with the second highest priority value is
the BDR.
The default for the interface OSPF priority is 1. In
case of a tie, the routers router ID is used.
Bringing a True-long Stand Vocation

108

Lesson 8: OSPF
www.saigonlab.vn

OSPF Network Types


Bringing a True-long Stand Vocation

109

Lesson 8: OSPF
www.saigonlab.vn

Shortest Path First Algorithm

Places each router at the root of a tree and calculates the


shortest path to each destination based on the
cumulative cost.
Cost = 108/bandwidth (bps).
Bringing a True-long Stand Vocation

110

Lesson 8: OSPF
www.saigonlab.vn

5 steps of operation:
1. Establish router adjacencies.
2. Elect a DR and BDR (if necessary).
3. Discover routes.
4. Select the appropriate routes to use.
5. Maintain routing information.

Bringing a True-long Stand Vocation

111

Lesson 8: OSPF
www.saigonlab.vn

Configuring Single-Area OSPF


Router(config)#router ospf process-id
Defines OSPF as the IP routing protocol
Router(config-router)#network net wildcard-mask area area-id

Assigns networks to a specific OSPF area


Bringing a True-long Stand Vocation

112

Lesson 8: OSPF
www.saigonlab.vn

OSPF Configuration Example

Bringing a True-long Stand Vocation

113

Lesson 8: OSPF
www.saigonlab.vn

Configuring Loopback Interfaces

Router ID
Number by which the router is known to OSPF
Default: The highest IP address on an active interface
at the moment of OSPF process startup
Can be overridden by a loopback interface: Highest
IP address of any active loopback interface
Can be set manually using the router-id command
Bringing a True-long Stand Vocation

114

Lesson 8: OSPF
www.saigonlab.vn

Verifying the OSPF Configuration


Verifies that OSPF is configured
Router#show ip protocols
Displays all the routes learned by the router
Router#show ip route

Bringing a True-long Stand Vocation

115

Lesson 8: OSPF
www.saigonlab.vn

Verifying the OSPF Configuration (Cont.)


Router#show ip ospf interface
Displays area ID and adjacency information
Router#show ip ospf interface ethernet 0
Ethernet0isup,lineprotocolisup
InternetAddress192.168.254.202,Mask255.255.255.0,Area0.0.0.0
AS201,RouterID192.168.99.1,NetworkTypeBROADCAST,Cost:10
TransmitDelayis1sec,StateOTHER,Priority1
DesignatedRouterid192.168.254.10,Interfaceaddress
192.168.254.10
BackupDesignatedrouterid192.168.254.28,Interfaceaddr
192.168.254.28
Timerintervalsconfigured,Hello10,Dead60,Wait40,Retransmit5
Helloduein0:00:05
NeighborCountis8,Adjacentneighborcountis2
Adjacentwithneighbor192.168.254.28(BackupDesignatedRouter)
Adjacentwithneighbor192.168.254.10(DesignatedRouter)
Bringing a True-long Stand Vocation

116

Lesson 8: OSPF
www.saigonlab.vn

Verifying the OSPF Configuration (Cont.)


Router#show ip ospf neighbor
Displays OSPF neighbor information on a perinterface basis
Router#show ip ospf neighbor
IDPriStateDeadTimeAddressInterface
10.199.199.1371FULL/DR0:00:31192.168.80.37
Ethernet0
172.16.48.11FULL/DROTHER0:00:33172.16.48.1Fddi0
172.16.48.2001FULL/DROTHER0:00:33172.16.48.200
Fddi0
10.199.199.1375FULL/DR0:00:33172.16.48.189Fddi0

Bringing a True-long Stand Vocation

117

Lesson 8: OSPF
www.saigonlab.vn

OSPF debug Commands


Router# debug ip ospf events
OSPF:hello with invalid timers on interface Ethernet0
hello interval received 10 configured 10
net mask received 255.255.255.0 configured 255.255.255.0
dead interval received 40 configured 30
Router# debug ip ospf packet
OSPF: rcv. v:2 t:1 l:48 rid:200.0.0.117
aid:0.0.0.0 chk:6AB2 aut:0 auk:
Router# debug ip ospf packet
OSPF: rcv. v:2 t:1 l:48 rid:200.0.0.116
aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x0

Bringing a True-long Stand Vocation

118

www.saigonlab.vn

Bringing a True-long Stand Vocation