You are on page 1of 6

Configure Static Route GNS3 Lab

December 3rd, 2010 Go to comments

In this tutorial we will connect two routers via static route with GNS3. Static route and Dynamic route Static route tells the device exactly where to send tra ic, no matter what. Static route is o ten used when your networ! has only a ew routers or there is only one route rom a source to a destination. Dynamic routes, on the other hand, use a routin" #rotocol to determine the best #ath and the routes can be chan"ed de#endin" on s#eci ic #arameters $li!e bandwidth, delay, cost%&. 'ith dynamic routes, routers can communicate with each other to exchan"e routin" in ormation. In ()*+, -.2/002 you will learn about dynamic routin" #rotocols such as )S12, ,IG(1 and 3G1 $(I1 is also a dynamic routin" #rotocol but it is not mentioned in ()*+,&. +he sim#le syntax o static route4 ip route destination-network-address subnet-mask {next-hop-IP-address | exit-interface} 5 destination-network-address: destination networ! address o the remote networ! 5 subnet mask: subnet mas! o the destination networ! 5 next-hop-IP-address: the I1 address o the receivin" inter ace on the next/ho# router 5 exit-interface: the local inter ace o this router where the #ac!ets will "o out Now we consider a real/world exam#le o static routin". Su##ose that your com#any has 2 branches located in New 6or! and 7hica"o. 8s the administrator o the networ!, you are tas!ed to connect them so that em#loyees in the two 98Ns can communicate with each other. 8 ter care ul consideration you decided to connect them via static route.

In GNS3, #lace 2 routers and connect them as the ima"e below, I used I)S c2 !!-bin-m"#$2%f#bin to save some (8: $only re;uire -.:3<router&. 'e will use two loo#bac! inter aces to simulate two ,thernet 98Ns.

&onfi'urin' interfaces on (! (!)confi'*+interface s!,! (!)confi'-if*+ip address $2#$2#$2#$ 2--#2--#2--#! (!)confi'-if*+no shutdown (!)confi'-if*+interface .o! (!)confi'-if*+ip address $!#!#!#$ 2--#!#!#! (!)confi'-if*+exit &onfi'urin' interfaces on ($ (!)confi'*+interface s!,! (!)confi'-if*+ip address $2#$2#$2#2 2--#2--#2--#! (!)confi'-if*+no shutdown (!)confi'-if*+interface .o! (!)confi'-if*+ip address $/2#$ #!#$ 2--#2--#!#! (!)confi'-if*+exit Now i we chec! the routin" table o (0 = (1 by the command show ip route on both (0 and (1 )n (04 (!+ show ip route

+he letter >7? means >connected? or >directly connected?. So there are 2 networ!s that are directly connected to (04 10.0.0.0<@ and 12.12.12.0 )n (1 ($+ show ip route

&onfi'urin' static route on (!

(!)confi'*+ip route $/2#$ #!#! 2--#2--#!#! $2#$2#$2#2 &onfi'urin' static route on ($ ($)confi'*+ip route $!#!#!#! 2--#!#!#! $2#$2#$2#$ Notice that static route wor!s one/way. It means we have to add static route to both (0 and (1 so that (0 and (1 can communicate.

Now try to #in" each ar end networ!

$Note4 In act, (0 can success ully #in" (1 ri"ht a ter addin" the static route to (0& 0dministrati1e distance of a static route# 8 ter addin" two static routes in (0 = (1 routers, the routin" tables o two routers contain these lines4 S 10.0.0.0<@ A1<0B via 12.12.12.1 $on (1& S 1C2.1-.0.0<1- A1<0B via 12.12.12.2 $on (0& +he >S? letter tells us this is a static route. +he networ!s 10.0.0.0<@ and 1C2.1-.0.0<1- are the destinations o this static route and i the routers want to reach them they must send #ac!ets to 12.12.12.1 $on (1& and 12.12.12.2 $on (2&. +hese #arameters are strai"ht orward and easy to understand. 3ut what is A1<0BD 'ell, 1 is the administrati1e distance $8D& and 0 is the metric o that static route. +he administrative distance is a measure o trustworthiness where lower numbers are considered to be more trustworthy than hi"her numbers. +he route with the lowest administrative distance value is the #re erred route that the router selects. 8dministrative distance is the value rom 0 to 2EE. Directly connected routes have an administrative distance o 0. Static routes have an administrative distance o 1 so in the out#uts above you will see the administrative distance o both static routes are 1. +he router treats a static route #ointin" to an inter ace the same as a connected inter ace so the its 8D is 0. I you con i"ure a static route #ointin" to an exitin" inter ace $ or exam#le4 >i# route 1C2.1-.0.0 2EE.2EE.0.0 s!,!? on (0& then the 8D will not be shown.

$2or your in ormation, ,IG(1 has an administrative distance o 00. IG(1 has an administrative distance o 100. )S12 has an administrative distance o 110. 8nd (I1 has an administrative distance o 120&
Comments (41)Comments

You might also like