2021-22-3Sem-CE257-DCN Practical - 5 - Journal
2021-22-3Sem-CE257-DCN Practical - 5 - Journal
Practical-5
Date: - -
AIM: Understand and identify Layer-3 functionality.
Tools required:
1. Desktop Computer
2. Cisco Packet Tracer
Time distribution
Exercise-1 30 minutes
Exercise-2 30 minutes
Exercise-3 45 minutes
Simulate different scenarios (Exercises-1 to 3) given below in Cisco packet tracker. Fill up respective
tables, justify statements and write conclusion in your words.
Routing
A Router is a process of selecting path along which the data can be transferred from
source to the destination. Routing is performed by a special device known as a router.
A Router works at the network layer in the OSI model and internet layer in TCP/IP model
A router is a networking device that forwards the packet based on the information
available in the packet header and forwarding table.
The routing algorithms are used for routing the packets. The routing algorithm is nothing
but a software responsible for deciding the optimal path through which packet can be
transmitted.
The routing protocols use the metric to determine the best path for the packet delivery.
The metric is the standard of measurement such as hop count, bandwidth, delay, current
load on the path, etc. used by the routing algorithm to determine the optimal path to the
destination.
The routing algorithm initializes and maintains the routing table for the process of path
determination.
Page 1 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Types of routing
There are three types of routing as shown in figure 5.1.
Figure 5.1
Static routing:
Static Routing is also known as Nonadaptive Routing.
It is a technique in which the administrator manually adds the routes in a routing
table.
Dynamic routing:
It is also known as Adaptive Routing.
It is a technique in which a router adds a new route in the routing table for each packet
in response to the changes in the condition or topology of the network.
Dynamic protocols are used to discover the new routes to reach the destination.
Default routing:
Default Routing is a technique in which a router is configured to send all the packets
to the same hop device, and it doesn't matter whether it belongs to a particular
network or not. A Packet is transmitted to the device for which it is configured in
default routing.
Page 2 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Routing Protocols
Routing protocols can be either an interior protocol or an exterior protocol. An interior protocol
handles intradomain routing; an exterior protocol handles interdomain routing.
Several intra-domain and inter-domain routing protocols are in use. We discuss two intra-
domain routing protocols: distance vector and link state. We also introduce one inter-domain
routing protocol: path vector.
Page 4 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Page 5 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Exercise-1
Redraw above diagram which includes IP address and MAC address. Take IP address and MAC
address as per your knowledge.
Ping from PC0 to PC1 and vice versa and get the output here.
Write down the ARP table of PC0 and PC1. Write down Routing table Router0.
10.0.0.0 -- 0
11.0.0.0 -- 0
Which are the following statements correct? Also justify each statement.
Page 6 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Conclusions (Inference):
1.
2.
Page 7 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Exercise-2
Redraw above diagram which includes IP address and MAC address. Take IP address and MAC
address as per your knowledge.
Ping from PC0 to PC1 and vice versa and get the output here.
Write down ARP table of PC0 and PC1. Write down switch table of switches. Write down Routing
table of routers.
ARP table entry of PC0
Page 8 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Which are the following statements correct? Also justify each statement.
Page 9 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Exercise-3
Redraw above diagram which includes IP address and MAC address. Take IP address and MAC
address as per your knowledge.
Write down ARP table of PC0, PC1 and PC3 after successful ping. Write down switch table of
switches. Write down Routing table of routers.
Page 10 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Page 11 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Conclusions (Inference):
1.
2.
3.
4.
Page 12 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
GATE Questions:
1. Consider a network with 6 routers R1 to R6 connected with links having
weights as shown in the following diagram.
All the routers use the distance vector-based routing algorithm to update their
routing tables. Each router starts with its routing table initialized to contain an
entry for each neighbor with the weight of the respective connecting link. After
all the routing tables stabilize, how many links in the network will never be
used for carrying any data?
A) 4
B) 3
C) 2
D) 1
Suppose the weights of all unused links are changed to 2 and the distance
vector algorithm is used again until all routing tables stabilize. How many links
will now remain unused?
A) 0
B) 1
C) 2
D) 3
Page 13 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
The network uses a Distance Vector Routing protocol. Once the routes have
been stabilized, the distance vectors at different nodes are as follows.
N1: (0, 1, 7, 8, 4)
N2: (1, 0, 6, 7, 3)
N3: (7, 6, 0, 2, 6)
N4: (8, 7, 2, 0, 4)
N5: (4, 3, 6, 4, 0)
Each distance vector is the distance of the best known path at that instance to
nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric
and the cost is identical in both directions. In each round, all nodes exchange
their distance vectors with their respective neighbors. Then all nodes update
their distance vectors. In between two rounds, any change in cost of a link will
cause the two incident nodes to change only that entry in their distance vectors.
The cost of link N2 − N3 reduces to 2 (in both directions). After the next round
of updates, what will be the new distance vector at node, N3?
A) (3, 2, 0, 2, 5)
B) (3, 2, 0, 2, 6)
C) (7, 2, 0, 2, 5)
D) (7, 2, 0, 2, 6)
Page 14 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
The network uses a Distance Vector Routing protocol. Once the routes have
been stabilized, the distance vectors at different nodes are as follows.
N1: (0, 1, 7, 8, 4)
N2: (1, 0, 6, 7, 3)
N3: (7, 6, 0, 2, 6)
N4: (8, 7, 2, 0,
N5: (4, 3, 6, 4, 0)
Each distance vector is the distance of the best known path at that instance to
nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric
and the cost is identical in both directions. In each round, all nodes exchange
their distance vectors with their respective neighbors. Then all nodes update
their distance vectors. In between two rounds, any change in cost of a link will
cause the two incident nodes to change only that entry in their distance vectors.
The cost of link N2 − N3 reduces to 2 (in both directions). After the next round
of updates, the link N1 − N2 goes down. N2 will reflect this change immediately
in its distance vector as cost, ∞. After the NEXT ROUND of update, what will be
the cost to N1 in the distance vector of N3 ?
A) 3
B) 9
C) 10
D) ∞
5. Consider a computer network using the distance vector routing algorithm in its
network layer. The partial topology of the network is shown below.
Page 15 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
The objective is to find the shortest-cost path from the router R to routers P
and Q. Assume that R does not initially know the
shortest routes to P and Q. Assume that R has three neighbouring routers
denoted as X, Y and Z. During one iteration, R measures its distance to its
neighbours X, Y , and Z as 3, 2 and 5, respectively. Router R gets routing vectors
from its neighbours that indicate that the distance to router P from routers X, Y
and Z are 7, 6 and 5, respectively. The routing vector also indicates that the
distance to router Q from routers X, Y and Z are 4, 6 and 8 respectively. Which
of the following statement(s) is/are correct with respect to the new routing
table o R, after updation during this iteration?
A) The distance from R to P will be stored as 10
B) The distance from R to Q will be stored as 7
C) The next hop router for a packet from R to P is Y
D) The next hop router for a packet from R to Q is Z.
6. For the network given in the figure below, the routing tables of the four nodes
A, E, D and G are shown. Suppose that F has estimated its delay to its neighbors,
A, E, D and G as 8, 10, 12 and 6 msecs respectively and updates its routing table
using distance vector routing technique.
Page 16 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
A)
B)
C)
D)
7. Consider the following three statements about link state and distance vector routing
protocols, for a large network with 500 network nodes and 4000 links.
Page 17 of 18
CE257 DATA COMMUNICATION & NETWORKING <<Student ID>>
Page 18 of 18