NWCPE Sum23
NWCPE Sum23
NWCPE Sum23
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:
Unacknowledged:
+ 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.
HDLC PPP
HDLC stands for High-Level data link PPP stands for Point-To-Point protocol
control
It is a Bit-oriented protocol It is a Byte-oriented protocol
The HDLC protocol is only used for the The PPP protocol is used for both the
synchronous media asynchronous media as well as
synchronous media
It is an older protocol as compared to It is the newer protocol as compared to
PPP protocol so it does not provide any HDLC protocol which means that it
kind of authentication does provide the authentication.
In this, the addressing is not dynamic In this, the addressing is dynamic which
which means that the addressing is makes it quite more reliable than the
purely static. HDLC protocol.
As the HDLC protocol is quite old The PPP protocol is relatively newer
school which purely signifies that it does than the HDLC protocol which signifies
not support non-cisco devices at all. that it does support the non-cisco
devices.
It is more costlier than PPP It is less costlier than HDLC
Solution:
For continuous transmission: Use Go-Back-N or Selective Repeat ARQ
Go-Back-N
7 nf
If N = 7: =2.5 s=¿ nf =535714,3 bits
1.5 Mbps
127 nf
If N = 127: =2.5 s=¿ nf =29527,5 bits
1.5 Mbps
Selective Repeat
4 nf
If N = 4: =2.5 s=¿ nf =937500 bits
1.5 Mbps
64 nf
If N=64: =2.5 s=¿ nf =58593,75 bits
1.5 Mbps
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 = 1,5 ×1 06 bps, and n f = 2000 bits = 250 bytes * 8
The distance that the information must travel is the Earth-to-Satellite Distance, or
D ≈ 36000 km = 3,6 ×1 07 m
The speed of light is c = 3 ×1 08 m
We can calculate the propagation delay and processing rate as follows
D 3,6 ×1 07
t¿ = = = 0,12 s = 120 ms
c 3× 1 08
nf 2000
tf = = = 0,00133s = 1,33 ms
R 1,5× 10 6
¿ 58011,85 bps
In which, n is number of bits transmitted in a cycle, Rmax is the number of bits sent in a
cycle / minimum cycle time.
¿ 1052500,725 bps
¿ 33149,63 bps
¿ 530394,07 bps
Solution:
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
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.
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)
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.
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?
Solution:
The file length n = 8 ×10 6 bits, the transmission rate R = 1 Mbps, and
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
P[no error in the entire file] = ( 1− p )n ≈ e−np, for n >> 1, p << 1
= e−8=3.35× 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 error if all subblocks have no errors, so
P[no error in block] = P [ no error ∈subblock ] N
( ) =( 1− p )
n N
N n
¿ ( 1− p )
n f = number of bits/frame
nt = number of transmissions
t total | i transmissions = i . t 0
∞ ∞
t 0 ( 1−Pf ) t0
E[t total] = ∑ i t 0 P [ nt =i ]=t o (1−P f ) ∑ i P f =
i−1
=
i=1 i=1 ( 1−P f )
2
(1−P f )
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.
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
2 N ≥5
Then N = 3.
(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.129 -
192.168.1.128 192.168.1.159
192.168.1.158
192.168.1.161 -
192.168.1.160 192.168.1.191
192.168.1.190
192.168.1.193 -
192.168.1.192 192.168.1.223
192.168.1.222
192.168.1.225 -
192.168.1.224 192.168.1.255
192.168.1.254
d. The last octet of an IP address has 8 bits, since we have borrowed 3 bits, so that
the answer is
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.
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.
a) Use the Dijkstra algorithm to find the set of shortest paths from node 4 to other
nodes.
Iterati N D D D D D
on 1 2 3 5 6
Initial
b) 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.
Iteratio N D1 D2 D3 D5 D6
n
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.
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:
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.
a. The largest required subnet is LAN-A, which needs a minimum of 50 host IP
addresses (since LAN-B needs a minimum of 40 host IP addresses, which is lower
than 50).
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:
a,
2 things are needed to be changed:
- 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 received list contains the
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.
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?
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
Let g ( x )=x 3+ x+1. Consider the information sequence 1001. Find the codeword
corresponding to the preceding information sequence. Using polynomial
arithmetic we obtain
Given an information polynomial code is g ( x )=x 3+ x+1
Now we rewrite the polynomial code as 1 × x 3+ 0 × x 2+1 × x +1 ×1 as 1011
Since polynomial is of order (3 is the higest power of g(x))
So, we add three zeros in the information sequence.
Therefore, the new polynomial code is 1001 000
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?
a, 135.46.63.10
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,
The start address, the ending address, and the mask are as follows:
We note that n=12 is the smallest number that satisfy 2n≥4000. 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 n=11 is the smallest number that satisfy 2n≥2000. 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 n=12 is the smallest number that satisfy 2n≥4000. 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
11000110.00010000.00100000 .00000000 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 n=13 is the smallest number that satisfy 2n≥8000. 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
11000110.00010000.01000000 .00000000 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.
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.
Therefore
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.
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
4 3 2
G=x ∗1+ x ∗0+ x ∗0+ x∗1+1∗1
4
¿ x + x +1
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?