0% found this document useful (0 votes)
63 views6 pages

CH A PE NWC - Trình Bày

bbbb

Uploaded by

Vương Ly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views6 pages

CH A PE NWC - Trình Bày

bbbb

Uploaded by

Vương Ly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

14/ 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.

+ Add 0000 (dãy có độ dài = n-1, n: độ dài đa thức sinh) to data bits string. It will be
1001110100110110000
+ Divide 1001110100110110000 to 10111 in modulo-2 method

Note: nhớ thêm dấu ⨁ nhá


+ The transmitted bits string is 1001110100110110010

3 2
1/ Let g1(x) = x + 1 and let g2(x) = 𝑥 + 𝑥 + 1. Consider the information bits
(1,1,0,1,1,1).
a. Find the codeword corresponding to these information bits if g1(x) is used as the generating
polynomial.
b. Find the codeword corresponding to these information bits if g2(x) is used as the generating
polynomial.

G1(x) = x + 1
3 2
G2(x) = 𝑥 + 𝑥 + 1
Data Bit: 110111
a. Use G1(x) = x + 1
⇨ G1(x) = 10 => n=2
+ Add 0 to data bits string. It will be 1101110
+ Divide 1101110 to 10 in module-2 method.
1 => FCS
+ Codeword = 1101111
3 2
b. Use G2(x) = 𝑥 + 𝑥 + 1
Data string: 110111
5 4 2
⇨ Convert this string into polynomial: 𝑥 + 𝑥 + 𝑥 + x + 1
3 8 7 5 4 3
Multiply data polynomial to 𝑥 :𝑥 + 𝑥 + 𝑥 + 𝑥 + 𝑥
8 7 5 4 3 3 2
𝑥 +𝑥 +𝑥 +𝑥 +𝑥 𝑥 +𝑥 +1
8 7 5 5
𝑥 +𝑥 +𝑥 𝑥 +1
4 3
𝑥 +𝑥
4 3
𝑥 +𝑥 +x
x FCS
8 7 5 4 3
=> data: 𝑥 + 𝑥 + 𝑥 + 𝑥 + 𝑥 + x
Codeword: 110111010
2/ Consider the 7-bit generator, G=10111, and suppose that D has the value 1010100001. What
is the value of R? Show your all steps to have result. (trình bày như câu 14)
G: G = 10111
D = 1010100001
+ Add 0000 to data bits string. It will be 10101000010000
+ Divide 10101000010000 to 10111 in modulo-2 method
Tính toán ở đây, ra dk FCS chính là R
+ Therefore the value of R = …. (có độ dài = độ dài của G -1)

3
6/ Let g(x) = 𝑥 + 𝑥 + 1. Consider the information sequence 1011. Find the codeword
corresponding to the preceding information sequence. Using polynomial arithmetic we obtain
3
G: g(x) = 𝑥 + 𝑥 + 1 ⇒ G = 1011
+ Add 000 to data bits string. It will be 1011000
+ Divide 1011000 to 1011 in modulo-2 method
Tính toán
+ Codeword = 1011000
3/ Consider the following network Figure 1. With the indicated link costs, use Dijkstra’s
shortest-path algorithm to compute the shortest path from u to all network nodes. Show how
the algorithm works by computing a table.

Step Node U V W X Y Z

0 ~ ~ ~ ~ ~ ~

1 U - 2,U 5,U 1,U ~ ~

2 U,X - 2,U 5,U - 2,X ~

3 U,X,V - - 5,U - 2,X ~

4 U,X,V,Y - - 5,U - - 5,Y


5 U,X,V,Y,W - - - - - 5,Y

6 U,X,V,Y,W,Z - - - - - -

From U to Z: …….

4/ A router has the following CIDR entries in its routing table:


Address/mask Next hop
135.46.56.0/22 Interface 0
135.46.60.0/22 Interface 1
192.53.40.0 /23 Router 1
default Router 2
(a) What does the router do if a packet with an IP address 135.46.63.10 arrives?
(b)What does the router do if a packet with an IP address 135.46.57.14 arrives?

a/ IP: 135.46.63.10 subnet mask/22 means Taking the first 22 bits of 135.46.63.10 as network
address
Applying subnet mask/ 22 we have:
135.46. 001111 11.00001010 / 22
we get => 135.46.60.0/22
Match with network address in the routing table. The 2rd row matches. The router will forward
the packet to Interface 1.
b/ IP: 135.46.57.14 subnet mask/22 means Taking the first 22 bits of 135.46.57.14 as network
address
Applying subnet mask/ 22 we have:
135.46. 001110 01.00001110 / 22
we get => 135.46.56.0/22
𝑠𝑡
Match with network address in the routing table. The1 row matches. The router will forward
the packet to Interface 0.

5/ Suppose two hosts, A and B, are separated by 30,000 kilometers and are connected by a
8
direct link of R = 3 Mbps. Suppose the propagation speed over the link is 2.5 x 10 meters/sec.
a. Calculate the bandwidth-delay product, R _ dprop.
b. Consider sending a file of 900,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 distance (Distance) between two hosts A and B = 30000 km = 3.10^7 m
Transmission rate(R) of the direct link between A and B =3Mbps = 3.10^6 bps
a. Calculate the propagation delay:
𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒
𝑑𝑝𝑟𝑜𝑔 = 𝑆𝑝𝑒𝑒𝑑
= (3.10^7) / (2,5.10^8) = 0,12 (s)
Calculate the band-width delay product:
R * d𝑝𝑟𝑜𝑔 = 3. 10^6 . 0,12 = 36.10^4 (bits)
Band-width delay product: 36.10^4 bits
b. Size of the file =900000 bits
According part a, the band-width delay product: 36.10^4 bits
Therefore, the maximum number of bits at a given time will be 36.10^4 bits.

7/ A packet switch receives a packet and determines the outbound link to which the packet
should be forwarded. When the packet arrives, one other packet is halfway done being
transmitted on this outbound link and four other packets are waiting to be transmitted. Packets
are transmitted in order of arrival.
Suppose all packets are 2,500 bytes and the link rate is 3 Mbps. What is the queuing delay for
the packet? More generally, what is the queuing delay when all packets have length L, the
transmission rate is R, x bits of the currently-being- transmitted packet have been transmitted,
and n packets are already in the queue?

Packet length = L;
Transmission rate = R;
Current transmitted packet = x bits;
Waiting queue = n packets
+) Generally, queuing delay = [nL + (L - x) ] / R (đề hỏi)
+) With data:
L = 2500 bytes
R = 3 Mbps = 3.10^6 bps
x = 2500 / 2 = 1250 bytes (packet is halfway done being transmitted)
n = 4 (four packets are waiting to be transmitted)
Packets are transmitted at 3Mbps:
nL + (L - x) = 4.2500 + (2500 - 1250) = 11250 bytes = 90000 bits
So, queuing delay = 90000 / 3.10^6 = 0,03 sec

8/ Suppose a header consists of four 16-bit words: (11111111 11111110, 11111111 00000000,
11110000 11110000, 11000000 11000001). Find the Internet checksum for this code

11111111 11111110
11111111 00000000
11110000 11110000
11000000 11000001

10110000 10110000
11

10110000 10110011
The sum = 10110000 10110011
Now let's take the 1's complement: checksum = 01001111 01001100
So the Internet checksum = 01001111 01001100

9/ Consider a packet of length 2,000 bytes that propagates over a link of distance 3,500 km
with propagation speed of 2,5.10^8 m/s (tốc độ lan truyền), and transmission rate 2 Mbps?
a. How long does the packet propagation take?
b. Does this propagation delay depend on the packet length?
c. Does this propagation delay depend on the transmission rate?

distance = 3500 km = 3500000 m


Propagation speed = 2,5.10^8 m/s
a. The packet propagation time = distance / propagation speed
= 3500000 / 2,5.10^8 = 0,014 sec
b. No, the propagation delay depend on packet length is not true
c. No, propagation delay depend on the transmission rate is not true

10/ Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has
three links, of rates R1 = 250 kbps, R2 = 3 Mbps, and R3 = 2 Mbps.
a. Assuming no other traffic in the network, what is the throughput for the file transfer?
b. Suppose the file is 4 million bytes. Dividing the file size by the throughput, roughly how
long will it take to transfer the file to Host B? (throughput: thông lượng)

R1 = 250 kbps, R2 = 3 Mbps, R3 = 2 Mbps


a/ throughput = min(R1, R2, R3) = 250 kbps
b/ File size = 4.10^6 bytes = 32.10^6 bits
throughput = 250 kbps = 250000 bps
Transfer time = file size / throughput = 32.10^6 / 250000 = 128 sec

11/ 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 = 200 bytes, 1000 bytes, 2000 bytes

TCP/IP over Ethernet allows data frames with a payload size up to 1460 bytes.
Therefore, L = 200 and 1000 bytes are within this limit. And L = 2000 is outside this limit so it
is divided into 2 parts
The message overhead includes:
• TCP: 20 bytes of header
• IP: 20 bytes of header
• Ethernet: total 18 bytes of header and trailer.
So, percentage of the transmitted bits in the physical layer correspond to message information:
L = 200 bytes, H = 200 / 258 * 100% = 77, 52 %
L = 1000 bytes, H = 1000 / 1058 * 100% = 94, 52 %
L = 2000 bytes, H = 2000 / 2116 * 100 % = 94,52 %

12/ Suppose the size of an uncompressed text file is 1 megabyte


a. How long does it take to download the file over a 35 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
35 kilobit and 1 megabit lines respectively

Size file = 1 megabyte = 2^20 bytes = 8.2^20 bits


a/ 35 kilobit/second = 35000 bit/s
Time to download the file over a 35 kilobit/second modem:
𝑇32𝑘 = 8.2^20 / 35000 = 239,67 sec
b/ 1 megabit/second = 10^6 bit/s
Time to download the file over a 1 megabit/second modem:
𝑇1𝑀 = 8.2^20 / 10^6 = 8,39 sec
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:
𝑇32𝑘 = 8.2^20 / (35000 * 6) = 40,94 sec
𝑇1𝑀 = 8.2^20 / (10^6 * 6) = 81,4 sec
13/ Consider the three-way handshake in TCP’s 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 unlikely accepted. (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 station A to a SYN segment from B. Is this
connection request also rejected? (consider old segments as duplicate segments)

a/ In a three-way handshake procedure, one must ensure the selection of the initial sequence
number is always unique. If station B receives an old SYN segment from A, B will
acknowledge the request based on the old sequence number. When A receives the
acknowledgment segment from B, A will find out that B received a wrong sequence number. A
will discard the acknowledgment packet and reset the connection.

b/ If an old SYN segment from A arrives at B, followed by an old ACK segment from A to a
SYN segment from B, the connection will also be rejected. Initially, when B receives an old
SYN segment, B will send a SYN segment with its own distinct sequence number set by itself.
If B receives the old ACK from A, B will notify A that the connection is invalid since the old
ACK sequence number does not match the sequence number previously defined by
B. Therefore, the connection is rejected.

You might also like