Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Revise NWC203

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 148

NWC203c PE

Author: StarCi
(Đây chỉ là giải lại theo góc nhìn khác, chứ hoàn toàn là sao chép. Tác giả tôn
trọng bản quyền của các bài tập này.)
*****************************
Q.1: Explain the difference between connectionless unacknowledged service and
connectionless acknowledged service. How do the protocols that provide these
services differ?
Solution:
Connectionless:
Connectionless service comes with a single free-standing data unit for all
transmissions.
In this, each unit contains all of the protocols that control information necessary for
delivery perspective, but this also contains no provision for sequencing or flow
control.
(Dòng trên giải thích Connectionless)
>> Acknowledged:
This is achieved by the use of ACK and NAK control messages.
-- > These types of protocols are well suited for communication over the network,
where high layers are very sensitive to loss and can have a significant probability of
error in these underlying networks.
Example: HDLC, which offers for unnumbered acknowledgment service(setup and
release).
(Dòng trên giải thích cho sự khác biệt của Acknowledged)
>> Unacknowledge:
This comes with a very simpler version and provides faster communication for
networks, which are inherently reliable or provide service to a higher layer, that can
tolerate loss in the information, or which has built-in error control/recovery feature.
(Dòng trên giải thích cho sự khác biệt của Unacknowledge)
Q.2: Explain the difference between connection-oriented acknowledged service and
connectionless acknowledged service. How do the protocols that provide these
services differ?
Solution:
Less & Oriented:
>> Connection-oriented:
In this type of service, a setup phase will be initialized between sender and receiver,
to establish a context for transferring the information
This connection is provided to the sender for all SDUs.
This service requires a stateful protocol, which is used to keep track of sequence
numbers, and timers.
(Dòng trên giải thích cho sự khác biệt của Connection-oriented)
>> Connectionless:
Here, there will be no prior context provided for transferring the information
between sender and receiver.
The sender will pass its SDU to an underlying layer without any notice.
And in this, the sender requires an acknowledgment of SDU delivery.
The protocols are very different in these services
this service also does not require transmitting protocols to track the
acknowledgment of PDU.
After receiving the PDU, the receiver needs to send acknowledgment, If not
received in time, then it will return failure.
(Dòng trên giải thích cho sự khác biệt của Connectionless)
Q.3: Explain the differences between PPP and HDLC.
Solution:
HDLC is a short form of High-level Data Link Control that does the data encapsulation.
PPP is an acronym for Point-to-Point Protocol that can be used by different devices
without any data format change.
(Dòng trên định nghĩa HDLC và PPP)
A few major differences are as below:
For communication through HDLC, a bit-oriented protocol is used for point-to-point
links as well as for multipoint link channels. However, PPP uses a byte-oriented
protocol for point-to-point links at the time of communication.
HDLC does the encapsulation for synchronous media only whereas PPP can do the
encapsulation for synchronous as well as for asynchronous media.
HDLC can be used only for CISCO devices whereas PPP can be easily used for other
devices.
(Những dòng trên mô tả sự khác biệt của HDLC và PPP)

Q.4: A 1.5 Mbps communications link is to use HDLC to transmit information to the
moon. What is the smallest possible frame size that allows continuous
transmission? The distance between earth and the moon is approximately 375,000
km, and the speed of light is 3 x 10 meters/second.
8

Solution:
We know that Default HDLC Frame and Extended HDLC Frame depend on Go-Back-N
and Selective Repeat, and can be presented as below

(Đây là bảng tra cứu thông tin của Default và Extended, bảng này phải tự vẽ ra chứ đề
không có sẵn)
D (Quãng đường = Distance) = 375,000 km = 375 x 10 m6

c (Vận tốc ánh sáng = Speed of Light) = 3 x 10 m


8

Then, we can calculate Round Trip Propagation Delay (Trì hoãn do quãng đường) by
this formula
2tprop=Dc=375 x 1063 x 108=2,5s
We know that
NnfR=2tpropnf=2tprop RN (*)
In which, nf is Possible Frame Size (bits), Mbps is the number of Megabyte Per
Second.
R = 1,5 Mbps so that R = 1,5 x 10 bps.
6

>> Go-back-N:

Default HDLC Frame: N = 7, substitute to (*) then we have


2,5×1,5 ×1067=535714 (bits)

Extended HDLC Frame: N = 127, substitute to (*) then we have


2,5×1,5 ×106127=29527 (bits)
>> Selective Repeat

Default HDLC Frame: N = 4, substitute to (*) then we have


2,5×1,5 ×1064=937500 (bits)

Extended HDLC Frame: N = 64, substitute to (*) then we have


2,5×1,5 ×10664= 58594 (bits)
Q.5: Suppose HDLC is used over a 1.5 Mbps geostationary satellite link. Suppose that
250-byte frames are used in the data link control. What is the maximum rate at
which information can be transmitted over the link?
Solution:
We have
R = 1.5 Mbps or R = 1,5 x 10 bps, and nf = 250 bytes or nf=2000 bits (250 x 8).
6

The distance that the information must travel is the Earth-to-Satellite Distance, or
D ≈ 36000 km = 3,6 x 10 m.
7

The Speed of Light c = 3 x 10 m. 8

We can calculate the propagation delay and processing rate as follows:


tprop= Dc=3,6×1073×108=0,12 s=120 ms
tf=nfR=20001,5×106 = 0,00133 s = 1,33 ms
In which, tprop is propagation delay, tf is processing rate.
We can use either Go-Back-N or Selective Repeat ARQ. The default window size is N =
7 (with a 3bit sequence number). 0 1 2 3 4 5 6 7 …

The maximum information rate is achieved with no error, and hence, no


retransmission.
tcycle=tf+2 tprop=1,33+2×120=241,33 ms
In which, tcycle is the minimum time to transmit a group of N packets.
n=N×nf=7×2000=14,000 bits
Rmax=ntcycle=14000241,33=58,01 kbps
In which, n is number of bits transmitted in a cycle, Rmax is number of bits sent in a
cycle / minimum cycle time.
If the extended sequence numbering option (7-bit) is used, the maximum send
window size would be N = 27 – 1 = 127, and hence, the maximum information rate
is:
n=N×nf=127×2000=254000 bits
Rmax=ntcycle=254000241,33=1052,5 kbps=1,0525 Mbps
Q.6: Suppose that a multiplexer receives constant-length packet from N = 60 data
sources. Each data source has a probability p = 0.1 of having a packet in a given T-
second period. Suppose that the multiplexer has one line in which it can transmit
eight packets every T seconds. It also has a second line where it directs any packets
that cannot be transmitted in the first line in a T-second period. Find the average
number of packets that are transmitted on the first line and the average number of
packets that are transmitted in the second line.
Solution:
Firstly, we find out the probability of the k packets that have reached the T - second.
It can be computed with the help of binomial distribution that has parameters as N =
60 and shows the probability of p = 0.1.
The average number for the arrivals of the packets can be given as Np=6. Now,
calculate the average number of packets received through the first line as
below:
X= i=08iNipi1-pN-i
= i=08i60i0,1i×0,960-i= 4,595

Now, the average number of packets received is 4.595 that gets transmitted through
the first line. The remaining will get transmitted by the second line. Now, the average
number of packets transmitted through the second line per T second can be
obtained as below:
Y=Np-X=6-4,595=1,405

Therefore, it will transmit 1.405 packets on average per T second from the second
line.
Q.7: Consider the transfer of a single real-time telephone voice signal across a packet
network. Suppose that each voice sample should not be delayed by more than 20
ms.
a. Discuss which of the following adaptation functions are relevant to meeting
the requirements of this transfer: handling of arbitrary message size; reliability
and sequencing; pacing and flow control; timing; addressing; and privacy, integrity
and authentication.
b. Compare a hop-by-hop approach to an end-to-end approach to meeting the
requirements of the voice signal.
Solution:
a, Message size is important because in real-time signals of voice it is necessary to
transfer a fixed packet size of that holds no more than 20 ms of the speech signal.
The handling of arbitrary message size is not as important as long as the desired
packet size for voice can be handled.
Sequencing is essential because each packet needs to arrive in the same
sequence that it was generated. Reliability is moderately important since voice
transmission can tolerate a certain level of loss and error.
Pacing and flow control are not as important because the synchronous nature of the
voice signal implies that the end systems will be matched in speed.
Timing, for real-time voice transfer, is important because this adaptation function
helps to control the jitter in the delivered signal.
Addressing is only during the connection setup phase if we assume some form of
virtual circuit packet switching method.
Privacy, integrity, and authentication have traditionally not been as important as the
other issues discussed above.
b, If the underlying network is reliable then the end-to-end approach is better
because the probability of error is very low so processing at the edge suffices to
provide acceptable performance.
If the underlying network is unreliable then the hop-by-hop approach may be
required. For example, if the probability of error is very high, as in a wireless channel,
then error recovery at each hop may be necessary to make effective communication
possible.

Q.8: Consider the Stop-and-Wait protocol as described. Suppose that the protocol is
modified so that each time a frame is found in error at either the sender or receiver,
the last transmitted frame is immediately resent.

a. Show that the protocol still operates correctly.


b. Does the state transition diagram need to be modified to describe the
new operation?
c. What is the main effect of introducing the immediate-retransmission feature?
Solution:
a, The sender in the stop-and-wait protocol described in the chapter retransmits a
frame when an acknowledgment is not received in time. The modified protocol says
that the frame is retransmitted every time the sender or receiver sees an error.
Therefore, the only difference is that frames are retransmitted sooner. So, the
protocol will work correctly.
b, No. The state transition diagram will stay the same.
c, The error recovery process will be faster with this modified protocol.
Q.9: Suppose that two peer-to-peer processes provide a service that involves the
transfer of discrete messages. Suppose that the peer processes are allowed to
exchange PDUs that have a maximum size of M bytes including H bytes of
header. Suppose that a PDU is not allowed to carry information from more than one
message.
Solution:
Bytes each to be transmitted in several PDUs in order to exchange messages of any
size. A single PDU must include all small messages.
Peer processes must exchange information that permits messages to be reassembled
at the recipient. The message length, for example, could be included in the first PDU.
A message end-of-message marker could be included in the last PDU. In connection-
oriented networks, sequence numbers can be used to detect loss, while in
connectionless networks, they can be used to aid in message reconstruction. Finally,
because variable-size PDUs are allowed, the PDU size must be specified in the PDU
header.
In this instance, each PDU must be identified with a stream ID in addition to all of the
header information specified in (b), so that the receiver may treat each stream
separately while reassembling messages.

Q.10: A 1 Mbyte file is to be transmitted over a 1 Mbps communication line that has a
bit error rate of
p = 10 .
-6

a. What is the probability that the entire file is transmitted without errors. We
conclude that it is extremely unlikely that the file will arrive error free.
b. The file is broken up into N equal-sized blocks that are transmitted separately.
What is the probability that all the blocks arrive correctly without error? Does
dividing the file into blocks help?
c. Suppose the propagation delay is negligible, explain how Stop-and-Wait ARQ
can help deliver the file in error-free form. On the average how long does it take to
deliver the file if the ARQ transmits the entire file each time?
Solution:
(Câu này tham khảo được trên mạng và chính xác, các bạn để ý cho tôi là
n = 8 x 10 bits là do 1 Mbyte = 10 byte = 8 x 10 bits do 1 byte = 8 bits,
8 6 8

bên cạnh đó, nhớ rằng e = 3,35 là hằng số,


R = 1 Mbps = 10 bps, còn p = 10 là hiển nhiên).
6 -6
Câu c này khá khó, nhưng thay số thì dễ. Các bạn chú ý các phần nên thay là n,p và R.
Q.11:
In this activity, you are given the network address of 192.168.100.0/24 to subnet and
provide the IP addressing for the Packet Tracer network. Each LAN in the network
requires at least 25 addresses for end devices, the switch and the router. The
connection between R1 to R2 will require an IP address for each end of the link.

a. Based on the topology, how many subnets are needed?


b. How many bits must be borrowed to support the number of subnets in
the topology table?
c. How many subnets does this create?
d. How many usable hosts does this create per
subnet? Solution:
a,

We saw that S1, S2, S3, S4, S0/0/0 are the subnets needed, so that there is 5 subnets
are needed.
b,
We call N is the number of bits, then N is the smallest number that satisfies
4×2N -2≥25
Then we got N = 3.
(Chú ý rằng 4 là số các subnet có thực – các subnet có hình hộp , là các subnet
S1,S2,S3,S4, nó không tính subnet ảo – là subnet có hình sợi dây như là S0/0/0.)
c,
We saw that number of bits N = 3, then the number of subnets does this create is 23
=8.
d, The number of host is 2N -2, where N is the smallest number that satisfies 2N-
2≥25,
we saw that N = 3, so that number of host is
2N -2=23-2=30
Q.12:
Five stations (S1-S5) are connected to an extended LAN through transparent bridges
(B1-B2), as shown in the following figure. Initially, the forwarding tables are empty.
Suppose the following stations transmit frames: S1 transmits to S5, S3 transmit to
S2, S4 transmits to S3, S2 transmits to S1, and S5 transmits to S4. Fill in the
forwarding tables with appropriate entries after the frames have been completely
transmitted.

Solution:
(Câu này thầy đã giải thích khá kĩ, và tôi chỉ English hóa nó lại, để hiểu câu này, cần
tham khảo hình và đọc kĩ giải thích là có thể hiểu được).
Trước tiên, phải hiểu là ở đây chúng ta có 3 mạng LAN, và mỗi 1 mạng LAN đều
được bố trí theo dạng BUS nên khi 1 máy truyền dữ liệu, nó sẽ truyền theo kiểu
broadcast (tức là truyền đi đến tất cả các máy và các cổng mạng)
Firstly, we know that we have 3 types of LAN, and each LAN is arranged follow BUS.
Then, if a device sends data, it will send according to broardcast type (send to any
device and internet port).
Giải thích khá dễ nếu English hóa, các bạn tự cố gắng nha.

Q.13:

1. Consider the network in Figure.


a. Use the Dijkstra algorithm to find the set of shortest paths from node 4
to other nodes.
We call that node that have number N is V(N) (i.e the green one is V(4))

b, Find the set of associated routing table entries (Destination, Next Hop, Cost)

Destination Cost Next Hop


Solution:
a,

V(4) V(1) V(2) V(3) V(5) V(6)

V(4) 5, V(4) 1,V(4) 2,V(4) 3,V(4) ~

V(4),V(2) 4,V(2) 2,V(4) 3,V(4) ~

V(4),V(2),V(3) 4,V(2) 3,V(4) 3,V(3)

4,V(3)

V(4),V(2),V(3), 4,V(2)

V(5),V(6) 4,V(3)

Then, we have
The shortest part from V(4) to V(1) is 4, and the path is V(4) -> V(2) -> V(1) or V(4) ->
V(3) -> V(1)
The shortest part from V(4) to V(2) is 1, and the path is V(4) ->
V(2) The shortest part from V(4) to V(3) is 2, and the path is V(4) -
> V(3) The shortest part from V(4) to V(5) is 3, and the path is V(4)
-> V(5)
The shortest part from V(4) to V(6) is 3, and the path is V(4) -> V(5) -> V(6)

b,
Dijkstras Algorithm:
Starting vertex is 4.
So the last row value is the shortest path from node 4 to all other nodes.

Each time it updates the path using relaxation:


distu+costu,v<distv

then update the


distv=distu+cost(u,v)
In which,
dist(u) is distance of vertex u from starting vertex
ccost(u,v) is cost/weight of the edge uv
dist(v) is distance of vertex u from starting vertex

Q.14:

You are a network technician assigned to install a new network for a


customer. You must create multiple subnets out of the 192.168.12.0/24
network address space to meet the following requirements:
 The first subnet is the LAN-A network. You need a minimum of 50
host IP addresses.
 The second subnet is the LAN-B network. You need a minimum of
40 host IP addresses.
 You also need at least two additional unused subnets for
future network expansion.
Note: Variable length subnet masks will not be used. All of the device subnet
masks should be the same length.
Answer the following questions to help create a subnetting scheme that meets the
stated network requirements:

a. How many host addresses are needed in the largest required subnet?
b. What is the minimum number of subnets required?
c. The network that you are tasked to subnet is 192.168.12.0/24. What is the
/24 subnet mask in binary?
d. The subnet mask is made up of two portions, the network portion, and the
host portion. This is represented in the binary by the ones and the zeros in the
subnet mask.

In the network mask, what do the ones and zeros represent?

e. When you have determined which subnet mask meets all of the stated
network requirements, derive each of the subnets. List the subnets from
first to last in the table. Remember that the first subnet is 192.168.12.0 with
the chosen subnet mask.

Subnet Address Prefix Subnet Mask

Solution:
a, How many host addresses are needed in the largest required subnet?

No of host addresses required = 2^6-2 = 62

Explanation : No. of subnets required = 4 which implies that the network is divided
into four parts and

the given IP address i.e 192.168.12.0 is a Class C IP address . Therefore the max
number of hosts possible in each subnet is 62 .

b, What is the minimum number of subnets required?

According to the question , two subnet are required for LAN-A and LAN-B and two
subnets are needed to be left for future use Therefor the total number of subnets are
4.

c, The network that you are tasked to subnet is 192.168.12.0/24. What is the /24
subnet mask in binary?

Subnet mask for any network is obtained by changing the net id bits to 1's and host id
bits to 0's. Since the given network is a Class C network so the number of netid bits
are 24 and the number of host id bits are 8 and there are two bits reserved for
subnet
id bits . Therefore the subnet mask for network is
11111111.11111111.11111111.11000000 in binary.
d,
In the nerwork maslk the ones represent the net id bits and the zeroes represent the
host id bits.
e, Subnets for LAN-A are :

a.) Starting network address is 192.168.12.00000000

b.) 192.168.12.00000001

c.) 192.168.12.00000010

d.) 192.168.12.00000011

and so on .........

Last network for the subnet will be 192.168.12.00111111

Subnets for LAN-B are :

a.) Starting network address is 192.168.12.01000000

b.) 192.168.12.01000001

c.) 192.168.12.01000010

d.) 192.168.12.01000011

and so on ......

Last network for the subnet will be 192.168.12.01111111

Other two subnets are :

Starting address of third subnet is : 192.168.12.10000000


Last address of the third subnet is :

192.168.12.10111111 Starting address of forth

subnet is : 192.168.12.11000000 Last address of

the forth subnet is : 192.168.12.11111111

Q.15:
Suppose that Selective Repeat ARQ is modified so that ACK messages contain
a list of the next m frames that it expects to receive.
Solutions follow questions:
a. How does the protocol need to be modified to accommodate this change?
b. What is the effect of the change on protocol
performance? Solution:
a,
2 things are needed to be changed:-
The frame header needs to be modified to recieve the list of frames and Since
the reciever explicitly indicates which frames are needed to be transmitted.
Change in transmitter operation is needed. If the recieved list contains m
oldest frames that are yet to be recieved , then it can be used to skip
retransmission of frames that have already been received.
b,
Performance will surely increase if the error rate is high or delay is high. A
single frame can ask for the retransmission of several frames.
The complexity of the protocol will surely increase relative to the unchanged
Selective repeat ARQ

Câu 1: Explain the difference between connectionless unacknowledged service and


connectionless acknowledged service. How do the protocols that provide these services
differ?
Câu 2. Explain the difference between connection-oriented acknowledged service and
connectionless acknowledged service. How do the protocols that provide these services
differ?
Câu 3: Explain the differences between PPP and HDLC.

Câu 4:
A 1.5 Mbps communications link is to use HDLC to transmit information to the moon.
What is the smallest possible frame size that allows continuous transmission? The
distance between earth and the moon is approximately 375,000 km, and the speed of
light is 3 x 108 meters/second.
The smallest possible frame size that allows continuous transmission is the size of the
round-trip propagation delay. The round-trip propagation delay is the time it takes for a
signal to travel from Earth to the Moon and back.

The distance between Earth and the Moon is 375,000 km, so the round-trip propagation
delay is 2 * 375,000 km / 3 x 10^8 meters/second = 250 milliseconds.

The data rate of the communications link is 1.5 Mbps, so the smallest possible frame
size is 1.5 Mbps * 250 milliseconds = 375,000 bits.

In bytes, the smallest possible frame size is 375,000 bits / 8 bits/byte = 46,875 bytes.

Therefore, the smallest possible frame size that allows continuous transmission is
46,875 bytes.
Câu 5: Suppose HDLC is used over a 1.5 Mbps geostationary satellite link. Suppose that
250-byte frames are used in the data link control. What is the maximum rate at which
information can be transmitted over the link?

The maximum rate at which information can be transmitted over the link is 299,800 bits
per second.

The data rate of the link is 1.5 Mbps, which is equal to 1.5 * 10^6 bits per second.
However, the overhead of the HDLC protocol is 250 * 8 = 2000 bits per frame. This
means that the maximum rate at which information can be transmitted over the link is
1.5 * 10^6 - 2000 = 299,800 bits per second.

In bytes, the maximum rate at which information can be transmitted over the link is
299,800 / 8 = 37,475 bytes per second.

Câu 6:
Suppose that a multiplexer receives constant-length packet from N = 60 data sources.
Each data source has a probability p = 0.1 of having a packet in a given T-second period.
Suppose that the multiplexer has one line in which it can transmit eight packets every T
seconds. It also has a second line where it directs any packets that cannot be
transmitted in the first line in a T-second period. Find the average number of packets
that are transmitted on the first line and the average number of packets that are
transmitted in the second line.

The average number of packets that are transmitted on the first line is given by:

E[x_1] = np = 60 * 0.1 = 6
where n is the number of data sources and p is the probability of a data source having a
packet in a given T-second period.
The average number of packets that are transmitted in the second line is given by:

E[x_2] = np(1 - p/m) = 6 * 0.1 * (1 - 0.1/8) = 0.133333


where m is the capacity of the first line.

Therefore, the average number of packets that are transmitted on the first line is 6 and
the average number of packets that are transmitted in the second line is 0.133333.

Câu 7:
Consider the transfer of a single real-time telephone voice signal across a packet
network. Suppose that each voice sample should not be delayed by more than 20 ms.
a. Discuss which of the following adaptation functions are relevant to meeting
the requirements of this transfer: handling of arbitrary message size;
reliability and sequencing; pacing and flow control; timing; addressing; and
privacy, integrity and authentication.
b. Compare a hop-by-hop approach to an end-to-end approach to meeting
the requirements of the voice signal.

a.

The following adaptation functions are relevant to meeting the requirements of this
transfer:

Handling of arbitrary message size: The voice signal is a continuous signal, so it needs to
be divided into small packets. The packets can be of different sizes, so the network needs
to be able to handle arbitrary message sizes.
Reliability and sequencing: The voice signal is a real-time signal, so it is important that the
packets are delivered reliably and in the correct order.
Pacing and flow control: The network needs to be able to pace the delivery of the packets
so that the voice signal does not become too delayed.
Timing: The network needs to be able to keep track of the timing of the packets so that
the voice signal is not played back out of order.
Addressing: The network needs to be able to address the packets so that they can be
delivered to the correct destination.
Privacy, integrity and authentication: The network needs to be able to protect the voice
signal from unauthorized access, modification, and replay.
b.

A hop-by-hop approach to meeting the requirements of the voice signal would involve
each hop in the network handling the adaptation functions independently. This approach
would be simple to implement, but it would not be very reliable. If a packet is lost or
delayed at one hop, the other hops would not be able to recover it.

An end-to-end approach to meeting the requirements of the voice signal would involve
the network providing end-to-end guarantees for the adaptation functions. This approach
would be more reliable, but it would be more complex to implement.

The best approach to meeting the requirements of the voice signal would depend on the
specific network and the requirements of the application. If the network is reliable and the
application does not require very low latency, then a hop-by-hop approach may be
sufficient. However, if the network is not reliable or the application requires very low
latency, then an end-to-end approach may be necessary.
Câu 8 :
Consider the Stop-and-Wait protocol as described. Suppose that the protocol is
modified so that each time a frame is found in error at either the sender or receiver, the
last transmitted frame is immediately resent.

a. Show that the protocol still operates correctly.


b. Does the state transition diagram need to be modified to describe the
new operation?
c. What is the main effect of introducing the immediate-retransmission
feature?

a.

The Stop-and-Wait protocol works by sending a frame, waiting for an


acknowledgement, and then sending the next frame. If the acknowledgement is
not received, the frame is resent.

The immediate-retransmission feature modifies the protocol so that the frame is


resent as soon as an error is detected. This means that the sender does not have to
wait for the acknowledgement before resending the frame.

The protocol will still operate correctly with the immediate-retransmission feature.
If a frame is received in error, the receiver will send a negative acknowledgement.
The sender will then immediately resent the frame.
b.

The state transition diagram does not need to be modified to describe the new
operation. The only difference is that the sender will now enter the "Resend frame"
state as soon as an error is detected.

c.

The main effect of introducing the immediate-retransmission feature is to reduce


the number of frames that are lost. This is because the frame is resent as soon as
an error is detected, so there is less time for the frame to be lost in the network.

The immediate-retransmission feature also improves the throughput of the


protocol. This is because the sender does not have to wait for the
acknowledgement before resending the frame, so the sender can send more
frames in a given period of time.
Câu 9:
Suppose that two peer-to-peer processes provide a service that involves the transfer of
discrete messages. Suppose that the peer processes are allowed to exchange PDUs that
have a maximum size of M bytes including H bytes of header. Suppose that a PDU is not
allowed to carry information from more than one message.
a. Develop an approach that allows the peer processes to exchange messages of
arbitrary size.
b. What essential control information needs to be exchanged between the peer
processes?
c. Now suppose that the message transfer service provided by the peer processes is
shared by several message source-destination pairs. Is additional control information
required, and if so, where should it be placed?
a.

To allow the peer processes to exchange messages of arbitrary size, we can use a
technique called fragmentation. This technique breaks the message into smaller pieces,
called fragments, that are each smaller than the maximum PDU size. The fragments are
then sent as separate PDUs.

The receiver reassembles the fragments into the original message. The fragmentation
and reassembly process is handled by the peer processes.

b.

The essential control information that needs to be exchanged between the peer
processes includes:

The size of the message.

The number of fragments.

The sequence number of each fragment.

c.

If the message transfer service provided by the peer processes is shared by several
message source-destination pairs, then additional control information is required. This
additional control information includes:

The source and destination of the message.

The type of message.

The priority of the message.

This additional control information is needed to ensure that the messages are routed to
the correct destination and that the messages are processed in the correct order.
The additional control information can be placed in the header of the PDU. The header of
the PDU can be up to H bytes long, so there is enough space to include the additional
control information.

Câu 10:
A 1 Mbyte file is to be transmitted over a 1 Mbps communication line that has a bit error
rate of p = 10-6.
a. What is the probability that the entire file is transmitted without errors? Note for
n large and p very small, (1 − p)n ≈ e-np.
b. The file is broken up into N equal-sized blocks that are transmitted
separately. What is the probability that all the blocks arrive correctly without
error? Does dividing the file into blocks help?
c. Suppose the propagation delay is negligible, explain how Stop-and-Wait ARQ can
help deliver the file in error-free form. On the average how long does it take to
deliver the file if the ARQ transmits the entire file each time?
.

Câu 11:

In this activity, you are given the network address of 192.168.1.0/24 to subnet
and provide the IP addressing for the Packet Tracer network. Each LAN in the
network requires at least 25 addresses for end devices, the switch and the router.
The connection between R1 to R2 will require an IP address for each end of the
link.

a. Based on the topology, how many subnets are needed?


b. How many bits must be borrowed to support the number of subnets in the
topology table?
c. How many subnets does this create?
d. How many usable hosts does this create per subnet?
Note: If your answer is less than the 25 hosts required, then you borrowed
too many bits.

Câu 12:

Five stations (S1-S5) are connected to an extended LAN through transparent bridges
(B1- B2), as shown in the following figure. Initially, the forwarding tables are empty.
Suppose the following stations transmit frames: S1 transmits to S5, S3 transmit to S2, S4
transmits to S3, S2 transmits to S1, and S5 transmits to S4. Fill in the forwarding tables
with appropriate entries after the frames have been completely transmitted.
Câu 13:
Consider the network in Figure.

a) Use the Dijkstra algorithm to find the set of shortest paths from node 4 to
other nodes.
Iteration N D1 D2 D3 D5 D6

Initial
b) Find the set of associated routing table entries (Destination, Next Hop, Cost)

Destination Cost Next Hop


D1 4 D2
D2 1 D2
D3 2 D3
D5 3 D5
D6 3 D3
14)
You are a network technician assigned to install a new network for a customer. You
must create multiple subnets out of the 192.168.1.0/24 network address space to
meet the following requirements:
- The first subnet is the LAN-A network. You need a minimum of 50 host IP
addresses.
- The second subnet is the LAN-B network. You need a minimum of 40 host
IP addresses.
- You also need at least two additional unused subnets for future
network expansion.
Note: Variable length subnet masks will not be used. All of the device subnet masks
should be the same length.
Answer the following questions to help create a subnetting scheme that meets the
stated network requirements:

a. How many host addresses are needed in the largest required subnet?
b. What is the minimum number of subnets required?
c. The network that you are tasked to subnet is 192.168.1.0/24. What is
the /24 subnet mask in binary?
d. The subnet mask is made up of two portions, the network portion, and the
host portion. This is represented in the binary by the ones and the zeros in the
subnet mask.

In the network mask, what do the ones and zeros represent?

e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in
the table. Remember that the first subnet is 192.168.0.0 with the chosen subnet
mask.
Câu 15:

Suppose that Selective Repeat ARQ is modified so that ACK messages contain a list of
the next m frames that it expects to receive.

Solutions follow questions:

a. How does the protocol need to be modified to accommodate this change?


b. What is the effect of the change on protocol performance?

Q.16. (2 marks)
Suppose the size of an uncompressed text file is 1 megabyte
Note: Explain your answer in details.
a. How long does it take to download the file over a 32 kilobit/second modem?

b. How long does it take to take to download the file over a 1


megabit/second modem?
c. Suppose data compression is applied to the text file. How much do the
transmission times in parts (a) and (b) change?
Q17. (2 marks)
Let g(x)=x3+x+1. Consider the information sequence 1001. Find the codeword
corresponding to the preceding information sequence. Using polynomial arithmetic we obtain

Note: Explain your answer in details.


Q.18. (2 marks)
A router has the following CIDR entries in its routing table:
Address/mask Next hop

135.46.56.0/22 Interface 0

135.46.60.0/22 Interface 1

192.53.40.0 /23 Router 1

default Router 2

(a) What does the router do if a packet with an IP address 135.46.63.10 arrives?

(b) What does the router do if a packet with an IP address 135.46.57.14 arrives?

a.

The router will forward the packet with an IP address 135.46.63.10 to interface 1. This is
because the destination IP address matches the first routing table entry, which has a
subnet mask of /22. The subnet mask of /22 means that the first 22 bits of the IP address
must match for the packet to be routed to the interface. The first 22 bits of the IP address
135.46.63.10 match the first 22 bits of the subnet mask 135.46.60.0, so the packet will be
forwarded to interface 1.

b.

The router will forward the packet with an IP address 135.46.57.14 to interface 0. This is
because the destination IP address does not match any of the first two routing table
entries. The default routing table entry will then be used, which routes all packets to
Router 2.

Câu 19:
A Large number of consecutive IP address are available starting at
198.16.0.0. Suppose four organizations, A, B, C, D request 4000, 2000, 4000,
and 8000 addresses, respectively. For each of these organizations, give:
1. the first IP address assigned
2. the last IP address assigned
3. the mask in the w.x.y.z/s notation
The start address, the ending address, and the mask are as follows:

Here are the details for each organization:


Organization A

Start address: 198.16.0.0


Last IP address assigned: 198.16.39.255
Mask: 255.255.252.0
The mask of 255.255.252.0 means that the first 23 bits of the IP address must match for the
packet to be routed to organization A. The first 23 bits of the IP address 198.16.0.0 match the
first 23 bits of the subnet mask 255.255.252.0, so all packets with an IP address in the range
198.16.0.0 to 198.16.39.255 will be routed to organization A.

Organization B

Start address: 198.16.40.0


Last IP address assigned: 198.16.63.255
Mask: 255.255.254.0
The mask of 255.255.254.0 means that the first 22 bits of the IP address must match for the
packet to be routed to organization B. The first 22 bits of the IP address 198.16.40.0 match the
first 22 bits of the subnet mask 255.255.254.0, so all packets with an IP address in the range
198.16.40.0 to 198.16.63.255 will be routed to organization B.

Organization C

Start address: 198.16.64.0


Last IP address assigned: 198.16.95.255
Mask: 255.255.252.0
The mask of 255.255.252.0 means that the first 23 bits of the IP address must match for the
packet to be routed to organization C. The first 23 bits of the IP address 198.16.64.0 match the
first 23 bits of the subnet mask 255.255.252.0, so all packets with an IP address in the range
198.16.64.0 to 198.16.95.255 will be routed to organization C.

Organization D

Start address: 198.16.96.0


Last IP address assigned: 198.16.127.255
Mask: 255.255.255.0
The mask of 255.255.255.0 means that all 32 bits of the IP address must match for the packet to
be routed to organization D. The first 32 bits of the IP address 198.16.96.0 match the first 32 bits
of the subnet mask 255.255.255.0, so all packets with an IP address in the range 198.16.96.0 to
198.16.127.255 will be routed to organization D.

Câu 20:
(2 marks) Suppose an application layer entity wants to send an L-byte message to its
peer process, using an existing TCP connection. The TCP segment consists of the
message plus 20 bytes of header. The segment is encapsulated into an IP packet that
has an additional 20 bytes of header. The IP packet in turn goes inside an Ethernet
frame that has 18 bytes of header and trailer. What percentage of the transmitted bits
in the physical layer correspond to message information, if L = 100 bytes, 500 bytes,
1000 bytes.

Câu 21:
(2 marks) Consider the three-way handshake in TCP connection setup.
(a) Suppose that an old SYN segment from station A arrives at station B, requesting
a TCP connection. Explain how the three-way handshake procedure ensures that
the connection is rejected.
(b) Now suppose that an old SYN segment from station A arrives at station B, followed a
bit later by an old ACK segment from A to a SYN segment from B. Is this connection

Câu 22:
(2 marks) Suppose a header consists of four 16-bit words: (11111111 11111111,
11111111 00000000, 11110000 11110000, 11000000 11000000). Find the Internet
checksum for this code.

The Internet checksum is a 16-bit checksum that is used to verify the integrity of IP
packets. The checksum is calculated by adding the 16-bit words in the IP header, and
then taking the one's complement of the sum.

The header consists of four 16-bit words:

0xFFFF
0x0000
0xAAFF
0xCCCC
The checksum is calculated as follows:

0xFFFF + 0x0000 + 0xAAFF + 0xCCCC = 0x155D


The one's complement of 0x155D is 0xEAAB.

Therefore, the Internet checksum for this code is 0xEAAB.


Note: SV có thể làm cách khác nhưng kết quả đúng vẫn được tính điểm
Câu 23:

(2 marks)
Consider the 7-bit generator, G=10011, , and suppose that D has the value
1001010101. What is the value of R? Show your all steps to have result.
Note: Explain your answer in details

The value of R is 1001010010.

Here are the steps:

The generator polynomial is G=10011. This means that


the polynomial that is used to generate the codewords is
x^3 + x + 1.
The dataword is D=1001010101. This means that the
dataword is a binary sequence with 7 bits.
The remainder R is calculated by dividing the dataword D
by the generator polynomial G.
R = D - G * Quotient
The quotient is the number of times that the generator
polynomial G divides evenly into the dataword D. The
remainder is the remainder that is left after the division.

In this case, the quotient is 1. This means that the


generator polynomial G divides evenly into the dataword
D once. The remainder is therefore the last 3 bits of the
dataword D, which is 1010.

Therefore, the value of R is 1001010010.

Câu 24:

(2 marks)

Suppose two hosts, A and B, are separated by 20,000 kilometers and are connected by
a direct link of R = 2 Mbps. Suppose the propagation speed over the link is 2.5 x 10 8
meters/sec.
a. Calculate the bandwidth-delay product, R _ dprop.
b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is sent
continuously as one large message. What is the maximum number of bits that will be in
the link at any given time?
Note: Explain your answer in details

a. Calculate the bandwidth-delay product, R _ dprop.


The bandwidth-delay product is calculated as the product of the link capacity (R) and
the propagation delay (dprop). In this case, we have:

Bandwidth-delay product = R * dprop = 2 Mbps * (20,000 km / 2.5 x 10^8 m/s) =


500,000,000 bits
b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is
sent continuously as one large message. What is the maximum number of bits that will
be in the link at any given time?

The maximum number of bits that will be in the link at any given time is the sum of the
file size (800,000 bits) and the bandwidth-delay product (500,000,000 bits). This is
because the file is being sent continuously as one large message, so there will be a
delay between the time the first bit is sent and the time the last bit is received. During
this delay, the link will be filled with the file data.

Maximum number of bits in link = 800,000 bits + 500,000,000 bits = 500,800,000 bits
In other words, at any given time, there will be at most 500,800,000 bits in the link. This
is the maximum amount of data that can be transmitted by the sender before waiting
for acknowledgment.

Note: The bandwidth-delay product is an important concept in networking because it


limits the maximum throughput of a link. If the file size is larger than the bandwidth-
delay product, then the sender will have to stop and wait for acknowledgments before
sending more data. This can lead to a decrease in throughput and an increase in
latency.
Note:
Students have to follow the steps and complete the tasks in details in order to
have the results. If the students only write the result, that is, that result is not
marked or recorded.
- Students do examination on word file and answer by English

+Max sliding của Window:


Max: 2nvới n là số bit.
Bài trong quizlet: Given 3 bits for sequence numbers in Selective Repeat ARQ. If the sender already set the s to be
4, what is the maximum sliding window size at the receiver?
Đáng lẽ bài này chỉ đơn giản chỉ lấy 2^3 = 8 là ra đáp án nhưng nhìn phần in đậm nó bảo lấy từ bit thứ 4 đến bit s:
12345678
Nên chỉ lấy các bit màu đỏ( bit từ thứ tự thứ 4 do bit đầu là bit 0) 2^3-4=4 \
+Công thức tính host của Sabnet:
 Host 2n -2 với n là bit

Ví dụ: Given a subnet mask 255.255.255.240, how many hosts the subnet can support?(mỗi màu là 1 bit các bit
cách nhau bởi dấu chấm)
24 -2=14
+Tính băng thông:
Suppose an application layer entity wants to send an L-byte message to its peer process, using an existing TCP
connection. The TCP segment consists of the message plus 20 bytes of header. The segment is encapsulated into
an IP packet that has an additional 20 bytes of header. The IP packet in turn goes inside an Ethernet frame that has
18 bytes of header and trailer. What is the bandwidth utilization in terms of the percentage of the transmitted bits
in the physical layer corresponds to message information if L = 500 bytes
B1: Tính tổng byte
 Header + Trailer = 20+20+18= 58

B2: Xem cái byte muốn gửi (ở bài này là L-byte) = 500
B3: Tính % của L-Byte so với tổng byte
L−Byte
* 100%
L−Byte+Tổng Byte
500
¿=¿ *100%=90%
500+58
+Tính giá trị trì hoãn chuẩn:
B1:Tính độ trễ lan truyền(Propagation Delay)
Khoảng cách (Distance)
Tốc độ truyền( Propagation Speed )

B2:Tính độ trễ đường truyền(Transmission Delay)


Kích thước khung hình ¿ ¿
B3: Tính tốc độ chuẫn hóa
Độ trễ lan truyền
Độtrễ đường truyền
VD: Consider a Gigabit Ethernet hub with stations at a 100-meter distance and average frame size of 512 bytes.
Assume the propagation speed is at 2/3 of light speed. What is the value of normalized delay-bandwidth product?
100

(3)
Độ trễ truyền: 2
∗300000000
=5*10−7

512∗8 −6
Độ trễ đường truyền: 9 =4.096*10
10
Độ chuẩn hóa:0,122
+Tốc độ truyền dữ liệu bền vững bằng phương pháp nhóm mã thông báo(To determine the sustainable data
transmission rate using a token bucket approach)
B1:Chuyển đổi thời gian tạo mã thông báo sang giây
B2:Tính tốc độ tạo mã thông báo
B3: Chuyển kích thước của mã thông báo sang định dạng bit(1 byte bằng 8 bit)
B4: Tính tốc độ truyền bền vững:Kích thước mã thông báo * Tốc độ tạo mã
VD: Consider a token bucket approach for traffic shaping. A token is generated every 5 micro-sec packet can hold
48 bytes of data. What is the sustainable data transmission rate by the toker
Giải:
B1: 5 micro-sec= 5*10−6 giây
1
B2: 1 mã thông báo chiếm 5*10−6 giây  tốc độ tạo mã là −6
5∗10
B3: Có 48 bytes dữ liệu mã thông báo mà 1 byte bằng 8 bit  Có 384 bit
1
B4: Tốc độ truyền bền vững: −6 *384=76800000 (chuyển sang Mbps bằng cách chia cho 10^6)=76.8 mbps
5∗10

Chú ý: Anh thấy một số câu tính toán ở đề PE 1 2 đúng, PE 3 4 sai


Note:
PE thi là làm bài trên word rồi nộp bài thi như thi PRO192/PRF192

Hiện tại chỉ có Đà Nẵng là check đạo văn bài làm nên những đáp án
mẫu phải tự sửa theo lời của mình nhé, các cơ sở khác thì không cần.
Nhớ tải đáp án mẫu về máy sẵn để còn dùng nha

Q1:
Explain the difference between connectionless unacknowledged service and
connectionless acknowledged service. How do the protocols that provide these services
differ?

Solution:.
Connection Less:
-- > Connectionless service comes with a single free-standing data unit for all transmissions.
-- > In this, each unit contains all of the protocols that control information necessary for delivery
perspective, but this also contains no provision for sequencing or flow control.

>> Acknowledged:
-- > This is achieved by the use of ACK and NAK control messages.
-- > These types of protocols are well suited for communication over the network, where high
layers are very sensitive to loss and can have a significant probability of error in these underlying
networks.
Example: HDLC, which offers for unnumbered acknowledgment service(setup and release).

>> Unacknowledge:
-- > This comes with a very simpler version and provides faster communication for networks,
which are inherently reliable or provide service to a higher layer, that can tolerate loss in the
information, or which has built-in error control/recovery feature.

Q2:
Explain the difference between connection-oriented acknowledged service and
connectionless acknowledged service. How do the protocols that provide these services
differ?
Solution:
Less & Oriented:
>> Connection-oriented:
-- > In this type of service, a setup phase will be initialized between sender and receiver, to
establish a context for transferring the information
-- > This connection is provided to the sender for all SDUs.
-- > This service requires a stateful protocol, which is used to keep track of sequence numbers, and
timers.

>> ConnectionLess:
-- > Here, there will be no prior context provided for transferring the information between sender
and receiver.
-- > The sender will pass its SDU to an underlying layer without any notice.
-- > And in this, the sender requires an acknowledgment of SDU delivery.
-- > The protocols are very different in these services
-- > this service also does not require transmitting protocols to track the acknowledgment of PDU.
-- > After receiving the PDU, the receiver needs to send acknowledgment, If not received in time,
then it will return failure.

Q3 : : Explain the differences between PPP and HDLC.

Solution :
HDLC is a short form of High-level Data Link Control that does the data encapsulation. PPP is an
acronym for Point-to-Point Protocol that can be used by different devices without any data format
change.

A few major differences are as below:

For communication through HDLC, a bit-oriented protocol is used for point-to-point links as well
as for multipoint link channels. However, PPP uses a byte-oriented protocol for point-to-point
links at the time of communication.
HDLC does the encapsulation for synchronous media only whereas PPP can do the encapsulation
for synchronous as well as for asynchronous media.
HDLC can be used only for CISCO devices whereas PPP can be easily used for other devices.

Q4:
A 1.5 Mbps communications link is to use HDLC to transmit information to the
moon. What is the smallest possible frame size that allows continuous transmission?
The distance between earth and the moon is approximately 375,000 km, and the speed
of light is 3 x 108 meters/second.

Solution :
Maximum Send Window Maximum Send Window
Size in Default HDLC Size in Extended HDLC
Frame Frame

Go-Back-N 7 127
Selective Repeat 4 64

D (Distance) = 375,000 km = 375 x 106 m


c (Speed of Light) = 3 x 108 m

Then, we can calculate Round Trip Propagation Delay (Trì hoãn do quãng đường) by this formula
D 2 ( 375∗10 m )
6
2t ¿ = = 8
=2.50 s
c 3∗10
We know that
N × nf 2t × R
=2t ¿ ⇒ n f = ¿ (¿)
R N
In which, n f is Possible Frame Size (bits), Mbps is the number of Megabit Per Second.
R = 1,5 Mbps so that R = 1,5 x 106 bps.
Substitute to (*) then we have
Go-Back-N:
7 nf
If N = 7 : 1.5 Mbs =2.5 s → nf =535715 bits
127 nf
If N = 127: 1.5 Mbs =2.5 s → nf =29528 bits
Selective Repeat:
4 nf
If N = 4 : 1.5 Mbs =2.5 s → nf =973500 bits
64 nf
If N = 64 : 1.5 Mbs =2.5 s → nf =58594 bits

Q5:
Suppose HDLC is used over a 1.5 Mbps geostationary satellite link. Suppose that 250-
byte frames are used in the data link control. What is the maximum rate at which
information can be transmitted over the link?

Solution :
R = 1.5 Mbps or R = 1,5 x 106 bps , and nf =250 bytes or 2000 bits (250 x 8).
The distance that the information must travel is the earth-to-satellite distance, or
D 36,000 7km
= 3,6 x 10 m .
The speed of light c is 3 x 108 . We can calculate the propagation delay and processing rate
as follows:
7
D 3 ,6 × 10
t ¿= = 8
=0 , 12 s=120 ms
c 3× 10
nf 2000
tf = = =0,00133 s=1 ,33 ms
R 1 ,5 ×10 6

We can use either Go-Back-N or Selective Repeat ARQ. The default window size is N = 7
(with a 3- bit sequence number).

The maximum information rate is achieved with no error, and hence, no retransmission.
t cycle= minimum time to transmit a group of N packets
= t f + 2 t ¿ = 1.33 + 2 x 120 = 241.33 ms
In which, t cycleis the minimum time to transmit a group of N packets.

n = no. of bits transmitted in a cycle = N. n f = 7 x 2000 = 14000 bits


Rmax = no. of bits sent in a cycle / minimum cycle time = n / t cycle= 58 kbps
In which, n is number of bits transmitted in a cycle, Rmax is number of bits sent in a cycle /
minimum cycle time.
If the extended sequence numbering option (7-bit) is used, the maximum send window size
would be N = 27– 1 = 127, and hence, the maximum information rate is:
n=N × n f =127 × 2000=254000 bits
n 254000
Rmax = = =1052 , 5 kbps=1,0525 Mbps
t cycle 241 , 33

Q6:
Suppose that a multiplexer receives constant-length packet from N = 60 data sources.
Each data source has a probability p = 0.1 of having a packet in a given T-second
period. Suppose that the multiplexer has one line in which it can transmit eight
packets every T seconds. It also has a second line where it directs any packets that
cannot be transmitted in the first line in a T-second period. Find the average number
of packets that are transmitted on the first line and the average number of packets
that are transmitted in the second line.
Solution :
Firstly, we find out the probability of the k packets that have reached the T- second. It can
be computed with the help of binomial distribution that has parameters as N=60 and shows
the probability of p=0.1.
The average number for the arrivals of the packets can be given as Np=6. Now, calculate
the average number of packets received through the first line as below:
8
X= ∑ ❑ k .C 60 k
k .(0 ,1) .(0 , 9)
60−k
=4.59
k=0

Now, the average number of packets received is 4.59 that gets transmitted through the first
line. The remaining will get transmitted by the second line. Now, the average number of
packets transmitted through the second line per T second can be obtained as below:
Y= Np – X = 6 – 4,59 = 1,41

Therefore, it will transmit 1.41 packets on average per T second from the second line.

Q7:
Consider the transfer of a single real-time telephone voice signal across a packet
network. Suppose that each voice sample should not be delayed by more than 20 ms.
a. Discuss which of the following adaptation functions are relevant to meeting the
requirements of this transfer: handling of arbitrary message size; reliability and
sequencing; pacing and flow control; timing; addressing; and privacy, integrity
and authentication.
b. Compare a hop-by-hop approach to an end-to-end approach to meeting the
requirements of the voice signal.

Solution

192.168

Q8 :
Consider the Stop-and-Wait protocol as described. Suppose that the protocol is
modified so that each time a frame is found in error at either the sender or receiver,
the last transmitted frame is immediately resent.

a. Show that the protocol still operates correctly.


b. Does the state transition diagram need to be modified to describe the new
operation?
c. What is the main effect of introducing the immediate-retransmission feature?
Solution:
a/The sender in the stop-and-wait protocol described in the chapter retransmits a frame
when an acknowledgment is not received in time. The modified protocol says that the
frame is retransmitted every time the sender or receiver sees an error.

Therefore, the only difference is that frames are retransmitted sooner. So, the protocol will
work correctly.

b/ No. The state transition diagram will stay the same.

c/ The error recovery process will be faster with this modified protocol.

Q9
Suppose that two peer-to-peer processes provide a service that involves the transfer of
discrete messages. Suppose that the peer processes are allowed to exchange PDUs that
have a maximum size of M bytes including H bytes of header. Suppose that a PDU is
not allowed to carry information from more than one message.

Solution :
a. Develop an approach that allows the peer processes to exchange messages of
arbitrary size .
To exchange messages of arbitrary size, large messages must be segmented into parts
of M-H bytes
each in length to be transmitted in multiple PDUS. Small messages must be placed in
a single PDU.
b. What essential control information needs to be exchanged between the peer
processes?
The peer processes need to communicate information that allows for the reassembly
of messages at
the receiver. For example, the first PDU may contain the message length. The last
PDU may contain
and end-of-message marker. Sequence numbers may also be useful to detect loss in
connection
oriented networks and to help in reconstruction of the messages in connectionless
networks. Lastly,
since variable size PDUS are permitted, the size of the PDU must be transmitted in
the PDU header.
c. Now suppose that the message transfer service provided by the peer processes is
shared by several message source-destination pairs. Is additional control information
required, and if so, where should it be placed?

In this case, in addition to all of the header information mentioned in b), each PDU
must be labeled
with a stream ID, so that the receiver can treat each stream independently when
reassembling
messages.

Q10 :
A 1 Mbyte file is to be transmitted over a 1 Mbps communication line that has a bit
error rate of p = 10-6.
a. What is the probability that the entire file is transmitted without errorsWe
conclude that it is extremely unlikely that the file will arrive error free.
b. The file is broken up into N equal-sized blocks that are transmitted separately.
What is the probability that all the blocks arrive correctly without error? Does
dividing the file into blocks help?
c. Suppose the propagation delay is negligible, explain how Stop-and-Wait ARQ can
help deliver the file in error-free form. On the average how long does it take to
deliver the file if the ARQ transmits the entire file each time?

Solution :
1Mbyte = 106 byte = 8 x 106bits because1 byte = 8 bits
The file length n = 8 x 106 bits, the transmission rate R = 1 Mbps = 106 bps and p =
10-6
a. Note : For n lagrge and p very small , (1− p)n ≈ e−np
P[no error in the entire file] = (1− p)n ≈ e−np for n >> 1 , p << 1
= e−8 = 3.35 x 10−4
We conclude that it is extremely unlikely that the file will arrive error free

b. A subblock of length n/N is received without error with probability :


P[no error in subblock] = (1− p)n / N
A block has no errors if all subblocks have no errors, so
N

P[no error in block]❑= P[no error ∈ subblock ]N = (1− p)(n / N ) = (1− p)n

So simply dividing the blocks does not help.

c.
Refer to the following figure for the discussion .

We assume the following:


- t 0= basic time to send a frame and receive the ACK/NAK ≈ ttimeout
- t total = total transmission time until success
- nf ¿ number of bits/ frame
- na = number of bits per ACK
- nt = number of transmissions
- Pf = probability of frame transmission error

n n
t0 = t f +t ACK = Rf + Ra (t ¿≈ 0 ¿ ¿
P [ nt =i ]=P[one success after i−1 failure ] = (1 - pf ¿ p f
i−1

Given i transmissions : t total | = i * t 0


∞ ∞ t 0 ( 1−P f ) t0
E[t total] = ∑ ❑i t0P[nt =i] =t 0 (1−P f )∑ ❑i . Pi−1
f =
(1−Pf )
2 = 1− pf
i=1 i=1

Here , n f = n >> n a thus t 0 ≈ t f = n/R ; and Pf =1−P [no error ] =


1−¿ e−np
E[total] = n/R(1 - pf ¿=n /[ℜ−np ] = 8 / (3.35 x 10-4) = 23847 seconds = 6,62 hours
The file gets through, but only after many retransmissions.

Q11

In this activity, you are given the network address of 192.168.100.0/24 to subnet and
provide the IP addressing for the Packet Tracer network. Each LAN in the network
requires at least 25 addresses for end devices, the switch and the router. The connection
between R1 to R2 will require an IP address for each end of the link.

a. Based on the topology, how many subnets are needed?


b. How many bits must be borrowed to support the number of subnets in the topology
table?
c. How many subnets does this create?
d. How many usable hosts does this create per subnet?
Solution:
a,
We saw that S1, S2, S3, S4, S0/0/0 are the subnets needed, so that there is 5 subnets are
needed.
b,
We call N is the number of bits, then N is the smallest number that satisfies
N
4 ×2 −2 ≥ 25
Then we got N = 3.
(4 because 4 is subnet S1, S2, S3 , S4 not S0/0/0)
c,
We saw that number of bits N = 3, then the number of subnets does this create is 23=8.

d.How many usable hosts does this create per subnet? 28-n – 2 = 28-3 – 2 = 30

Q12:
Five stations (S1-S5) are connected to an extended LAN through transparent bridges (B1-
B2), as shown in the following figure. Initially, the forwarding tables are empty. Suppose the
following stations transmit frames: S1 transmits to S5, S3 transmit to S2, S4 transmits to S3,
S2 transmits to S1, and S5 transmits to S4. Fill in the forwarding tables with appropriate
entries after the frames have been completely transmitted.

Solution :
Firstly, we know that we have 3 types of LAN, and each LAN is arranged follow BUS.
Then, if a device sends data, it will send according to broardcast type (send to any device
and internet port).

B1
Address Port
Step 1 S1 => S5 S1 1
Step 2 S3 => S2 S3 2
Step 3 S4 => S3 S4 2
Step 4 S2 => S1 S2 1
Step 5 S5 => S4

B2
Address Port
Step 1 S1 => S5 S1 1
Step 2 S3 => S2 S3 2
Step 3 S4 => S3 S4 2
Step 4 S2 => S1 1
Step 5 S5 => S4 S5

Q13 :

1. Consider the network in Figure.


a) Use the Dijkstra algorithm to find the set of shortest paths from node 4 to other
nodes.

We call that node that have number N is V(N) (i.e the green one is V(4))

b, Find the set of associated routing table entries (Destination, Next Hop, Cost)

Destinatio Cost Next


n Hop

Solution:
a.
Iteration N D1 D2 D3 D5 D6

Initial {4} (−1 , ∞) −1 , ∞ ¿ (−1 , ∞) (−1 , ∞) (−1 , ∞)

1 {4,2} (5,4) (1, 4) (2,4) (3,4) (−1 , ∞)

2 {4,2,3} (4,2) ______ (2,4) (3,4) (−1 , ∞)

3 {4,2,3, 5} (4,2) ______ ______ (3,4) (3,3)

5 {4,2,3,5,6} (4,2) ______ ______ ______ (3,3)

6 {4,2,3,5,6,1 (4,2) ______ ______ ______ ______


}

The shortest part from D4 to D1 is 4 and the path is D4 -> D2 -> D1

The shortest part from D4 to D2 is 1 and the path is D4 -> D2

The shortest part from D4 to D3 is 2 and the path is D4 -> D3

The shortest part from D4 to D5 is 3 and the path is D4 -> D5


The shortest part from D4 to D6 is 3 and the path is D4 -> D3 -> D6

b.
Destination Cost Next Hop

1 (chính là D1) 4 2
2 1 2
3 2 3
5 3 5
6 3 3

Q14 :

You are a network technician assigned to install a new network for a customer. You must
create multiple subnets out of the 192.168.12.0/24 network address space to meet the
following requirements:
- The first subnet is the LAN-A network. You need a minimum of 50 host IP
addresses.
- The second subnet is the LAN-B network. You need a minimum of 40 host IP
addresses.
- You also need at least two additional unused subnets for future network
expansion.
Note: Variable length subnet masks will not be used. All of the device subnet masks
should be the same length.
Answer the following questions to help create a subnetting scheme that meets the stated
network requirements:

a. How many host addresses are needed in the largest required subnet?
b. What is the minimum number of subnets required?
c. The network that you are tasked to subnet is 192.168.12.0/24. What is the /24 subnet
mask in binary?
d. The subnet mask is made up of two portions, the network portion, and the host
portion. This is represented in the binary by the ones and the zeros in the subnet
mask.
Questions:
In the network mask, what do the ones and zeros represent?

e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in the
table. Remember that the first subnet is 192.168.12.0 with the chosen subnet mask.

Subnet Prefi Subnet Mask


Address x

Solution :
a. How many host addresses are needed in the largest required subnet?
Soln: 50

b. What is the minimum number of subnets required?


Soln : According to the question , two subnet are required for LAN-A and LAN-B and two
subnets are needed to be left for future use Therefor the total number of subnets are 4 .

c. The network that you are tasked to subnet is 192.168.12.0/24. What is the /24 subnet
mask in binary?

Soln : /24 is prefix length.


a. In binary, it is 11111111.111111111.111111111.000000000
There are 24 bits 1. It means that the address left 24 first bits for network portion

d. The subnet mask is made up of two portions, the network portion, and the host portion.
This is represented in the binary by the ones and the zeros in the subnet mask. In the
network mask, what do the ones and zeros represent?

Soln : In the nerwork mask, the ones represent the network portion and the zeroes represent
the host portion.

e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in the table.
Remember that the first subnet is 192.168.12.0 with the chosen subnet mask.

Subnet Prefi Subnet Mask


Address x

192.168.12.0 /26 255.255.255.192

192.168.12.64 /26 255.255.255.192

192.168.12.12 /26 255.255.255.192


8

192.168.12.19 /26 255.255.255.192


2

Câu 15:
Suppose that Selective Repeat ARQ is modified so that ACK messages contain a list of the
next m frames that it expects to receive.
Solutions follow questions:
a. How does the protocol need to be modified to accommodate this change?
b. What is the effect of the change on protocol performance?
Solution :
GIVENTHAT :

a) How does the protocol need to be modified ?

2 things are needed to be changed:-

The frame header needs to be modified to recieve the list of frames and Since the reciever
explicitly indicates which frames are needed to be transmitted.
Change in transmitter operation is needed. If the recieved list contains m oldest frames that are yet
to be recieved , then it can be used to skip retransmission of frames that have already been
received.
b) What is the effect of change on protocol performance?

Performance will surely increase if the error rate is high or delay is high. A single frame can ask
for the retransmission of several frames.
The complexity of the protocol will surely increase relative to the unchanged Selective repeat
ARQ

Q.1. (2 marks)
Suppose the size of an uncompressed text file is 1 megabyte
Note: Explain your answer in details.
a. How long does it take to download the file over a 32 kilobit/second modem?
b. How long does it take to take to download the file over a 1 megabit/second
modem?
c. Suppose data compression is applied to the text file. How much do the transmission
times in parts (a) and (b) change?

solu:
Câu a)
(Đổi hết sang đơn vị bit và bit / second)
Size text file = 1 x 1024 x 1024 x 8 (bit)
Speed = 32 x 1000 (bit / second)
=> T (32k) = (1 x 1024 x 1024 x 8) / (32 x 1000) = 262.144 (seconds)

Câu b)
(Đổi hết sang đơn vị bit và bit / second)
Size text file = 1 x 1024 x 1024 x 8 (bit)
Speed = 1 x 1000 x 1000 (bit / second)
=> T (1M) = (1 x 1024 x 1024 x 8) / (1 x 1000 x 1000) = 8.38 (seconds)

Câu c)
(Đề kêu 1:6 thì chỉ việc nhân thêm cho 6 ở chỗ tốc độ là xong, nếu trường ra đề 1:10 thì nhân 10)
=> T (32k) = (1 x 1024 x 1024 x 8) / (32 x 1000 x 6) = 43.69 (seconds)
=> T (1M) = (1 x 1024 x 1024 x 8) / (1 x 1000 x 1000 x 6) = 1.4 (seconds)
Q2. (2 marks)
Let g(x)=x3+x+1. Consider the information sequence 1001. Find the codeword
corresponding to the preceding information sequence. Using polynomial arithmetic we obtain
Note: Explain your answer in details.

Solu:

Step 1: Add 000 to data bits string. It will be 1001000

Step 2: Devide 1001000 to 1011 in modulo – 2 method.


g(x) = x3+x+1 -> 1011
Using polynomial arithmetic we obtain:

101
-----------------
1011 | 1001000
| 1011
---------------
001000
1011
---------------
00110

Codeword = 1 0 0 1 1 1 0

Q.4. (2 marks)
A router has the following CIDR entries in its routing table:
Address/mask Next hop
135.46.56.0/22 Interface 0
135.46.60.0/22 Interface 1
192.53.40.0/23 Router 1
default Router 2
(a) What does the router do if a packet with an IP address 135.46.63.10 arrives?
(b) What does the router do if a packet with an IP address 135.46.57.14 arrives?

solu:
a)
Taking the first 22 bits of the above IP address as network address, we have 135.46.60.0.
It matches the network address of 135.46.60.0/22. So, the router will forward the packet to Interface
1.

b)
Taking the first 22 bits of the above IP address as network address, we have 135.46.56.0.
It matches the network address of 135.46.56.0/22. The packet will be forwarded to Interface 0.

(ko chep vao) Cách nhận biết:


Xét 135.46.63.10 có 135.46 giống Interface 0 và 1.
135.46.63 lớn hơn Interface 1 thì chọn Interface 1, ngược nếu ví dụ như đề câu b chỉ có 57 (lớn
hơn 56 nhưng nhỏ hơn 60) -> chọn Interface 0.
Nếu đề hỏi khác nữa như cho 10.10.10.10 không giống cái nào ở Interface 0, 1 hay Router 1 thì
mặc định chọn Default -> Router 2.

Câu 15:
A Large number of consecutive IP address are available starting at 198.16.0.0.
Suppose four organizations, A, B, C, D request 4000, 2000, 4000, and 8000
addresses, respectively. For each of these organizations, give:
1. the first IP address assigned
2. the last IP address assigned
3. the mask in the w.x.y.z/s notation

solu:
IP addresses will be allocated in blocks of power of 2. So the four organizations will be allocated
IPs as A-4096, B-2048, C-4096 and D-8192. Remaining unused IPs are wasted. IPs will be allocated
to the organizations contiguously

A has 2^12 hosts. So lower order 12 bits will denote host ID and higher order 32-12=20 bits
denotes network ID

A's first IP=198.16.0.0 (Host IP part contains all Os)

A's last IP=11000110.00010000.00001111.11111111 (Host ID part contains all 1s=198.16.15.255)

A's Mask=198.16.15.255
------------------------------------------------------------------------------------------------------------

B has 2^11 hosts. So lower order 11 bits will denote host ID and higher order 32-11=21 bits
denotes network ID

B's first IP=198.16.16.0

B's last IP=11000110.00010000.00010111.11111111=198.16.23.255

B's Mask=198.16.16.0/21
------------------------------------------------------------------------------------------------------------

C has 2^12 hosts. So lower order 12 bits will denote host ID and higher order 32-12=20 bits
denotes network ID

C's first IP=198.16.24.0

C's last IP=11000110.00010000.00011111.11111111=198.16.31.255

C's Mask=198.16.24.0/20
--------------------------------------------------------------------------------------------------------------

D has 2^13 hosts. So lower order 13 bits will denote host ID and higher order 32-13=19 bits
denotes network ID

D's first IP=198.16.32.0

D's last IP=11000110.00010000.00111111.11111111=198.16.63.255


D's Mask=198.16.32.0/19

Chú ý: Anh thấy một số câu tính toán ở đề PE 1 2 đúng, PE 3 4 sai


Note:
PE thi là làm bài trên word rồi nộp bài thi như thi PRO192/PRF192

Hiện tại chỉ có Đà Nẵng là check đạo văn bài làm nên những đáp án
mẫu phải tự sửa theo lời của mình nhé, các cơ sở khác thì không cần.
Nhớ tải đáp án mẫu về máy sẵn để còn dùng nha
Q1:
Explain the difference between connectionless unacknowledged service and connectionless
acknowledged service. How do the protocols that provide these services differ?

Solution:.
Connection Less:
-- > Connectionless service comes with a single free-standing data unit for all transmissions.
-- > In this, each unit contains all of the protocols that control information necessary for delivery
perspective, but this also contains no provision for sequencing or flow control.

>> Acknowledged:
-- > This is achieved by the use of ACK and NAK control messages.
-- > These types of protocols are well suited for communication over the network, where high
layers are very sensitive to loss and can have a significant probability of error in these underlying
networks.
Example: HDLC, which offers for unnumbered acknowledgment service(setup and release).

>> Unacknowledge:
-- > This comes with a very simpler version and provides faster communication for networks,
which are inherently reliable or provide service to a higher layer, that can tolerate loss in the
information, or which has built-in error control/recovery feature.
Q2:
Explain the difference between connection-oriented acknowledged service and
connectionless acknowledged service. How do the protocols that provide these services
differ?
Solution:
Less & Oriented:
>> Connection-oriented:
-- > In this type of service, a setup phase will be initialized between sender and receiver, to
establish a context for transferring the information
-- > This connection is provided to the sender for all SDUs.
-- > This service requires a stateful protocol, which is used to keep track of sequence numbers, and
timers.

>> ConnectionLess:
-- > Here, there will be no prior context provided for transferring the information between sender
and receiver.
-- > The sender will pass its SDU to an underlying layer without any notice.
-- > And in this, the sender requires an acknowledgment of SDU delivery.
-- > The protocols are very different in these services
-- > this service also does not require transmitting protocols to track the acknowledgment of PDU.
-- > After receiving the PDU, the receiver needs to send acknowledgment, If not received in time,
then it will return failure.

Q3 : : Explain the differences between PPP and HDLC.

Solution :
HDLC is a short form of High-level Data Link Control that does the data encapsulation. PPP is an
acronym for Point-to-Point Protocol that can be used by different devices without any data format
change.

A few major differences are as below:

For communication through HDLC, a bit-oriented protocol is used for point-to-point links as well
as for multipoint link channels. However, PPP uses a byte-oriented protocol for point-to-point
links at the time of communication.
HDLC does the encapsulation for synchronous media only whereas PPP can do the encapsulation
for synchronous as well as for asynchronous media.
HDLC can be used only for CISCO devices whereas PPP can be easily used for other devices.
Q4:
A 1.5 Mbps communications link is to use HDLC to transmit information to the moon.
What is the smallest possible frame size that allows continuous transmission? The distance
between earth and the moon is approximately 375,000 km, and the speed of light is 3 x 108
meters/second.

Solution :
Maximum Send Window Maximum Send Window
Size in Default HDLC Size in Extended HDLC
Frame Frame

Go-Back-N 7 127
Selective Repeat 4 64

D (Distance) = 375,000 km = 375 x 106 m


c (Speed of Light) = 3 x 108 m

Then, we can calculate Round Trip Propagation Delay (Trì hoãn do quãng đường) by this formula
D 2 ( 375∗10 m )
6
2t ¿ = = 8
=2.50 s
c 3∗10
We know that
N × nf 2t × R
=2t ¿ ⇒ n f = ¿ (¿)
R N
In which, n f is Possible Frame Size (bits), Mbps is the number of Megabyte Per Second.
R = 1,5 Mbps so that R = 1,5 x 106 bps.
Substitute to (*) then we have
Go-Back-N:
7 nf
If N = 7 : 1.5 Mbs =2.5 s → nf =535715 bits
127 nf
If N = 127: 1.5 Mbs =2.5 s → nf =29528 bits
Selective Repeat:
4 nf
If N = 4 : 1.5 Mbs =2.5 s → nf =973500 bits
64 nf
If N = 64 : 1.5 Mbs =2.5 s → nf =58594 bits

Q5:
Suppose HDLC is used over a 1.5 Mbps geostationary satellite link. Suppose that 250-byte
frames are used in the data link control. What is the maximum rate at which information
can be transmitted over the link?

Solution :
R = 1.5 Mbps or R = 1,5 x 106 bps , and nf =250 bytes or 2000 bits (250 x 8).
The distance that the information must travel is the earth-to-satellite distance, or
D 36,000 7km
= 3,6 x 10 m .
The speed of light c is 3 x 108 . We can calculate the propagation delay and processing rate
as follows:
7
D 3 ,6 × 10
t ¿= = 8
=0 , 12 s=120 ms
c 3× 10
nf 2000
tf = = =0,00133 s=1 ,33 ms
R 1 ,5 ×10 6

We can use either Go-Back-N or Selective Repeat ARQ. The default window size is N = 7
(with a 3- bit sequence number).

The maximum information rate is achieved with no error, and hence, no retransmission.
t cycle= minimum time to transmit a group of N packets
= t f + 2 t ¿ = 1.33 + 2 x 120 = 241.33 ms
In which, t cycleis the minimum time to transmit a group of N packets.

n = no. of bits transmitted in a cycle = N. n f = 7 x 2000 = 14000 bits


Rmax = no. of bits sent in a cycle / minimum cycle time = n / t cycle= 58 kbps
In which, n is number of bits transmitted in a cycle, Rmax is number of bits sent in a cycle /
minimum cycle time.
If the extended sequence numbering option (7-bit) is used, the maximum send window size
would be N = 27– 1 = 127, and hence, the maximum information rate is:
n=N × n f =127 × 2000=254000 bits
n 254000
Rmax = = =1052 , 5 kbps=1,0525 Mbps
t cycle 241 , 33

Q6:
Suppose that a multiplexer receives constant-length packet from N = 60 data sources. Each
data source has a probability p = 0.1 of having a packet in a given T-second period.
Suppose that the multiplexer has one line in which it can transmit eight packets every T
seconds. It also has a second line where it directs any packets that cannot be transmitted in
the first line in a T-second period. Find the average number of packets that are transmitted
on the first line and the average number of packets that are transmitted in the second line.
Solution :
Firstly, we find out the probability of the k packets that have reached the T- second. It can
be computed with the help of binomial distribution that has parameters as N=60 and shows
the probability of p=0.1.
The average number for the arrivals of the packets can be given as Np=6. Now, calculate
the average number of packets received through the first line as below:
8

X= ∑ ❑ k .C 60 k
k .(0 ,1) .(0 , 9)
60−k
=4.59
k=0

Now, the average number of packets received is 4.59 that gets transmitted through the first
line. The remaining will get transmitted by the second line. Now, the average number of
packets transmitted through the second line per T second can be obtained as below:
Y= Np – X = 6 – 4,59 = 1,41

Therefore, it will transmit 1.41 packets on average per T second from the second line.

Q7:
Consider the transfer of a single real-time telephone voice signal across a packet network.
Suppose that each voice sample should not be delayed by more than 20 ms.
a. Discuss which of the following adaptation functions are relevant to meeting the
requirements of this transfer: handling of arbitrary message size; reliability and
sequencing; pacing and flow control; timing; addressing; and privacy, integrity and
authentication.
b. Compare a hop-by-hop approach to an end-to-end approach to meeting the
requirements of the voice signal.

Solution

a/Message size is important because in real-time signals of voice it is necessary to


transfer a fixed packet size of that holds no more than 20 ms of the speech signal.
The handling of arbitrary message size is not as important as long as the desired
packet size for voice can be handled.

Sequencing is essential because each packet needs to arrive in the same sequence
that it was generated. Reliability is moderately important since voice transmission
can tolerate a certain level of loss and error.

Pacing and flow control are not as important because the synchronous nature of the
voice signal implies that the end systems will be matched in speed.

Timing, for real-time voice transfer, is important because this adaptation function
helps to control the jitter in the delivered signal.

Addressing is only during the connection setup phase if we assume some form of virtual
circuit packet switching method.

Privacy, integrity, and authentication have traditionally not been as important as the
other issues discussed above.

b/If the underlying network is reliable then the end-to-end approach is better because the
probability of error is very low so processing at the edge suffices to provide acceptable
performance.
If the underlying network is unreliable then the hop-by-hop approach may be required. For
example, if the probability of error is very high, as in a wireless channel, then error
recovery at each hop may be necessary to make effective communication possible.

Q8 :
Consider the Stop-and-Wait protocol as described. Suppose that the protocol is modified
so that each time a frame is found in error at either the sender or receiver, the last
transmitted frame is immediately resent.

a. Show that the protocol still operates correctly.


b. Does the state transition diagram need to be modified to describe the new operation?
c. What is the main effect of introducing the immediate-retransmission feature?
Solution:
a/The sender in the stop-and-wait protocol described in the chapter retransmits a frame
when an acknowledgment is not received in time. The modified protocol says that the
frame is retransmitted every time the sender or receiver sees an error.
Therefore, the only difference is that frames are retransmitted sooner. So, the protocol will
work correctly.

b/ No. The state transition diagram will stay the same.

c/ The error recovery process will be faster with this modified protocol.

Q9
Suppose that two peer-to-peer processes provide a service that involves the transfer of
discrete messages. Suppose that the peer processes are allowed to exchange PDUs that have
a maximum size of M bytes including H bytes of header. Suppose that a PDU is not
allowed to carry information from more than one message.

Solution :
a. Develop an approach that allows the peer processes to exchange messages of
arbitrary size .
To exchange messages of arbitrary size, large messages must be segmented into parts
of M-H bytes
each in length to be transmitted in multiple PDUS. Small messages must be placed in
a single PDU.
b. What essential control information needs to be exchanged between the peer
processes?
The peer processes need to communicate information that allows for the reassembly
of messages at
the receiver. For example, the first PDU may contain the message length. The last
PDU may contain
and end-of-message marker. Sequence numbers may also be useful to detect loss in
connection
oriented networks and to help in reconstruction of the messages in connectionless
networks. Lastly,
since variable size PDUS are permitted, the size of the PDU must be transmitted in
the PDU header.
c. Now suppose that the message transfer service provided by the peer processes is
shared by several message source-destination pairs. Is additional control information
required, and if so, where should it be placed?

In this case, in addition to all of the header information mentioned in b), each PDU
must be labeled
with a stream ID, so that the receiver can treat each stream independently when
reassembling
messages.

Q10 :
A 1 Mbyte file is to be transmitted over a 1 Mbps communication line that has a bit error
rate of p = 10-6.
a. What is the probability that the entire file is transmitted without errorsWe conclude that
it is extremely unlikely that the file will arrive error free.
b. The file is broken up into N equal-sized blocks that are transmitted separately. What is
the probability that all the blocks arrive correctly without error? Does dividing the file
into blocks help?
c. Suppose the propagation delay is negligible, explain how Stop-and-Wait ARQ can help
deliver the file in error-free form. On the average how long does it take to deliver the
file if the ARQ transmits the entire file each time?

Solution :
1Mbyte = 106 byte = 8 x 106bits because1 byte = 8 bits
The file length n = 8 x 106 bits, the transmission rate R = 1 Mbps = 106 bps and p =
10-6
a. Note : For n lagrge and p very small , (1− p)n ≈ e−np
P[no error in the entire file] = (1− p)n ≈ e−np for n >> 1 , p << 1
= e−8 = 3.35 x 10−4
We conclude that it is extremely unlikely that the file will arrive error free

b. A subblock of length n/N is received without error with probability :


P[no error in subblock] = (1− p)n / N
A block has no errors if all subblocks have no errors, so
N

P[no error in block]❑= P[no error ∈ subblock ]N = (1− p)(n / N ) = (1− p)n

So simply dividing the blocks does not help.

c.
Refer to the following figure for the discussion .
We assume the following:
- t 0= basic time to send a frame and receive the ACK/NAK ≈ ttimeout

-t total = total transmission time until success


-n f ¿ number of bits/ frame
-n a = number of bits per ACK
-nt = number of transmissions
- Pf = probability of frame transmission error

n n
t0 = t f +t ACK = Rf + Ra (t ¿≈ 0 ¿ ¿
P [ nt =i ]=P[one success after i−1 failure ] = (1 - pf ¿ p f
i−1

Given i transmissions : t total | = i * t 0


∞ ∞ t 0 ( 1−P f ) t0
E[t total] = ∑ ❑i t0P[nt =i] =t 0 (1−P f )∑ ❑i . Pi−1
f = (1−Pf )
2 = 1− pf
i=1 i=1

Here , n f = n >> n a thus t 0 ≈ t f = n/R ; and =


Pf =1−P [no error ]
1−¿ e −np

E[total] = n/R(1 - pf ¿=n /[ℜ−np ] = 8 / (3.35 x 10-4) = 23847 seconds = 6,62 hours
The file gets through, but only after many retransmissions.

Q11
In this activity, you are given the network address of 192.168.100.0/24 to subnet and provide
the IP addressing for the Packet Tracer network. Each LAN in the network requires at least 25
addresses for end devices, the switch and the router. The connection between R1 to R2 will
require an IP address for each end of the link.

a. Based on the topology, how many subnets are needed?


b. How many bits must be borrowed to support the number of subnets in the topology table?
c. How many subnets does this create?
d. How many usable hosts does this create per subnet?
Solution:
a,

We saw that S1, S2, S3, S4, S0/0/0 are the subnets needed, so that there is 5 subnets are
needed.
b,
We call N is the number of bits, then N is the smallest number that satisfies
N
4 ×2 −2 ≥ 25
Then we got N = 3.
(4 because 4 is subnet S1, S2, S3 , S4 not S0/0/0)
c,
We saw that number of bits N = 3, then the number of subnets does this create is 23=8.

d.How many usable hosts does this create per subnet? 28-n – 2 = 28-3 – 2 = 30

Q12:
Five stations (S1-S5) are connected to an extended LAN through transparent bridges (B1-B2), as
shown in the following figure. Initially, the forwarding tables are empty. Suppose the following
stations transmit frames: S1 transmits to S5, S3 transmit to S2, S4 transmits to S3, S2 transmits to
S1, and S5 transmits to S4. Fill in the forwarding tables with appropriate entries after the frames
have been completely transmitted.

Solution :
Firstly, we know that we have 3 types of LAN, and each LAN is arranged follow BUS.
Then, if a device sends data, it will send according to broardcast type (send to any device
and internet port).
B1
Address Port
Step 1 S1 => S5 S1 1
Step 2 S3 => S2 S3 2
Step 3 S4 => S3 S4 2
Step 4 S2 => S1 S2 1
Step 5 S5 => S4

B2
Address Port
Step 1 S1 => S5 S1 1
Step 2 S3 => S2 S3 2
Step 3 S4 => S3 S4 2
Step 4 S2 => S1 1
Step 5 S5 => S4 S5

Q13 :

1. Consider the network in Figure.

a) Use the Dijkstra algorithm to find the set of shortest paths from node 4 to other
nodes.
We call that node that have number N is V(N) (i.e the green one is V(4))

b, Find the set of associated routing table entries (Destination, Next Hop, Cost)

Destinatio Cost Next


n Hop

Solution:
a.
Iteration N D1 D2 D3 D5 D6

Initial {4} (−1 , ∞) −1 , ∞ ¿ (−1 , ∞) (−1 , ∞) (−1 , ∞)

1 {4,2} (5,4) (1, 4) (2,4) (3,4) (−1 , ∞)

2 {4,2,3} (4,2) ______ (2,4) (3,4) (−1 , ∞)

3 {4,2,3, 5} (4,2) ______ ______ (3,4) (3,3)

5 {4,2,3,5,6} (4,2) ______ ______ ______ (3,3)

6 {4,2,3,5,6,1 (4,2) ______ ______ ______ ______


}

The shortest part from D4 to D1 is 4 and the path is D4 -> D2 -> D1

The shortest part from D4 to D2 is 1 and the path is D4 -> D2

The shortest part from D4 to D3 is 2 and the path is D4 -> D3

The shortest part from D4 to D5 is 3 and the path is D4 -> D5

The shortest part from D4 to D6 is 3 and the path is D4 -> D3 -> D6

b.
Destination Cost Next Hop

1 (chính là D1) 4 2
2 1 2
3 2 3
5 3 5
6 3 3
Q14 :

You are a network technician assigned to install a new network for a customer. You must
create multiple subnets out of the 192.168.12.0/24 network address space to meet the following
requirements:
- The first subnet is the LAN-A network. You need a minimum of 50 host IP
addresses.
- The second subnet is the LAN-B network. You need a minimum of 40 host IP
addresses.
- You also need at least two additional unused subnets for future network expansion.
Note: Variable length subnet masks will not be used. All of the device subnet masks should be
the same length.
Answer the following questions to help create a subnetting scheme that meets the stated network
requirements:

a. How many host addresses are needed in the largest required subnet?
b. What is the minimum number of subnets required?
c. The network that you are tasked to subnet is 192.168.12.0/24. What is the /24 subnet mask
in binary?
d. The subnet mask is made up of two portions, the network portion, and the host portion.
This is represented in the binary by the ones and the zeros in the subnet mask.
Questions:
In the network mask, what do the ones and zeros represent?

e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in the table.
Remember that the first subnet is 192.168.12.0 with the chosen subnet mask.

Subnet Prefi Subnet Mask


Address x
Solution :
a. How many host addresses are needed in the largest required subnet?
Soln: 50

b. What is the minimum number of subnets required?


Soln : According to the question , two subnet are required for LAN-A and LAN-B and two
subnets are needed to be left for future use Therefor the total number of subnets are 4 .

c. The network that you are tasked to subnet is 192.168.12.0/24. What is the /24 subnet
mask in binary?

Soln : /24 is prefix length.


a. In binary, it is 11111111.111111111.111111111.000000000
There are 24 bits 1. It means that the address left 24 first bits for network portion

d. The subnet mask is made up of two portions, the network portion, and the host portion.
This is represented in the binary by the ones and the zeros in the subnet mask. In the
network mask, what do the ones and zeros represent?

Soln : In the nerwork mask, the ones represent the network portion and the zeroes represent
the host portion.

e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in the table.
Remember that the first subnet is 192.168.12.0 with the chosen subnet mask.
Subnet Prefi Subnet Mask
Address x

192.168.12.0 /26 255.255.255.192

192.168.12.64 /26 255.255.255.192

192.168.12.12 /26 255.255.255.192


8

192.168.12.19 /26 255.255.255.192


2

Câu 15:
Suppose that Selective Repeat ARQ is modified so that ACK messages contain a list of the next m
frames that it expects to receive.
Solutions follow questions:
a. How does the protocol need to be modified to accommodate this change?
b. What is the effect of the change on protocol performance?
Solution :
GIVENTHAT :

a) How does the protocol need to be modified ?

2 things are needed to be changed:-

The frame header needs to be modified to recieve the list of frames and Since the reciever
explicitly indicates which frames are needed to be transmitted.
Change in transmitter operation is needed. If the recieved list contains m oldest frames that are yet
to be recieved , then it can be used to skip retransmission of frames that have already been
received.
b) What is the effect of change on protocol performance?

Performance will surely increase if the error rate is high or delay is high. A single frame can ask
for the retransmission of several frames.

The complexity of the protocol will surely increase relative to the unchanged Selective repeat
ARQ
Chú ý: Anh thấy một số câu tính toán ở đề PE 1 2 đúng, PE 3 4 sai
Note:
PE thi là làm bài trên word rồi nộp bài thi như thi PRO192/PRF192

Hiện tại chỉ có Đà Nẵng là check đạo văn bài làm nên những đáp án
mẫu phải tự sửa theo lời của mình nhé, các cơ sở khác thì không cần.
Nhớ tải đáp án mẫu về máy sẵn để còn dùng nha

Câu 1: Explain the difference between connectionless unacknowledged service and


connectionless acknowledged service. How do the protocols that provide these services
differ?

Connectionless service is a network communication service that does not establish a


dedicated communication path between the sender and receiver. In connectionless
unacknowledged service, also known as "fire and forget," the sender sends a message
without ensuring that it has been received by the receiver. The receiver may or may not
receive the message, and there is no confirmation sent back to the sender.

In contrast, in connectionless acknowledged service, the sender transmits a message


and waits for a confirmation of receipt from the receiver. If the receiver receives the
message, it sends an acknowledgement back to the sender. If the sender does not
receive an acknowledgement, it can assume that the message was not received.

The protocols that provide these services differ in their handling of packet loss and
protocol overhead. Connectionless unacknowledged service protocols, such as UDP
(User Datagram Protocol), are lightweight and have minimal overhead but provide no
guarantee of message delivery. Connectionless acknowledged service protocols, such as
ICMP (Internet Control Message Protocol) and ARP (Address Resolution Protocol), have
more overhead but provide greater reliability by sending acknowledgements of
successful message delivery.
Câu 2. Explain the difference between connection-oriented acknowledged service and
connectionless acknowledged service. How do the protocols that provide these services
differ?

Connection-oriented acknowledged service is a network communication service that


establishes a dedicated connection between the sender and receiver before any data
transmission takes place. In this service, the receiver sends an acknowledgement to the
sender after receiving each packet of data.

In contrast, connectionless acknowledged service does not establish a dedicated


connection before data transmission. The sender simply sends packets to the receiver,
and the receiver sends acknowledgements back to the sender for each received packet.

The protocols that provide these services differ in their handling of packet loss and
protocol overhead. Connection-oriented acknowledged service protocols, such as TCP
(Transmission Control Protocol), use a three-way handshake to establish a reliable
connection between the sender and receiver. This protocol also implements flow
control and congestion control mechanisms to ensure efficient data transfer and
minimize packet loss. Once the data transmission is complete, the connection is
terminated.

Connectionless acknowledged service protocols, such as UDP (User Datagram Protocol),


do not establish a dedicated connection with the receiver. Instead, they simply send the
packets to the receiver without guaranteeing their delivery or order. These protocols
have lower overhead and are useful in applications where speed is more important than
accuracy, such as online gaming and live streaming.

In summary, connection-oriented acknowledged service is reliable but has higher


overhead and may be slower, while connectionless acknowledged service is faster but
less reliable and does not guarantee the order of packet delivery.
Câu 3: Explain the differences between PPP and HDLC.

PPP (Point-to-Point Protocol) and HDLC (High-level


Data Link Control) are both protocols used for data link
layer communication. While they share many
similarities, there are several differences between the
two protocols.

Flexibility: PPP is a more flexible protocol than HDLC. It


can be used to carry multiple network layer protocols,
including IP, IPX, and AppleTalk, whereas HDLC is
primarily designed for carrying only one protocol.

Error Detection: PPP has a better error detection


mechanism as compared to HDLC. PPP uses a cyclic
redundancy check (CRC) for detecting errors, while
HDLC uses a frame check sequence (FCS). The CRC is
considered more effective in detecting errors in data
transmission.

Configuration: PPP is easier to configure than HDLC.


PPP uses a configuration protocol called LCP (Link
Control Protocol), which automates the configuration
process. In contrast, HDLC requires manual
configuration of parameters, such as the address field
and control field.

Authentication: PPP supports authentication


mechanisms such as PAP (Password Authentication
Protocol) and CHAP (Challenge Handshake
Authentication Protocol), which authenticate the
identity of the sender. HDLC does not support any
authentication mechanism.

Sliding Window Protocol: HDLC uses a sliding window


protocol for flow control, while PPP does not. The
sliding window protocol is used to optimize the flow of
data between the sender and receiver, ensuring that
the receiver is not overwhelmed with too much data at
once.

In summary, PPP is a more flexible, easier to configure


and better error detection mechanism than HDLC.
Additionally, PPP offers mechanisms like
authentication, which HDLC lacks. However, HDLC uses
a sliding window protocol for flow control, which PPP
does not provide.

Câu 4:
A 1.5 Mbps communications link is to use HDLC to transmit information to the moon.
What is the smallest possible frame size that allows continuous transmission? The
distance between earth and the moon is approximately 375,000 km, and the speed of
light is 3 x 108 meters/second.

To determine the smallest possible frame size that allows continuous transmission, we
need to calculate the round-trip time (RTT) for a signal to travel from Earth to the Moon
and back.

RTT = 2 * distance / speed of light

Converting the distance between Earth and the Moon to meters:


375,000 km * 1000 m/km = 375,000,000 meters

Plugging in the values:

RTT = 2 * 375,000,000 / 3 x 10^8


= 5 seconds

To achieve continuous transmission on a 1.5 Mbps link with HDLC, we need to calculate
the minimum frame size that can be transmitted within this RTT.

Minimum frame size = (Link speed * RTT) / Efficiency

The efficiency factor takes into account the protocol overhead, such as header and
trailer bits.

Assuming an efficiency factor of 80%, we get:

Minimum frame size = (1.5 Mbps * 5 sec) / 0.8


= 11.25 megabits

To convert to bytes:

11.25 megabits / 8 bits/byte = 1.41 megabytes

Therefore, the smallest possible frame size that allows continuous transmission on a 1.5
Mbps HDLC link to the Moon is approximately 1.41 megabytes.
Câu 5: Suppose HDLC is used over a 1.5 Mbps geostationary satellite link. Suppose that
250-byte frames are used in the data link control. What is the maximum rate at which
information can be transmitted over the link?
To determine the maximum rate at which information can be transmitted over a 1.5
Mbps geostationary satellite link using HDLC with 250-byte frames, we need to take into
account the overhead of the HDLC protocol.

The HDLC frame consists of several fields, including flag characters, address, control,
data, and CRC (Cyclic Redundancy Check). The flag characters mark the beginning and
end of the frame and are each one byte long. The address and control fields are each
one byte long. The CRC field is two bytes long.
Therefore, the total size of an HDLC frame is:

Frame size = Data + Address (1 byte) + Control (1 byte) + CRC (2 bytes) + Flag (1 byte) +
Flag (1 byte)
= Data + 6 bytes

For 250-byte frames, the total frame size is:

Frame size = 250 + 6


= 256 bytes

To calculate the maximum rate of information transmission, we need to divide the link
speed by the time it takes to transmit one frame, including the overhead.

Time to transmit one frame = Frame size / Link speed


= 256 bytes / 1.5 Mbps
= 0.001707 seconds

Therefore, the maximum rate of information transmission is:

Maximum rate = Data rate / Efficiency

The efficiency factor takes into account the protocol overhead, such as the header and
trailer bits.

Assuming an efficiency factor of 80%, we get:

Maximum rate = (250 bytes * 8 bits/byte) / 0.001707 seconds / 0.8


= 23,154 bits per second
Therefore, the maximum rate at which information can be transmitted over a 1.5 Mbps
geostationary satellite link using HDLC with 250-byte frames is approximately 23,154
bits per second.

Câu 6:
Suppose that a multiplexer receives constant-length packet from N = 60 data sources.
Each data source has a probability p = 0.1 of having a packet in a given T-second period.
Suppose that the multiplexer has one line in which it can transmit eight packets every T
seconds. It also has a second line where it directs any packets that cannot be
transmitted in the first line in a T-second period. Find the average number of packets
that are transmitted on the first line and the average number of packets that are
transmitted in the second line.

Given:

N = 60 data sources
Probability of having a packet in a given T-second period, p = 0.1
The multiplexer can transmit eight packets every T seconds
Any packets that cannot be transmitted in the first line are directed to the second line
To find:

Average number of packets that are transmitted on the first line


Average number of packets that are transmitted in the second line
We can model this scenario as a binomial distribution problem, where each data source
has a probability p of transmitting a packet and there are N such sources.

The probability of k sources transmitting a packet is given by the binomial distribution


formula:

P(k) = (N choose k) * p^k * (1-p)^(N-k)

where (N choose k) is the binomial coefficient, given by:

(N choose k) = N! / (k! * (N-k)!)

We want to find the average number of packets that are transmitted on the first line and
the second line. Let X be the total number of packets generated in a T-second period.
Then, we can divide X into two parts: Y, the number of packets transmitted on the first
line, and Z, the number of packets transmitted on the second line.

Since we can transmit up to eight packets on the first line, we have:

Y = min(X, 8)

For the remaining packets, we send them on the second line, so we have:

Z = max(0, X - 8)

The expected value of Y is given by:

E(Y) = Σ[k=0 to 8] k * P(k)

where P(k) is the probability of k sources transmitting a packet, as computed using the
binomial distribution formula.

Similarly, the expected value of Z is given by:

E(Z) = Σ[k=9 to N] k * P(k)

where P(k) is again the probability of k sources transmitting a packet.

Let's compute these values using the given parameters:

N = 60
p = 0.1
T = 1 second (since we are considering a T-second period)
M = 8 (maximum packets that can be transmitted on the first line)

First, let's calculate the probabilities of k sources transmitting a packet:

P(k) = (N choose k) * p^k * (1-p)^(N-k)

For k = 0 to 8:

P(0) = (60 choose 0) * 0.1^0 * 0.9^60 = 0.026


P(1) = (60 choose 1) * 0.1^1 * 0.9^59 = 0.157
P(2) = (60 choose 2) * 0.1^2 * 0.9^58 = 0.318
P(3) = (60 choose 3) * 0.1^3 * 0.9^57 = 0.306
P(4) = (60 choose 4) * 0.1^4 * 0.9^56 = 0.185
P(5) = (60 choose 5) * 0.1^5 * 0.9^55 = 0.080
P(6) = (60 choose 6) * 0.1^6 * 0.9^54 = 0.027
P(7) = (60 choose 7) * 0.1^7 * 0.9^53 = 0.007
P(8) = (60 choose 8) * 0.1^8 * 0.9^52 = 0.001

For k = 9 to 60:

P(k) = (N choose k) * p^k * (1-p)^(N-k)

For simplicity, we can use the complement rule and subtract the sum of probabilities from
0 to 8 from 1:

P(k) = 1 - Σ[k=0 to 8] P(k)


= 1 - (P(0) + P(1) + P(2) + P(3) + P(4) + P(5) + P(6) + P(7) + P(8))
= 0.996

Now, let's calculate the expected values of Y and Z:

E(Y) = Σ[k=0 to 8] k * P(k)


= 00.026 + 10.157 + 20.318 + 30.306 + 40.185 + 50.080 + 6*0.027 + 7

Câu 7:
Consider the transfer of a single real-time telephone voice signal across a packet
network. Suppose that each voice sample should not be delayed by more than 20 ms.
a. Discuss which of the following adaptation functions are relevant to meeting
the requirements of this transfer: handling of arbitrary message size;
reliability and sequencing; pacing and flow control; timing; addressing; and
privacy, integrity and authentication.
b. Compare a hop-by-hop approach to an end-to-end approach to meeting
the requirements of the voice signal.

a. To meet the requirement of transferring a single real-time telephone voice signal across a
packet network with a maximum delay of 20 ms, the following adaptation functions are relevant:

Timing: The timing adaptation function is critical in ensuring that each voice sample is delivered
within the required deadline. The network must be able to synchronize its clock with the sender
and receiver to maintain the required time intervals between packets.

Reliability and sequencing: To ensure that each voice sample is delivered without loss or
misordering, the reliability and sequencing adaptation function is necessary. This requires the use
of error detection and correction mechanisms, as well as sequencing and resequencing of
packets at the receiver end.

Pacing and flow control: To prevent packet loss due to congestion, pacing and flow control
mechanisms are necessary. These mechanisms regulate the rate at which packets are
transmitted and received to match the capacity of the network.

Addressing: Addressing is necessary to identify the source and destination of each voice sample.
It also enables routing of packets through the network.

b. There are two approaches for meeting the requirements of a real-time telephone voice signal
over a packet network: the hop-by-hop approach and the end-to-end approach.

The hop-by-hop approach involves implementing the required adaptation functions at each
intermediate node in the packet network. Each node processes the packets it receives before
forwarding them to the next node. This approach can introduce additional delays and overhead
due to processing at each node. Furthermore, if a node fails, the entire communication may
become compromised.

The end-to-end approach involves implementing the required adaptation functions only at the
endpoints of the communication path, i.e., the sender and receiver of the voice signal. The
packets are transmitted through the network without modification, and any required processing
is performed at the endpoints. This approach minimizes delays and overhead, but it may not be
suitable for networks with high packet loss rates or variable delays.

In general, the end-to-end approach is preferred for real-time voice communications over packet
networks because it minimizes delays and overhead. However, the hop-by-hop approach may be
necessary in some situations, such as when the network has high delay or loss rates, or when
additional processing is necessary at intermediate nodes.
Câu 8:
Consider the Stop-and-Wait protocol as described. Suppose that the protocol is
modified so that each time a frame is found in error at either the sender or receiver, the
last transmitted frame is immediately resent.

a. Show that the protocol still operates correctly.


b. Does the state transition diagram need to be modified to describe the
new operation?
c. What is the main effect of introducing the immediate-retransmission
feature?
a. The modified Stop-and-Wait protocol still operates correctly because it ensures
that every frame is received correctly before the next one is sent. If a frame is
found in error, the sender immediately resends the last transmitted frame,
which guarantees that the receiver will receive a correct copy of the frame.

b. The state transition diagram would need to be modified to reflect the new
operation. Specifically, a new transition would need to be added from the
"Frame Received, ACK/NAK Lost" state back to the "Frame Sent" state,
indicating that the sender should immediately resend the last transmitted
frame in response to the error.

c. The main effect of introducing the immediate-retransmission feature is to


improve the protocol's error recovery capabilities. With this feature, errors can
be quickly corrected by resending the last transmitted frame. This reduces the
time required for error recovery and increases the overall efficiency of the
protocol. However, it also introduces additional network traffic, which could
potentially increase congestion and delay.

Câu 9:
Suppose that two peer-to-peer processes provide a service that involves the transfer of
discrete messages. Suppose that the peer processes are allowed to exchange PDUs that
have a maximum size of M bytes including H bytes of header. Suppose that a PDU is not
allowed to carry information from more than one message.

a. Develop an approach that allows the peer processes to exchange messages of


arbitrary size.

b. What essential control information needs to be exchanged between the peer


processes?

c. Now suppose that the message transfer service provided by the peer processes is
shared by several message source-destination pairs. Is additional control
information required, and if so, where should it be placed?

a. To allow for the exchange of messages of arbitrary size within the given constraints, the
peer processes can use a technique known as segmentation and reassembly. This involves
dividing a message into smaller segments, each of which can fit within a single PDU, and
then sending these segments over multiple PDUs. The receiver can then reassemble the
segments back into the original message.

b. The essential control information that needs to be exchanged between the peer processes
includes:

Sequence numbers: These are used to ensure that all segments are received in the correct
order and that no segments are missing or duplicated.
Acknowledgment numbers: These are used to confirm that a segment has been successfully
received by the receiver.
Window sizes: These are used to allow the sender to adjust the number of unacknowledged
segments it can send at any given time based on how much space is available in the
receiver's buffer.
c. If the message transfer service is shared by several source-destination pairs, additional
control information may be required to differentiate between the different messages being
sent. This information could be placed in the header of each PDU and could include the
source and destination addresses, session identifiers, or any other information needed to
identify the specific message being sent. Additionally, the control information used to
manage the flow of PDUs between the sender and receiver may also need to be adjusted to
account for multiple concurrent connections. For example, each connection may require its
own sequence and acknowledgment numbers to ensure that segments are properly tracked
and acknowledged for each individual message.

Câu 10:
A 1 Mbyte file is to be transmitted over a 1 Mbps communication line that has a bit
error rate of p = 10-6.
a.
What is the probability that the entire file is transmitted without errors? Note forn n large and p ve
-npe
.
b. The file is broken up into N equal-sized blocks that are transmitted
separately. What is the probability that all the blocks arrive correctly without
error? Does dividing the file into blocks help?
c. Suppose the propagation delay is negligible, explain how Stop-and-Wait ARQ can
help deliver the file in error-free form. On the average how long does it take to
deliver the file if the ARQ transmits the entire file each time?

a. The probability that the entire 1 Mbyte file is transmitted without errors can be calculated as
follows:

P = (1 - p)^n
where p is the bit error rate and n is the number of bits in the file.

Since the file size is 1 Mbyte, which is equal to 8 million bits, we can calculate the probability as:
P = (1 - 10^-6)^8,000,000
P e^(-8)

Therefore, the probability that the entire file is transmitted without errors is approximately e^(-
8), which is a very small probability.

b. If the file is broken up into N equal-sized blocks and transmitted separately, the probability
that all blocks arrive correctly without error can be calculated as:
P = (1 - p)^(n*N)
where p is the bit error rate, n is the number of bits in each block, and N is the total number of
blocks.

Dividing the file into blocks does help because if an error occurs in one block, only that block
needs to be retransmitted instead of the entire file.

Assuming each block is equally sized at 1/N Mbytes or 8/N million bits, the probability can be
calculated as:
P = (1 - 10^-6)^(8/N * N)
P = (1 - 10^-6)^8
P 0.999992

Therefore, the probability that all blocks arrive correctly without error is approximately
0.999992.

c. Stop-and-Wait ARQ (Automatic Repeat Request) can help deliver the file in error-free form by
ensuring that each block is successfully received before transmitting the next block. In this
protocol, the sender transmits one block at a time and waits for an acknowledgment from the
receiver before transmitting the next block.

Assuming the propagation delay is negligible, the time required to deliver the file using Stop-and-
Wait ARQ can be calculated as follows:

Time required to transmit one block = n/p, where n is the number of bits in each block and p is
the bit rate of the communication line.
Time required to receive an acknowledgment for one block = 2 * propagation delay
Total time required to transmit and receive one block = n/p + 2 * propagation delay
Since there are N blocks to be transmitted, the total time required to deliver the file would be N
times the time required to transmit and receive one block:

Total time = N * (n/p + 2 * propagation delay)

Assuming a negligible propagation delay, the total time required to deliver the entire 1 Mbyte file
would be:

Total time = 8,000,000 / 10^6 + 2 * 0 = 8 seconds.

However, this assumes no errors occur during transmission. If errors occur, additional time will
be required for retransmission until all blocks are received correctly.
Câu 11:

In this activity, you are given the network address of 192.168.1.0/24 to subnet
and provide the IP addressing for the Packet Tracer network. Each LAN in the
network requires at least 25 addresses for end devices, the switch and the router.
The connection between R1 to R2 will require an IP address for each end of the
link.

a. Based on the topology, how many subnets are needed?


b. How many bits must be borrowed to support the number of subnets in the
topology table?
c. How many subnets does this create?
d. How many usable hosts does this create per subnet?

a. Based on the topology, we need 4 subnets - one for each LAN and one for the link
between R1 and R2.

b. To support 4 subnets, we need to borrow two bits from the host portion of the IP
address. This is because 2^2 = 4 (remember that the formula for calculating the number of
subnets is 2^n, where n is the number of borrowed bits).

c. Borrowing two bits creates four subnets: 192.168.1.0/26, 192.168.1.64/26,


192.168.1.128/26, and 192.168.1.192/26.

d. Each subnet has 62 usable host addresses. This is because a /26 subnet provides 64
total addresses, but two of those are reserved for the network and broadcast addresses,
leaving 62 usable addresses per subnet.

Câu 12:

Five stations (S1-S5) are connected to an extended LAN through transparent bridges
(B1- B2), as shown in the following figure. Initially, the forwarding tables are empty.
Suppose the following stations transmit frames: S1 transmits to S5, S3 transmit to S2, S4
transmits to S3, S2 transmits to S1, and S5 transmits to S4. Fill in the forwarding tables
with appropriate entries after the frames have been completely transmitted.
Forwarding table for B1:

MAC Address Port


--------------------
S1 MAC port 2
S2 MAC port 1
S3 MAC port 3
B2 MAC port 4

Forwarding table for B2:

MAC Address Port


--------------------
S4 MAC port 2
S5 MAC port 1
S2 MAC port 3
B1 MAC port 4

When S1 transmits to S5, the frame goes through B1 and B2 before reaching S5. B1 learns S1's MAC address on port 2 and
forwards the frame to B2, which learns S5's MAC address on port 1.
When S3 transmits to S2, the frame goes through B1 before reaching S2. B1 learns S3's MAC address on port 3 and forwards
the frame to B2, which learns S2's MAC address on port 3.
When S4 transmits to S3, the frame goes through B2 before reaching S3. B2 learns S4's MAC address on port 2 and forwards
the frame to B1, which learns S3's MAC address on port 3.
When S2 transmits to S1, the frame goes through B2 and B1 before reaching S1. B2 learns S2's MAC address on port 3 and
forwards the frame to B1, which learns S1's MAC address on port 2.
When S5 transmits to S4, the frame goes through B2 and B1 before reaching S4. B2 already knows S5's MAC address on port 1
from the first transmission, so it forwards the frame to B1, which learns S4's MAC address on port 2.

Câu 13:

1. Consider the network in Figure.


a) Use the Dijkstra algorithm to find the set of shortest paths from node 4 to
other nodes.
Iteratio N D D D D D
n 1 2 3 5 6
Initial {}

1 {}

2 {}

3 {}

4 {}

b) Find the set of associated routing table entries (Destination, Next Hop, Cost)

Destinatio Cost Next


n Hop

ANSWER :
14)
You are a network technician assigned to install a new network for a customer. You
must create multiple subnets out of the 192.168.0.0/24 network address space to
meet the following requirements:
- The first subnet is the LAN-A network. You need a minimum of 50 host IP
addresses.
- The second subnet is the LAN-B network. You need a minimum of 40 host
IP addresses.
- You also need at least two additional unused subnets for future
network expansion.
Note: Variable length subnet masks will not be used. All of the device subnet masks
should be the same length.
Answer the following questions to help create a subnetting scheme that meets the
stated network requirements:

a. How many host addresses are needed in the largest required subnet?
b. What is the minimum number of subnets required?
c. The network that you are tasked to subnet is 192.168.0.0/24. What is
the /24 subnet mask in binary?
d. The subnet mask is made up of two portions, the network portion, and the
host portion. This is represented in the binary by the ones and the zeros in the
subnet mask.

In the network mask, what do the ones and zeros represent?

e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in
the table. Remember that the first subnet is 192.168.0.0 with the chosen subnet
mask.

a. The largest required subnet is LAN-A, which needs a minimum of 50 host IP addresses.

b. We need a minimum of 4 subnets - 2 for the required LANs and 2 additional unused subnets for future
network expansion.

c. The /24 subnet mask in binary is 11111111 11111111 11111111 00000000.

d. In the subnet mask, the ones represent the network portion, and the zeros represent the host portion.
The network portion identifies the network address, while the host portion identifies individual hosts
within the network.

e. To meet the stated network requirements, we can use the following subnetting scheme:
Use a /26 subnet mask (255.255.255.192) for LAN-A to provide 62 host addresses per subnet.
Use a /26 subnet mask (255.255.255.192) for LAN-B to provide 62 host addresses per subnet.
Use a /27 subnet mask (255.255.255.224) for the first unused subnet to provide 30 host addresses per
subnet.
Use a /27 subnet mask (255.255.255.224) for the second unused subnet to provide 30 host addresses per
subnet.
The resulting subnets are:

Subnet 1: 192.168.0.0/26 (LAN-A)


Subnet 2: 192.168.0.64/26 (LAN-B)
Subnet 3: 192.168.0.128/27 (Unused)
Subnet 4: 192.168.0.160/27 (Unused)
Note that the first subnet is 192.168.0.0 with the chosen subnet mask, and the last usable address in
each subnet is used as the broadcast address.
Câu 15:

Suppose that Selective Repeat ARQ is modified so that ACK messages contain a list of
the next m frames that it expects to receive.

a. How does the protocol need to be modified to accommodate this change?

b. What is the effect of the change on protocol performance?

a. To modify Selective Repeat ARQ so that ACK messages contain a list of the next m
frames that it expects to receive, the protocol needs to be modified as follows:

The sender maintains a sliding window that includes all unacknowledged frames, as in the
standard Selective Repeat ARQ protocol.
When the receiver receives a frame, it checks to see if it is the next expected frame in the
sequence. If it is, the receiver sends an ACK message that contains a list of the next m
frames that it expects to receive.
If there are gaps in the received frames, the receiver sends an ACK message that requests
retransmission of the missing frames. The sender then retransmits the requested frames.
b. The effect of this change on protocol performance depends on the value of m and the
characteristics of the network.

One potential benefit of this modification is improved efficiency, particularly in networks


with high latency or high error rates. By including a list of expected frames in each ACK
message, the receiver can help reduce the number of unnecessary retransmissions. For
example, if the sender knows that the receiver is expecting frames 10-20, it can prioritize
those frames for transmission instead of sending other frames that may not be needed.

However, there are also potential drawbacks to this modification. One concern is
increased overhead due to the larger size of the ACK messages. Depending on the value of
m, the size of each ACK message could be significantly larger than in the standard
protocol, which could impact network performance. Additionally, the more frames that
are included in each ACK message, the greater the risk of errors in the ACK message itself,
which could lead to further retransmissions and delays.

Q.16. (2 marks)
Suppose the size of an uncompressed text file is 1 megabyte
Note: Explain your answer in details.
a. How long does it take to download the file over a 32 kilobit/second modem?

b. How long does it take to take to download the file over a 1


megabit/second modem?
c. Suppose data compression is applied to the text file. How much do the
transmission times in parts (a) and (b) change?

a. To download a 1 megabyte file over a 32 kilobit/second modem, we need to convert the


file size from bytes to bits and then divide by the bit rate:

1 megabyte = 8 million bits

Download time = (8 million bits) / (32 kilobits/second)

Download time 250 seconds

Therefore, it would take approximately 250 seconds or 4 minutes and 10 seconds to


download the file over a 32 kilobit/second modem.

b. To download the same 1 megabyte file over a 1 megabit/second modem:

Download time = (8 million bits) / (1 megabit/second)

Download time = 8 seconds

Therefore, it would take only 8 seconds to download the file over a 1 megabit/second
modem.

c. If data compression is applied to the text file, the transmission times in parts (a) and (b)
will change depending on the level of compression achieved. Data compression reduces the
size of the file, which means that fewer bits need to be transmitted over the network. The
amount of compression achieved depends on the type of compression algorithm used and
the characteristics of the file being compressed.

Generally, higher levels of compression can lead to larger reductions in file size, resulting in
shorter transmission times. However, achieving higher levels of compression may require
more processing time and computational resources, which can increase the time required
for compression.

In general, if data compression results in a reduction in file size, the transmission time for
downloading the file will decrease proportionally. For example, if the file size is reduced to
half its original size due to compression, the transmission time will also be halved.

However, it is important to note that the effectiveness of data compression depends on the
type of data being compressed. Some types of data, such as already compressed files like
JPEG or MP3 files, may not be able to be compressed much further, if at all. In such cases,
data compression may have little effect on transmission times.
Q17. (2 marks)
Let g(x)=x3+x+1. Consider the information sequence 1001. Find the codeword
corresponding to the preceding information sequence. Using polynomial arithmetic we obtain

Note: Explain your answer in details.

To find the codeword corresponding to the information sequence 1001, we need to


perform polynomial division using the generator polynomial g(x) = x^3 + x + 1. The steps
for performing polynomial division are as follows:

Write the information sequence as a polynomial in binary form:

Information sequence = 1x^3 + 0x^2 + 0*x + 1 = x^3 + 1

Append two zeros to the end of the information sequence to create a polynomial of
degree 4:

x^3 + 1 becomes x^3 + 1x^2 + 0x + 0 = x^3 + x^2

Divide the resulting polynomial by the generator polynomial g(x) using modulo-2
polynomial division:
x
x^3 + x + 1 | x^3 + x^2 + 0x + 0 x^3 + x^2 + 0x
x^2 + 0x
x^2 + x + 1
--------
x+1
The remainder of the division is the checksum that needs to be added to the original
message to create the codeword:

Checksum = x + 1

The codeword is formed by concatenating the information sequence with the checksum:

Codeword = 1001 (information sequence) + 11 (checksum) = 100111

Therefore, the codeword corresponding to the information sequence 1001 is 100111.

Q.18. (2 marks)
A router has the following CIDR entries in its routing table:
Address/mask Next hop

135.46.56.0/22 Interface 0

135.46.60.0/22 Interface 1
192.53.40.0 /23 Router 1

default Router 2

(a) What does the router do if a packet with an IP address 135.46.63.10 arrives?

(b) What does the router do if a packet with an IP address 135.46.57.14 arrives?

(a) If a packet with an IP address of 135.46.63.10 arrives, the router will forward the packet to
Interface 1. This is because the destination address falls within the range of the CIDR entry
135.46.60.0/22, which has a longer prefix than the other matching CIDR entry for the destination
address.

(b) If a packet with an IP address of 135.46.57.14 arrives, the router will forward the packet to
Interface 0. This is because the destination address falls within the range of the CIDR entry
135.46.56.0/22, which has a longer prefix than the other matching CIDR entry for the destination
address.

In general, when a packet arrives at a router, the router looks up the destination IP address in its
routing table to determine where to forward the packet. The router selects the route with the
longest matching prefix (i.e., the most specific entry), known as the "most-specific match," to
determine the next hop for the packet. If there are multiple matching entries with the same
prefix length, the router uses the entry with the lowest administrative distance, which is a value
assigned by the router to indicate how trustworthy the route is. If no matching routes are found
in the routing table, the router forwards the packet to the default route, which is typically the
gateway to an external network such as the internet.

Câu 19:
A Large number of consecutive IP address are available starting at
198.16.0.0. Suppose four organizations, A, B, C, D request 4000, 2000, 4000,
and 8000 addresses, respectively. For each of these organizations, give:
1. the first IP address assigned
2. the last IP address assigned
3. the mask in the w.x.y.z/s notation
The start address, the ending address, and the mask are as follows:

To allocate the requested number of IP addresses to each organization, we need to calculate the
number of bits required to represent the maximum number of hosts for each organization. We can
then use these bit counts to create subnet masks that provide enough addresses for each
organization.

The number of bits required to represent x hosts is ceil(log2(x)), where ceil() is the ceiling function
that rounds up to the nearest integer. Applying this formula to each of the four organizations, we
get:

Organization A: 4000 hosts ceil(log2(4000)) = 12 bits


Organization B: 2000 hosts ceil(log2(2000)) = 11 bits
Organization C: 4000 hosts ceil(log2(4000)) = 12 bits
Organization D: 8000 hosts ceil(log2(8000)) = 13 bits
To allocate these address blocks, we can use the following approach:

Allocate an address block to Organization D, which requires the most addresses. We need a block
with at least 8000 addresses, which requires a mask with at least 13 host bits. The closest subnet
mask that provides enough addresses is /19, which has a mask of 255.255.224.0. This creates a block
starting at 198.16.0.0 and ending at 198.16.31.255. The first IP address assigned to Organization D is
198.16.0.0, and the last IP address assigned is 198.16.31.255.

Allocate an address block to Organization A, which requires 4000 addresses. We need a block with at
least 12 host bits, but since we've already allocated a /19 block, we have only 9 bits left for the next
block. The closest subnet mask that provides enough addresses is /21, which has a mask of
255.255.248.0. This creates a block starting at 198.16.32.0 and ending at 198.16.39.255. The first IP
address assigned to Organization A is 198.16.32.0, and the last IP address assigned is 198.16.39.255.

Allocate an address block to Organization C, which requires 4000 addresses. We can use the same
/21 subnet mask that we used for Organization A, since we still have enough addresses left in that
block. This creates a block starting at 198.16.40.0 and ending at 198.16.47.255. The first IP address
assigned to Organization C is 198.16.40.0, and the last IP address assigned is 198.16.47.255.

Allocate an address block to Organization B, which requires 2000 addresses. We need a block with at
least 11 host bits, but we only have 3 bits left after allocating the previous two blocks. The closest
subnet mask that provides enough addresses is /23, which has a mask of 255.255.254.0. This creates
a block starting at 198.16.48.0 and ending at 198.16.49.255. The first IP address assigned to
Organization B is 198.16.48.0, and the last IP address assigned is 198.16.49.255.

Therefore, the answer to the question is:

Organization A: First IP address = 198.16.32.0, Last IP address = 198.16.39.255, Mask =


255.255.248.0 or /21
Organization B: First IP address = 198.16.48.0, Last IP address = 198.16.49.255, Mask =
255.255.254.0 or /23
Organization C: First IP address = 198.16.40.0, Last IP address = 198.16.47.255, Mask =
255.255.248.0 or /21
Organization D: First IP address = 198.16.0.0, Last IP address = 198.16.31.255, Mask = 255.255.224.0
or /19

Câu 20:

The ability to work with IPv4 subnets and determine network and host information based on
a given IP address and subnet mask is critical to understanding how IPv4 networks operate.
The first part is designed to reinforce how to compute network IP address information from a
given IP address and subnet mask. When given an IP address and subnet mask, you will be
able to determine other information about the subnet.
Fill out the tables below with appropriate answers given the IPv4 address, original subnet mask,
and new subnet mask.

Give
n:
Host IP Address: 192.135.250.180
Original Subnet Mask 255.255.255.0
New Subnet Mask: 255.255.255.248

Fin
d:
Number of Subnet Bits
Number of Subnets Created
Number of Host Bits per Subnet
Number of Hosts per Subnet
Network Address of this Subnet
IPv4 Address of First Host on this Subnet
IPv4 Address of Last Host on this Subnet
IPv4 Broadcast Address on this Subnet

Given:

Host IP Address: 192.135.250.180


Original Subnet Mask: 255.255.255.0
New Subnet Mask: 255.255.255.248

To determine the other information about the subnet, we need to find the
number of subnet bits, the number of subnets created, the number of host bits
per subnet, the number of hosts per subnet, and the network address of this
subnet using the given IP address and subnet masks.

First, let's convert the subnet masks to binary form:

Original Subnet Mask: 11111111.11111111.11111111.00000000


New Subnet Mask: 11111111.11111111.11111111.11111000

Next, we can determine the number of subnet bits by counting the number of
additional bits in the new subnet mask compared to the original subnet mask. In
this case, there are 3 additional bits:

Number of Subnet Bits: 3

The number of subnets created is equal to 2 raised to the power of the number
of subnet bits:

Number of Subnets Created: 2^3 = 8

The number of host bits per subnet is equal to the total number of bits in the IP
address minus the number of subnet bits:

Number of Host Bits per Subnet: 32 - 3 = 29


The number of hosts per subnet is equal to 2 raised to the power of the number
of host bits per subnet, minus 2 (one for the network address and one for the
broadcast address):

Number of Hosts per Subnet: 2^29 - 2 = 536,870,910

To find the network address of this subnet, we first need to determine the block
size, which is the number of IP addresses in each subnet. The block size is equal
to 2 raised to the power of the number of host bits in the new subnet mask:

Block Size: 2^3 = 8

Next, we can find the network address by performing a bitwise AND operation
between the host IP address and the new subnet mask:

11000000.10000111.11111010.10110100 (host IP address)


AND 11111111.11111111.11111111.11111000 (new subnet mask)
11000000.10000111.11111010.10110000 (network address)
Therefore, the answer to the question is:

Number of Subnet Bits: 3


Number of Subnets Created: 8
Number of Host Bits per Subnet: 29
Number of Hosts per Subnet: 536,870,910
Network Address of this Subnet: 192.135.250.176

Using the network address of the subnet that we found previously


(192.135.250.176), we can determine the IPv4 address of the first and last host
on this subnet, as well as the IPv4 broadcast address.

To find the IPv4 address of the first host, we add 1 to the network address:

IPv4 Address of First Host on this Subnet: 192.135.250.177


To find the IPv4 address of the last host, we subtract 2 from the total number of
addresses in the subnet (536,870,910), since one address is reserved for the
network address and one address is reserved for the broadcast address. We then
add this result to the network address to get the IPv4 address of the last host:

Last Address = Network Address + Total Addresses - 1


IPv4 Address of Last Host on this Subnet: 192.135.251.126

To find the IPv4 broadcast address, we set all the host bits in the subnet mask to
1's and perform a bitwise OR operation with the network address:

11000000.10000111.11111010.10110000 (network address)


OR 00000000.00000000.00000000.00000111 (host bits set to 1 in subnet mask)
11000000.10000111.11111010.10110111 (broadcast address)
IPv4 Broadcast Address on this Subnet: 192.135.250.183
Chú ý: Anh thấy một số câu tính toán ở đề PE 1 2 đúng, PE 3 4 sai
Note:
PE thi là làm bài trên word rồi nộp bài thi như thi PRO192/PRF192

Hiện tại chỉ có Đà Nẵng là check đạo văn bài làm nên những đáp
án mẫu phải tự sửa theo lời của mình nhé, các cơ sở khác thì
không cần.
Nhớ tải đáp án mẫu về máy sẵn để còn dùng nha
Câu 1: Explain the difference between connectionless unacknowledged service and
connectionless acknowledged service. How do the protocols that provide these services
differ?
Câu 2. Explain the difference between connection-oriented acknowledged service and
connectionless acknowledged service. How do the protocols that provide these services
differ?

Câu 3: Explain the differences between PPP and HDLC.


Câu 4:
A 1.5 Mbps communications link is to use HDLC to transmit information to the moon.
What is the smallest possible frame size that allows continuous transmission? The
distance between earth and the moon is approximately 375,000 km, and the speed of
light is 3 x 108 meters/second.
The smallest possible frame size that allows continuous transmission is the size of the
round-trip propagation delay. The round-trip propagation delay is the time it takes for a
signal to travel from Earth to the Moon and back.

The distance between Earth and the Moon is 375,000 km, so the round-trip propagation
delay is 2 * 375,000 km / 3 x 10^8 meters/second = 2.5 seconds.

The data rate of the communications link is 1.5 Mbps, so the smallest possible frame
size is 1.5 Mbps * 2.5 seconds = 3,750,000 bits.

In bytes, the smallest possible frame size is 3,750,000 bits

Therefore, the smallest possible frame size that allows continuous transmission is
3,750,000 bits.
Câu 5: Suppose HDLC is used over a 1.5 Mbps geostationary satellite link. Suppose that
250-byte frames are used in the data link control. What is the maximum rate at which
information can be transmitted over the link?

The maximum rate at which information can be transmitted over the link is 299,800 bits
per second.

The data rate of the link is 1.5 Mbps, which is equal to 1.5 * 10^6 bits per second.
However, the overhead of the HDLC protocol is 250 * 8 = 2000 bits per frame. This
means that the maximum rate at which information can be transmitted over the link is
1.5 * 10^6 - 2000 = 299,800 bits per second.

In bytes, the maximum rate at which information can be transmitted over the link is
299,800 / 8 = 37,475 bytes per second.

Câu 6:
Suppose that a multiplexer receives constant-length packet from N = 60 data sources.
Each data source has a probability p = 0.1 of having a packet in a given T-second period.
Suppose that the multiplexer has one line in which it can transmit eight packets every T
seconds. It also has a second line where it directs any packets that cannot be
transmitted in the first line in a T-second period. Find the average number of packets
that are transmitted on the first line and the average number of packets that are
transmitted in the second line.

The average number of packets that are transmitted on the first line is given by:

E[x_1] = np = 60 * 0.1 = 6
where n is the number of data sources and p is the probability of a data source having a
packet in a given T-second period.

The average number of packets that are transmitted in the second line is given by:
E[x_2] = np(1 - p/m) = 6 * 0.1 * (1 - 0.1/8) = 0.133333
where m is the capacity of the first line.

Therefore, the average number of packets that are transmitted on the first line is 6 and
the average number of packets that are transmitted in the second line is 0.133333.

Câu 7:
Consider the transfer of a single real-time telephone voice signal across a packet
network. Suppose that each voice sample should not be delayed by more than 20 ms.
a. Discuss which of the following adaptation functions are relevant to meeting
the requirements of this transfer: handling of arbitrary message size;
reliability and sequencing; pacing and flow control; timing; addressing; and
privacy, integrity and authentication.
b. Compare a hop-by-hop approach to an end-to-end approach to meeting
the requirements of the voice signal.

a.

The following adaptation functions are relevant to meeting the requirements of this
transfer:

Handling of arbitrary message size: The voice signal is a continuous signal, so it needs to
be divided into small packets. The packets can be of different sizes, so the network needs
to be able to handle arbitrary message sizes.
Reliability and sequencing: The voice signal is a real-time signal, so it is important that the
packets are delivered reliably and in the correct order.
Pacing and flow control: The network needs to be able to pace the delivery of the packets
so that the voice signal does not become too delayed.
Timing: The network needs to be able to keep track of the timing of the packets so that
the voice signal is not played back out of order.
Addressing: The network needs to be able to address the packets so that they can be
delivered to the correct destination.
Privacy, integrity and authentication: The network needs to be able to protect the voice
signal from unauthorized access, modification, and replay.
b.
A hop-by-hop approach to meeting the requirements of the voice signal would involve
each hop in the network handling the adaptation functions independently. This approach
would be simple to implement, but it would not be very reliable. If a packet is lost or
delayed at one hop, the other hops would not be able to recover it.

An end-to-end approach to meeting the requirements of the voice signal would involve
the network providing end-to-end guarantees for the adaptation functions. This approach
would be more reliable, but it would be more complex to implement.

The best approach to meeting the requirements of the voice signal would depend on the
specific network and the requirements of the application. If the network is reliable and the
application does not require very low latency, then a hop-by-hop approach may be
sufficient. However, if the network is not reliable or the application requires very low
latency, then an end-to-end approach may be necessary.
Câu 8 :
Consider the Stop-and-Wait protocol as described. Suppose that the protocol is
modified so that each time a frame is found in error at either the sender or receiver, the
last transmitted frame is immediately resent.

a. Show that the protocol still operates correctly.


b. Does the state transition diagram need to be modified to describe the
new operation?
c. What is the main effect of introducing the immediate-retransmission
feature?

a.

The Stop-and-Wait protocol works by sending a frame, waiting for an


acknowledgement, and then sending the next frame. If the acknowledgement is
not received, the frame is resent.

The immediate-retransmission feature modifies the protocol so that the frame is


resent as soon as an error is detected. This means that the sender does not have to
wait for the acknowledgement before resending the frame.

The protocol will still operate correctly with the immediate-retransmission feature.
If a frame is received in error, the receiver will send a negative acknowledgement.
The sender will then immediately resent the frame.
b.

The state transition diagram does not need to be modified to describe the new
operation. The only difference is that the sender will now enter the "Resend frame"
state as soon as an error is detected.

c.

The main effect of introducing the immediate-retransmission feature is to reduce


the number of frames that are lost. This is because the frame is resent as soon as
an error is detected, so there is less time for the frame to be lost in the network.

The immediate-retransmission feature also improves the throughput of the


protocol. This is because the sender does not have to wait for the
acknowledgement before resending the frame, so the sender can send more
frames in a given period of time.
Câu 9:
Suppose that two peer-to-peer processes provide a service that involves the transfer of
discrete messages. Suppose that the peer processes are allowed to exchange PDUs that
have a maximum size of M bytes including H bytes of header. Suppose that a PDU is not
allowed to carry information from more than one message.
a. Develop an approach that allows the peer processes to exchange messages of
arbitrary size.
b. What essential control information needs to be exchanged between the peer
processes?
c. Now suppose that the message transfer service provided by the peer processes is
shared by several message source-destination pairs. Is additional control information
required, and if so, where should it be placed?
a.

To allow the peer processes to exchange messages of arbitrary size, we can use a
technique called fragmentation. This technique breaks the message into smaller pieces,
called fragments, that are each smaller than the maximum PDU size. The fragments are
then sent as separate PDUs.

The receiver reassembles the fragments into the original message. The fragmentation
and reassembly process is handled by the peer processes.

b.

The essential control information that needs to be exchanged between the peer
processes includes:

The size of the message.

The number of fragments.

The sequence number of each fragment.

c.

If the message transfer service provided by the peer processes is shared by several
message source-destination pairs, then additional control information is required. This
additional control information includes:

The source and destination of the message.

The type of message.

The priority of the message.

This additional control information is needed to ensure that the messages are routed to
the correct destination and that the messages are processed in the correct order.
The additional control information can be placed in the header of the PDU. The header of
the PDU can be up to H bytes long, so there is enough space to include the additional
control information.

Câu 10:
A 1 Mbyte file is to be transmitted over a 1 Mbps communication line that has a bit error
rate of p = 10-6.
a.
What is the probability that the entire file is transmitted without errors? Note for
n n large and p ve

-npe
.
b. The file is broken up into N equal-sized blocks that are transmitted
separately. What is the probability that all the blocks arrive correctly without
error? Does dividing the file into blocks help?
c. Suppose the propagation delay is negligible, explain how Stop-and-Wait ARQ can
help deliver the file in error-free form. On the average how long does it take to
deliver the file if the ARQ transmits the entire file each time?
.

Câu 11:

In this activity, you are given the network address of 192.168.1.0/24 to subnet
and provide the IP addressing for the Packet Tracer network. Each LAN in the
network requires at least 25 addresses for end devices, the switch and the router.
The connection between R1 to R2 will require an IP address for each end of the
link.

a. Based on the topology, how many subnets are needed?


b. How many bits must be borrowed to support the number of subnets in the
topology table?
c. How many subnets does this create?
d. How many usable hosts does this create per subnet?
Note: If your answer is less than the 25 hosts required, then you borrowed
too many bits.

Câu 12:

Five stations (S1-S5) are connected to an extended LAN through transparent bridges
(B1- B2), as shown in the following figure. Initially, the forwarding tables are empty.
Suppose the following stations transmit frames: S1 transmits to S5, S3 transmit to S2, S4
transmits to S3, S2 transmits to S1, and S5 transmits to S4. Fill in the forwarding tables
with appropriate entries after the frames have been completely transmitted.
Câu 13:
Consider the network in Figure.

a) Use the Dijkstra algorithm to find the set of shortest paths from node 4 to
other nodes.
Iterati N D D D D D
on 1 2 3 5 6
Initial
b) Find the set of associated routing table entries (Destination, Next Hop, Cost)

Destinatio Cost Next


n Hop
D1 4 D2
D2 1 D2
D3 2 D3
D5 3 D5
D6 3 D3
14)
You are a network technician assigned to install a new network for a customer. You
must create multiple subnets out of the 192.168.1.0/24 network address space to
meet the following requirements:
- The first subnet is the LAN-A network. You need a minimum of 50 host IP
addresses.
- The second subnet is the LAN-B network. You need a minimum of 40 host
IP addresses.
- You also need at least two additional unused subnets for future
network expansion.
Note: Variable length subnet masks will not be used. All of the device subnet masks
should be the same length.
Answer the following questions to help create a subnetting scheme that meets the
stated network requirements:

a. How many host addresses are needed in the largest required subnet?
b. What is the minimum number of subnets required?
c. The network that you are tasked to subnet is 192.168.1.0/24. What is
the /24 subnet mask in binary?
d. The subnet mask is made up of two portions, the network portion, and the
host portion. This is represented in the binary by the ones and the zeros in the
subnet mask.

In the network mask, what do the ones and zeros represent?

e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in
the table. Remember that the first subnet is 192.168.0.0 with the chosen subnet
mask.
Câu 15:

Suppose that Selective Repeat ARQ is modified so that ACK messages contain a list of
the next m frames that it expects to receive.

Solutions follow questions:


a. How does the protocol need to be modified to accommodate this change?

b. What is the effect of the change on protocol performance?

Q.16. (2 marks)
Suppose the size of an uncompressed text file is 1 megabyte
Note: Explain your answer in details.
a. How long does it take to download the file over a 32 kilobit/second modem?

b. How long does it take to take to download the file over a 1


megabit/second modem?
c. Suppose data compression is applied to the text file. How much do the
transmission times in parts (a) and (b) change?
Q17. (2 marks)
Let g(x)=x3+x+1. Consider the information sequence 1001. Find the codeword
corresponding to the preceding information sequence. Using polynomial arithmetic we obtain

Note: Explain your answer in details.


Q.18. (2 marks)
A router has the following CIDR entries in its routing table:
Address/mask Next hop

135.46.56.0/22 Interface 0

135.46.60.0/22 Interface 1

192.53.40.0 /23 Router 1

default Router 2

(a) What does the router do if a packet with an IP address 135.46.63.10 arrives?

(b) What does the router do if a packet with an IP address 135.46.57.14 arrives?

a.

The router will forward the packet with an IP address 135.46.63.10 to interface 1. This is
because the destination IP address matches the first routing table entry, which has a
subnet mask of /22. The subnet mask of /22 means that the first 22 bits of the IP address
must match for the packet to be routed to the interface. The first 22 bits of the IP address
135.46.63.10 match the first 22 bits of the subnet mask 135.46.60.0, so the packet will be
forwarded to interface 1.

b.

The router will forward the packet with an IP address 135.46.57.14 to interface 0. This is
because the destination IP address does not match any of the first two routing table
entries. The default routing table entry will then be used, which routes all packets to
Router 2.

Câu 19:
A Large number of consecutive IP address are available starting at
198.16.0.0. Suppose four organizations, A, B, C, D request 4000, 2000, 4000,
and 8000 addresses, respectively. For each of these organizations, give:
1. the first IP address assigned
2. the last IP address assigned
3. the mask in the w.x.y.z/s notation
The start address, the ending address, and the mask are as follows:

Here are the details for each organization:


Organization A

Start address: 198.16.0.0


Last IP address assigned: 198.16.39.255
Mask: 255.255.252.0
The mask of 255.255.252.0 means that the first 23 bits of the IP address must match for the
packet to be routed to organization A. The first 23 bits of the IP address 198.16.0.0 match the
first 23 bits of the subnet mask 255.255.252.0, so all packets with an IP address in the range
198.16.0.0 to 198.16.39.255 will be routed to organization A.

Organization B

Start address: 198.16.40.0


Last IP address assigned: 198.16.63.255
Mask: 255.255.254.0
The mask of 255.255.254.0 means that the first 22 bits of the IP address must match for the
packet to be routed to organization B. The first 22 bits of the IP address 198.16.40.0 match the
first 22 bits of the subnet mask 255.255.254.0, so all packets with an IP address in the range
198.16.40.0 to 198.16.63.255 will be routed to organization B.

Organization C

Start address: 198.16.64.0


Last IP address assigned: 198.16.95.255
Mask: 255.255.252.0
The mask of 255.255.252.0 means that the first 23 bits of the IP address must match for the
packet to be routed to organization C. The first 23 bits of the IP address 198.16.64.0 match the
first 23 bits of the subnet mask 255.255.252.0, so all packets with an IP address in the range
198.16.64.0 to 198.16.95.255 will be routed to organization C.

Organization D

Start address: 198.16.96.0


Last IP address assigned: 198.16.127.255
Mask: 255.255.255.0
The mask of 255.255.255.0 means that all 32 bits of the IP address must match for the packet to
be routed to organization D. The first 32 bits of the IP address 198.16.96.0 match the first 32 bits
of the subnet mask 255.255.255.0, so all packets with an IP address in the range 198.16.96.0 to
198.16.127.255 will be routed to organization D.

Câu 20:
(2 marks) Suppose an application layer entity wants to send an L-byte message to its
peer process, using an existing TCP connection. The TCP segment consists of the
message plus 20 bytes of header. The segment is encapsulated into an IP packet that
has an additional 20 bytes of header. The IP packet in turn goes inside an Ethernet
frame that has 18 bytes of header and trailer. What percentage of the transmitted bits
in the physical layer correspond to message information, if L = 100 bytes, 500 bytes,
1000 bytes.

Câu 21:
(2 marks) Consider the three-way handshake in TCP connection setup.
(a) Suppose that an old SYN segment from station A arrives at station B, requesting
a TCP connection. Explain how the three-way handshake procedure ensures that
the connection is rejected.
(b) Now suppose that an old SYN segment from station A arrives at station B, followed a
bit later by an old ACK segment from A to a SYN segment from B. Is this connection

Câu 22:
(2 marks) Suppose a header consists of four 16-bit words: (11111111 11111111,
11111111 00000000, 11110000 11110000, 11000000 11000000). Find the Internet
checksum for this code.

The Internet checksum is a 16-bit checksum that is used to verify the integrity of IP
packets. The checksum is calculated by adding the 16-bit words in the IP header, and
then taking the one's complement of the sum.

The header consists of four 16-bit words:

0xFFFF
0x0000
0xAAFF
0xCCCC
The checksum is calculated as follows:

0xFFFF + 0x0000 + 0xAAFF + 0xCCCC = 0x155D


The one's complement of 0x155D is 0xEAAB.

Therefore, the Internet checksum for this code is 0xEAAB.


Note: SV có thể làm cách khác nhưng kết quả đúng vẫn được tính điểm
Câu 23:

(2 marks)
Consider the 7-bit generator, G=10011, , and suppose that D has the value
1001010101. What is the value of R? Show your all steps to have result.
Note: Explain your answer in details

The value of R is 1001010010.

Here are the steps:

The generator polynomial is G=10011. This means that the


polynomial that is used to generate the codewords is x^3 +
x + 1.
The dataword is D=1001010101. This means that the
dataword is a binary sequence with 7 bits.
The remainder R is calculated by dividing the dataword D
by the generator polynomial G.
R = D - G * Quotient
The quotient is the number of times that the generator
polynomial G divides evenly into the dataword D. The
remainder is the remainder that is left after the division.

In this case, the quotient is 1. This means that the


generator polynomial G divides evenly into the dataword
D once. The remainder is therefore the last 3 bits of the
dataword D, which is 1010.

Therefore, the value of R is 1001010010.

Câu 24:

(2 marks)

Suppose two hosts, A and B, are separated by 20,000 kilometers and are connected by
a direct link of R = 2 Mbps. Suppose the propagation speed over the link is 2.5 x 10 8
meters/sec.
a. Calculate the bandwidth-delay product, R _ dprop.
b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is sent
continuously as one large message. What is the maximum number of bits that will be in
the link at any given time?
Note: Explain your answer in details
a. Calculate the bandwidth-delay product, R _ dprop.

The bandwidth-delay product is calculated as the product of the link capacity (R) and
the propagation delay (dprop). In this case, we have:

Bandwidth-delay product = R * dprop = 2 Mbps * (20,000 km / 2.5 x 10^8 m/s) =


500,000,000 bits
b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is
sent continuously as one large message. What is the maximum number of bits that will
be in the link at any given time?

The maximum number of bits that will be in the link at any given time is the sum of the
file size (800,000 bits) and the bandwidth-delay product (500,000,000 bits). This is
because the file is being sent continuously as one large message, so there will be a
delay between the time the first bit is sent and the time the last bit is received. During
this delay, the link will be filled with the file data.

Maximum number of bits in link = 800,000 bits + 500,000,000 bits = 500,800,000 bits
In other words, at any given time, there will be at most 500,800,000 bits in the link. This
is the maximum amount of data that can be transmitted by the sender before waiting
for acknowledgment.

Note: The bandwidth-delay product is an important concept in networking because it


limits the maximum throughput of a link. If the file size is larger than the bandwidth-
delay product, then the sender will have to stop and wait for acknowledgments before
sending more data. This can lead to a decrease in throughput and an increase in
latency.
Note:
Students have to follow the steps and complete the tasks in details in order to
have the results. If the students only write the result, that is, that result is not
marked or record
Students do examination on word file and answer by English

You might also like