cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11316
Views
2
Helpful
1
Comments
Pulkit Nagpal
Cisco Employee
Cisco Employee

 

 

 

Introduction

 

This document provides a sample configuration on how to redirect traffic in OSPF

 

Requirements

 

It is assumed that a person reading this document is familiar with general Ospf operation.

 

Components used

 

For this document 3700 Series router with IOS 12.4(2)T loaded in it.

 

Network Diagram

 

ospf.jpg

Configuration

 

The configuration files are attached with this document.

 

For this example we will take network 10.1.23.0/24 and manipulate routing in a way that R2 is the router which is always preffered over R3 by R1.

 

Before we start making changes in routing table of R1:

 

Lets have a look at the rouring table of R1 and see how it reaches network 10.1.23.0/24:

 

R1#show ip route ospf

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/65] via 10.1.12.2, 00:24:06, Serial1/0.12

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/65] via 10.1.13.3, 00:24:06, Serial1/0.13

10.0.0.0/24 is subnetted, 3 subnets

O 10.1.23.0 [110/74] via 10.1.13.3, 00:24:06, Serial1/0.13

[110/74] via 10.1.12.2, 00:24:06, Serial1/0.12

 

Now to make sure that Router R2 is always preffered over R3, we have number of options available like, we can change bandwidth or cost of links. However, the option we are going to use involves only one command and is easy to use. The command we will be using is max-metric router-lsa

 

We will configure this command on Router R3, here is the syntax:

 

R3#config t

Enter configuration commands, one per line. End with CNTL/Z.

R3(config)#router ospf 1

R3(config-router)#max-metric router-lsa

 

This will configure R3 to advertise a maximum metric so that the other routers do not prefer the router as an immediate next-hop in their Shortest path first calculations.

Verify

 

Lets see the routing table of Router R1:

 

R1#show ip route ospf

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/65] via 10.1.12.2, 00:03:12, Serial1/0.12

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/65] via 10.1.13.3, 00:03:12, Serial1/0.13

10.0.0.0/24 is subnetted, 3 subnets

O 10.1.23.0 [110/74] via 10.1.12.2, 00:03:12, Serial1/0.12

 

We can see that R1 only uses R2 as next-hop for networl 10.1.23.0/24 now.

 

Related Information

Comments
kunalgandhi
Level 1
Level 1

Good info...

To the point & Easy to understand article.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: