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

MSSV + Mã môn + PE + papers no. Ví dụ: HE140001_ NWC203c_PE_01.

1. Explain the difference between connectionless unacknowledged service and


connectionless acknowledged service. How do the protocols that provide these
services differ?
Answer:
 Connectionless unacknowledged service does not provide any reliability
guarantees. The transmitter simply sends data and does not patiently await
for the receiver to sign for reception. If the data is lost or distorted, the
sender will be unaware. Applications like streaming media that can
withstand data loss employ this kind of service.
 Connectionless acknowledged service provides a basic level of reliability by
sending acknowledgments for each data packet. A packet will be resent by
the sender if it doesn't get an acknowledgment the first time. File transfers,
for example, are examples of applications that cannot tolerate data loss.
The protocols that provide these services differ in how they handle
acknowledgments.
 Protocols that provide connectionless unacknowledged service do not send
acknowledgments. The sender simply sends the data and does not wait for
any response from the receiver. This type of protocol is simpler and faster
than protocols that provide connectionless acknowledged service.
 Protocols that provide connectionless acknowledged service send
acknowledgments for each data packet. The sender waits for an
acknowledgment before sending the next packet. This type of protocol is
more reliable than protocols that provide connectionless unacknowledged
service, but it is also slower.
*After paraphase:
• There are no reliability assurances offered by connectionless unrecognized
services. Instead of patiently waiting for the receiver to indicate for receipt,
the transmitter simply sends data. The sender won't be informed if the data is
corrupted or lost. This kind of service is used by applications like streaming
media that can survive data loss.

----Hoapooh----Hoapooh----
• By delivering acknowledgements for each data packet, connectionless
acknowledged service offers a fundamental level of reliability. If the sender
doesn't receive an acknowledgment the first time, the packet will be sent
again. Examples of applications that cannot tolerate data loss include file
transfers.
Different protocols that offer these services handle acknowledgments
differently.

•Connectionless unacknowledged service protocols do not send


acknowledgments. Data is simply sent, with no waiting for a response from
the recipient. Compared to protocols that offer connectionless recognized
service, this kind of protocol is easier to use and moves more quickly.
• Protocols that offer connectionless acknowledged service transmit
acknowledgements with every data packet. Before delivering the following
packet, the sender waits for an acknowledgment. Although slower than
protocols that offer connectionless unacknowledged service, this kind of
communication is more dependable.
2. Explain the difference between connection-oriented acknowledged service and
connectionless acknowledged service. How do the protocols that provide these
services differ?
Answer:
 Connection-oriented acknowledged service establishes a connection between
the sender and receiver before any data transmission takes place. This
connection is used to track the sequence of data packets and to ensure that
all packets are delivered reliably.
 Connectionless acknowledged service does not establish a connection before
data transmission. Instead, each data packet is delivered separately, and the
receiver acknowledges receipt of each packet individually. This service is
less dependable than connection-oriented recognized service, but it is
quicker
The protocols that provide these services differ in how they handle connections
and acknowledgments.

----Hoapooh----Hoapooh----
 Protocols that provide connection-oriented acknowledged service establish a
connection between the sender and receiver before any data transmission.
The most common protocol that provides connection-oriented acknowledged
service is the Transmission Control Protocol (TCP).
 Protocols that provide connectionless acknowledged service do not establish
a connection before data transmission.
*After paraphase:
• Before any data transmission occurs, connection-oriented recognized
services create a link between the sender and receiver. Data packet
tracking and reliable packet delivery are both accomplished using this
connection.
• A connection is not made before data is transmitted by a
connectionless acknowledged service. As an alternative, each data
packet is sent independently, and the receiver confirms receipt of each
one separately. Although it is speedier, this service is less reliable than
connection-oriented recognized services.
Different protocols that offer these services handle connections and
acknowledgments in different ways.
• Prior to any data transmission, protocols that offer connection-
oriented acknowledged service create a link between the sender and
recipient. The Transmission Control Protocol (TCP) is the most used
protocol for connection-oriented recognized service.
• Connections are not made before data is transmitted using protocols
that offer connectionless acknowledged service.

3. Explain the differences between PPP and HDLC


Answer:
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.
And below are few differences of HDLC and PPP:

----Hoapooh----Hoapooh----
- Configuration type
HDLC is implemented by Point-to-point link configuration and also multi-point
link configurations.
PPP is implemented by Point-to-Point configuration only.
- Layer
HDLC works at layer 2 (Data Link Layer).
PPP works at layer 2 and layer 3 (Network Layer).
- Media Type
HDLC is used in synchronous media.
PPP is used in synchronous media as well as asynchronous media.
- Error detection
HDLC does not offer error detection.
PPP provides the feature of error detection using FCS (Frame Check Sequence)
while transmitting data.
- Authentication
HDLC does not provide link authentication.
PPP provides link authentication using protocols like PAP (Password
Authentication Protocol) and CHAP (Challenge Handshake Authentication
Protocol).
In general, PPP is a more versatile and secure protocol than HDLC. However,
HDLC is simpler and faster than PPP. The best protocol to use will depend on the
specific needs of the application
*After paraphase:
High-level Data Link Control, abbreviated HDLC, is responsible for data
encapsulation. PPP stands for Point-to-Point Protocol, which can be utilized
by various devices without requiring any modifications to the data format.
The following are some distinctions between HDLC and PPP:
*HDLC:
- Configuration type: Both point-to-point and multi-point link configurations
are used to implement HDLC.

----Hoapooh----Hoapooh----
- Layer: Layer 2 (Data Link Layer) is where HDLC operates.
- Media Type: Media that is synchronous uses HDLC.
- Error detection: Error detection is not a feature of HDLC.
- Authentication: There is no link authentication offered by HDLC.
*PPP:
- Configuration type: Only Point-to-Point configuration is used to implement
PPP.
- Layer: Layers 2 and 3 (Network Layer) are where PPP operates.
- Media Type: Both synchronous and asynchronous media can employ PPP.
- Error detection: While transmitting data, PPP has the ability to detect errors
using FCS (Frame Check Sequence).
- Authentication: PPP uses protocols like PAP (Password Authentication
Protocol) and CHAP (Challenge Handshake Authentication Protocol) to offer
link authentication.
=> PPP is, on the whole, a more flexible and secure protocol than HDLC. PPP
is more complex and slower than HDLC, though. Using the best protocol will
rely on the application's particular requirements.

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 3x108 meters/second
(câu này đáp án đã được trình bày công thức đầy đủ và chi tiết bên dưới, các bạn
chỉ cần chú ý các con số khi ra thi để thay đổi khi cần thiết nhé)
Answer:
As Go-Back-N and Selective Repeat are required for both the Default HDLC
Frame and Extended HDLC Frame, it can be described as follows.
Maximum Send Window Size Maximum Send Window Size in
in Default HDLC Frame Extended HDLC Frame
Go-Back-N 7 127

----Hoapooh----Hoapooh----
Selective Repeat 4 64

As topic, we have Distance and Speed of Light:


D (Distance) = 375,000 km = 375 * 106 (m)
c (Speed of Light) = 3 * 108 (m)
Then, we can compute Round Trip Propagation Delay by this formula:
6
D 375 x 10
2 t¿ = = 8
=2 ,5 s
c 3 x 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.
 Go-back-N:
Default HDLC Frame: N = 7, substitute to (*) then we have
6
2 ,5 ×1 , 5 ×10
≈ 535714 (bits)
7

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


6
2 ,5 ×1 , 5 ×10
≈ 29527 (bits)
127

 Selective Repeat
Default HDLC Frame: N = 4, substitute to (*) then we have
6
2 ,5 ×1 , 5 ×10
=937500 (bits)
4

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


6
2 ,5 ×1 , 5 ×10
≈ 58594 (bits)
64

*After paraphase:
----Hoapooh----Hoapooh----
It can be explained as follows because Go-Back-N and Selective Repeat are
necessary for both the Default HDLC Frame and Extended HDLC Frame.
Maximum Send Maximum Send
Window Size in Default Window Size in
HDLC Frame Extended HDLC Frame
Go-Back-N 7 127
Selective Repeat 4 64

We have Distance and Speed of Light:


D (Distance) = 375,000 km = 375 * 106 (m)
c (Speed of Light) = 3 * 108 (m)
Using the following formula, we can calculate the round-trip propagation delay:
6
D 375 x 10
2 t¿ = = 8
=2 ,5 s
c 3 x 10

We know that:
N × nf 2t × R
=2t ¿ ⇒ n f = ¿ (¿)
R N

where n f stands for possible frame size (in bits), and Mbps stands for
megabytes per second.
R = 1,5 Mbps => R = 1,5 x 106 bps.
 Go-back-N:
Default HDLC Frame: N = 7, substitute to (*) then we have
6
2 ,5 ×1 , 5 ×10
≈ 535714 (bits)
7

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


6
2 ,5 ×1 , 5 ×10
≈ 29527 (bits)
127

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

----Hoapooh----Hoapooh----
6
2 ,5 ×1 , 5 ×10
=937500 (bits)
4

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


6
2 ,5 ×1 , 5 ×10
≈ 58594 (bits)
64

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?( Giả sử HDLC được sử dụng
qua liên kết vệ tinh địa tĩnh 1,5 Mbps. Giả sử rằng các khung 250 byte được sử
dụng trong điều khiển liên kết dữ liệu. Tốc độ tối đa mà thông tin có thể được
truyền qua liên kết là bao nhiêu?) (cần xem lại)
(câu này vừa rồi xảy ra ko ít tranh cãi, nên mình để 2 đáp án ở đây đề phòng
trường hợp nhé, theo như các admin trong cuộc họp gg meet thì đáp án thứ 2 sẽ
được lựa chọn nhiều hơn, câu này các bạn nên đặc biệt chú ý nhé)

Answer:
The speed of the satellite link is 1.5 Mbps which is equal to 1.5*106 bits per
second.
The size of the frame that occurred on the data link line is 250 bytes = 2000 bits.
So under the HDLC protocol, the maximum rate can be calculated by using the
formula given below,
Max rate = speed link * frame size = 1.5*106 * 2000 = 3*109
Thus the maximum rate transmitted over the link is 3*109 bits per second.

Second Answer:
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 .

----Hoapooh----Hoapooh----
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:

----Hoapooh----Hoapooh----
n=N × n f =127 × 2000=254000 bits
n 254000
Rmax = = =1052 , 5 kbps=1,0525 Mbps
t cycle 241 , 33

*After paraphase:
R = 1.5 Mbps or R = 1,5 x 106 bps , and nf =250 bytes or 2000 bits (250 x 8).
The earth-to-satellite distance, or D 36,000 km = 3,6 x 107m, is the distance that
the data must travel.
c = 3 x 108 is the speed of light. The propagation delay and processing rate can be
determined 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

Go-Back-N or Selective Repeat ARQ are both options. N = 7 is the standard


window size (and the sequence number is 3 bits).
No errors are made, hence there is no need for retransmission in order to reach the
maximum information rate.
t cycle: Minimum transmission cycle for a set 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

----Hoapooh----Hoapooh----
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
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.( . Giả sử rằng một bộ ghép kênh
nhận gói tin có độ dài không đổi từ N = 60 nguồn dữ liệu. Mỗi nguồn dữ liệu có
xác suất p = 0,1 có một gói trong khoảng thời gian thứ hai nhất định. Giả sử rằng
bộ ghép kênh có một đường truyền có thể truyền 8 gói tin mỗi T giây. Nó cũng có
một dòng thứ hai, nơi nó chỉ đạo bất kỳ gói nào không thể truyền được trong dòng
đầu tiên trong khoảng thời gian T-giây. Tìm số gói trung bình được truyền trên
dòng đầu tiên và số gói trung bình được truyền trên dòng thứ hai.)
(câu này bạn chú ý đến các số liệu trên đề bài là ổn bạn nhé, công thức đã có và
bạn chỉ cần thế số là xong ạ)
Answer:
multiplexer services constant length packet from N = 60 data sources.
available data sources = 60 data sources
probability of selecting each data source = 0.1
probability of not selecting each data source = 1 – 0.1 = 0.9
1st channel will transmit 8 packets of data in time period T
2nd channel will transmit remaining number of packets = 60 – 8 = 52 packets
average number of packets that are selected by first line = (number of packets
transmitted)*(probability of packet) + (number of packet transmitted) *
(probability of not selecting packet)
= (8*0.1) + (52*0.9)
= 0.8 + 46.8

----Hoapooh----Hoapooh----
= 47.6 packets by line 1
average number of packets that are selected by second line
= (52*0.1) + (8*0.9)
= 5.2 + 7.2
= 12.4 packets by line 2
*New answer:
First, 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
Avg 1=∑ (k∗C60
k k 60−k
¿ ( 0.1 ) ¿ ( 1−0.1 ) )=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:
Tsecond = Np – Avg1 = 6 – 4.59 = 1.41
Therefore, it will transmit 1.41 packets on average per T second from the second
line.
*After paraphase:
Determine the likelihood that the k packets have reached the T-second first. It can
be calculated using a binomial distribution whose parameters are N = 60 and which
displays the probability p = 0.1.
The average number of packet arrivals can be expressed as Np = 6. Next, figure out
how many packets on average are received through the first line as shown below:
8
Avg 1=∑ (k∗C60
k k 60−k
¿ ( 0.1 ) ¿ ( 1−0.1 ) )=4.59
k=0

----Hoapooh----Hoapooh----
Currently, 4.59 packets are received on average every transmission through the
first line. The second line will transmit the remainder. The average number of
packets sent across the second line per T seconds can now be calculated as follows:
Tsecond = Np – Avg1 = 6 – 4.59 = 1.41
Therefore, it will transmit 1.41 packets on average per T second from the second
line.

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.( Xem xét việc chuyển một tín hiệu thoại điện
thoại thời gian thực duy nhất qua một mạng gói.
Giả sử rằng mỗi mẫu giọng nói không được trễ hơn 20 ms.
a. Thảo luận chức năng thích ứng nào sau đây có liên quan đến việc đáp ứng
yêu cầu của việc chuyển giao này: xử lý kích thước tin nhắn tùy ý; độ tin cậy và
trình tự; kiểm soát nhịp độ và dòng chảy; thời gian; xưng hô; và quyền riêng tư,
tính toàn vẹn
và xác thực.
b. So sánh cách tiếp cận hop-by-hop với cách tiếp cận end-to-end để đáp ứng
yêu cầu của tín hiệu thoại.)
Answer:

----Hoapooh----Hoapooh----
a)
• Message size is crucial because real-time voice communications need the
delivery of a fixed packet size that can only accommodate speech signals of 20
milliseconds or less. As long as the required speech packet size can be handled, it
is not as crucial how arbitrary message sizes are handled.
• Sequencing is crucial as every packet must arrive in the order that it was
produced. While voice transmission can withstand a certain amount of error and
loss, reliability is only somewhat critical.
• Pacing and flow control are less significant because it is assumed that the
end systems' speeds will be same by virtue of the voice signal's synchronous
nature.
• Timing, for real-time voice transfer is crucial since it assists in reducing the
jitter of the supplied signal through its adaption function.
• Addressing is just when the connection is being set up, assuming some kind
of virtual circuit packet switching technique.
• Privacy, integrity, and authentication have typically not been as
significant as the previously mentioned issues.
*paraphase:
Real-time audio communications need the transmission of a limited packet size
that can only include speech signals of 20 milliseconds or less, hence message size
is essential. It is not as important how arbitrary message sizes are handled as long
as the required speech packet size can be supported.
Since each packet must arrive in the exact same sequence that it was created,
sequencing is essential. Although speech communication may tolerate some
mistake and loss, dependability is only marginally important.

Because it is anticipated that the end systems' speeds will be the same as a result of
the speech signal's synchronous nature, pacing and flow management are less
important.
Timing is essential for real-time voice transfer because, through its adaptation
function, it helps to lessen the jitter of the given signal.

----Hoapooh----Hoapooh----
If a virtual circuit packet switching mechanism is being used, addressing only
occurs during connection setup.
The importance of privacy, integrity, and authentication has traditionally lagged
behind those of the aforementioned problems.

b)
- If the underlying network is trustworthy, end-to-end is preferable since edge
processing is sufficient to deliver respectable performance and the likelihood of
mistake is very low.
- The hop-by-hop technique may be necessary if the underlying network is
unstable. For instance, error recovery at each hop may be required to enable
successful communication if the probability of error is very high, as it is in a
wireless channel.
*paraphase:
- End-to-end is desirable if the underlying network is reliable since edge processing
is sufficient to offer decent performance and the likelihood of error is extremely
low.
- In the event that the underlying network is unstable, the hop-by-hop method
might be required. For instance, if the risk of mistake is very high, as it is in a
wireless channel, error recovery at each hop may be necessary to permit successful
communication.
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.( Xem xét
giao thức Dừng và Chờ như được mô tả. Giả sử rằng giao thức được sửa đổi
sao cho mỗi khi phát hiện một khung bị lỗi ở người gửi hoặc người nhận,
khung được truyền cuối cùng sẽ được gửi lại ngay lập tức.)

----Hoapooh----Hoapooh----
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. Cho thấy giao thức vẫn hoạt động chính xác.
b. Sơ đồ chuyển đổi trạng thái có cần phải sửa đổi để mô tả hoạt động
mới không?
c. Tác dụng chính của việc giới thiệu tính năng truyền lại ngay lập tức
là gì?)
Answer:
a/ In the chapter's discussion of the stop-and-wait protocol, the sender resends a
frame if an acknowledgement is not received in a timely manner. Every time a
transmitter or receiver detects an error, according to the updated protocol, the
frame is sent again.
Since frames are retransmitted more frequently, it is the sole change. The protocol
will thus operate as expected.
b/ No. The state transition diagram won’t change.
c/ With this modified protocol, the error recovery procedure will proceed more
quickly.

----Hoapooh----Hoapooh----
*paraphase:
a. When the stop-and-wait protocol is discussed in the chapter, the sender resends a
frame if an acknowledgement is not received promptly. The frame is sent anew in
accordance with the modified protocol each time a transmitter or receiver notices a
mistake.
It is the only modification since frames are sent and received more frequently.
Thus, the protocol will function as planned.

b. No. The diagram of state transitions won't be altered.

c. The error recovery method will move more swiftly with this changed approach.

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(Giả sử rằng hai quy trình ngang hàng cung cấp một dịch vụ liên quan đến
việc truyền các thông điệp rời rạc. Giả sử rằng các tiến trình ngang hàng được phép
trao đổi PDU có kích thước tối đa M byte bao gồm cả H byte tiêu đề. Giả sử rằng
một PDU không được phép mang thông tin từ nhiều bản tin)
Answer:
a. Develop an approach that allows the peer processes to exchange messages of
arbitrary size.( Phát triển một cách tiếp cận cho phép các quy trình ngang hàng trao
đổi thông điệp có kích thước tùy ý.)
To convert arbitrary sizes, large contents must be split into bytes of each length
that will be transmitted in multiple PDUs.
*paraphase:
Large contents must be divided into bytes of each length that will be broadcast in
different PDUs in order to convert arbitrary sizes.

----Hoapooh----Hoapooh----
b. What essential control information needs to be exchanged between the peer
processes?( Thông tin kiểm soát thiết yếu nào cần được trao đổi giữa các tiến trình
ngang hàng?)
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.
*paraphase:
For messages to be built at the recipient, peer processes must exchange
information. For instance, the first PDU can contain the message length. In the
final PDU, a message end-of-message marker can be present. Sequence numbers
can help with message reconstruction in connectionless networks and loss
detection in connection-oriented networks. Finally, the PDU size must be given in
the PDU header because variable-size PDUs are permitted.

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?( Bây giờ, giả sử rằng
dịch vụ chuyển thông báo được cung cấp bởi các tiến trình ngang hàng được chia
sẻ bởi một số cặp nguồn-đích thông báo. Thông tin kiểm soát bổ sung có cần thiết
không, và nếu có thì nên đặt thông tin đó ở đâu?)
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.
*paraphase:
In this case, the receiver must be able to treat each stream independently when
reassembling messages, so each PDU must be identified with a stream ID in
addition to all of the header information given in (b).
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.

----Hoapooh----Hoapooh----
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?(
Tệp 1 Mbyte sẽ được truyền qua đường truyền thông 1 Mbps có tỷ lệ lỗi bit
là p = 10-6.
Một. Xác suất để toàn bộ tệp được truyền đi mà không có lỗi là bao nhiêu?
Lưu ý với n lớn và p rất nhỏ, (1 − p)n ≈ e-np.
b. Tệp được chia thành N khối có kích thước bằng nhau được truyền riêng
rẽ. Xác suất mà tất cả các khối đến đúng mà không có lỗi là gì? Việc chia tệp
thành các khối có hữu ích không?
c. Giả sử độ trễ lan truyền là không đáng kể, hãy giải thích cách ARQ Dừng
và Chờ có thể giúp phân phối tệp ở dạng không có lỗi. Trung bình mất bao
lâu để gửi tệp nếu ARQ truyền toàn bộ tệp mỗi lần?)
(Đây là một câu khó nên các bạn chú ý đọc kỹ đề và thay đúng số nếu đề có thay
đổi số liệu nhé)
Answer:
The file length n = 1 Mbyte = 8 Mbit = 8*106 bits, the transmission rate R = 1
Mbps, and p = 10-6.
a.
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

----Hoapooh----Hoapooh----
A block has no errors if all subblocks have no errors, so
P[no error in block] = P[no errors in subblock]N =((1 – p)n/N)N = (1 – p)n
So simply dividing the blocks does not help.
c.
We assume the following:
• t0 = basic time to send a frame and receive the ACK/NAK ≈ ttimeout
• ttotal = 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
t0 = tf + tACK = nf / R + na / R (tprop ≈ 0).
P[nt = i ] = P[one success after i – 1 failure] = (1 – Pf) P i – 1 f

Ttotal | i transmissions = i.t0


∞ ∞

E[ttotal] = ∑ i t 0 P [ nt =i ]=t 0 (1−P f ) ∑ i P i−1


f = t0 (1 − Pf)
i=1 i=1

= t0(1–Pf )/(1–Pf)2 = t0/(1 - Pf)


Here, nf = n >> na thus t0 ≈ tf = n/R ; and Pf = 1 – P[ no error] = 1 - e-np
E[total] = n/R (1 – Pf) = n/[Re-np] = 8 / (3.35*10-4) = 23,880 seconds ≈ 6.63 hours!
The file gets through, but only after many retransmissions.

11.

----Hoapooh----Hoapooh----
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. (Trong hoạt động này, bạn được cấp địa chỉ mạng 192.168.1.0/24 cho
mạng con và cung cấp địa chỉ IP cho mạng Packet Tracer. Mỗi mạng LAN trong
mạng yêu cầu ít nhất 25 địa chỉ cho thiết bị đầu cuối, bộ chuyển mạch và bộ định
tuyến. Kết nối giữa R1 đến R2 sẽ yêu cầu một địa chỉ IP cho mỗi đầu của liên kết.
a. Dựa trên cấu trúc liên kết, có bao nhiêu mạng con là cần thiết?
b. Phải mượn bao nhiêu bit để hỗ trợ số lượng mạng con trong bảng cấu trúc liên
kết?
c. Điều này tạo ra bao nhiêu mạng con?
đ. Điều này tạo ra bao nhiêu máy chủ có thể sử dụng trên mỗi mạng con?

----Hoapooh----Hoapooh----
Lưu ý: Nếu câu trả lời của bạn ít hơn 25 máy chủ yêu cầu, thì bạn đã mượn quá
nhiều bit.)

(Câu này các bạn chỉ copy đáp án ra là ổn nhé, các bạn chú ý ra thi ko copy hình
mình dán ở câu a. nhé, mình chỉ show cho các bạn cách nhận biết thôi ạ)
Answer:
a)

We saw that S1, S2, S3, S4, S0/0/0 are the subnets needed, so total we have a 5
Network so we needed 5 in subnets.
b)
The script itself they mentioned at least 25 addresses for the entry devices such as
or router, so if you have to get this 25 addresses we have to borrow 3 bits
We call N is the number of bits, follow fomula below:
N
4 ×2 −2 ≥ 25

N is the smallest number that satisfies


 We got N = 3.
Explain: 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 created are :

----Hoapooh----Hoapooh----
N 3
2 =2 =8.

=> The number of subnets created is 8


d)
The number of host is 2 N −2 , where N is the smallest number that satisfies:
2 −2 ≥ 25,
N

 We saw that N = 5, so that number of hosts are


N 5
2 −2=2 −2=30

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(Năm trạm (S1-S5) được kết nối với mạng LAN mở rộng
thông qua các cầu nối trong suốt (B1-B2), như thể hiện trong hình dưới đây. Ban
đầu, các bảng chuyển tiếp trống. Giả sử các trạm sau truyền khung: S1 truyền tới
S5, S3 truyền tới S2, S4 truyền tới S3, S2 truyền tới S1 và S5 truyền tới S4. Điền
vào các bảng chuyển tiếp với các mục thích hợp sau khi các khung đã được truyền
hoàn toàn)

----Hoapooh----Hoapooh----
(câu này đáp án đã là chuẩn nhất nên bạn ko cần chỉnh sửa gì nhé, những chỗ
trống không phải mình làm sai hoặc thiếu mà là cái thằng station tại đó không
tìm thấy bạn nhé)
Answer:

B1
Address Port Explaination
Because there is S1 sent. So B1 will
Step 1 S1 => S5 S1 1
receive this packet
Since S3 sends the broadcast, B1
Step 2 S3 => S2 S3 2 receives
it.
Because after step 2, B2 knows that S3
is on port 2, it will forward the packet
Step 3 S4 => S3 S4 2 to port
2. And of course, both S3 and port 2 of
B1 will also receive it.
Since S2 sends the broadcast, B1
Step 4 S2 => S1 S2 1 receives
it.
B2 already knows that S4 is on network
3, so B2 will no longer forward the
Step 5 S5 => S4 packet to networks 2 and 1. So this step
B1 won't say
where S5 is

B2
Address Port Explaination
Because in the beginning, there is S1
sending S5. But both B1 and B2 do not
know where S5 is, so the packet that S1
Step 1 S1 => S5 S1 1 sends is a broadcast. B1 will also
forward the packet because it doesn't
know where S5 is => B2 will receive it
and know that S1 is on port 1
Step 2 S3 => S2 S3 1 Because there is a session sending S3 to
S2, but since S3 doesn't know where S2
is initially, it sends it as a broadcast. And
----Hoapooh----Hoapooh----
so, B2 can also receive the packet of S3,
so B2
can also understand that S3 is on its port
1.
Step 3 S4 => S3 S4 2 Because S4 sent to S3
After step 1, B1 already knows that S1
is on network 1, so it will not forward
Step 4 S2 => S1
the packet anymore. So at this step, B2
doesn't know where S2 is.
Step 5 S5 => S4 S5 2 Because S5 sends a broadcast

13. Consider the network in Figure

(câu này là chuẩn nhất nên các bạn cứ copy paste thoải mái nhé)
Answer:
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 {4} ∞ ∞ ∞ ∞ ∞
(2,4
1 {4,2} (5,4) (1,4) (3,4) ∞
)
(2,4
2 {4,2,3} (4,2) --- (3,4) ∞
)
3 {4,2,3,5} (4,2) --- --- (3,4) (3,3)

----Hoapooh----Hoapooh----
4 {4,2,3,5,6} (4,2) --- --- --- (3,3)
5 {4,2,3,5,6,1} (4,2) --- --- --- ---

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.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
----Hoapooh----Hoapooh----
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(Bạn là một kỹ thuật viên mạng được giao nhiệm vụ cài đặt mạng mới cho
một khách hàng. Bạn
phải tạo nhiều mạng con ngoài không gian địa chỉ mạng 192.168.0.0/24 để đáp ứng
các yêu cầu sau:
- Mạng con đầu tiên là mạng LAN-A. Bạn cần tối thiểu 50 host IP
địa chỉ.
- Mạng con thứ hai là mạng LAN-B. Bạn cần tối thiểu 40 máy chủ
Các địa chỉ IP.
- Bạn cũng cần thêm ít nhất hai mạng con chưa sử dụng cho mạng trong tương lai
sự bành trướng.
Lưu ý: Mặt nạ mạng con có độ dài thay đổi sẽ không được sử dụng. Tất cả các mặt
nạ mạng con của thiết bị
phải có cùng độ dài.
Trả lời các câu hỏi sau để giúp tạo sơ đồ mạng con đáp ứng các yêu cầu đã nêu
yêu cầu mạng:

----Hoapooh----Hoapooh----
Một. Cần bao nhiêu địa chỉ máy chủ trong mạng con yêu cầu lớn nhất?
b. Số lượng mạng con tối thiểu cần thiết là bao nhiêu?
c. Mạng mà bạn được giao nhiệm vụ subnet là 192.168.0.0/24. /24 là gì
mặt nạ mạng con ở dạng nhị phân?
đ. Mặt nạ mạng con được tạo thành từ hai phần, phần mạng và máy chủ lưu trữ.
khẩu phần. Điều này được thể hiện trong nhị phân bởi những cái và số không trong
mạng con
mặt nạ
Trong mặt nạ mạng, số 1 và số 0 đại diện cho điều gì?
đ. Khi bạn đã xác định mặt nạ mạng con nào đáp ứng tất cả các mạng đã nêu
yêu cầu, lấy được từng mạng con. Liệt kê các mạng con từ đầu đến cuối trong
bàn. Hãy nhớ rằng mạng con đầu tiên là 192.168.0.0 với mặt nạ mạng con đã chọn)
(trong câu này, đối với câu c. /?? subnet mask ở đây rất dễ để nhận biết trong giao
thức IPv4, nó sẽ có phương thức hiển thị là w.x.y.z, mỗi vị trí ở trong đây tương
đương với 8 bits trong binary, mình lấy ví dụ, nếu đề bài cho là /12 subnet mask
thì mình sẽ có đáp án là 11111111.11110000.00000000.00000000, ở đây mình sẽ
có 12 số 1 (hoặc 12 bits) tương đương với /12 subnet mask và đối với trong bài
này /24 subnet mask thì bạn hiểu đơn giản sẽ có 24 số 1 (24 bits) và các vị trí
trống ở sau toàn bộ đều là số 0 - 11111111.11111111.11111111.00000000)
(đặc biệt đối với câu e, mình sẽ giải thích đơn giản cho các bạn hiểu về bước nhảy
mạng, cách tìm số subnet, số host mà mỗi subnet có được:
trong bài này số subnet có được là 4 và chúng ta cần tìm là số bit phần Host cho
phần Net mượn
- số subnet có được: 2n (n: số bit phần Host cho phần Net mượn), đối với
bài này ta đã biết số subnet có được là 2n = 4 Ta sẽ tìm được n = 2,
ban đầu các mạng này là /24 subnet mask, sau khi tìm được số bít phần
Host cho phần Net mượn thì ta thêm 2 bit đó vào(2 bit được thêm vào
bạn hiểu đơn giản là thay thế bằng số 1) và nó sẽ trở thành /26 subnet
mask: 11111111.11111111.11111111.1100000000.

----Hoapooh----Hoapooh----
- số host trong mỗi mạng con: 2m – 2 (m: là số bit 0 còn lại trong Subnet
mask), trong bài mình sẽ còn lại 6 bit 0 thì mình sẽ có 26 – 2 = 64.
- số bước nhảy: k = 28-n (n: số bit phần Host cho phần Net mượn), chúng
ta sẽ tìm được k = 28-2 = 64.
và để hình thành ra cái bảng ở câu e, chúng ta chỉ cần điền subnet id đầu tiên vào,
để tìm những subnet id tiếp theo bạn chỉ cần cộng tiếp với 64
subnet ID1: 192.168.0.0 / 26
subnet ID2: 192.168.0.64 / 26 (cộng thêm 64 từ subnet ID1)
subnet ID3: 192.168.0.128 / 26 (cộng thêm 64 từ subnet ID2)
subnet ID4: 192.168.0.192 / 26 (cộng thêm 64 từ subnet ID3)

Answer:
a)
50 Hosts addresses are needed in the largest required subnet.
b)
The requirements stated above specify two company networks for future
expansion. So, there are a 4 minimum number of subnets required.
c)
the /24 subnet mask in binary is 11111111.11111111.11111111.00000000 .
d)
Ones in the binary is represented the network portion.
Zeros in the binary is represented the host portion.
e)
Subnet Address Prefix Subnet Mask
192.168.0.0 /26 255.255.255.192
192.168.0.64 /26 255.255.255.192
192.168.0.128 /26 255.255.255.192
192.168.0.192 /26 255.255.255.192

----Hoapooh----Hoapooh----
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?( Giả sử rằng ARQ lặp
lại có chọn lọc được sửa đổi sao cho các bản tin ACK chứa danh sách m khung
tiếp theo mà nó dự kiến sẽ nhận được.
Một. Làm thế nào để giao thức cần phải được sửa đổi để phù hợp với sự thay đổi
này?
b. Ảnh hưởng của sự thay đổi đối với hiệu suất giao thức là gì?)
Answer:
a. There are two things needed to be changes:
First, the frame header needs to be modified to accommodate the list of frames to
receive. It can be a fixed or a variable number of slots. NAK won’t be necessary
because the receiver explicitly indicates which frames need to be transmitted.
Second, the transmitter operation must change to retransmit frames according to
the received list. If the list contains the m oldest frames that are yet to be received,
then the list can be used to skip retransmissions of frames that have already been
received.
*paraphase:
Changes must be made to two things:
In order to accommodate the list of frames to receive, the frame header must first
be changed. There may be a set or random distribution of slots. Because the
receiver expressly indicates which frames must be transmitted, NAK won't be
required. In order to retransmit frames in accordance with the received list, the
transmitter operation must alter. The list can be used to bypass retransmissions of
frames that have already been received if it contains the m oldest frames that have
yet to be 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 performance will increase in cases with high error rate or in cases where the
delay is high. A single frame can ask for the retransmission of several frames. The

----Hoapooh----Hoapooh----
drawback is the overhead in the header and the increased protocol complexity
relative to pure Selective-Repeat ARQ.
*paraphase:
If the mistake rate or latency is significant, performance will undoubtedly improve.
Multiple frames may be requested for retransmission by a single frame.
When there is a high mistake rate or a significant latency, the performance will
improve. The retransmission of many frames might be requested by a single frame.
In comparison to pure Selective-Repeat ARQ, the overhead in the header and
higher protocol complexity are disadvantages.
16. 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?
If we assume a maximum compression ratio of 1:6, then we have the following
times for the 32 Kb and Mb lines respectively(Giả sử kích thước của tệp văn bản
không nén là 1 megabyte
Lưu ý: Giải thích chi tiết câu trả lời của bạn.
Một. Mất bao lâu để tải xuống tệp qua modem 32 kilobit/giây?
b. Mất bao lâu để tải xuống tệp trên 1 megabit/giây
modem?
c. Giả sử nén dữ liệu được áp dụng cho tệp văn bản. Truyền tải bao nhiêu
lần ở phần (a) và (b) thay đổi?
Nếu chúng ta giả sử tỷ lệ nén tối đa là 1:6, thì chúng ta có thời gian sau cho các
dòng 32 Kb và Mb tương ứng)
trong câu này, mình đưa ra cho bạn 2 lựa chọn

----Hoapooh----Hoapooh----
- đối với câu trả lời số 1, đơn vị megabyte, megabit và kilobit sẽ được
mình làm tròn đến con số thông dụng nhất, ở đây mình sẽ lấy 1
megabytes = 1,000,000 bytes và chuyển từ byte sang bits thì mình
nhân với 8 (1 byte = 8 bits)
- đối với câu trả lời số 2, mình sẽ lấy chuẩn đơn vị đo lường quốc tế bạn
nhé, mình sẽ có 1 megabytes = 1,048,576 bytes và chuyển từ byte
sang bits thì mình nhân với 8 (1 byte = 8 bits)
Bạn có thể lựa chọn 1 trong 2 cách đều được nhé, mình thì recommend đáp án số 2
nhé.

Answer:
To calculate the download time, we need to convert the file size from megabytes to
kilobits.
a. Download time over a 32 kilobit/second modem:
 File size: 1 megabyte = 1,000,000 bytes = 8,000,000 bits = 8,000 kilobits
 Download speed: 32 kilobits/second
 Download time = File size / Download speed = 8,000 kilobits / 32
kilobits/second = 250 seconds
b. Download time over a 1 megabit/second modem:
 File size: 1 megabyte = 1,000,000 bytes = 8,000,000 bits = 8 megabits
 Download speed: 1 megabit/second
 Download time = File size / Download speed = 8 megabits / 1
megabit/second = 8 seconds
c. If we assume a maximum compression ratio of 1:6, then we have the following
times for the 32 kilobit and 1 megabit lines respectively:
Then 1 megabyte will be compressed into 1/6 megabyte.
1 megabyte = 1,000,000 bytes = 8,000,000 bits = 8,000 kilobits = 8 megabits
T32K = 8000 kilobits / (6*32) kilobits/second ≈ 41,67 secconds.
T1M = 8 megabits / (6 * 1) megabits ≈ 1,33 seconds.

----Hoapooh----Hoapooh----
Second Answer:
To calculate the download time, we need to convert the file size from megabytes to
kilobits.
a. Download time over a 32 kilobit/second modem:
 File size: 1 megabyte = 1,048,576 bytes = 8,388,608 bits = 8,388.608
kilobits
 Download speed: 32 kilobits/second
 Download time = File size / Download speed = 8,388.608 kilobits / 32
kilobits/second = 262.144 seconds
b. Download time over a 1 megabit/second modem:
 File size: 1 megabyte = 1,048,576 bytes = 8,388,608 bits = 8.388608
megabits
 Download speed: 1 megabit/second
 Download time = File size / Download speed = 8.388608 megabits / 1
megabit/second = 8.388608 seconds
c. If we assume a maximum compression ratio of 1:6, then we have the following
times for the 32 kilobit and 1 megabit lines respectively:
Then 1 megabyte will be compressed into 1/6 megabyte.
1 megabyte = 1,048,576 bytes = 8,388,608 bits = 8,388.608 kilobits = 8.388608
megabits
T32K = 8,388.608 kilobits / (6*32) kilobits/second ≈ 43,69 secconds.
T1M = 8.388608 megabits / (6 * 1) megabits ≈ 1,39 seconds.

17. 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(Đặt g(x)=x3+x+1. Xét chuỗi thông tin 1001. Tìm từ mã
tương ứng với chuỗi thông tin trước đó. Sử dụng số học đa thức, chúng tôi có
được)
----Hoapooh----Hoapooh----
trong bài này G là generator polynomial (đa thức sinh) và D là chuỗi Data)
- các bạn lưu ý, đa thức sinh (G) phải có độ dài bé hơn hoặc bằng độ dài
của chuỗi Data (D), phải bắt đầu và kết thúc bằng bit 1. ví dụ G =
10011 (đúng), G = 11010 (sai vì bit cuối khác 1).
thêm bao nhiêu số ko vào cuối chuỗi Data (D) thì bạn sẽ lấy số lượng bit trong đa
thức sinh (G) – 1, trong bài này, mình gọi n là số lượng bit trong G  mình sẽ có n
= 4, và sẽ bit 0 mình cần thêm vào cuối chuỗi Data (D) là n – 1 = 4 – 1 = 3.
Lúc chia thì bạn chia bit Data mới (new D) cho G.
Answer:
G = x3+x+1 or we can write in binary is 1011.
D = 1001.
Step 1: Add 000 to data bits string. It will be 1001000
Step 2: Devide 1001000 to 1011 in modulo – 2 method.
1001000 1011

1011 1010
-----
001000

1011
-----
00110  110 is FCS

So the codeword = 1001110

18. 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?

----Hoapooh----Hoapooh----
(b) What does the router do if a packet with an IP address 135.46.57.14 arrives?(
Một bộ định tuyến có các mục CIDR sau trong bảng định tuyến của nó:
Địa chỉ/mặt nạ Next hop
135.46.56.0/22 Giao diện 0
135.46.60.0/22 Giao diện 1
192.53.40.0/23 Bộ định tuyến 1
Bộ định tuyến mặc định 2
(a) Bộ định tuyến sẽ làm gì nếu một gói có địa chỉ IP 135.46.63.10 đến?
(b) Bộ định tuyến sẽ làm gì nếu một gói có địa chỉ IP 135.46.57.14 đến?)
trong câu này bạn đổi tất cả các con số ra dạng nhị phân nhé
đối với máy 570VN  Bạn bấm mode rồi bấm số 4 để vào dạng chuyển đổi
decimal và binarry nhé, bạn quan tâm 2 cái này cho mình là được
đối với máy 580VN  Bạn bấm menu rồi bấm số 3
để chuyển đổi decimal qua binary thì bạn chú ý các nút trên máy tính cầm tay nhé
(trên máy tính cầm tay các bạn tìm giùm mình những nút DEC HEX BI OCT gần
nhau là được nhé), bấm số bên decimal sau đó bấm dấu “=” rồi bấm qua binary là
được nhé
sau khi đã đổi hết số sang binary, bạn sẽ dùng phép so sánh AND
0 và 0 là 0
1 và 0 là 0
0 và 1 là 0
1 và 1 là 1
trong bài này thì bạn so sánh /23 subnet mask trước (vì nó lớn nhất), khi chuyển
đổi xong bạn so sánh với các con số có sẵn trong đề bài có trùng hay không, nếu ko
có trong /23 thì bạn so sánh tiếp với /22 là được bạn nhé. Trong bài thì câu a) so
sánh với /23 thì cho ra kết quả ko trùng với đề bài còn /22 thì trùng với Interface 1
và cứ so sánh như vậy với câu b) là được bạn nhé.
Answers:
a)
----Hoapooh----Hoapooh----
First, the router will check the routing entry starting with the longest prefix (/23)
135.46.63.10 AND 255.255.254.0 = 135.46.62.0 != 192.53.40.0 therefore this
entry does not match.
Next longest prefix is 22: 135.46.63.10 AND 255.255.252.0 =135.46.60.0.
Therefore this packet will routed out over Interface 1.

b)
Similarly, the router will check the routing entry starting with the longest prefix
(/23) 135.46.57.14 AND 255.255.254.0 = 135.46.56.0 != 192.53.40.0 therefore this
entry does not match.
Next longest prefix is 22: 135.46.57.14 AND 255.255.252.0 = 135.46.56.0
Therefore this packet will routed out over Interface 0.

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: (Một số lượng
lớn địa chỉ IP liên tiếp có sẵn bắt đầu từ 198.16.0.0.
Giả sử bốn tổ chức A, B, C, D yêu cầu lần lượt 4000, 2000, 4000 và 8000 địa chỉ.
Đối với mỗi tổ chức này, hãy cung cấp:
1. địa chỉ IP đầu tiên được chỉ định
2. địa chỉ IP cuối cùng được chỉ định
3. mặt nạ trong ký hiệu w.x.y.z/s
Địa chỉ bắt đầu, địa chỉ kết thúc và mặt nạ như sau: )
(câu này mình hướng dẫn khá kỹ và có công thức trong câu trả lời nên các bạn cần
chú ý các số liệu nhé)
Answers:
Organization A (4000 IP addresses)
Host ID: 12 bits (212= 4096 >=4000)

----Hoapooh----Hoapooh----
-> Network ID = 20 bits
The first IP address:
11000110.00010000.00000000.00000000 -> 198.16.0.0
The last IP address:
11000110.00010000.00001111.11111111 - >198.16.15.255
The mask: 198.16.0.0/20 (The first IP address + “/” + Network ID)

Organization B (2000 IP addresses)


Host ID: 11 bits (211= 2048 >=2000)
-> Network ID = 21 bits
The first IP address:
11000110.00010000.00010000.00000000 -> 198.16.16.0 (Add 1 from the last IP
of Organization A)
The last IP address:
11000110.00010000.00010111.11111111 - >198.16.23.255
The mask: 198.16.16.0/21 (The first IP address + “/” + Network ID)

Organization C (4000 IP addresses)


Host ID: 12 bits (212= 4096 >=4000)
-> Network ID = 20 bits
The first IP address:
11000110.00010000.00100000.00000000 -> 198.16.32.0 (Add 1 from the last IP
of Organization B)
The last IP address:
11000110.00010000.00101111.11111111 - >198.16.47.255
The mask: 198.16.32.0/20 (The first IP address + “/” + Network ID)

----Hoapooh----Hoapooh----
Organization D (8000 IP addresses)
Host ID: 13 bits (213= 8192 >=8000)
-> Network ID = 19 bits
The first IP address:
11000110.00010000.01000000.00000000 -> 198.16.64.0 (Add 1 from the last IP
of Organization C)
The last IP address:
11000110.00010000.01011111.11111111 - >198.16.95.255
The mask: 198.16.64.0/19 (The first IP address + “/” + Network ID)

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(Khả năng làm việc với mạng con IPv4 và xác
định thông tin mạng và máy chủ lưu trữ dựa trên địa chỉ IP và mặt nạ mạng con
nhất định là rất quan trọng để hiểu cách thức hoạt động của mạng IPv4. Phần đầu
tiên được thiết kế để củng cố cách tính toán thông tin địa chỉ IP mạng từ một địa
chỉ IP và mặt nạ mạng con đã cho. Khi được cung cấp địa chỉ IP và mặt nạ mạng
con, bạn sẽ có thể xác định thông tin khác về mạng con.

----Hoapooh----Hoapooh----
Điền vào các bảng dưới đây với các câu trả lời thích hợp cho địa chỉ IPv4, mặt nạ
mạng con ban đầu và mặt nạ mạng con mới)

(đây là câu mình tự thêm vào nên mang tính chất tham khảo là chính, nhưng
bạn vẫn nên đọc hết cách làm của nó nhé)
Answer:
Number of subnet bits:
Original Subnet Mask: 255.255.255.0 (24 bit-1s)
New Subnet Mask: 255.255.255.248 (29 bit-1s)
Number of Subnet bits: 5 (29 - 24)
Number of subnet created:
2number of subnet bits = 25 = 32
Number of host bits per subnets
32 – (number of network bits) – (number of subnet bits)
= 32 – 24 – 5 = 3
Number of hosts per subnet
2Host bits - 2= 23 - 2 = 6 (-2: Network address, Broadcast address)
Network Address of this Subnet

----Hoapooh----Hoapooh----
11000000.10000111.11111010.10110100 (Host IP Address)
11111111.11111111.11111111.11111000 (New Subnet mask)
(Host IP Address) AND (New Subnet mask)
 11000000.10000111.11111010.10110000 = 192.135.250.176

Câu 21:
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.( Giả sử một thực thể tầng ứng dụng muốn gửi một
thông báo L-byte đến tiến trình ngang hàng của nó, sử dụng kết nối TCP hiện có.
Phân đoạn TCP bao gồm thông báo cộng với 20 byte tiêu đề. Phân đoạn được gói
gọn trong một gói IP có thêm 20 byte tiêu đề. Đến lượt mình, gói IP đi vào bên
trong khung Ethernet có 18 byte tiêu đề và đuôi. Bao nhiêu phần trăm số bit được
truyền trong lớp vật lý tương ứng với thông tin bản tin, nếu L = 100 byte, 500 byte,
1000 byte.)
(câu này thì bạn chú ý xem kỹ số liệu và đọc kỹ đề là được bạn nhé)
Anwser: Because the message overhead includes – TCP’s header: 20 bytes; IP
packet’s header: 20 bytes and Ethernet frame’s header and trailer: 18 bytes.
Therefore, if an message consists of L byte length so that the total bytes of that
message now is L + 20 + 20 + 18 = L + 58.
The percentage of the transmitted bits in the physical layer correspond to message
information is p = [L/(L+58)]*100.
When :
+ L = 100 bytes  p ≈ 63.29%.
+ L = 500 bytes  p ≈ 89.61%.

----Hoapooh----Hoapooh----
+ L = 1000 bytes  p ≈ 94.52%.

Câu 22:
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(Hãy xem xét bắt tay ba bước trong thiết lập kết nối
TCP.
(c) (a) Giả sử rằng một đoạn SYN cũ từ trạm A đến trạm B, yêu cầu kết nối
TCP. Giải thích cách thủ tục bắt tay ba bước đảm bảo rằng kết nối bị từ chối.
(d) (b) Bây giờ giả sử rằng một phân đoạn SYN cũ từ trạm A đến trạm B, một
lát sau theo sau bởi một phân đoạn ACK cũ từ A đến một phân đoạn SYN từ
B. Đây có phải là kết nối)

Answer:
a) In three-way handshake, to identify which connection is rejected or accepted,
the initial sequence number is always unique. If B receives an old SYN segment
form A, B will acknowledged the request base old sequence number. When A
receives the acknowledge message from B, A will know B used the wrong initial
sequence number and discard it then reset the connection.
b) First of all, B recieves an old SYN segment, B will send a SYN segment with its
own unique sequence number set by B. If B receives the old ACK from A, B will
inform A that the connection is invalid since the old ACK sequence numbers does
not match the sequence number previously defined by B. Therefore, the connection
is rejected.
Câu 23:
Suppose a header consists of four 16-bit words: (11111111 11111111, 11111111
00000000, 11110000 11110000, 11000000 11000000). Find the Internet checksum
for this code.

----Hoapooh----Hoapooh----
trong câu này các bạn bấm máy tính nhé, bạn chuyển qua dạng chuyển đổi và tập
trung vào binary giùm mình thôi nhé (cách chuyển đổi mình đã ghi ở câu 18), ở
đây là checksum nên bạn cứ cộng hết vào cho mình, sau đó bạn sẽ ra đáp á giống
như hình bên dưới, bạn chú ý giùm mình 2 dòng cuối nhé, khi cộng xong bạn cứ
ghi hết tất cả các bit ra cho mình (giống như mình trình bày ở trong bài), bài này
chỉ cho 16 bit nên bạn đếm từ cuối chuỗi đến con số thứ 16 là bạn dừng và lấy các
con số đó, các số trước đó (carry bit – số mà mình bôi đỏ trong bài) thì bạn giữ lại
(ko được tự ý bỏ đi) rồi tiếp tục cộng với chuỗi hiện tại. Để chắc cú thì bạn hãy
bấm máy tính giùm mình nhé.
Tiếp đến, để tìm Internet checksum thì nó chỉ đơn giản là 1’s complement hay hiểu
đơn giản là lật ngược chuỗi  0 đổi thành 1 và 1 đổi thành 0. Ví dụ: 1010  đổi
thành 0101, 1001  0110.

Answer:
11111111 11111111
+
11111111 00000000
+
11110000 11110000

----Hoapooh----Hoapooh----
+
11000000 11000000
-------------------------
1110110000 10101111
(here we have 11 is a carry-bit, so to maintain the bit string is 16 bit length, we
need to add 11 to the current bit string 10110000 10101111). Let’s continue with
the sum calculate:
10110000 10101111
+
11
-------------------------
10110000 10110010
And now to find the Internet checksum, we need to use 1’s complement for the
above bit string.
10110000 10110010
1’s complement: 01001111 01001101
 So the Internet Checksum is: 01001111 01001101
Câu 24:
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.
(câu này giống như câu 17 bạn nhé) R ở đây là remainder (phần còn lại) bạn nhé, là
cái giống mình làm trong bài nhé
G = 10011
D = 1001010101
- step 1: We need to add four 0 at the end of D => 10010101010000
- step 2: Now we divide new D to G

10010101010000 10011
⊕ 1000110000
10011
-------
000011010

10011
----Hoapooh----Hoapooh----
-------
010011

10011
-------
000000000 => Now we get the remain is : 0000
 So the value of R is 0000.

Câu 25:
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 108 meters/sec.
a. Calculate the bandwidth-delay product, R_prop.
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?( Giả sử hai máy chủ A và B cách nhau
20.000 km và được kết nối bằng đường truyền trực tiếp có tốc độ R = 2 Mbps. Giả
sử tốc độ lan truyền trên liên kết là 2,5 x 108 mét/giây.
Một. Tính sản phẩm độ trễ băng thông, R_prop.
b. Xem xét việc gửi một tệp 800.000 bit từ Máy chủ A đến Máy chủ B. Giả sử tệp
được gửi liên tục dưới dạng một tin nhắn lớn. Số lượng bit tối đa sẽ có trong liên
kết tại bất kỳ thời điểm nào là bao nhiêu?)
(câu này công thức mình đã ghi rất chi tiết nên bạn cần chú ý đọc kỹ đề nhé, đối
với câu b) thì bạn chỉ cần lấy giá trị của bandwidth-delay product điền vào là được,
bài này mình tính ra 160000 bits thì ở câu b) mình đổi đơn vị và ghi thành 160
kilobits).
ANSWER:
distance between A and B: 2*107 m
tranmission rate: R = 2*106 bits/s
propagation delay: 2,5*108 m/s

----Hoapooh----Hoapooh----
a) R_dprop = distance / propagation delay = 2*107 / 2,5*108 = 0,08s
bandwidth-delay product = R * R_dprop = 2*106 * 0,08 = 160000 bits
b) Send a file from Host A to Host B: 800000 bits.
When you send a file from A to B, you need to split data into packets, each
packets has 160 Kilobits.
Câu 26. (optional question) Sender A wants to send 100111010011011 to receiver
B. This transmission uses CRC algorithm for error detection with generator
polynomial bits string is 10111. What is bits string will be transmitted on the
medium. Show your all steps to have result.( Người gửi A muốn gửi
100111010011011 cho người nhận B. Quá trình truyền này sử dụng thuật toán
CRC để phát hiện lỗi với chuỗi bit đa thức của trình tạo là 10111. Chuỗi bit là gì sẽ
được truyền trên phương tiện. Hiển thị tất cả các bước của bạn để có kết quả.)
(bài này giống như bài 17 bạn nhé) – đây là câu mình tự thêm vào nên cũng chỉ
mang tính chất tham khảo bạn nhé, nhưng bạn vẫn nên đọc để hiểu thêm nhé
First add 0000 to data bits string. It will be 1001110100110110000.
Next, we divide 1001110100110110000 to 10111 to get remainder.

1001110100110110000 10111

101010001000110
10111
-------
0010010

10111
-------
0010110

10111
-------
000010110

10111
--------

----Hoapooh----Hoapooh----
000011100

10111
-------
010110

10111
-------
000010
And here, we have our remainder is 10, but we need 4 bit string so it need to
be 0010  FCS is 0010
Therefore, transmitted bits string is 1001110100110110010.

----Hoapooh----Hoapooh----

You might also like