0% found this document useful (0 votes)
9 views

Assignment 6-solution-assignment-for-students

This document contains the solution to Assignment 6 for a Computer Networks course at the University of Regina. It includes various problems related to packet parity, slotted ALOHA efficiency, and IP addressing in a network with multiple subnets and routers. The document emphasizes the importance of understanding the concepts rather than copying answers directly from textbooks or slides.

Uploaded by

neelpatelyt1195
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Assignment 6-solution-assignment-for-students

This document contains the solution to Assignment 6 for a Computer Networks course at the University of Regina. It includes various problems related to packet parity, slotted ALOHA efficiency, and IP addressing in a network with multiple subnets and routers. The document emphasizes the importance of understanding the concepts rather than copying answers directly from textbooks or slides.

Uploaded by

neelpatelyt1195
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

lOMoARcPSD|48328536

Asg 6 solution - Assignment for students

Computer Networks (University of Regina)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Neel Patel ([email protected])
lOMoARcPSD|48328536

CS 335, Assignment 6 Solution


(Please submit your answers in a single PDF file using UR Courses)

**NOTE: The objective of this assignment is that you study the textbook and the slides, and then
answer the questions below yourself. You SHOULD NOT simply copy and paste the answers from the
textbook or from the slides.

Total = 45
1. (i) [4] Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an
even parity scheme is being used. What would be the value of the field containing the parity bits be for
the case of a two-dimensional parity scheme? Your answer should be such that a minimum length
checksum field is used.
11101
01100
10010
11011
11000

(ii) [3+3] Consider the 5-bit generator, G=10011. Find the value of R, given
(a) D = 1010101010
Dividing 10101010100000 by G will give result 1011011100 and remainder 100 (Module-2 division). So,
R=0100 . Students need to show the division.
(b) D = 1001010101
Dividing 10010101010000 by G will give result 1000110000 and remainder 0 (Module-2 division). So,
R=0000 . Students need to show the division.

2. (i) [5] Given that, when there are N active nodes, the efficiency of slotted ALOHA is Np(1-p)N-1 , where
p is the probability that a node transmits. Find the value of p that maximizes this expression.
E ( p)  Np(1  p) N 1
E ' ( p)  N (1  p) N 1  Np( N  1)(1  p) N 2
 N (1  p) N 2 ((1  p)  p( N  1))
1
E ' ( p )  0  p* 
N
(ii) [5] Using the value of p found (i), find the efficiency of slotted ALOHA by letting N approaches
infinity. Hints: (1-1/N)N approaches 1/e as N approaches infinity.
1 N
) (1 
1 1 N 1 1 N 1 N
E ( p*)  N (1  )  (1  ) 
N N N 1
1
N
1 1 N 1
lim (1  )  1 lim (1  ) 
N  N N  N e

Page 1 of 3

Downloaded by Neel Patel ([email protected])


lOMoARcPSD|48328536

Thus
1
lim E ( p*) 
N  e
Which is 37%

(iii) [5] Consider a broadcast channel with N nodes and a transmission rate of R bps. Suppose the
broadcast channel uses polling (with an additional polling node) for multiple access. Suppose the
amount of time from when a node completes transmission until the subsequent node is permitted to
transmit (that is, the polling delay) is dpoll . Suppose that within a polling round, a given node is allowed
to transmit at most Q bits. What is the maximum throughput of the broadcast channel?
The length of a polling round is N (Q / R  d poll ) .
The number of bits transmitted in a polling round is NQ . The maximum throughput therefore is
NQ R

N (Q / R  d poll ) d poll R
1
Q

3. Consider the network below, having 3 subnets, two routers R1 and R2, and three switches S1, S2 and
S3.

C
E
A

S1 R1 S2 R2 S3

B
F
D

(i) [5] Assign IP addresses to all of the interfaces. For Subnet 1 use addresses of the form 192.168.1.xxx.
For Subnet 2 use addresses of the form 192.168.2.xxx. For Subnet 3 use addresses of the form
192.168.3.xxx.
(ii) [5] Assign MAC addresses to all of the adapters.

Page 2 of 3

Downloaded by Neel Patel ([email protected])


lOMoARcPSD|48328536

Below is the answer for (i) and (ii):

C E
A 192.168.1.001
00-00-00-00-00-00 192.168.2.001 192.168.3.001
44-44-44-44-44-44 77-77-77-77-77-77

S1 R1 S2 R2
S3

192.168.1.002 192.168.2.002 192.168.2.003


22-22-22-22-22-22 33-33-33-33-33-33 55-55-55-55-55 192.168.3.002
88-88-88-88-88-88
192.168.2.004
B 192.168.1.003 D 66-66-66-66-66
11-11-11-11-11-11 192.168.3.003 F
99-99-99-99-99-99

(iii) [5] Consider sending an IP datagram from Host E to Host F. Will Host E ask Router R2 to help
forward the datagram? Why? In the Ethernet frame containing the IP datagram, what are the source
and destination IP and MAC addresses?
No. E can check the subnet prefix of Host F’s IP address, and then learn that F is on the same LAN. Thus,
E will not send the packet to the default router R2.
In the Ethernet frame from E to F:
Source IP = E’s IP address = 192.168.3.001
Destination IP = F’s IP address = 192.168.3.003
Source MAC = E’s MAC address = 77-77-77-77-77-77
Destination MAC = F’s MAC address = 99-99-99-99-99-99

(iv) [5] Suppose E would like to send an IP datagram to B, and assume that E’s ARP table does not
contain B’s MAC address. Will E perform an ARP query to find B’s MAC address? Why? In the Ethernet
frame (containing the IP datagram destined to B) that is delivered to Router R2, what are the source and
destination IP and MAC addresses?
No, because they are not on the same LAN. E can find this out by checking B’s IP address.
In the Ethernet frame from E to R2:
Source IP = E’s IP address = 192.168.3.001
Destination IP = B’s IP address = 192.168.1.003
Source MAC = E’s MAC address = 77-77-77-77-77-77
Destination MAC = MAC address of R2’s interface connecting to Subnet 3 = 88-88-88-88-88-88

Page 3 of 3

Downloaded by Neel Patel ([email protected])

You might also like