0% found this document useful (0 votes)
11 views13 pages

Dynamic Routing Configuration Guide

Uploaded by

sumeethnsk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views13 pages

Dynamic Routing Configuration Guide

Uploaded by

sumeethnsk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Practical 8

Dynamic Routing using CLI

Router 0 – Left Router


Router>enable

Router#configure terminal

Router(config)#int fa0/0

Router(config-if)#ip add [Link] [Link]

Router(config-if)#no shutdown

Router(config-if)#int s 0/0/0
Router(config-if)#ip add [Link] [Link]

Router(config-if)#no shutdown

Router 2 - Middle Router


Router>enable

Router#config terminal

Router(config)#int fa 0/0

Router(config-if)#ip add [Link] [Link]

Router(config-if)#no shutdown

Router(config-if)#int s 0/0/0

Router(config-if)#ip add [Link] [Link]

Router(config-if)#no shutdown

Router(config)#int s 0/1/0

Router(config-if)#ip add [Link] [Link]

Router(config-if)#no shutdown

Router 1 – Right Router


Router>enable

Router#config terminal
Router(config)#int fa 0/0

Router(config-if)#ip add [Link] [Link]

Router(config-if)#no shutdown

Router(config-if)#int s 0/0/0

Router(config-if)#ip add [Link] [Link]

Router(config-if)#no shutdown

Router 0 – Left Router


Router(config)#router rip

Router(config-router)#network [Link]

Router(config-router)#network [Link]

Router 2 - Middle Router


Router(config)#router rip

Router(config-router)#network [Link]

Router(config-router)#network [Link]

Router(config-router)#network [Link]
Router 1 – Right Router
Router(config)#router rip

Router(config-router)#network [Link]

Router(config-router)#network [Link]

Configuring RIPv2
Configuring RIPv2 is a pretty straightforward process. Only three steps are required:

1. enabling RIP by using the router rip global configuration command


2. instructing the router to use RIPv2 by typing the version 2 command
3. telling RIP which networks to advertise by using one or more network commands.

So, the configuration on R1 should look like this:

R1(config)#router rip

R1(config-router)#version 2

R1(config-router)#network [Link]

R1(config-router)#network [Link]
The configuration on R2 looks similar, but with different network number for the directly
connected subnet:

R2(config)#router rip

R2(config-router)#version 2

R2(config-router)#network [Link]

R2(config-router)#network [Link]

You can verify that router R1 has a route to R2’s directly connected subnet by typing the
show ip route command:

Router#show ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is not set

[Link]/24 is subnetted, 1 subnets

C [Link] is directly connected, FastEthernet0/0


C [Link]/16 is directly connected, FastEthernet0/1

R [Link]/24 [120/1] via [Link], [Link], FastEthernet0/1

The legend lists R for all RIP routes in the routing table. Also note that the administrative
distance of 120 is shown, together with the metric of 1.

The show ip route Command Explained

The 'show ip route' command displays the structure and contents of the routing table. You
can use the 'show ip route' for the following purposes.

• To list the routing table's entries


• To view how many routes available for a particular destination
• To view the route the router uses to forward data packets for a specific destination
• To know the routes added by a routing protocol
• To know the routes added by the router from the IP configurations
• To view the current status of a route
• To verify and troubleshoot the routing

To use the 'show ip route' command, enter privileged-exec mode and run the following
command.

#show ip route

The output of this command is organized into three sections. These sections are Codes,
Default route, and Routes. The following image shows the output of this command.
Codes

The routing table uses the abbreviated code to store the type of route. This section displays
the meaning of each abbreviated code.

Default route

This section displays the default route. The router uses the routing table's routes to forward
data packets. If there is no route available for the destination address of a data packet, the
router uses the default route to forward the data packet. If the default route is not set, the
router discards the data packet.

Routes

The routing table puts all routes in this section. To arrange routes, the routing table uses
blocks. Each block contains a classful network and the classless networks created from the
classful network. If a classful network is subnetted into small classless networks and the
router knows the routes for the classless networks, the routing table uses a heading to group
all classless networks of the same classful network.

The routing table uses the heading for a classful network only if it knows more than one
route for the classful network. If there is only one route for the network, the routing table
adds the route without the heading.
The following image shows routes with the heading and without the heading.

The heading includes three things: the classful network, the total number of subnets, and the
total number of masks used to create the subnets. Let's understand these things.

The classful network

The routing table organizes routes by classful networks. If a classful network is subnetted
into classless networks and the routes for the classless networks are available, the router
arranges all classless networks under the classful network.

Total number of subnets

A router learns routes from various sources. This part shows the total number of routes the
router learned from all sources for the classful network. The total number includes all routes
for the classful network and all classless networks created from the same classful network.

When you assign an IP configuration to the interface, the router automatically creates two
routes from the IP configuration and adds them to the routing table. The router adds the first
route for the network address of the IP configuration. The router uses this route to forward
data packets. The router adds the second route for the interface. The router uses this route
to reach the interface. The router uses the prefix /32 for this route.

Total number of masks

This is the total number of different masks used in all routes for all subnets created from the
classful network mentioned in the heading.

The routing table uses a heading to organize all routes created from the same classful
network. We have already discussed the things the routing table uses to create the heading.
Now let's discuss the things the routing table uses to build route entries.
Legend code

The legend code is the first thing in a route entry. A router can learn a route from various
sources. The legend code shows the source from which the router learned the route. The
routing table stores the legend code in the abbreviated form. The first section of the output
of the 'show ip route' command shows the meaning of each code.

Network address / Subnet mask

Each route reaches a specific destination. Each route entry includes only one destination
network. After the legend code, the routing table places the destination network address with
the subnet mask in the route entry.
Routers use the routing table to make a forwarding decision. A router compares the
destination address of the data packet to the network address stored in each entry of the
routing table. If the network address mentioned in an entry matches the destination address
of the data packet, the router forwards the data packet from the interface or to the next-hop
router's interface mentioned the matching entry.

To learn how this process works or how routers take a routing decision, you can check the
following tutorial.

Routing Decision Longest Match Explained

AD(Administrative Distance)/Metric
The routing table stores only one route for each destination. If the router learns more than
one route for a destination from different sources, the router adds only the best route to the
routing table. To select the best route, the router uses the AD (Administrative Distance)
value.

The AD value is the trustworthiness of a source. A source with a lower AD value is


considered more reliable than a source with a higher AD value.

Let's take an example. A router learned two routes for the same destination. The AD value
of the first source is 10 and the AD value of the second source is 20. The router will add the
route learned from the first source to the routing table.

A router can also learn more than one route from the same source. If the router learns more
than one route for a destination from the same source, the router uses the metric value of the
routes to select the best route. Sources use the metric value to calculate the best route for the
destination.

In simple words, a router uses the AD value to select the best route learned from different
sources and the metric value to select the best route learned from the same source.
The IP address of the next-hop router

This is the IP address of the next-hop router. A router forwards the packet to the next-hop
router if the destination address and the address specified in the route match.

Common questions

Powered by AI

The RIPv2 network setup, while straightforward and easy to configure, is limited in terms of scalability and incurs significant administrative overhead as it uses distance vector routing. RIPv2 supports a maximum hop count of 15, which restricts its use in larger networks. It also requires frequent route advertisements across the network, leading to increased bandwidth usage and inefficient routing updates, particularly in expansive networks. As networks grow, the simplicity of RIPv2 can lead to inefficiency, necessitating consideration of more sophisticated routing protocols like OSPF or EIGRP .

The IP address of the next-hop router is crucial in the routing table as it defines the immediate destination for forwarding a packet on its route to the final destination. This address is significant because it tells the router where to send the packet next, ensuring that data progresses along the correct path. Without the next-hop address, routers cannot forward packets effectively, leading to misrouting or packet loss .

Configuring a default route in a routing table is essential in scenarios where routers do not have specific routes for all possible destinations, such as networks with limited topology knowledge or stub networks. A default route provides a catch-all path for packets with unknown destinations, preventing packet loss. The absence of a default route can lead to packets being discarded if no exact match is found, resulting in communication failures and service disruptions, particularly critical in environments dependent on internet connectivity or external networks .

Using different subnet masks in a routing table impacts network reachability by specifying the extent of a network or subnetwork. Subnet masks determine which portion of the IP address represents the network and which portion represents hosts. They influence how routers interpret and route packets through the network by affecting route precision and efficiency. Various masks allow networks to optimize address utilization and control traffic segmentation, impacting reachability and routing strategy .

The 'longest match' concept in routing decisions refers to how routers select routes based on the most specific route available. It influences packet forwarding by comparing the destination IP address with the routing table entries to find the route with the longest matching prefix. This means that a more specific route (e.g., /24) is favored over a less specific one (e.g., /16), ensuring that packets are directed as precisely as possible to their destination, optimizing traffic flow and network efficiency .

The 'show ip route' command output aids in understanding routing table entries by organizing information into three sections: Codes, Default route, and Routes. The Codes section provides reverse lookup for the kinds of routes based on legend codes, which identify the route's source. The Default route section displays the default action for packet forwarding when no specific route exists. The Routes section details each route, including network addresses and masks, helping administrators verify connectivity and troubleshoot routing issues by showing route origins and preferences .

Configuring RIPv2 involves three steps: enabling RIP by using the 'router rip' command, specifying the RIPv2 version with the 'version 2' command, and declaring the networks to be advertised using one or more 'network' commands. Each step serves a purpose. Enabling RIP initiates the use of the RIP protocol on the router, specifying the version ensures the correct version of the protocol that supports CIDR (Classless Inter-Domain Routing) is used, and indicating the networks to be advertised allows the router to know which networks need to be shared with neighboring routers, thus ensuring network reachability .

The router configuration verifies proper route advertisement by using the 'show ip route' command to list all the routes in the routing table, including those learned from RIP. It checks for routes labeled with 'R' indicating RIP-learned routes and reviews associated metrics and administrative distances. This allows network administrators to confirm that the expected routes are being advertised, have the correct metrics, and are being learned properly from neighboring routers, thereby ensuring effective network communication .

Subnetting affects route organization by segregating routes into classful and classless networks within the routing table. Classless networks derived from a classful network are grouped under their respective classful heading if multiple subnets exist. The routing table uses this hierarchy to efficiently organize and present routes, indicating subnets and how they are derived from larger, classful networks. This structured organization helps in route lookup processes and network design analysis .

Administrative Distance (AD) is crucial in routing because it determines the trustworthiness of a source providing a route. It affects route selection by allowing the router to prioritize routes from the most reliable sources, thus impacting decisions on which paths to prefer over others. Lower AD values signify more trustworthy sources, so a route with a lower AD will be preferred over one with a higher AD, even if both routes lead to the same destination. This ensures accurate and optimal routing within networks .

You might also like