Sunteți pe pagina 1din 71

Chapter 6

Routing Protocol EIGRP And OSPF

LINK-STATE ROUTING
PROTOCOL

Link-state routing protocol features

Uses the hello information and Link-state advertisements (LSAs) it receives from other routers to build a database about the network A topological database Uses the shortest path first (SPF) algorithm (Dijkstra algorithm) to calculate the shortest route to each network The resulting SPF tree Stores this route information in its routing table

How routing information is maintained


When a failure occurs in the network, each link-state router take flowing action: Flood LSAs using a special multicast address throughout an area. Copy of the LSA and updates its link-state, or topological database. Then forward the LSA to all neighboring devices Recalculate their routing tables.

OSPF

SINGLE AREA OSPF


CONCEPTS

OSPF overview

Open Shortest Path First (OSPF) is a link-state routing protocol based on open standards.
The most recent description is RFC 2328. The Open in OSPF means that it is open to the public and is non-proprietary.

OSPF terminology

OSPF terminology: Area


A collection of networks and routers that have the same area identification.

Area 1
Token Ring

Area 0

OSPF terminology: Adjacency database


A listing of all the neighbors to which a router has established bi-directional communication. Not every pair of neighboring routers become adjacent

Neighbors

Token Ring

Adjacency database

OSPF terminology: Link-state database


Also known as a topological database A list of link-state entries of all other routers in the internetwork

Token Ring

Adjacency database

Topological Database

OSPF terminology: Routing table


The routing table (also known as forwarding database) generated when an algorithm is run on the link-state database. Each routers routing table is unique

Token Ring

Lists neighbors Lists all routes

Adjacency Database

Topological Database

Lists best routes

Routing Table

Configuring OSPF loopback address


Router ID:

Number by which the router is known to OSPF Router ID is Highest IP address of any active loopback interface. If there is no looback interface then Router ID is The highest IP address on an active interface at the moment of OSPF process startup

EX : Configuring ip address to loopback interface

Router(configf)#Interface loopback 0 Router(configf-if)#ip address 192.168.31.33 255.255.255.0

OSPF terminology: DR and BDR router


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

DR

Token Ring

BDR

Electing the DR and BDR (if necessary).


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 the same priority, Router has the highest router ID is DR. Router has the second highest router ID is BDR

Shortest path algorithm


1 4

C
4

2 D 1 E F G

The best path is the lowest cost path.

Modifying OSPF cost metric


Medium 56 kbps serial link T1 (1.544 Mbps serial link) E1 (2.048 Mbps serial link) Ethernet Fast Ethernet/FDDI Cost 1785 64 48 10 1

Cost is calculated using the formula 108/bandwidth, where bandwidth is expressed in bps. Bandwidth dividend is user configurable:

Interface subcommand: bandwidth 64 Interface subcommand: ip ospf cost <1-65535>


Relevant going out an interface only

OSPF network types

OSPF network types: Fourth type

OSPF Hello Protocol

The rules that govern the exchange of OSPF hello packets are called the Hello protocol. Hello packets use : 224.0.0.5 (all routers). Hello packets are sent at regular intervals (default):

Multi access and Point-to-point: 10s NBMA : 30s


On multi-access networks the Hello protocol elects a designated router (DR) and a backup designated router (BDR).

The hello packet carries information that all neighbors must agree upon before an adjacency is formed, and link-state information is exchanged.

Establish router adjacencies


D E

Hello

A
afadjfjorqpoeru 39547439070713

Hello

Router ID Hello/dead intervals Neighbors Area-ID Router priority DR IP address BDR IP address Authentication password Stub area flag

* Entry must match on neighboring routers

Steps in the operation of OSPF


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.

Step 1: Establish router adjacencies

First step in OSPF operation is to establish router adjacencies RTB sends hello packets, advertising its own router ID highest IP address:10.6.0.1(no loopback)

Step 1: Establish router adjacencies (cont.)


D E

Hello

A
afadjfjorqpoeru 39547439070713

Hello

Router ID Hello/dead intervals Neighbors Area-ID Router priority DR IP address BDR IP address Authentication password Stub area flag

* Entry must match on neighboring routers

Step 2: Electing the DR and BDR (if necessary).


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.

Step 3: Discover routes

On difference network have differ discover process.

On multi-access network, the exchange of routing information occurs between the DR or BDR and every other router on the network. Link partners on a point-to-point or point-to-multipoint network also engage in the exchange process.

Exchange Process
A
172.16.5.1/24 E0 172.16.5.2/24 E1

Down State

I am router ID 172.16.5.1 and I see no one.


Init State

Router B Neighbors List 172.16.5.1/24, int E1

I am router ID 172.16.5.2, and I see 172.16.5.1.


Router A Neighbors List 172.16.5.2/24, int E0
Two-way State

Step 3: Discover routes (cont.)


E0 172.16.5.1
afadjfjorqpoeru 39547439070713

DR E0 172.16.5.3 Exstart State

Hello I will start exchange because I have router ID 172.16.5.1. No, I will start exchange because I have a higher router ID. Hello Exchange State
afadjfjorqpoeru 39547439070713 afadjfjorqpoeru 39547439070713

Here is a summary of my link-state database.


afadjfjorqpoeru 39547439070713

DBD

DBD

Here is a summary of my link-state database.

Step 3: Discover routes (cont.)


DR

E0 172.16.5.1
afadjfjorqpoeru 39547439070713

E0 172.16.5.3
afadjfjorqpoeru 39547439070713

LSAck
afadjfjorqpoeru 39547439070713

Thanks for the information! Loading State

LSAck

LSR

I need the complete entry for network 172.16.6.0/24.


afadjfjorqpoeru 39547439070713

Here is the entry for network 172.16.6.0/24.


afadjfjorqpoeru 39547439070713

LSU

LSAck Thanks for the information!

Full State

Step 4: Choosing Routes


10.1.1.0/24 A
Token Ring

10.2.2.0/24 B
FDDI

10.3.3.0/24 C

Cost=6 Cost=1 Cost=10


10.4.4.0/24 Topology Table Net Cost Out Interface 10.2.2.0 6 To0 10.3.3.0 7 To0 10.3.3.0 10 E0

This is the best route to 10.3.3.0.

Step 5: Maintaining Routing Information


Link-State Change
DR

1 LSU
A B

Router A tells all OSPF DRs on 224.0.0.6

Step 5: Maintaining Routing Information


Link-State Change
LSU

2
DR

1 LSU
A B

Router A tells all OSPF DRs on 224.0.0.6 DR tells all others on 224.0.0.5

Step 5: Maintaining Routing Information


Link-State Change
LSU

2
DR

1 LSU
A B

3
LSU

Router A tells all OSPF DRs on 224.0.0.6 DR tells all others on 224.0.0.5

Step 5: Maintaining Routing Information


Link-State Change
LSU

2
DR

4 I need to update my routing table.

1 LSU
A B

3
LSU

Router A tells all OSPF DRs on 224.0.0.6 DR tells all others on 224.0.0.5

SINGLE AREA OSPF

Configuration

Wildcard Mask

The function of a wildcard mask


A wildcard mask is a 32-bit quantity that is divided into four octets, with each octet containing 8 bits. A wildcard mask bit 0 means "check the corresponding bit value. A wildcard mask bit 1 means "do not check (ignore) that corresponding bit value".

Subnet mask and wildcard mask


Range of host Subnet mask Wildcard mask

-Bit 1 : check
-Bit 0 : ignore
11111110 254 11111100

-Bit 1 : ignore
-Bit 0 : check
00000001 1 00000011

2 4 8 16

252
11111000 248 11110000 240

3
00000111 7 00001111 15

32
64 128 256

11100000
224 11000000 192 10000000 128 00000000 0

00011111
31 0011111 1 63 0111111 1 127 11111111 255

Common Wildcard mask


Range of IP
2 4 8 16 32 64 128 256

Subnet mask
192.168.1.2 255.255.255.254 192.168.1.8 255.255.255.252 192.168.1.16 255.255.255.248 192.168.1.16 255.255.255.240 192.168.1.0 255.255.255.224 192.168.1.128 255.255.255.192 192.168.1.0 255.255.255.128 192.168.1.0 255.255.255.0

Wildcard mask
192.168.1.2 0. 0 . 0 .1 192.168.1.8 0. 0 . 0 .3 192.168.1.16 0. 0 . 0 .7 192.168.1.16 0. 0 . 0 .15 192.168.1.0 0. 0 . 0 .31 192.168.1.128 0. 0 . 0 .63 192.168.1.0 0. 0 . 0 .127 192.168.1.0 0. 0 . 0 .255

Wildcard any

Any = 0.0.0.0 255.255.255.255

Wildcard host

Host 172.30.16.29 = 172.30.16.29 0.0.0.0

Basic OSPF Configuration


Broadcast Network
E0 10.64.1.2/24

Point-to-Point Network
S0 10. 2.1.1/24 S1

10.64.1.1/24

E0

10.2.1.2/24

<Output Omitted> interface Ethernet0 ip address 10.64.1.1 255.255.255.0 ! <Output Omitted> router ospf 1

network 10.64.1.0 0.0.0.255 area 0

<Output Omitted> interface Ethernet0 ip address 10.64.0.2 255.255.255.0 ! interface Serial0 ip address 10.2.1.2 255.255.255.0 <Output Omitted> router ospf 50
network 10.2.1.0 0.0.0.255 area 0 network 10.64.0.0 0.0.0.255 area 0

Assign Network with wildcard mask

Verifying OSPF Operation


Router#

show ip protocols

Verifies that OSPF is configured


Router#

show ip route

Displays all the routes learned by the router


Router#

show ip ospf interface

Displays area ID and adjacency information

Verifying OSPF Operation (cont.)


Router#

show ip ospf

Displays OSPF timers and statistics


Router#

show ip ospf neighbor detail

Displays information about DR, BDR and neighbors


Router#

show ip ospf database

Displays the link-state database

Verifying OSPF Operation (cont.)

Router#

clear ip route *

Allows you to clear the IP routing table


Router#

debug ip ospf option

Displays router interaction during the hello, exchange, and flooding processes

show ip route

show ip ospf interface

R2#sh ip ospf int e0 Ethernet0 is up, line protocol is up Internet Address 192.168.0.12/24, Area 0 Process ID 1, Router ID 192.168.0.12, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State DROTHER, Priority 1 Designated Router (ID) 192.168.0.11, Interface address 192.168.0.11 Backup Designated router (ID) 192.168.0.13, Interface address 192.168.0.13 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:04 Neighbor Count is 3, Adjacent neighbor count is 2 Adjacent with neighbor 192.168.0.13 (Backup Designated Router) Adjacent with neighbor 192.168.0.11 (Designated Router) Suppress hello for 0 neighbor(s)

show ip ospf neighbor

Neighbor ID 192.168.0.13 192.168.0.14 192.168.0.11 192.168.0.12

Pri 1 1 1 1

State Dead Time Address 2WAY/DROTHER 00:00:31 192.168.0.13 FULL/BDR 00:00:38 192.168.0.14 2WAY/DROTHER 00:00:36 192.168.0.11 FULL/DR 00:00:38 192.168.0.12

Interface Ethernet0 Ethernet0 Ethernet0 Ethernet0

OSPF over Ethernet - Multiaccess Network

Neighbor ID 192.168.0.11

Pri 1

State FULL/

Dead Time 00:00:39

Address 10.1.1.2

Interface Serial1

OSPF over HDLC - Point-to-Point Network

EIGRP CONCEPTS

EIGRP Overview
Cisco released EIGRP in 1994 as a scalable, improved version of its proprietary distance vector routing protocol, IGRP. Unlike IGRP, which is a classful routing protocol, EIGRP supports CIDR and VLSM. Hybrid routing protocol

Fast convergence times Multiple network-layer protocols supported

Reduced bandwidth usage


Easy to configure

EIGRP and IGRP compatibility


EIGRP 2446 IGRP 2446 192.168.1.0/24

RTA
10.1.1.0/24

RTB RTD
172.16.1.0/24

RTC

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.

EIGRP concepts and terminology


Neighbor TableAppleTalk NeighborNext Table IPX Destination Hop Neighbor Table IP Destination Next Hop Router Next-Hop Router Interface Router Topology TableAppleTalk Destination 1 Next Router 1/Cost Topology Table IPX Destination Topology1Table Router IP 1/Cost Destination 1Next Next Router 1/Cost Destination Successor Destination 11 Next Router 1/Cost Destination 1 Feasible Successor Routing TableAppleTalk Routing Table IPX Destination 1 Next Router X Routing Table Router IP Destination Next Router Destination 11 Next XX Destination Successor Destination 11 Next Router X

EIGRP Successors and Feasible successor


I have a route to Z, with a metric of 5 RTB is successor to Net Z

RTB RTA Network Z

EIGRP 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 RTA Network Z RTC

EIGRP 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 RTB is successor to Net Z RTX is feasible successor to Net Z

RTB RTA Network Z RTC RTX RTY I have a route to Z, with a metric of 6

DUAL Example (Start)


(a) C (a) EIGRP via B via D via E D EIGRP (a) via B via C FD AD 3 3 1 4 2 4 3 FD AD 2 2 1 5 3 Topology (fd) (Successor) (fs)

A (1) (1) B D (2) (1) C E

Topology (fd) (Successor)

(2)

(1)
E EIGRP (a) via D via C FD AD 3 3 2 4 3 Topology (fd) (Successor)

EIGRP technologies

Many new technologies are improvement in operating efficiency, speed of convergence, or functionality relative to others routing protocols.

Four categories:

Neighbor discovery and recovery Reliable Transport Protocol (RTP) DUAL finite-state machine algorithm

Protocol-dependent modules (PDM)

Neighbor discovery and recovery


EIGRP routers establish adjacencies with neighbor routers by using small hello packets On IP networks, EIGRP routers send hellos to the multicast IP address 224.0.0.10

Bandwidth T1 or less Greater than T1

Example link Multipoint frame relay, ISDN Ethernet, T1

Default hello interval 60 seconds 5 seconds

Default hold times 180 seconds 15 seconds

Neighbor discovery and recovery

By forming adjacencies, EIGRP routers do:

Dynamically learn of new router that join their network Identify routers that become either unreachable or inoperable Rediscover routers that had previously been unreachable

Reliable Transport Protocol (RTP)

EIGRP uses RTP as its own proprietary transport-layer protocol, that can guarantee ordered delivery of routing information to all neighbors. EIGRP can call on RTP to provide reliable or unreliable service as the situation warrants. Reliable delivery of other routing information can actually speed convergence, because EIGRP routers are not waiting for a timer to expire before they retransmit.

With RTP, EIGRP can multicast and unicast to different peers simultaneously, which allows for maximum efficiency.

Reliable Transport Protocol (RTP)

EIGRP reliable packets are packets that requires explicit acknowledgement:

Update: Send routing updates Query: Ask neighbors about routing information Reply: Response to query about routing information
EIGRP unreliable packets are packets that do not require explicit acknowledgement:

Hello: Establish neighbor relationships ACK: Acknowledgement of a reliable packet

DUAL finite-state machine algorithm

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

DUAL Discovery route


A
Neighbor TableIP

Router B information
Router C information

C DUAL ?

Topology TableIP Router B information Router C information

Routing Table IP

Successor (primary route)

Successor (primary route) Feasible successor

Protocol-dependent modules (PDM)


Support for routed protocols, such as IP, IPX, and AppleTalk, is included in EIGRP through PDMs. Easily adapt to new or revised routed protocols, such as IPv6, by adding protocol-dependent modules. Each PDM is responsible for all functions related to its specific routed protocol. The IP-EIGRP module is responsible for the following: Sending and receiving EIGRP packets that bear IP data Notifying DUAL of new IP routing information that is received Maintaining the results of DUAL routing decisions in the IP routing table Redistributing routing information that was learned by other IP-capable routing protocols

CONFIGURING EIGRP

For IP networks

1. router(config)# router eigrp autonomous-system-number

AS much match all router inside AS


2. router(config-router)# network network-number

Network number only for connected major network


3. router(config-if)# bandwidth kilobits

Serial interface link use (if not Router take default)

For IP networks

Verify EIGRP with Show command


Command Show ip eigrp neighbors [int type] [details] Description Display EIGRP neighbor table

Show ip eigrp interfaces [int type] [asnumber][details] Show ip eigrp topology [asnumber][ [ip-add] mask ]

Displays EIGRP statistics and status information

Display the EIGRP topology table, use the show ip eigrp topology EXEC command. Also used to determine DUAL states & debug possible DUAL problems.
Depending on keywork is used. Display all routes in the topology table that are either active, pending or without successor Display all routes not just FC in EIGRP topology Display the number of EIGRP packets send and received.

Show ip eigrp topology [active | pending | zerosuccessor] Show ip eigrp all-links Show ip eigrp traffic [asnumber]

Verify EIGRP with Debug command


Command
Debug eigrp fsm

Description
This command helps you observe EIGRP FS activuty and to determine whether route updates are being installed and deleted by the routing process

debug eigrp packet

Displays all types of EIGRP packets, both sent and received


Displays the EIGRP neighbor interaction

debug eigrp neighbor

debug ip eigrp route


debug ip eigrp summary show ip eigrp events

Displays advertisements and changes EIGRP makes to the routing table


Displays a brief report of the EIGRP routing activity Displays the different categories of EIGRP activity, including route calculations

Use show ip eigrp neighbors command

RTA#show ip eigrp neighbors IP-EIGRP neighbors for process 400 H Address Interface Hold Uptime (sec) 1 172.68.2.2 To0 13 02:15:30 13 0 172.68.16.2 Se1 10 02:38:29 10

SRTT (ms) 8 29

RTO Q Seq Cnt Num 200 0 9 200 0 6

Use show ip route command

S-ar putea să vă placă și