SIT202 Computer Networks Assignment: Problem Solving Report - 2019

Verified

Added on  2022/09/15

|11
|1787
|23
Homework Assignment
AI Summary
This document presents a comprehensive solution to a computer networks assignment, addressing key concepts from the network and transport layers. The solution begins by exploring classful and classless addressing, including modifications to accommodate a different number of classes and detailed calculations for determining the first and last addresses, along with the mask, for a classless address. The assignment then delves into distance vector routing, analyzing the cost and next node for various network configurations, and evaluating the impact of changes in network links on the maximum distance between nodes. Furthermore, the solution examines the transport layer, differentiating between connection-oriented and connectionless protocols. It provides detailed answers related to Go-Back-N protocol with calculations for sequence and acknowledgment numbers, and analyzing a TCP header in hexadecimal format, including the identification of the destination port and sequence number. The assignment concludes with a discussion of the performance implications of link failures and the overall analysis of the network's behavior under different conditions.
Document Page
Computer networks Assignment
8/27/2019
[Type the company name]
Student Name
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Question-1 (Chapter 18):
1) In current classful addressing, there are 5 classes as shown in Fig. 18.18 (p. 531 of the textbook).
There are 5 classes with variable-length leading bits as follows: Class A: 0; Class B: 10; Class C: 110; Class
D: 1110; Class E: 1111 suppose that we wish to modify to accommodate 9 classes. What are 9 (variable-
length) leading bits for them?
Answer: IPv4 is a logical addressing used in network layer of OSI model of computer network, the IP
address can be classful or classless depending on the requirements of users. An IPv4 comprises of dotted
notation having total 32 bits, of which we define network address and host address according to the
classes.
In the general use classful address is divided into 5 classes: class A, B, C, D and E
The leading bits of the classful address are shown below:
Class First Byte (leading bits ) First Byte (decimal) range
A 0 0-127
B 10 128-191
C 110 192-223
D 1110 224-239
E 1111 240-255
Now as per the question we need to accommodate 9 classes, the first byte will show the leading bits
that will classify the classes of the IP address.
The table below shows the leading bits of the classes:
Class leading bits (first byte) decimal range of class(first byte)
2 | P a g e
Document Page
A 0 0-127
B 10 128-191
C 110 192-223
D 1110 224-139
E 11110 240-247
F 111110 248-251
G 1111110 252-253
H 11111110 254
I 11111111 255
2)
Answer:
A classless address is given as 200.107.16.17/20
The IP address in binary notation consists of 32 bits
11001000.01101011.0001 0000.00010001
The IP address and /n define the whole block of address which include first IP address, last address and
the number of addresses.
In this question n = 20
a) First Address:
First address can be found by putting 32-n rightmost bits to zeroes
32-n = 32-20 = 12
So first address will be 11001000.01101011.0001 0000.00000000
Decimal notation of IP address: 200.107.16.0
3 | P a g e
Document Page
Last address:
Last address can be found by putting 32-n or 12 rightmost bits to ones
Last IP address: 11001000.01101011.0001 1111.11111111
Decimal notation of IP address: 200.107.31.255
b) Mask of the IP address
In classless IP address given, n=20
The mask is a 32 bit binary value in which the leftmost n bits are 1s and the rightmost 32-n bits are 0s
So, mask is: 11111111.11111111.1111 0000.00000000
In decimal notation: 255.255.240.0
Question-2
Consider the network consisting of 5 nodes.
1. The distance vectors for all the nodes
The route with minimum distance is the least cost route between two nodes. In distance vector routing
the routing table is shared by each node with neighbors periodically and when some changes are made.
The next node shows the intermediate node through which the data flows, it depends on the least cost
between two end nodes.
A Node
4 | P a g e
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
From node To node Cost Next node
A A 0 -
A B 1 -
A C 3 -
A D 3 B
A E 4 C
B Node
From node To node Cost Next node
B A 1 -
B B 0 -
B C 4 A
B D 2 -
B E 4 -
C Node
From node To node Cost Next node
C A 3 -
C B 4 A
C C 0 -
C D 6 A,B
C E 1 -
5 | P a g e
Document Page
D Node
From node To node Cost Next node
D A 3 B
D B 2 -
D C 6 B,A
D D 0 -
D E 6 B
E Node
From node To node Cost Next node
E A 4 C
E B 4 -
E C 1 -
E D 6 B
E E 0 -
2) Can the maximum distance of the network (the maximum distance between any pair of different
nodes, i.e., {A,C}, {A,D}, {B,C}, etc.) be lowered if the distance between nodes B and E becomes 2? Please
explain how you come to the answer (Yes or No).
Answer: yes, the maximum distance between any pair of different nodes will be lowered
6 | P a g e
Document Page
Explanation:
If we take previous value of distance between B and E is 4, the maximum distance is shown below
The maximum distance of the network will be between nodes D to A the intermediate nodes will be (D-
B-E-C-A) with distance = 2+4+1+3 = 10.
Now when we take the distance between B to E as 2
The maximum distance will be (D-B-E-C-A) = 2+2+1+3 = 8.
So the maximum distance of the network is lowered.
3) Find the maximum distance of the network if the link between nodes A and C is removed. In addition,
discuss what the performance loss is after losing the link between nodes A and C.
Answer: As per the question the network if the link between nodes A and C is removed is shown below
If we take the maximum distance of the network, it is from node D to C with intermediate nodes (D-B-E-
C) HAVING DISTANCE = 2+4+1=7
After removing the link between nodes A and C, there will be performance loss such as
7 | P a g e
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Node A will have link with node C via (A-B-E-C) with a distance of 6, which is twice the distance,
if the link between A and C exists. The time delay will increase when A node is communicating
with node C. Also the other nodes which has used link between A and C will be affected,
increasing the distance and hence time delay will increase.
Question-3
1) Choose “True” or “False” for each item
In the transport layer, port numbers are used to identify local computers.
Answer: False
Explanation: Port number is used to identify the particular process running in client host and server
when interaction between these two is going on. TCP, UDP header of the data segment contains the
port number of the application.
For flow control, we need two buffers: one at the sending transport layer and the other at the
receiving transport layer
Answer: True
Explanation: the buffer is allocated to sender and receiver side, as the transport layer manages to
communicate end to end flow. The sender will send the data which will be kept in buffer and processed.
There are only connection-oriented protocols in the transport layer, while the network layer supports
connectionless communication.
Answer: False
Explanation: Transport layer have two protocols, TCP is a connection oriented protocol, while UDP is a
connectionless protocol. The network layers supports connectionless communication.
2) Suppose that the Go-Back-N protocol with 𝑚 = 3 and the sending window of size 7 is used to send
packets. Let 𝑆f = 31, 𝑆n = 35, and
𝑅n = 33.
a. What are the sequence numbers of data packets in transit?
Answer: As per the given scenario, the data packets of sequence number 33,34,35,36 are in transit. Also
the expected packet to arrive at receiver side is 33, as Rn=33. The sequence number 31 and 32 have
been acknowledged by the receiver as they have successfully received by the receiver.
8 | P a g e
Document Page
b. What are the acknowledgement numbers of ACK packets in transmit?
The acknowledgement numbers of ACK packets in transit are 31, and 32, as given in the question Rn=33
this implies receiver is expecting sequence number 33 to arrive at receiver. The receiver has received
sequence number 31 and 32 and these are to be acknowledged by the receiver to sender.
c. If the sender’s process sends two more data packets to the sender’s transport layer and one ACK
packet is received from the receiver’s transport layer, what are the updated values for 𝑆f and 𝑆n?
Answer: in this scenario, the sender’s process sends two more data packets to the sender’s transport
layer and one ACK packet is received from the receiver’s transport layer. So, sender sends sequence
number 33 and 34 but Rn =33 at the receiver shows only one packet 33 is acknowledged.
Now
Sf=34
Rn=34
Sn = 37
3) The following is part of a TCP header in hexadecimal format:
93E2 B017 0AB2 0000 …
TCP header is shown below:
9 | P a g e
Document Page
Source port address: in the header of the TCP segment, the port of the host sending the segment is
defined by source port address, it is of 16 bits in size.
Destination port address: in the header of the TCP segment, the port of the host receiving the segment
is defined by destination port address, it is of 16 bits in size.
Sequence Number: The number assigned in the first byte of the data in the segment is defined by 32 bit
sequence number.
a) Destination port:
Each hexadecimal value is of 4 bits, so 4 hexadecimal value is 16 bits
93E2 B017 0AB2 0000 …
The destination port is given by B017 which can be written in decimal form as 45,079
b) The sequence number is the next 32 bits
93E2 B017 0AB2 0000
So, the sequence number is given by 0AB2 0000
In decimal format it is 179437568
10 | P a g e
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Conclusion
In this report computer network assignment questions are answered and discussed. This assignment
consists of question related to data link layer, network layer, routing etc., which are analyzed and
answered according to the questions. The mathematical and calculation part with the relevant diagrams
are shown in the report appropriately.
References
[1]. Data Communications and Networking, Fourth Edition , Behrouz A. Forouzan
[2]. Computer Networking: A Top-Down Approach, Jim Kurose
[3]. https://in.pcmag.com/
11 | P a g e
chevron_up_icon
1 out of 11
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]