Routing and Routing Protocols
From Mycomputer Notes
- What is Routing?
Routing is the process that a router uses to forward packets towards the destination network. A router makes decisions based upon the destination IP address of a packet. All the routers that will process the packet along the route will make decision based on the destination IP address. In order for the router to make a proper decision, to route the pocket to its final destination it must learn how to reach distant networks. (ie How to reached and foward the packet to other routers) Routers have to ways of learning about each other a) static routes, b) dynamic routes.
- Static Route
- Uses a programmed route that a network administrator enter into the router.
- Dynamic
- Uses a route that a routing protocol adjust automatically for topology or traffic changes.
Contents |
Static Route Operation
Static route operations can be divided into these three parts:
- Network administrator configures the route.
- Router installs the route in the routing table.
- The static route is used to route the packets.
The static route on a router needs to be specified by the Administrator.
At the Console Line Interface (CLI) he needs to type the command
ip route (with the specified parameters)
ip route <ip_network_to_reached, subnetmask, ip_of_next_hop, administrative_distace>
- Administrative Distance
- The administrative distance is an optinal parameter that indicates the reliability of a route. A lower value for the administrative distance indicates a more reliable route. A Route with a lower administrative distance wil be installed before a similar route with a higher administrative distance. The default administrative value for a static route is 1. If the administrator needs to verify the administrative distance of a route he has one command available:
show ip route <ip_address_of_particular_route>
Since administrating static route can be significanlty demanding task, most of the time they are used for backup purposes. A static route can be configured on a router that will only be used when a dynamic route has failed. To set a static route as a backup, set a higher administrative distance than the dynamic routing protocol.
- NB
Remember that when you are configuring a router and you test connectivity to another network you might get a timeout request; not because the device is down but because the router does not know what to do with a packet to that the network. The route has not been setup yet.
Configuring default Route Forwarding
Since administrating a static routes can be resource demanding the administrator can decide to specified a default route for all networks that have not been specified on the router's table. Default routes are used to route packets with destinations that do not match any of the other routes in the routing table.
A default route is actually a special static route that uses this format:
ip route 0.0.0.0 0.0.0.0 ip route <next_hop_address> <outgoing_interface>
When a default route is configured in the routing table the administrator will see:
Gate way of last resort is 0.0.0.0 to Network 0.0.0.0
If a default route has not been set the admin will see
Gate way of last resort is not set
Verifying static route configurations
Once the administrator has configured the required or need it static routes it is important to verify that they are in the routing table and that routing is working as expected.
Show running-configcan be used to view the active running configuration in RAM to verify that the static route was entered correctly.
Show ip route needs to be used to make sure that the static route is present in the routing tables.
Path Determination -A router generally relays a packet information from one link to another using two functions:
- Path Determination functions
- Switching function
- Switching
- Allows a router to accepts a packet on one interface and foward it thorugh a second interface.
- Path Determination
- Enables the router to select the most appropriate interface for forwarding a packet.
Dynamic Routing
Path determination occurs at Layer 3. Layer 3 evaluates the available paths to a destination and establish a prefered handling of a packet.
Path determination is the process that a router uses to choose the next hop in a path toward a packet's ultimate destination. This is called routing the packet.
- Routing tables
The path determination process is achivied by the routing protocols when they build and maintain routing tables. Route information varies depending on the routing protocol the administrator decides to used. Routing protocols fill routing tables with a variety of information. The information kept on the routing table are:
- Protocol Type;
- Destination /next-hop associations
- Routing Metrics
- Outbound Interface
In order for routers to keep an up to date routing table they have to communicate changes between them, the changes are communicated thorough updates messages. The depending on the routing protocol, routing updates messages can be sent:
- Periodically
- When there is a change in the network topology
- Distance Vector Protocols
- These protocols used direction (vector) and distance (hop) to select the best route for a packet. Distance vector algoriths perdiodically send all or some portion of their routing table to their adjacent neighbors. Routers using a distance vector protocols sent updates to other routers even though there is no changes to the network. Router using distant vector protocol maintained their table through a process called routing by rumor; they make the changes based on what it is told to them. When the router receives a copy of the routing table from his neighbor it compares it to his own and make the changes based on the updated information.
- Link State protocols
- They overcome the limits of distance vector protocols.
- Respond much quicker to network changes.
- Sent trigger updates only when network changes occurs.
- Sent LSF(link state refreshes)at long intervals every 30 minutes.
When a link change states, the device that detected the change creates an LSA (link state advertisement) concerning that link (route) and fowards it to all neighboring devices. Each Router takes acopy of the LSA, updates itw own link-state database and fowards the LSA to all devices.