Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

How to configure the Static routes

Hi,

     what is the command to add the static route in RIP and OSPF, is there any different commands for both or same commands.

Thanks in advance

9 REPLIES
Community Member

How to configure the Static routes

As per me..

RIP and OSPF for dynamic routing..

Routing command will add in global configuration mode

Ip  route < source address>

RIP and OSPF u will advertise the network.. there is No connection of static route in RIP and OSPF..

Community Member

How to configure the Static routes

How the router will add other entries(in Bold letters) in the routing table,

Lets say,

In RIP,

Routing table structure is as per rfc 2453,

Address; // IP address of the destination host or destination network

Router; // The first router along the route to the destination

Interface; // The physical network which must be used to reach the first router

Metric; // Distance to the destination

Timer; // The amount of time since the entry was last updated

In OSPF as per RFC 2328

DestinationID;// The destination's identifier or name i,e OSPF Router ID

AddressMask;    // Only defined for networks i,e subnet mask

Ebit;        //Optional capabilities

MCbit;   

NPbit;   

EAbit;   

DCbit;

Area;        //OSPF Area ID

Path_type;  //Types of paths used to route traffic to the destination

Cost;                        //The Link state cost of the destination

Type_2_cost;                // Only valid for external paths

LinkStateOrigin;        /*Valid only for inter-area paths, this field indicates

                                    the LSA(router-LSA or network-LSA) that directly references the destination*/

szNexthop;        // The outgoing router interface to use  when forwarding traffic to the destination

Advertising_Router; //The router advertising the summary LSA or AS-external-LSA that led to this path.

Thanks in advance

How to configure the Static routes

Hello,

As Dinesh wrote, RIP and OSPF are dynamic routing protocols so there is no such thing as configuration of static routes. You can inject local subnets into routing protocol with network command. These subnets are then advertised to other neighbors.

Best Regards

Please rate all helpful posts and close solved questions

Best Regards Please rate all helpful posts and close solved questions

How to configure the Static routes

Hi,

I'm not sure either if I understand the question.

Are you asking how redistribution of external networks (in your case static routes) into routing protocol (topology) data structures is done and how the information of this external networks is installed into the routing table?

Best regards

Rolf

Community Member

How to configure the Static routes

The question is correct, Please go ahead

Re: How to configure the Static routes

The question is correct, Please go ahead

Maybe a little example helps. Under "router ospf " you can redistribute static routes with the command

redistribute static [subnets] [metric-type 1] [metric <0-16777214>] [route-map ] [tag <0-4294967295>]

So you can influence e.g. the metric type (E1 vs. default E2) and the seed metric.

The role of the router now is a ASBR and it generates a so called Tpye-5 LSA to represent that external network:

R1#show ip ospf database external 192.168.0.0 self-originate

OSPF Router with ID (1.1.1.1) (Process ID 1)

Type-5 AS External Link States

LS age: 151

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 192.168.0.0 (External Network Number )

Advertising Router: 1.1.1.1

LS Seq Number: 80000002

Checksum: 0x9220

Length: 36

Network Mask: /16

Metric Type: 1 (Comparable directly to link state metric)

TOS: 0

Metric: 20

Forward Address: 0.0.0.0

External Route Tag: 0

As you will notice, there are only few optional capabilities used in this data structure. For example "Area" is not used because external networks do not belong to a particular OSPF Area.

All the LSAs are synchronized within the routers of an Area and the other routers now install the best information for a given prefix into their routing-tables:

R2#show ip route 192.168.0.0

Routing entry for 192.168.0.0/16, supernet

Known via "ospf 1", distance 110, metric 84, type extern 1

Last update from 172.16.12.1 on Serial0/0, 00:04:21 ago

Routing Descriptor Blocks:

* 172.16.12.1, from 1.1.1.1, 00:04:21 ago, via Serial0/0

Route metric is 84, traffic share count is 1

Note that this example applies to OSPF, which is a link-state routing protocol, and the distribution of routing information is much more sophisticated than the mechanisms used by RIP.

Hope that helps

Rolf

Community Member

How to configure the Static routes

The router will add the routing table depends on the through which protocol its learned.

Static Route it will denote S

for RIP it will denote R

for OSPF  it will denote O, O IA (inter area route) and E1 ,  E2 these are external routers, N1 and N2 are NSSA type route

EIGRP it denotes D, EX

Each and every route there will metric distance is there.

Default Administrative Distances
Route Source Default Administrative Distance
Directly Connected0 (Highest reliability)
Static Route1
EIGRP90
IGRP 100
OSPF110
RIP 120
External EIGRP170
Route Default
Unknown255 (Lowest Reliability)

How to configure the Static routes

u can advertise static routes in eigrp and ospf by using command

redistribute static

Jawad

Jawad
Community Member

How to configure the Static routes

have u got answer for your query..

reditributed static route in eigrp and OSPF

will add in the eigrp and OSPF routing table like extrenal routes.

as you know in OSPF reditribute static will add in the routing table as extrenal route and LSA type 5...

373
Views
0
Helpful
9
Replies
CreatePlease to create content