Data Communication And Computer Networks Assignment # 2 PDF

Title Data Communication And Computer Networks Assignment # 2
Author MUHAMMAD Abu_Hurairah
Course Data Communication and Computer Networks
Institution COMSATS University Islamabad
Pages 5
File Size 200.1 KB
File Type PDF
Total Downloads 82
Total Views 163

Summary

Data Communication And Computer Networks Assignment # 2...


Description

COMSATS University Islamabad, Lahore Campus

Semester Fall 2021 Course Title:

Data Communications and Computer Networks Course Code: CSC339

Course Instructor:

Dr. Muhammad Hasanain Chaudary

Program Name:

BS Software Engineering, BS Computer Science

Semester:

5th

A

Date:

Student’s Name:

Muhammad Abu-Hurairah

Batch: FA19

Section:

Reg. No.

Credit Hours:

3(2,1)

Dec 22,2021

FA19-BSE-033

Assignment # 2 Q1. Define and explain VLSM, with the help of a suitable example from the internet. VLSM: Variable Length Subnet Mask (VLSM) is a subnet of a segmented piece of a larger network design strategy where all subnet masks can have varying sizes. VLSM means subnetting a subnet. It is a method that allows network administrators to divide an IP address space or length into subnets of different sizes, unlike simple same-size Subnetting. It also enables network administrators to use multiple masks for different subnets of a single class A, B, or C network. VLSM is used to break down IP addresses into a well-defined hierarchy of subnets with different sizes and allocate them according to the individual need on a network. VLSM helps enhance the usability of subnets because subnets can include masks of varying sizes. A subnet mask helps define the size of the subnet and create subnets with very different host counts without wasting large numbers of addresses.

Example: IP Address = 192.168.1.0 (Belongs to Class-C) HQ = 50 host, RO1 = 30 hosts, RO2 = 10 hosts We will try and subnet 192.168.1.0 /24 to soothe this network which allows a total number of 254 hosts. HQ= 50 hosts We are borrowing 6 bits with a value of 64. This is the closest we can get for 50 hosts. HQ = 192.168.1.0 /26 Network address (Network bits) HQ = 192.168.1.1 Gateway address 192.168.1.2, First usable address

192.168.1.62- Last usable address.

Total host address space -192.168.1.2 to 192.168.1.62 and 192.168.1.63 will be the Broadcast address

Page 1 of 5

HQ Network Mask 255.255.255.192 – we got the 192 by adding the bit value from the left to the value we borrowed = 128+64=192 HQ address will look like this 192.168.1.0 /26 RO1 = 30 hosts We are borrowing 3 bits with a value of 32; this again is the closest we can get to the number of hosts needed. RO1 address will start from 192.168.1.64 – Network address. Now we add the 32 to the 64 we borrowed earlier = 32+64 = 96 RO1 = 192.168.1.65 Gateway address 192.168.1.66 – First usable IP address

192.168.1.94 – Last usable IP address

192.168.1.95 Broadcast address and Total host address space – 192.168.1.66 to 192.168.1. 94 Network Mask 255.255.255.224 i.e., 128+64+32=224 or 192.168.1.64/27 (Network bits) RO2 = 192.168.1.96 Network address We borrow 4 bits with a value of 16. That’s the closest we can go. 96+16= 112 So, 192.168.1.97- Gateway address 192.168.1.98 – First usable address

192.168.1.110 – Last usable address

192.168.1.111 Broadcast address and Total host address space – 192.168.1.98 to 192.168.1.110 Network Mask 255.255.255.240 or 192.168.1.96 /28 (Network bits)

Q2. Consider the following IP address from Class B 198.16.0.0, Now by carefully observe the given requirement

  

No of Subnets

No of Hosts

Photocopy HR Department Accounts Department LAB A LAB B Library Café Hall

2 9 13 45 45 300 800 1400

Calculate the Number of bits that will belong to host and network part Recomputed the Subnet mask by keep the above mentioned requirements Assign the range of IP address in accordance to the given requirements. Page 2 of 5

Hall = 1400 Host bits = 211−2 = 2046 = 11 bits Network bits = 21 bits Subnet Mask = 255.255.248.0 Range = 172.168.0.0 – 172.168.6.254 Broadcast address = 172.168.7.255

Café = 800 Host bits = 210−2 = 1022 = 10 bits Network bits = 22 bits Subnet Mask = 255.255.252.240 Range = 172.168.8.0 – 172.168.11.254 Broadcast address = 172.168.11.255

Library

= 300 Host bits = 2 −2 = 510 = 9 bits 9

Network bits = 23 bits Subnet Mask = 255.255.254.0 Range = 172.168.12.0 – 172.168.13.254 Broadcast address = 172.168.13.255

LAB B = 45 Host bits = 26−2 = 62 = 6 bits Network bits = 26 bits Subnet Mask = 255.255.255.192 Range = 172.168.14.0 – 172.168.14.62 Broadcast address = 172.168.14.63

LAB A = 45 6 Host bits = 2 −2 = 62 = 6 bits Network bits = 26 bits Subnet Mask = 255.255.255.192 Range = 172.168.14.64 – 172.168.14.126 Broadcast address = 172.168.14.127

Accounts Department = 13 Host bits = 24 −2 = 14 = 4 bits Network bits = 28 bits Subnet Mask = 255.255.255.240 Range = 172.168.14.128 – 172.168.14.142 Broadcast address = 172.168.14.143

HR Department = 9 Page 3 of 5

Host bits = 24 −2 = 14 = 4 bits Network bits = 28 bits Subnet Mask = 255.255.255.240 Range = 172.168.14.144 – 172.168.14.158 Broadcast address = 172.168.14.159

Photocopy = 2 Host bits = 22−2 = 2 = 2 bits Network bits = 30 bits Subnet Mask = 255.255.255.252 Range = 172.168.14.160 – 172.168.14.162 Broadcast address = 172.168.14.163

Q3. Define and Explain the Distance vector routing protocol and count to infinity problem from the text book. Distance Vector Routing Protocol: A distance vector routing protocol uses a routing algorithm in which routers periodically send routing updates and exchange information to all neighbours by broadcasting their entire route tables. Distance Vector Routing is one of the dynamic routing algorithms. A router transmits its distance vector to each of its neighbours in a routing packet. It determines the best route for data packets based on distance. Distance-vector routing protocols measure the distance by the number of routers a packet has to pass, one router counts as one hop. Distance-vector routing protocols also require that a router informs its neighbours of network topology changes periodically. Distance-vector routing protocols use the Bellman-Ford algorithm to calculate the best route.

d x (y) = minv {c (x, v) + v

(y)}

Count to infinity problem: The Count to Infinity problem derives from the routing loop in the Distance Vector Routing network. Such Routing Loops usually occur when two routers send an update or exchange information together at the same time or when an interface goes down. The crux of the Count to Infinity problem is that if node A tells node B that it has a path somewhere, there is no way for node B to know if the path has node B as a part of it.

Q4. Write a short note on the working of RIP protocol by carefully studying the text book. Router Information Protocol: RIP uses a distance-vector algorithm to decide which path to put a packet on to get to its destination. Each RIP router maintains a routing table, which is a list of all the destinations the router knows how to reach.

Working of RIP: Each router broadcasts its entire routing table to its closest neighbours every 30 seconds. Each router also receives routing updates from its neighbouring routers. A routing update contains the entire routing table of the sending router. Routers compare the received routing tables with their routing tables. If they find any new route in the received routing tables, they add them to their routing tables. In the next routing update, routers Page 4 of 5

broadcast the updated routing tables. Over time, as each router learns more routes, they broadcast about those routes as well. By the end of the process, all routers know about all routes.

Page 5 of 5...


Similar Free PDFs