Sie sind auf Seite 1von 73


What Is Routing?

To route, a router needs to do the following: Know the destination address Identify the sources it can learn from Discover possible routes Select the best route Maintain and verify routing information

What Is Routing? (Cont.)

Routers must learn destinations that are not directly connected.

Identifying Static and Dynamic Routes

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

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

Static Routes

Configure unidirectional static routes to and from a stub network to allow communications to occur.

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

Static Route Example

This is a unidirectional route. You must have a route configured in the opposite direction.

Default Routes

This route allows the stub network to reach all known networks beyond router A.

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 to network

C S* is subnetted, 1 subnets is directly connected, Serial0 is directly connected, Serial0

What Is a Routing Protocol?

Routing protocols are used between routers to determine paths and maintain routing tables.

Once the path is determined, a router can route a routed protocol.

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.

Administrative Distance: Ranking Routes

Classes of Routing Protocols

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.

Examples of classful routing protocols:

RIP Version 1 (RIPv1) IGRP

Classless Routing Overview

Classless routing protocols include the subnet mask with the route advertisement. Classless routing protocols support variable-length subnet masking (VLSM). Summary routes can be manually controlled within the network. Examples of classless routing protocols: RIP Version 2 (RIPv2) EIGRP OSPF IS-IS

Routing Protocol Comparison Chart

Building Scalable Cisco Internetworks (BSCI)

OSPF (Open Shortest Path First)

Link-State Routing Protocols

Link-State Routing Protocols

Link-state routers recognize more information about the network than their distance-vector counterparts.

Consequently, LS routers tend to make more accurate decisions.

Link-state routers keep track of the following:
Their neighbors All routers within the same area Best paths toward a destination

Link-State Data Structures

Neighbor table:
Also known as the adjacency database. Contains list of recognized neighbors.

Topology table:
Typically referred to as LSDB. Contains all routers and their attached links in the area or network. All routers within an area have an identical LSDB

Routing table:
Commonly named a forwarding database. Contains list of best paths to destinations.

Link-State Data Structure: Network Hierarchy

Link-state routing requires a hierachical network structure that is enforced by OSPF. This two-level hierarchy consists of the following: 1. Transit area (backbone or area 0) 2. Regular areas (nonbackbone areas)

OSPF Areas

Area Terminology

OSPF Adjacencies

Routers build logical adjacencies between each other using the Hello Protocol. Once an adjacency is formed:

LS database packets are exchanged to synchronize

each others LS databases. using these adjacencies.

LSAs are flooded reliably throughout the area or network

Forming OSPF Adjacencies

Routers discover neighbors by exchanging hello packets and are declared to be up after checking certain parameters in the hello packet.
Point-to-point WAN links:
Both neighbors become fully adjacent.

LAN links:
Neighbors form full adjacency with the DR and BDR. Maintain two-way state with the other routers (DROTHERs).

Routing updates and topology information are only passed between adjacent routers.

OSPF Packet Types

The Hello Packet

OSPF Packet Header Format

Establishing Bidirectional Communication

Discovering the Network Routes

Adding the Link-State Entries

Maintaining Routing Information

Router A notifies all OSPF DRs on DR notifies others on


Issues with Maintaining a Large OSPF Network

The Solution: OSPF Hierarchical Routing

Consists of areas and autonomous systems Minimizes routing update traffic

Types of OSPF Routers

OSPF LSA Types :

LSA Type 1: Router LSA

One router LSA for every router in an area Includes list of directly attached links Each link identified by IP prefix assigned to link Identified by the router ID of the originating router Floods within its area only, does not cross ABR

LSA Type 2: Network LSA

One network (type 2) LSA for each transit broadcast or NBMA network in an area Includes list of attached routers on the transit link Includes subnet mask of link Advertised by the DR of the broadcast network Floods within its area only, does not cross ABR

LSA Type 3: Summary LSA

Type 3 summary LSAs are used to flood network information to areas outside the originating area (inter-area). Describes network number and mask of link Advertised by the ABR of originating area. Type 3 LSAs flood throughout the AS.

LSA Type 4: Summary LSA

Summary (type 4) LSAs are used to advertise an ASBR to all other areas in the AS. They are generated by the ABR of the originating area. Type 4 LSAs flood throughout the AS. They are regenerated by all subsequent ABRs. Type 4 LSA contains the router ID of the ASBR only.

LSA Type 5: External LSA

External (type 5) LSAs are used to advertise networks from other autonomous systems. Type 5 LSAs are advertised and owned by the originating ASBR. Type 5 LSAs flood throughout the entire AS. The advertising router ID ASBR is unchanged throughout the AS. Type 4 LSA is needed to find the ASBR.

Interpreting the Routing Table: Types of Routes

Calculating Costs for E1 and E2 Routes

OSPF Special Area Types

Types of Areas

Stub Area Rules

Stub areas cannot have an ASBR, and they should have one ABR. If there is more than one ABR, suboptimal routing paths to external autonomous systems can occur. Stub areas must not have virtual links going through them.

Using Stub Areas

External LSAs
are stopped Default route is advertised into stub area by the ABR All routers in area 50 must be configured as stub

Stub Area Configuration


Area area-id stub

This router subordinate command turns on stub area networking. All routers in a stub area must use the stub command.
router ospf 10 network area 1 network area 0 area 1 stub

OSPF Stub Area Configuration Example

Using Totally Stubby Areas

External LSAs are stopped Summary LSAs are stopped All routers must be configured as stub ABR must be configured as totally stubby Is a Ciscospecific feature

Totally Stubby Commands


area area-id stub no-summary

The addition of no-summary creates a totally stubby area. The no-summary option prevents all summary LSAs from entering the stub area.

area area-id default-cost cost

This command defines the cost of a default route sent into the stub area. The default cost is 1.

Totally Stubby Configuration Example

Not-So-Stubby Areas

Breaks stub area rules

Special LSA type 7 defined, sent by ASBR ABR (R2) converts LSA 7 to LSA 5 NSSA is an RFC addendum

ASBR (R1) is allowed in NSSA

NSSA Configuration

NSSA Totally Stubby Configuration


Benefits of Route Summarization

Minimizes number of routing table entries Localizes impact of a topology change Reduces LSA 3 and 5 flooding and saves CPU resources

Using Route Summarization

Inter-area (IA) summary link carries mask One or more entries can represent several subnets

Configuring Route Summarization


area area-id range address mask

Consolidates inter-area (IA) routes on an ABR


summary-address address mask

[not-advertise] [tag tag]

Consolidates external routes, usually on an ASBR

Route Summarization Configuration Example at ABR

Route Summarization Configuration Example at ASBR

RIPv2 must be redistributed into OSPF

Default Routes in OSPF

A default route is injected into OSPF as an external LSA type 5. Default route distribution is not on by default; use a default-information originate command under the OSPF routing process.

Configuring OSPF Default Routes


default-information originate [always]

A router ospf subordinate command Normally, this command only advertises a default into the OSPF network if the default route already exists in the routing table The always keyword allows the default to be advertised even when the default route does not exist in the routing table

Default Route Configuration Example


Illegal Area Connections

By default, all areas must connect to area 0. Area 4 is connected incorrectly. There may be times when this type of connectivity is required.

Defining Virtual Links

Virtual links are used to connect a discontiguous area to area 0. A logical connection is built between router A and router B. Virtual links are recommended for backup or temporary connections.

OSPF Virtual Link Configuration Example 1

OSPF Virtual LinkConfiguration Example 2

List of Labs for OSPF

Lab 1: Configuring OSPF in Single Area. Lab2: Configuring OSPF in Multiple Areas. LAb3: Configuring ABR and ASBR. Lab4:Configure Stub. Lab5:Configure Total Stub. Lab6:Configure NSSA. Lab7:Configure NSSA Total Stub. Lab8:Configure OSPF Route Summarization. Lab9. Configure OSPF Virtual Link. Lab10. Configure OSPF Authentication.