CS204 Assignment 3 Solved

30.00 $

Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment


5/5 - (1 vote)
  1. In the IPv4 addressing format, the number of networks allowed under Class C addresses is _____________
  2. The network is a _____________

(a) Class A network        (b) Class B network

  • Class C network
  • Class D network


  1. In a classful addressing, first three bits in Class C IP address is __________



Subnetting: Subnetting is the practice of dividing a network into two or more smaller networks.  

To understand subnetting, please go through the links given below:



Subnetting is done with the help of subnet mask as explained in here:

https://studyccna.com/subnetmask/ https://studyccna.com/createsubnets/

CIDR (Classless inter-domain routing) is a method of public IP address assignment which tackles the problem of IP address exhaustion problem (i.e., more networks and computers than the number of IP addresses available). It uses subnetting and supernetting principle for efficient allocation of IP addresses to computers.

https://studyccna.com/cidrclasslessinterdomainrouting/ https://www.ionos.com/digitalguide/server/knowhow/cidrclasslessinterdomainrouting/



  1. If a class B network on the Internet has a subnet mask of, what is the maximum number of hosts per subnet?
  2. (Multiple Choice Question) The subnet mask for a particular network is Which of the following pairs of IP addresses could belong to this network?
  • 57.88.62 and
  • 35.28.2 and
  • 203.31.87 and
  • 8.129.43 and


  1. In a class B subnet, we know the IP address of one host and the mask as given below:

IP address:


What is the first address (Network address)?


  1. The broadcast address for IP network with subnet mask is _____________


  1. Consider the graph given below:



  • In the above graph, nodes represent the routers, and edges represent the link costs between the routers.
  • Apply Distance Vector Routing on the above graph, and determine the shortest path between every pair of nodes.
  • Initially every router/node will build its own routing table based on the link cost value of its adjacent neighbors.
  • In each iteration, every node will then subsequently share the distance vectors to its neighbors, who will update their own routing table based on Bellman-Ford Distance update equation (dx(y) = min (cost(x,v)+dv(y) for all v). This process continues till convergence is achieved.


Your Task: Show the contents of the routing table initially for all the nodes, and update the routing table accordingly as mentioned in each iteration. The number of iterations ideally should be equal to the number of nodes present in the graph, after which convergence is achieved. Finally, show the contents of the routing table corresponding to every node.

Based on the output of the algorithm, write down the shortest path between every pair of nodes in the graph using the values in the routing table.


A typical routing table will consist of 3 entries primarily: Destination Node name, Distance, Next Hop Name.

For example, initially, routing table for node A is:

Destination Distance Value (which is the link cost value) Next Hop
A 0 A
B 4 B
C Infinity
D Infinity
E Infinity



Routing Table for B is:

Destination Distance Value (which is the link cost value) Next Hop
A 4 A
B 0 B
C 1 C
D Infinity
E 5 E




  1. Link State Routing:

Consider the graph shown below:




  1. Apply Dijkstra’s algorithm, and determine the shortest path between:

(a)  node A and node E (b) Node A and node D

  1. What is the time complexity of Dijkstra’s algorithm? Explain how you obtained the above answer? Can we do better, how to do so and what will be the lowest time complexity in such a case?