Here you can get the detailed information on Computers and Technology . Know the complete reviews and tips on Computers and Technology our articles are very clearly written posts that any one can understand. So learn more about Computers and Technology . read all blogs for get complete details......

Sunday, December 13, 2009

Understand the Routing Process, Part 2

Static Routes

Statics are build in the same way as defaults, in the sense that they have a destination a prefix and a next hop, the difference being that a static route informs the router about specif routes rather than an "any" route like a default does.

An example of the static would be:

Ip route 20.1.1.0 255.255.255.0 10.1.1.0

The first part of the route, the address "20.1.1.0" tells the device that this route specifies the destination of 20.1.1.0.

The second part tells the router which part of the destination address in the first part of the address it needs to look at, the "255.255.255.0" instructs the router to look at the first three octets in the destination address and ignore the 4th octet. We could have written the destination address as follows "20.1.1", but the command line will not allow us to do that.

The prefix tells the router which part of the destination address the router needs to look at.

Example 1: The following two statics are now in our example router:

1: Ip route 20.1.1.0 255.255.255.0 10.1.1.0

2: Ip route 20.1.0.0 255.255.0.0 10.5.5.0

Our router receives a packet with the destination address set to "20.1.1.23", the router will examine the routing table and choose between the two routes. The router will choose 1 since it is a closer match for the destination address in the packet header. The second one is less specific or "broader" matching "20.1.0.0 255.255.0.0" meaning "use this route if the packet wants to get to any destination starting with "20.1. anything. Anything" whereas the first route matches "20.1.1.anything" making this route more specific for routing the packet wanting to get to 20.1.1.23.

The very first choice that a router makes is longest match irrelevant of how the it was learnt.

Matching Routes

What would happen if the router has two matching routes:

1: Ip route 20.1.1.0 255.255.255.0 10.1.1.0

2: Ip route 20.1.1.0 255.255.255.0 10.5.5.0

The static routes above have the exact same destination addresses and the exact same prefix lengths, so which one will the router believe?. The router will in this case begin to share the traffic across both paths, if this is your desired result then you are done, what if it is not, how do we force the traffic to take one route over the other?. This is achieved by setting what is referred to as the "trust-ibilty" of the route. Every route that populates the routing table is assigned an "Administrative distance" between 0 and 255. The lower the value; the more desirable the route. All static routes have an Administrative distance of "1". This value can be changed.

Administrative distance is a local value on the router; a router never advertises this to any other router.

1: Ip route 20.1.1.0 255.255.255.0 10.1.1.0 1

2: Ip route 20.1.1.0 255.255.255.0 10.5.5.0 2

Even setting the Administrative Distance to 2 makes route two less desirable. The router now chooses to use route one to pass traffic to destination network "20.1.1.0"

Now we know that the router makes the following routing decisions in the following order

1. longest match irrelevant of how the route was learnt

2. Lowest Administrative distance



Article Source: http://EzineArticles.com/?expert=Joe_Spoto

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home