You are on page 1of 41

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

connectionless acknowledged service. How do the protocols that provide these services
differ?
Hãy giải thích sự khác biệt giữa dịch vụ không yêu cầu thiết lập kết nối và không
xác nhận (Connectionless Unacknowledged Service) và dịch vụ không yêu cầu
thiết lập kết nối và có xác nhận (Connectionless Acknowledged Service). Các giao
thức cung cấp các dịch vụ này khác nhau như thế nào?

• Connectionless unacknowledged service is a type of network service in which data


packets are sent without any guarantee of delivery. If a packet is lost, the sender will not
be notified. This type of service is often used for applications where reliability is not as
important as speed, such as streaming media or online gaming.
• Connectionless acknowledged service is a type of network service in which data packets
are sent with an acknowledgement from the receiver. This means that the sender knows if
the packet was received correctly. If a packet is lost, the sender will resend it. This type
of service is often used for applications where reliability is important, such as file transfer
or email.
The protocols that provide these services differ in the way they handle packet loss. In
connectionless unacknowledged service, the sender does not know if a packet was
received correctly. If a packet is lost, the sender will simply send it again. This can lead
to duplicate packets being received by the receiver. In connectionless acknowledged
service, the sender knows if a packet was received correctly because the receiver sends an
acknowledgement. This means that the sender does not need to resend packets that were
lost.
Here is a table that summarizes the key differences between connectionless
unacknowledged service and connectionless acknowledged service:
Câu 2. Explain the difference between connection-oriented acknowledged service and
connectionless acknowledged service. How do the protocols that provide these services
differ?

Sự khác biệt giữa dịch vụ có kết nối và có xác nhận (Connection-Oriented


Acknowledged Service) và dịch vụ không yêu cầu kết nối và có xác nhận
(Connectionless Acknowledged Service). Các giao thức cung cấp các dịch vụ
này khác nhau như thế nào?
Connection-oriented acknowledged service is a type of network service in which a
connection is established between the sender and receiver before any data is sent. This
connection provides a guarantee of delivery for all data packets. If a packet is lost, the
sender will resend it until it is received correctly. This type of service is often used for
applications where reliability is critical, such as file transfer or video conferencing.
• Connectionless acknowledged service is a type of network service in which data packets
are sent without establishing a connection between the sender and receiver. Each packet is
acknowledged individually, so if a packet is lost, the sender will only know that the packet
was lost if the receiver does not send an acknowledgement. This type of service is often
used for applications where reliability is not as critical as speed, such as email or streaming
media.
The protocols that provide these services differ in the way they handle packet loss. In
connection-oriented acknowledged service, the sender knows if a packet was received
correctly because the receiver sends an acknowledgement. If a packet is lost, the sender will
resend it until it is received correctly. This ensures that all data packets are delivered
reliably. In connectionless acknowledged service, the sender does not know if a packet was
received correctly unless the receiver sends an acknowledgement. If a packet is lost, the
sender will not know that the packet was lost unless the receiver does not send an
acknowledgement. This means that there is a small chance that some data packets may be
lost.
Here is a table that summarizes the key differences between connection-oriented
acknowledged service and connectionless acknowledged service:
Câu 3: Explain the differences between PPP and HDLC.

Giải thích sự khác nhau giữa PPP và HDLC

• Protocol type: PPP is a byte-oriented protocol, while HDLC is a bit-oriented protocol.


This means that PPP deals with data in units of bytes, while HDLC deals with data in units
of bits.
• Frame structure: The frame structure of PPP is more flexible than the frame structure of
HDLC. PPP can support a variety of network layer protocols, while HDLC is typically used
with only one network layer protocol.
• Error detection: PPP uses a CRC (cyclic redundancy check) for error detection, while
HDLC uses a FCS (frame check sequence). CRC is a more reliable error detection
mechanism than FCS.
• Support for multiple links: PPP can support multiple links, while HDLC can only support
a single link. This makes PPP more suitable for applications that require multiple
connections, such as dial-up networking.
• Security: PPP supports a variety of security mechanisms, while HDLC does not. This
makes PPP more secure than HDLC.
Here is a table that summarizes the key 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.

Một liên kết truyền thông với tốc độ 1.5 Mbps sẽ sử dụng giao thức HDLC để truyền
thông tin tới mặt trăng. Kích thước khung nhỏ nhất có thể nào cho phép truyền tải liên
tục? Khoảng cách giữa Trái Đất và mặt trăng là khoảng 375,000 km, và tốc độ ánh sáng
là 3 x 108 mét/giây.

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?

Giả sử HDLC được sử dụng qua một liên kết vệ tinh địa tĩnh với tốc độ 1.5 Mbps. Giả sử
rằng các khung dữ liệu kiểm soát liên kết có kích thước 250 byte. Tốc độ truyền thông tối
đa có thể trên liên kết là bao nhiêu?

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.

Giả sử một bộ đa kênh nhận các gói tin cùng độ dà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 tin trong một khoảng thời gian T nhất định. Giả
sử bộ đa kênh có một đường truyền trong đó có thể truyền tám gói tin mỗi T giây. Bộ đa
kênh cũng có một đường truyền thứ hai nơi mà nó chuyển hướng các gói tin mà không
thể truyền trên đường truyền thứ nhất trong một khoảng thời gian T. Tìm số lượng trung
bình các gói tin được truyền trên đường truyền thứ nhất và số lượng trung bình các gói
tin được truyền trên đường truyền thứ hai.

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.

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 về các chức năng điều chỉnh liên quan để đáp ứng yêu cầu của việc
truyền tải tín hiệu thoại thời gian thực qua mạng gói: xử lý kích thước thông điệp
tùy ý; độ tin cậy và sắp xếp; kiểm soát nhịp độ và luồng dữ liệu; đồng bộ hóa thời
gian; địa chỉ hóa; và quyền riêng tư, tính toàn vẹn và xác thực.

b. So sánh phương pháp từng bước và phương pháp từ đầu đến cuối để đáp ứng
yêu cầu của tín hiệu thoại.

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?

Xem xét giao thức Stop-and-Wait như đã mô tả. Giả sử giao thức được sửa đổi sao
cho mỗi lần một khung bị lỗi được phát hiện tại bộ gửi hoặc bộ nhận, khung đã được
gửi lần cuối sẽ ngay lập tức được gửi lại.
a. Chứng minh rằng giao thức vẫn hoạt động đúng.
b. Liệu sơ đồ chuyển trạng thái cần phải được sửa đổi để mô tả hoạt động mới?
c. Hiệu ứng chính của việc giới thiệu tính năng gửi lại ngay lập tức là gì?

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?

Giả sử có hai tiến trình ngang hàng cung cấp một dịch vụ liên quan đến việc truyền tải các
thông điệp rời rạc. Giả sử các tiến trình ngang hàng được phép trao đổi các đơn vị dữ liệu
giao thức (PDU) có kích thước tối đa là M byte bao gồm H byte tiêu đề. Giả sử một PDU
không được phép mang thông tin từ nhiều hơn một thông điệp.
a. Phát triển một phương pháp cho phép các tiến trình ngang hàng trao đổi các thông điệp
có kích thước tùy ý.
b. Thông tin điều khiển cần thiết cần được trao đổi giữa các tiến trình ngang hàng là gì?
c. Giả sử dịch vụ truyền tải thông điệp đượ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 điệp. Liệu có cần thông tin điều khiển bổ sung,
và nếu có, nó nên được đặt ở đâu?

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?

Một tệp có kích thước 1 Mbyte cần được truyền qua một đường truyền truyền thông tốc
độ 1 Mbps với tỷ lệ lỗi bit là p = 10^-6.
a. Xác suất rằng toàn bộ tệp được truyền mà không có lỗi là bao nhiêu? Lưu ý rằng 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ó cùng kích thước và được truyền riêng biệt. Xác suất
rằng tất cả các khối đến đích một cách đúng đắn và không có lỗi là bao nhiêu? Việc chia
tệp thành khối có giúp ích gì không?

c. Giả sử độ trễ lan truyền không đáng kể, hãy giải thích làm thế nào Stop-and-Wait ARQ
có thể giúp giao tệp một cách không có lỗi. Trung bình, mất bao lâu để giao tệp nếu ARQ
truyền toàn bộ tệp mỗi lần?
.
a.
The probability that the entire file is transmitted without errors is given by:
P = (1 - p)^n
where n is the number of bits in the file and p is the bit error rate.
In this case, n = 1048576 bits (1 Mbyte) and p = 10^-6. So, the probability that the entire
file is transmitted without errors is:
P = (1 - 10^-6)^1048576 ≈ 1
Therefore, the probability that the entire file is transmitted without errors is very close to 1.
b.
The file is broken up into N equal-sized blocks that are transmitted separately. The
probability that all the blocks arrive correctly without error is given by:
P = (1 - p)^N
where N is the number of blocks.
In this case, N is the number of bits in the file divided by the number of bits in each block.
So, the probability that all the blocks arrive correctly without error is:
P = (1 - 10^-6)^N
The probability of a block being transmitted without error is the same as the probability of
the entire file being transmitted without error. So, the probability that all the blocks arrive
correctly without error is also very close to 1.
Dividing the file into blocks does help to improve the reliability of the transmission. This is
because if one block is corrupted, the other blocks are still likely to be transmitted correctly.

c.
Stop-and-Wait ARQ is a simple and effective way to deliver a file in error-free form. The
sender transmits the file one block at a time. The receiver acknowledges each block that it
receives correctly. If the receiver does not receive a block correctly, it sends a negative
acknowledgement. The sender then resends the block.
The Stop-and-Wait ARQ protocol ensures that the file is delivered in error-free form by
retransmitting any blocks that are corrupted. The protocol also ensures that the file is
delivered in the correct order by acknowledging each block that is received correctly.
On the average, it takes 2RTT to deliver a file using Stop-and-Wait ARQ, where RTT is the
round-trip time. This is because the sender has to wait for an acknowledgement before it
can transmit the next block.
Here is a table summarizing the time it takes to deliver a file using Stop-and-Wait ARQ:

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?

Trong hoạt động này, bạn được cung cấp địa chỉ mạng 192.168.1.0/24 để chia mạng con và
cung cấp địa chỉ IP cho mạng trong Packet Tracer. Mỗi mạng LAN trong mạng yêu cầu ít
nhất 25 địa chỉ cho các thiết bị cuối, switch và router. Kết nối giữa R1 và R2 sẽ đòi hỏi một
địa chỉ IP cho mỗi đầu của liên kết.

a. Dựa trên topo, cần bao nhiêu mạng con?


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

Xem xét mạng trong Hình vẽ.

a) Sử dụng thuật toán Dijkstra để tìm tập hợp các đường đi ngắn nhất từ nút 4 đến các nút khác.

b) Tìm tập hợp các mục bảng định tuyến liên quan (Đích, Bước tiếp theo, Chi phí)
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.
Bạn là một kỹ thuật viên mạng được giao nhiệm vụ cài đặt một mạng mới cho một khách
hàng. Bạn phải tạo ra nhiều mạng con từ không gian địa chỉ mạng 192.168.1.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 nhất 50 địa chỉ IP máy chủ.
Mạng con thứ hai là mạng LAN-B. Bạn cần ít nhất 40 địa chỉ IP máy chủ.
Bạn cũng cần ít nhất hai mạng con trống để dành cho việc mở rộng mạng trong tương lai.
Lưu ý: Không sử dụng các mặt nạ mạng con chiều dài biến. Tất cả mặt nạ mạng con của
các thiết bị nên có cùng chiều dài.
Hãy trả lời các câu hỏi sau để giúp tạo ra một kế hoạch chia mạng con đáp ứng các yêu cầu
mạng đã nêu:

a. Cần bao nhiêu địa chỉ máy chủ trong mạng con lớn nhất cần thiết?
b. Số lượng mạng con tối thiểu cần là bao nhiêu?
c. Mạng mà bạn được giao nhiệm vụ chia mạng con là 192.168.1.0/24. Mặt nạ mạng /24
tương ứng với dạng nhị phân là gì?
d. Mặt nạ mạng bao gồm hai phần, phần mạng và phần máy chủ. Điều này được thể hiện
trong dạng nhị phân bằng các số 1 và số 0 trong mặt nạ mạng.

Trong mặt nạ mạng, số 1 và số 0 đại diện cho điều gì?

e. Khi bạn đã xác định được mặt nạ mạng nào đáp ứng tất cả các yêu cầu mạng đã nêu, hãy
tạo ra từng mạng con. Liệt kê các mạng con từ đầu đến cuối trong bảng. 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.
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?

Giả sử rằng Selective Repeat ARQ được sửa đổi sao cho các thông điệp ACK chứa
danh sách của m frames tiếp theo mà nó mong đợi nhận.

Các giải pháp theo sau câu hỏi:

a. Giao thức cần được sửa đổi như thế nào để thích ứng với thay đổi này?

b. Hiệu ứng của thay đổi đối với hiệu suất giao thức là gì?

a.
The Selective Repeat ARQ protocol needs to be modified in the following ways to
accommodate the change:
 The sender needs to keep track of the next m frames that it expects to receive.
 The receiver needs to send an ACK message that contains a list of the next m frames
that it expects to receive.
 The sender needs to retransmit the frames that are not included in the ACK message.

b.
The effect of the change on protocol performance is that it can improve the throughput of
the protocol. This is because the sender does not have to wait for an acknowledgement for
each frame that it sends. Instead, the sender can send multiple frames before receiving an
acknowledgement.
The change can also improve the reliability of the protocol. This is because the receiver can
request retransmission of multiple frames in a single ACK message. This can reduce the
number of frames that are lost or corrupted.
However, the change can also increase the complexity of the protocol. This is because the
sender and receiver need to keep track of the next m frames that they expect to receive.
Here is a table summarizing the effects of the change:

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?
Giả sử kích thước của một tệp văn bản không nén là 1 megabyte.
Lưu ý: Hãy giải thích câu trả lời của bạn một cách chi tiết.
a. Mất bao lâu để tải xuống tệp qua một modem tốc độ 32 kilobit/giây?
b. Mất bao lâu để tải xuống tệp qua một modem tốc độ 1 megabit/giây?
c. Giả sử nén dữ liệu được áp dụng vào tệp văn bản. Thời gian truyền trong các phần (a)
và (b) thay đổi bao nhiêu?
a.
The size of the uncompressed text file is 1 megabyte, which is equal to 1048576 bytes. The
bit rate of the modem is 32 kilobits/second, which is equal to 32000 bits/second.
The time it takes to download the file over the modem is:
time = size / bit rate = 1048576 bytes / 32000 bits/second = 326.4 seconds
b.
The time it takes to download the file over a 1 megabit/second modem is:
time = size / bit rate = 1048576 bytes / 1000000 bits/second = 1.048 seconds
c.
If data compression is applied to the text file, the size of the file will be reduced. The
amount of reduction will depend on the compression algorithm that is used.
For example, if the compression algorithm is able to reduce the size of the file by 50%, then
the time it takes to download the file will be:
• Over a 32 kilobit/second modem: 163.2 seconds.
• Over a 1 megabit/second modem: 0.524 seconds.
The reduction in the size of the file will also reduce the amount of bandwidth that is
required to download the file. This can improve the performance of the network and reduce
the cost of the download.

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.


Cho hàm số g(x) = x^3 + x + 1. Xem xét chuỗi thông tin 1001. Tìm mã từ tương ứng với
chuỗi thông tin trước đó. Bằng cách sử dụng phép toán đa thức, chúng ta thu được
Lưu ý: Hãy giải thích câu trả lời của bạn một cách chi tiết.
Codeword: 1010
Explanation:
The information sequence is 1001. We can represent this sequence as the polynomial:
i(x) = x^2 + x + 1
The generator polynomial is g(x) = x^3 + x + 1. We can use polynomial arithmetic to find
the codeword corresponding to the information sequence.
g(x)= x^3 + x + 1
i(x) = x^2 + x + 1
------------------------
c(x) = x^3 + 1
The codeword is c(x) = x^3+ 1. This can be represented as the binary sequence 1010.
Here is a table summarizing the steps:

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?

Một bộ định tuyến có các mục CIDR sau trong bảng định tuyến của nó:
Địa chỉ/mask Bước tiếp theo

135.46.56.0/22 Giao diện 0

135.46.60.0/22 Giao diện 1

192.53.40.0 /23 Router 1

default Router 2
a) Bộ định tuyến sẽ thực hiện gì nếu một gói tin có địa chỉ IP 135.46.63.10 đến?

b) Bộ định tuyến sẽ thực hiện gì nếu một gói tin có địa chỉ IP 135.46.57.14 đến?

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:

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:

Địa chỉ IP đầu tiên được gán


Địa chỉ IP cuối cùng được gán
Mặt nạ theo định dạng w.x.y.z/s

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.

Giả sử một thực thể tầng ứng dụng muốn gửi một thông điệp có độ dài L byte đến quá
trình đối tác của nó, sử dụng một kết nối TCP hiện có. Đoạn TCP bao gồm thông điệp
cộng với 20 byte tiêu đề. Đoạn TCP được đóng gói vào một gói IP có thêm 20 byte tiêu
đề. Gói IP lần lượt nằm trong một khung Ethernet có 18 byte tiêu đề và phần cuối.

Tỷ lệ phần trăm của các bit truyền trong tầng vật lý tương ứng với thông tin thông điệp
là bao nhiêu, nếu L = 100 byte, 500 byte, 1000 byte.
The percentage of the transmitted bits in the physical layer that correspond to message
information is given by:
message_bits/(message_bits + header_bits + trailer_bits)
The header bits and trailer bits are constant, so the percentage of the transmitted bits that
correspond to message information is inversely proportional to the message length.
For a message length of 100 bytes, the percentage of the transmitted bits that correspond to
message information is:
100 bits/(100 bits + 40 bits + 18 bits) = 46.15%
For a message length of 500 bytes, the percentage of the transmitted bits that correspond to
message information is:
500 bits/(500 bits + 40 bits + 18 bits) = 95.23%
For a message length of 1000 bytes, the percentage of the transmitted bits that correspond
to message information is:
1000 bits/(1000 bits + 40 bits + 18 bits) = 98.44%
As you can see, the percentage of the transmitted bits that correspond to message
information increases as the message length increases. This is because the header bits and
trailer bits are a fixed percentage of the total message length, so the percentage of the
transmitted bits that correspond to message information decreases as the message length
decreases.
Here is a table summarizing the results:
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

Xem xét bước ba trong thiết lập kết nối TCP (three-way handshake).

a) Giả sử một đoạn SYN cũ từ trạm A đến trạm B, yêu cầu một kết nối TCP. Giải thích
làm thế nào thủ tục three-way handshake đảm bảo rằng kết nối bị từ chối.

b) Giả sử bây giờ một đoạn SYN cũ từ trạm A đến trạm B, theo sau một thời gian ngắn
bởi một đoạn ACK cũ từ A đến một đoạn SYN từ B. Liệu kết nối này...

a.
The three-way handshake procedure ensures that the connection is rejected by ensuring that the
sequence numbers in the SYN and ACK segments match. If an old SYN segment from station A
arrives at station B, the sequence number in the SYN segment will be different from the sequence
number that station B expects. Station B will then send a RST segment to station A, which will
reject the connection.
b.
The connection is not established in this case. The ACK segment from A to a SYN segment from B
will be rejected by B because the sequence number in the ACK segment does not match the
sequence number that B expects. B will then send a RST segment to A, which will reject the
connection.
Here is a table summarizing the results:

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.

Giả sử một phần tiêu đề gồm bốn từ 16-bit: (11111111 11111111, 11111111 00000000,
11110000 11110000, 11000000 11000000). Tìm giá trị kiểm tra Internet (Internet
checksum) cho mã này.

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
Xem xét bộ sinh mã 7 bit, G=10011, và giả sử D có giá trị
là 1001010101. Giá trị của R là gì? Hãy trình bày tất cả các
bước để có được kết quả.

Lưu ý: Hãy giải thích câu trả lời của bạn một cách chi tiết.

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 108
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

Giả sử có hai máy chủ, A và B, cách nhau 20.000 kilomet và được kết nối bởi một liên
kết trực tiếp với R = 2 Mbps. Giả sử tốc độ truyền tải trên liên kết là 2.5 x 10^8 mét/giây.
a. Tính sản phẩm băng thông-độ trễ, R x dprop.
b. Xem xét việc gửi một tệp tin có 800.000 bit từ Máy chủ A đến Máy chủ B. Giả sử tệp
tin được gửi liên tục như một thông điệp lớn. Số bit tối đa có thể nằm trong liên kết tại
bất kỳ thời điểm nào là bao nhiêu?
Lưu ý: Hãy giải thích câu trả lời của bạn một cách chi tiết.

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

You might also like