LAB4 Javed
LAB4 Javed
INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS
A LAB REPORT
ON
STATIC ROUTING AND DEFAULT ROUTE
Objectives:
Requirements:
Exercises:
1. How does a sending host know whether the destination computer is on the same
network or on a different network? Explain.
2. Explain, how the data is forwarded from sending host in each of the following
cases:
a. When the destination computer is within the same network
b. When the destination computer is on the different network
If the destination computer is on the same network, the sending host uses the local
network infrastructure, like switches, to directly forward the data to the destination's
MAC address, facilitating communication within the same subnet.
When the destination computer is on a different network, the sending host forwards the
data to its configured gateway or router, which then routes the data through various
intermediate networks until it reaches the destination network. The final router on the
destination network then forwards the data to the destination computer using its local
MAC address.
4. What information can we get from the routing table? How can we observe the
routing table of a router? Explain.
The routing table contains details about the available paths for network traffic, such as
destination networks, subnet masks, next-hop addresses, and exit interfaces. To view the
routing table of a router, network administrators usually access a command-line
interface (CLI). The `show ip route` command displays the routing table, showing all
known routes and their statuses. This command provides information about directly
connected networks, router interfaces, and static routes.
5. What is a default route? What is its importance? State the default route
configuration command with its syntax.
A default route serves as a catch-all path for a router to forward packets to destinations
not specifically listed in the routing table. This route is crucial as it simplifies routing,
particularly when a router is connected to a vast or unpredictable number of networks,
by offering a single route for all unspecified destinations. The default route sends such
traffic to a designated gateway, usually an ISP router or a core network device.
Command: ip route
Syntax: ip route 0.0.0.0 0.0.0.0 [next-hop address or outgoing interface]
6. Note down the observation of each step with necessary commands specified in
activities A, B and C mentioned above and comment on it.
Activities:
1. Configure the hostname, console password, vty password and enable password in
both routers.Hostname of Router0 should be your first name_0, hostname of
Router1 should be your firstname_1 and so on. Set console password as your first
name, enable password as cisco and vty password as class for each router.
Hostnames for routers were set as javed_0, javed_1, javed_2, and javed_3 respectively.
Also, passwords were set for console, enable, and vty as per required specification using
appropriate commands.
2. Configure each interface of the router with the given Ip address and subnet
mask.
Each interface of the router was configured with Ip address and subnet mask as given in
figure using appropriate commands.
3. Configure the IP address, subnet mask and default gateway on each computer as
specified in figure.
The IP address, subnet mask and default gateway on each computer were configured as
specified in figure.
4. Observe the output of the command show ip route in each router and note down
the result.
‘show ip route’ command displayed the routing table for the router, highlighting
connected and local routes.
The output on router 0 shows that it has two primary subnets: 202.60.0.0/24 and
202.60.1.0/24, both directly connected through GigabitEthernet0/0 and
GigabitEthernet0/1 respectively. Additionally, local routes 202.60.0.1/32 and
202.60.1.1/32 correspond to the IP addresses assigned to the router’s interfaces. There
are no other static or dynamic routes configured, and a default route is not set.
5. Observe the output while using the ping command from PC0 to PC1, PC2, PC3,
Server0, Server1, Router0, Router1, Router2 and Router3.
PC0 to PC1, PC2, PC3, Server1, Router2, Router3 => destination host unreachable
( ping failed )
PC0 to Server0, Router0 => ping succeeded
PC0 to Router1 (202.60.1.2) => request timed out (ping failed)
PC0 to Router1(202.60.3.1 and 202.60.2.1) => destination host unreachable (ping failed)
6. Observe the output while using the ping command from PC1 to PC0, PC2, PC3,
Server0, Server1, Router0, Router1, Router2 and Router3.
PC1 to PC0, PC2, PC3, Server0, Server2, Router3 => destination host unreachable( ping failed )
PC1 to Router1 => ping succeeded
PC1 to Router0 (202.60.1.1), Router2 (202.60.3.2) => request timed out (ping failed)
PC1 to Router0 (202.60.0.1), Router2 (202.60.5.1 and 202.60.4.1) => destination host unreachable
7. Observe the output while using the ping command from PC2 to PC0, PC1, PC3,
Server0, Server1, Router0, Router1, Router2 and Router3.
PC2 to PC0, PC1, PC3, Server0, Server1, Router0 => destination host unreachable (ping
failed)
PC2 to Router2 => ping succeeded
PC2 to Router1 (202.60.3.1), Router3 (202.60.5.2) => request timed out (ping failed)
PC2 to Router1 (202.60.2.1 and 202.60.1.2), Router3 (202.60.6.1) => destination host
unreachable
8. Observe the output while using the ping command from PC3 to PC0, PC1, PC2,
Server0, Server1, Router0, Router1, Router2 and Router3.
PC3 to PC0, PC1, PC2, Server0, Router0, Router1 => destination host unreachable (ping
failed)
PC3 to Router3, Server1 => ping succeeded
PC3 to Router2 (202.60.5.1) => request timed out (ping failed)PC3 to Router2
(202.60.3.2 and 202.60.4.1) => destination host unreachable (ping failed)
9. From Router0 use ping command to Router1, Router2, Router3, PC0, PC1, PC2,
PC3 andobserve the output.
10. From Router1 use ping command to Router0, Router2, Router3, PC0, PC1,
PC2, PC3 and observe the output.
12. From Router3 use ping command to Router0, Router1, Router2, PC0, PC1,
PC2, PC3 and observe the output.
13. From PC0 enter into Router0 using telnet and configure the static route for
each destination network.
Using telnet from PC0, static routes for each destination network were configured for
Router0 as:
javed_0(config)#ip route 202.60.2.0 255.255.255.0 202.60.1.2
javed_0(config)#ip route 202.60.3.0 255.255.255.0 202.60.1.2
javed_0(config)#ip route 202.60.4.0 255.255.255.0 202.60.1.2
javed_0(config)#ip route 202.60.5.0 255.255.255.0 202.60.1.2
javed_0(config)#ip route 202.60.6.0 255.255.255.0 202.60.1.2
14. From there enter into Router1 using telnet and configure the static route for
each destination network.
Using telnet from PC1, static routes for each destination network were configured for
Router1 as:
javed_1(config)#ip route 202.60.0.0 255.255.255.0 202.60.1.1
javed_1(config)#ip route 202.60.4.0 255.255.255.0 202.60.3.2
javed_1(config)#ip route 202.60.5.0 255.255.255.0 202.60.3.2
javed_1(config)#ip route 202.60.6.0 255.255.255.0 202.60.3.2
15. Similarly enter into Router2 using telenet and configure the static route for
each destination network. Again enter into Router3 using telnet and configure the
static route for each destination network.
Using telnet from PC2, static routes for each destination network were configured for
Router2 as:
javed_2(config)#ip route 202.60.6.0 255.255.255.0 202.60.5.2
javed_2(config)#ip route 202.60.0.0 255.255.255.0 202.60.3.1
javed_2(config)#ip route 202.60.1.0 255.255.255.0 202.60.3.1
javed_2(config)#ip route 202.60.2.0 255.255.255.0 202.60.3.1
Using telnet from PC3, static routes for each destination network were configured for
Router3 as:
javed_3(config)#ip route 202.60.0.0 255.255.255.0 202.60.5.1
javed_3(config)#ip route 202.60.1.0 255.255.255.0 202.60.5.1
javed_3(config)#ip route 202.60.2.0 255.255.255.0 202.60.5.1
javed_3(config)#ip route 202.60.3.0 255.255.255.0 202.60.5.1
javed_3(config)#ip route 202.60.4.0 255.255.255.0 202.60.5.1
Above output observed on Router0 indicates that, there are several static routes
configured, directing traffic for the 202.60.2.0/24, 202.60.3.0/24, 202.60.4.0/24,
202.60.5.0/24, and 202.60.6.0/24 networks via the next-hop IP address 202.60.1.2.
This time ping succeeded from PC0 to all the devices: PC1, PC2, PC3, Server0, Server1,
Router0, Router1, Router2 and Router3.
This time ping succeeded from PC1 to all the devices: PC0, PC2, PC3, Server0, Server1,
Router0, Router1, Router2 and Router3.
7. Ping from PC2
This time ping succeeded from PC2 to all the devices: PC0, PC1, PC2, Server0, Server1,
Router0, Router1, Router2 and Router3.
This time ping succeeded from PC3 to all the devices: PC0, PC1, PC2, Server0, Server1,
Router0, Router1, Router2 and Router3.
This time ping succeeded from Router0 to all the devices: PC0, PC1, PC2, PC3,
Router1, Router2 and Router3.
This time ping succeeded from Router1 to all the devices: PC0, PC1, PC2, PC3,
Router0, Router2 and Router3.
This time ping succeeded from Router2 to all the devices: PC0, PC1, PC2, PC3,
Router0, Router1 and Router3.
This time ping succeeded from Router3 to all the devices: PC0, PC1, PC2, PC3,
Router0, Router1 and Router2.
17. Observe the output of tracert command from PC0 to PC1, PC2 and PC3.
Similarly, observe the output of tracert command from PC3 to PC0, PC1 and PC2.
The output of the tarcert command showed the path taken by packets to reach the
destination IP address with each hop representing a router or gateway the packets
traverse.
Above output of tracert command from PC3 to PC0 indicates trace completes in 5 hops
with the following IP addresses at each hop: 202.60.6.1, 202.60.5.1, 202.60.3.1,
202.60.1.1 and 202.60.0.3 .
18. What is observed while using tracert command from PC0 to a destination not
mentioned in the above network such as 2.2.2.2?
The "tracert 2.2.2.2" command from PC0 shows that the packets are repeatedly looping
back to Router0 and intermittently timing out. This indicates that there is no valid route
to the destination 2.2.2.2 in the router’s routing table, causing a routing loop. The
packets are being continuously forwarded back to Router0 because it does not have a
route to forward them to the correct destination.
B. Use the network topology given above in A and perform the followings:
1. Remove all static routes configured in activity A and configure the static routes
to minimize the route entries by using the default route in each router.
All static routes configured in activity A were removed from all routers using the 'no ip
route' command. Then, default routes were configured in each router to minimize route
entries.
Router0:
javed_0(config)#ip route 0.0.0.0 0.0.0.0 202.60.1.2
Router1:
javed_1(config)#ip route 202.60.0.0 255.255.255.0 202.60.1.1
javed_1(config)#ip route 0.0.0.0 0.0.0.0 202.60.3.2
Router2:
javed_2(config)#ip route 202.60.6.0 255.255.255.0 202.60.5.2
javed_2(config)#ip route 0.0.0.0 0.0.0.0 202.60.3.1
Router3:
javed_3(config)#ip route 0.0.0.0 0.0.0.0 202.60.5.1
2. Test the connectivity from PC0, PC1, PC2 and PC3 to each of the given PC and
router using ping command and note down the result.
During testing connectivity from PC0, PC1, PC2, and PC3 to each of the other PCs and
routers using the ping command, it was confirmed that all devices were successfully
connected as none of the pings failed from any device.
3. Observe the output of show ip route in each router and comment on the result.
The route entries in each router had gotten shorter this time.
Above output observed on Router0 shows that there is a static default route , indicated
by ‘s*’, which forwards all traffic for unknown destinations to the next-hop IP address
‘202.60.1.2’. This static route is also marked as the gateway of last resort.
4. Observe the output of tracert command from PC0 to PC1, PC2 & PC3.
The result of tracert was exactly the same as observed in earlier activity.
5. Similarly use tracert command from PC3 to PC0, PC1 & PC2 to observe how the
packet traveled across the network to reach the destination.
To reach PC2, the tracert command showed that packets traveled from PC3 to Router3,
then to Router2, and finally to PC2.
Likewise, to reach PC1, the tracert command indicated that packets traveled from PC3
to Router3, then to Router2, then to Router1, and finally to PC1.
Similarly, to reach PC0, the tracert command indicated that packets traveled from PC3
to Router3, then to Router2, then to Router1, then to Router0, and finally to PC0.
6. What is observed while using tracert command from PC0 to a destination not
mentioned in the above network such as 2.2.2.2?
This time tracert revealed hop from PC0 to Router0, then to Router1. After this, packets
kept on oscillating between Router1 and Router2 and could not find the destination
network. Oscillation happened because of the way in which static routes have been
configured in Router1 and Router2 using the default route.
C. Create the following network using Packet Tracer and perform the followings:
2. Configure the hostname, console password, vty password and enable password in
both routers. Hostname of Router0 should be your first name and the hostname of
Router1 should be your surname.
Set console password as your first name, enable password as cisco and vty
password as your surname for each router.
Hostname, console password, vty password and enable password were configured in
both routers as per the specification of this activity.
3. Configure the Interfaces of Routers with following IP addresses and turn on the
corresponding interfaces:
4. Observe and note down the output of the command show ip route in each router.
5. Observe the output while using the ping command from PC0 to PC1, PC2, PC3,
PC6, Router0 and Router1 (use each IP address of the router).
6. Observe the output while using the ping command from PC3 to PC1, PC4, PC5,
PC6, Router0 and Router1 (use each IP address of router).
7. Observe the output while using the ping command from PC6 to PC0, PC3, PC7,
PC8, Router0 and Router1 (use each IP address of router).
8. Observe the output while using the ping command from Router0 to PC0, PC1,
PC2, PC3, PC4 ,PC5, PC6, PC7, PC8 and Router1 (use each IP address of
Router1).
9. Observe the output while using the ping command from Router1 to PC0, PC1,
PC2, PC3, PC4, PC5, PC6, PC7, PC8 and Router0 (use each IP address of
Router0).
Default gateway was assigned for each computer as the activity specification.
12. From PC0 enter into Router0 using telnet and configure the static route for
destination network of Network 3 as:
Ip route 200.200.20.96 255.255.255.224 200.200.20.66
13. From there enter into Router1 using telnet and configure the static route for
destination network of Network 1 and Network 2.
Ip route 200.200.20.0 255.255.255.224 200.200.20.65
Ip route 200.200.20.32 255.255.255.224 200.200.20.65
Static routes for network1 and network2 were set in router1 as specified.
14. Repeat the step from 4 to 9 and observe the output. Compare the result with the
previous step (ie activity number 11) and comment on it.
4. Show ip route
In addition to the router’s subnets and interfaces, this time the command also displayed
the static ip routes that were just set using ip route command.
This time all the pings succeeded because of the set static ip routes. This enabled routers
to forward packets to the appropriate direction when the destination was located in a
different subnet to which the router was not connected.
15. Remove both routes added (into Router1) in step 13 by using no ip route
command.
Using no ip route command, both the routes added to Router1 in step 13 were removed.
16. Since the Network 1 and Network 2 are in consecutive address, we can
aggregate them to use a single entry for the route as:
Ip route 200.200.20.0 255.255.255.192 200.200.20.65
17. Again observe the output by repeating the step from 4 to 9 and observe the
output. Compare the result with the previous step (ie. activity number 14) and
comment on it.
4. Show ip route
Router1 showed new ip route set in activity 14. Router0 was exactly same as activity 14.
This showed that the aggregated single entry ip route in router1 worked well.
18. Remove the link between Router0 and Router1 and observe the connectivity
between computers from network3 to network1 & network2 and vice versa. Note
down the routing table of each router using show ip route command.
After removing the link, ping failed (destination host unreachable) from PC0 to PC6 and
vice versa. This proved computers in network3 were no more connected to computers in
network1 and network2.
In this lab exercise on Static Routing & Default Route using Packet Tracer, we explored
fundamental concepts and practical configurations related to routing in a network
environment. The objectives of the lab were to understand static routing, default routing,
and route aggregation. Here are the key takeaways and observations from the exercises
performed:
6. Connectivity Testing:
- Through `ping` commands and `tracert` (traceroute), we verified connectivity
between various devices (PCs and routers) after configuring static and default routes.