NWC203c PE SU2023
NWC203c PE SU2023
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 ( Liên kết truyền thông 1,5 Mbps là sử dụng HDLC để truyền thông tin
lên mặt trăng. Kích thước khung hình nhỏ nhất có thể cho phép truyền liên tục là bao nhiêu?
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à 3x108
mét/giây )
Answer:
For continuous transmission: use Go-Back-N or Selective Repeat ARQ
Maximum send Window size Maximum send Window size
in default HDLC Frame in extended HDLC Frame
Go-Back-N 7 127
Selective Repeat 4 64
If the extended sequence numbering option (7-bit) is used, the maximum send window
size would be N = 128 – 1 = 127.
So maximum information rate is : N.nf/tcycle = 127*2000/(241.33*10-3) = 1052500 bps =
1.0525 Mbps
4.59 is the average number of packets received that gets transmitted through the first line.
The remaining will get transmitted by the second line.
The average number of packets transmitted through the second line per T second = 6 –
4.59 = 1.41
So, 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.
Answer:
a/Message size is important because in real-time signals of voice it is necessary to
transfer a fixed packet size of that holds no more than 20 ms of the speech signal. The
handling of arbitrary message size is not as important as long as the desired packet size
for voice can be handled.
Sequencing is essential because each packet needs to arrive in the same sequence that it
was generated. Reliability is moderately important since voice transmission can tolerate a
certain level of loss and error.
Pacing and flow control are not as important because the synchronous nature of the voice
signal implies that the end systems will be matched in speed. Timing, for real-time voice
transfer, is important because this adaptation function helps to control the jitter in the
delivered signal.
Addressing is only during the connection setup phase if we assume some form of virtual
circuit packet switching method.
Privacy, integrity, and authentication have traditionally not been as important as the other
issues discussed above.
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
Answer:
a.Bytes each to be transmitted in several PDUs in order to exchange messages of any
size. A single PDU must include all small messages.
b.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.
c.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.
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? (
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.
a. 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? )
Answer:
The file length n = 8x106 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
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 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).
c/We assume the
following: • • • • • • t0 =
basic time to send a
frame
and receive the
ACK/NAK 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).
c/We assume the
following: • • • • • • t0 =
basic time to send a
frame
and receive the
ACK/NAK 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).
c/We assume the
following: • • • • • • t0 =
basic time to send a
frame
and receive the
ACK/NAK 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).
c/
We assume the following:
- t 0= basic time to send a frame and receive the ACK/NAK ≈ ttimeout
-t total = total transmission time until success
-n f ¿ number of bits/frame
nf na
t0 = t f +t ACK = +
R R
(t ¿≈ 0 ¿ ¿
P [ nt =i ]=P[one success after i−1 failure] = (1 - pf ¿ p f i−1
11.
Answer:
We saw that S1, S2, S3, S4, S0/0/0 are the subnets needed, so that there is 5
subnets are needed.
b,
We call N is the number of bits, then N is the smallest number that satisfies
N
4 ×2 −2 ≥ 25
Then we got N = 3.
(4 because 4 is subnet S1, S2, S3 , S4 not S0/0/0)
c,
We saw that number of bits N = 3, then the number of subnets does this create is
3
2 =8.
d.How many usable hosts does this create per subnet? 28-n – 2 = 28-3 – 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
Answer:
Answer:
a.
Iteration N D1 D2 D3 D5 D6
b.
Destination Cost Next Hop
1 (chính là D1) 4 2
2 1 2
3 2 3
5 3 5
6 3 3
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.
d. The ones in the subnet mask represent the network portion of the IP
address, and the zeros represent the host portion. The network portion of
the IP address identifies the network, and the host portion identifies the
individual host on the network.
e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in the
table. Remember that the first subnet is 192.168.12.0 with the chosen subnet mask.
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
Answer:
g(x)=x3+x+1 -> 1011
the information sequence -> 1001
Add 0 to data bits string. It will be 1001000
Divide 1001000 to 1011. Get the remainder
110
Codeword: 1001110
There are two things needed
to be changes:
The frame header needs to be
modified to receive the list of
frames and Since the receiver
explicitly indicates which
frames are needed to be
transmitted.
Change in transmitter
operation is needed. If the
recieved list contains m
oldest frames
that are yet to be received,
then it can be used to skip
retransmission of frames that
have
already been received.
b)
Performance will surely
increase if the error rate is
high or delay is high. A
single frame
can ask for the retransmission
of several frames.
The complexity of the
protocol will surely increase
relative to the unchanged
Selective
repeat ARQ.
There are two things needed
to be changes:
The frame header needs to be
modified to receive the list of
frames and Since the receiver
explicitly indicates which
frames are needed to be
transmitted.
Change in transmitter
operation is needed. If the
recieved list contains m
oldest frames
that are yet to be received,
then it can be used to skip
retransmission of frames that
have
already been received.
b)
Performance will surely
increase if the error rate is
high or delay is high. A
single frame
can ask for the retransmission
of several frames.
The complexity of the
protocol will surely increase
relative to the unchanged
Selective
repeat ARQ.
There are two things needed
to be changes:
The frame header needs to be
modified to receive the list of
frames and Since the receiver
explicitly indicates which
frames are needed to be
transmitted.
Change in transmitter
operation is needed. If the
recieved list contains m
oldest frames
that are yet to be received,
then it can be used to skip
retransmission of frames that
have
already been received.
b)
Performance will surely
increase if the error rate is
high or delay is high. A
single frame
can ask for the retransmission
of several frames.
The complexity of the
protocol will surely increase
relative to the unchanged
Selective
repeat ARQ.
There are two things needed
to be changes:
The frame header needs to be
modified to receive the list of
frames and Since the receiver
explicitly indicates which
frames are needed to be
transmitted.
Change in transmitter
operation is needed. If the
recieved list contains m
oldest frames
that are yet to be received,
then it can be used to skip
retransmission of frames that
have
already been received.
b)
Performance will surely
increase if the error rate is
high or delay is high. A
single frame
can ask for the retransmission
of several frames.
The complexity of the
protocol will surely increase
relative to the unchanged
Selective
repeat ARQ.
There are two things needed
to be changes:
The frame header needs to be
modified to receive the list of
frames and Since the receiver
explicitly indicates which
frames are needed to be
transmitted.
Change in transmitter
operation is needed. If the
recieved list contains m
oldest frames
that are yet to be received,
then it can be used to skip
retransmission of frames that
have
already been received.
b)
Performance will surely
increase if the error rate is
high or delay is high. A
single frame
can ask for the retransmission
of several frames.
The complexity of the
protocol will surely increase
relative to the unchanged
Selective
repeat ARQ.
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?
(b) What does the router do if a packet with an IP address 135.46.57.14 arrives?
Interface 0
Convert to binary
10000111.00101110.001110 00.00000000 (min)
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. Các
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.
Điền vào các bảng bên dưới 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. )
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)
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
Answers
(a)
The three-way handshake procedure ensures that the connection is rejected by ensuring that both
stations have the same sequence numbers. When station A sends a SYN segment, it includes its
sequence number in the segment. Station B then sends an ACK segment back to station A, including its
own sequence number and the sequence number of the SYN segment it received from station A. If
station B receives an old SYN segment from station A, it will not know the sequence number of the SYN
segment it sent back to station A. This means that station B will not be able to acknowledge the SYN
segment from station A, and the connection will be rejected.
(b)
The connection is not established in this case. The old SYN segment from station A will be ignored by
station B, and the old ACK segment from station A will also be ignored by station B. This is because the
sequence numbers in the old SYN segment and the old ACK segment do not match the sequence
numbers that station B expects.
Additional Information
The three-way handshake ensures that both hosts have the same sequence numbers and that the
connection is established in a reliable way.
-----------------
10111111 01110000
01000000 10001111
01000000 10001111
Or => 56814
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.
Here are the steps to get the result:
5. Repeat steps 2-4 until all the bits of D have been processed.
G = 10011
D = 1001010101
=> D & 1 = 1
D = 1001010101
5. Repeat steps 2-4 until all the bits of D have been processed.
=> R = 01000
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 _ 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?
(a)
The bandwidth-delay product is calculated as the product of the link capacity (R)
and the round-trip delay time (dprop). The round-trip delay time is the time it
takes for a signal to travel from one point to another and back again.
In this case, the bandwidth-delay product is:
R * dprop = 2 Mbps * (20,000 km * 1000 m/km) / (2.5 x 108 m/sec) = 160,000 bits