Nwc
Nwc
Solution:.
Similarities
Connection Less:
• Connectionless service comes with a single free-standing data unit for all
transmissions.
• In this, each unit contains all of the protocols that control information
necessary for delivery perspective, but this also contains no provision for
sequencing or flow control.
Differences
Acknowledged:
• This comes with a very simpler version and provides faster communication
for networks, which are inherently reliable or provide service to a higher
layer, that can tolerate loss in the information, or which has built-in error
control/recovery feature.
Differences
Connection-oriented:
• In this type of service, a setup phase will be initialized between sender and
receiver, to establish a context for transferring the information
• This connection is provided to the sender for all SDUs.
• This service requires a stateful protocol, which is used to keep track of
sequence numbers, and timers.
ConnectionLess:
• Here, there will be no prior context provided for transferring the information
between sender and receiver.
• The sender will pass its SDU to an underlying layer without any notice.
• And in this, the sender requires an acknowledgment of SDU delivery.
• The protocols are very different in these services
• this service also does not require transmitting protocols to track the
acknowledgment of PDU.
• After receiving the PDU, the receiver needs to send acknowledgment, If not
received in time, then it will return failure.
Solution:
Go-Back-N
If N = 7:
If N = 127:
Selective Repeat
If N = 4:
If N=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?
Solution:
We have
R = 1,5 Mbps or R = , and = 2000 bits = 250 bytes * 8
D ≈ 36000 km =
The distance that the information must travel is the Earth-to-Satellite Distance, or
The speed of light is c =
We can calculate the propagation delay and processing rate as follows
= = = 0,12 s = 120 ms
= = = 0,00133s = 1,33 ms
In which, is propagation rate, is processing rate.
We can use either Go-Back-N or Selective Repeat ARQ.
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:
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.
Packets:
Data sent over computer networks, such as the Internet, is divided into packets.
These packets are then recombined by the computer or device that receives them.
a)
Sequencing is essential because each packet needs to arrive in the same sequence
that it was generated. Reliability is moderately important since voice transmission
can tolerate a certain level of loss and error.
Pacing and flow control are not as important because the synchronous nature of the
voice signal implies that the end systems will be matched in speed.
Timing, for real-time voice transfer, is important because this adaptation function
helps to control the jitter in the delivered signal.
Addressing is only during the connection setup phase if we assume some form of
virtual circuit packet switching method.
Privacy, integrity, and authentication have traditionally not been as important as the
other issues discussed above.
b)
If the underlying network is reliable then the end-to-end approach is better because
the probability of error is very low so processing at the edge suffices to provide
acceptable performance.
Therefore, the adaptation functions are relevant to meeting the requirements and
the comparison of hop-by-hop approach to an end-to-end approach is provided.
a.
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.
9,
Suppose that two peer-to-peer processes provide a service that involves the
transfer of discrete messages. Suppose that the peer processes are allowed to
exchange PDUs that have a maximum size of M bytes including H bytes of
header. Suppose that a PDU is not allowed to carry information from more than
one message.
a. Develop an approach that allows the peer processes to exchange messages
of arbitrary size.
b. What essential control information needs to be exchanged between the peer
processes?
c. Now suppose that the message transfer service provided by the peer
processes is shared by several message source-destination pairs. Is additional
control information required, and if so, where should it be placed?
a,
To exchange messages of arbitrary size, large messages must be segmented into
parts of M-H bytes
each in length to be transmitted in multiple PDUs.
Small messages must be placed in a single PDU.
b.
The peer processes need to communicate information that allows for the
reassembly of messages at
the receiver.
For example, the first PDU may contain the message length.
The last PDU may contain
and end-of-message marker.
Sequence numbers may also be useful to detect loss in connection
oriented networks and to help in reconstruction of the messages in connectionless
networks.
Lastly,
since variable size PDUs are permitted, the size of the PDU payload must be
transmitted in the PDU
header.
c.
In this case, in addition to all of the header information mentioned in b, each PDU
must be labeled
with a stream ID, so that the receiver can treat each stream independently when
reassembling
messages.
This stream ID may be avoided if the source and destination operate so that they
handle
the transfer of a single message at a time.
For example, this approach is used by AAL5 in ATM.
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.
e-np.
• 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?
• Suppose the propagation delay is negligible, explain how Stop-and-Wait
ARQ can help deliver the file in error-free form. On the average how long
does it take to deliver the file if the ARQ transmits the entire file each
time?
Solution:
The file length n = 8 bits, the transmission rate R = 1 Mbps, and
p=
a. What is the probability that the entire file is transmitted without errors?
Note for n large and p very small,
P[no error in the entire file] = , for n >> 1, p << 1
=
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] =
A block has no error if all subblocks have no errors, so
P[no error in block] =
= + = / R+ / R (prop ≈ 0).
= probability of frame transmission error
Solution:
a. The answer is 5. Four for the LANs (S and R), and one for the link between the
routers (R and R).
b. To support 5 subnets, we need to borrow three bits from the host portion of the
IP address.
Explaination:
We have 5 networks in total, so that if we call N (N > 0) is the number of bits
borrowed, then N is the least number that sastifies
Then N = 3.
c. Borrowing three bits creates = 8 subnets.
Since we have borrowed 3 bits, then the subnet mask becomes
(We can understand that the initial subnet mask is /24, after borrowing 3 bits, the
subnet mask becomes /27)
All the network addresses are listed below
Network Address Usable Host Range Broadcast Address:
192.168.1.0 192.168.1.1 - 192.168.1.30 192.168.1.31
192.168.1.32 192.168.1.33 - 192.168.1.62 192.168.1.63
192.168.1.64 192.168.1.65 - 192.168.1.94 192.168.1.95
192.168.1.96 192.168.1.97 - 192.168.1.126 192.168.1.127
192.168.1.128 192.168.1.129 - 192.168.1.158 192.168.1.159
192.168.1.160 192.168.1.161 - 192.168.1.190 192.168.1.191
192.168.1.192 192.168.1.193 - 192.168.1.222 192.168.1.223
192.168.1.224 192.168.1.225 - 192.168.1.254 192.168.1.255
d. The last octet of an IP address has 8 bits, since we have borrowed 3 bits, so that
the answer is
Solution:
B1
Station Port
S1 1
S3 2
S4 2
S2 1
S5 2
B2
Station Port
S1 2
S3 1
S4 1
S2 1
S5 2
S1 transmits to S5
S3 transmits to S2
S4 transmits to S3
S2 transmits to S1
S5 transmits to S4
13.
Consider the network in Figure.
• 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
• Find the set of associated routing table entries (Destination, Next Hop, Cost)
Solution:
a, We define N is the node 4, D1, D2, D3, D5, D6 is the node 1,2,3,5,6.
Iteration N D1 D2 D3 D5 D6
Initial {N} 5 1 2 3 ~
1 {N, D2} 4, D2 • 2 3 ~
b, Find the set of associated routing table entries (Destination, Next Hop, Cost)
14.
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.
d. In the subnet mask, the ones represent the network portion, and the zeros
represent the host portion. The network portion identifies the network address,
while the host portion identifies individual hosts within the network.
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:
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
Then, we add 110 to the information sequence 1001 to get the codeword:
1001110.
18,
135.46.56.0/22 Interface 0
135.46.60.0/22 Interface 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?
huongdannhanh{
/24 256 1
/23 512 2
/22 1024 4
/21 2048 8
a, 135.46.63.10
10000111.00101110.00111111.00001010
10000111.00101110.00111100.00000000 or 135.46.60.0.
When we perform the bit and operation with 22 leading bit 1s and 10 bit 0s, it is
equivalent of making the last 10 bit zero. We get the following network address bit
pattern: 10000111.00101110.00111100.00000000. The first two bytes are not
changed. The 3rd type changes from 63 to 60 while the 4th byte become zero.
Match with network address in the routing table. The 2rd row matches. The router
will forward the packet to Interface 1.
(b) 135.46.57.14
Taking the first 22 bits of the above IP address as network address, we have
135.45.56.0. It matches the network address of the first row. The packet will be
forwarded to 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:
The start address, the ending address, and the mask are as follows:
We note that is the smallest number that satisfy Replace the last 12 bits of first IP
Address with 1, then we have the last IP Address is
11000110.00010000.00001111.11111111 or 198.16.15.255
The subnet mask is derived by subtracting 12 from 32, resulting in a value of 20,
which is equivalent to using a subnet mask of /20.
(Bạn đọc tự thực hiện phép cộng 2 IP để có được kết quả này)
We note that is the smallest number that satisfy Replace the last 11 bits of first IP
Address with 1, then we have the last IP Address is
11000110.00010000.00010111.11111111 or 198.16.23.255
The subnet mask is derived by subtracting 11 from 32, resulting in a value of 21,
which is equivalent to using a subnet mask of /21.
(Bạn đọc tự thực hiện phép cộng 2 IP để có được kết quả này)
We note that is the smallest number that satisfy But, the 12 last bits of the first IP
are not all zeros, so we have to find the nearest IP that is higher than the first IP and
satisfy that the last 12 bits are zeros. Particularly, it is
or 198.16.32.0
(Bạn đọc tự thấy cái màu xanh lá là cái nhỏ nhất mà lớn hơn màu xanh dương và
thỏa mãn điều kiện 12 bits cuối đều là 0, xanh lá xanh dương chỉ để nhận biết, đi
thi nhớ điền các dòng xanh lá xanh dương vào và mặc kệ dòng màu đỏ này).
Replace the last 12 bits of first IP Address with 1, then we have the last IP Address
is
11000110.00010000.00101111.11111111 or 198.16.47.255.
The subnet mask is derived by subtracting 12 from 32, resulting in a value of 20,
which is equivalent to using a subnet mask of /20.
(Bạn đọc tự thực hiện phép cộng 2 IP để có được kết quả này)
We note that is the smallest number that satisfy But, the 13 last bits of the first IP
are not all zeros, so we have to find the nearest IP that is higher than the first IP and
satisfy that the last 13 bits are zeros. Particularly, it is
or 198.16.64.0
(Bạn đọc tự thấy cái màu xanh lá là cái nhỏ nhất mà lớn hơn màu xanh dương và
thỏa mãn điều kiện 13 bits cuối đều là 0, xanh lá xanh dương chỉ để nhận biết, đi
thi nhớ điền các dòng xanh lá xanh dương vào và mặc kệ dòng màu đỏ này).
Replace the last 13 bits of first IP Address with 1, then we have the last IP Address
is
11000110.00010000.01011111.11111111 or 198.16.95.255.
The subnet mask is derived by subtracting 13 from 32, resulting in a value of 19,
which is equivalent to using a subnet mask of /19.
So in this case, the result is 198.16.64.0 - 198.16.95.255 or can be written as
198.16.64.0/19
20,
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.
The packet in turn goes inside an Ethernet frame that has 18 bytes of header and
trailer.
TCP/IP over Ethernet allows data frames with a payload size up to 1460 bytes.
Therefore, L = 100, 500 and 1000 bytes are within this limit.
21,
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
request also rejected?
a,
In three-way handshake, there are three messages transmitted by TCP to establish
connection between computer.
1. SYN: Client sets the segment sequence number to a random value (say X) and send
SYN message to server.
3. ACK- Finally, Client sends an ACK back to the server and set sequence number to
the recieved acknowledgment number (X+1) and acknowledgment number to one more
than recieved sequence number (Y+1).
In this process, one must ensure that first sequence number(i.e. X) is always unique.
Now, if station B recieves an old SYN segment from station A, station B will
acknowledge request based on old sequence number and send acknowledgment to
station A by adding one more to the recieved old sequence number. A will find out that B
had recieved wrong sequence number. Hence, A will discard the acknowledgment and
reject the connection.
b,
Yes, the connection will get rejected if 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.
Initially when B recieves an old SYN segment from A, B will send a SYN segment with
its own unique sequence number. Now, if B recieves an old ACK from A, B will identify
that the old ACK sequence number doesnot match with the sequence number send by
B previously and notify A that the connection is invalid. That is why the connection will
be rejected.
22, Suppose a header consists of four 16-bit words: (11111111 11111111, 11111111
00000000, 11110000 11110000, 11000000 11000000). Find the Internet
23, 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.
Given data
G = 10011
D = 1001010101
The polynomial expression of G
Thus, R = 0000
24, 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.
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?