Category: Subjects

Stop and Wait ARQ | Go back N | SR Protocol

Flow Control Protocols-

 

In computer networking, there are various flow control protocols-

 

 

Sliding Window Protocol-

 

  • Sliding window protocol allows the sender to send multiple frames before needing the acknowledgements.
  • It is more efficient.

 

Read More- Sliding Window Protocol

 

Implementations-

 

Various implementations of sliding window protocol are-

  1. Stop and Wait ARQ
  2. Go back N
  3. Selective Repeat

 

In this article, we will compare these sliding window protocols.

 

Comparison Table-

 

Stop and Wait ARQ Go back N Selective Repeat Remarks
Efficiency 1 / (1+2a) N / (1+2a) N / (1+2a) Go back N and Selective Repeat gives better efficiency than Stop and Wait ARQ.
Window Size Sender Window Size = 1

Receiver Window Size = 1

Sender Window Size = N

Receiver Window Size = 1

Sender Window Size = N

Receiver Window Size = N

Buffer requirement in Selective Repeat is very large.

If the system does not have lots of memory, then it is better to choose Go back N.

Minimum number of sequence numbers required 2 N+1 2 x N Selective Repeat requires large number of bits in sequence number field.
Retransmissions required if a packet is lost Only the lost packet is retransmitted The entire window is retransmitted Only the lost packet is retransmitted Selective Repeat is far better than Go back N in terms of retransmissions required.
Bandwidth Requirement Bandwidth requirement is Low Bandwidth requirement is high because even if a single packet is lost, entire window has to be retransmitted.

Thus, if error rate is high, it wastes a lot of bandwidth.

Bandwidth requirement is moderate Selective Repeat is better than Go back N in terms of bandwidth requirement.
CPU usage Low Moderate High due to searching and sorting required at sender and receiver side Go back N is better than Selective Repeat in terms of CPU usage.
Level of difficulty in Implementation Low Moderate Complex as it requires extra logic and sorting and searching Go back N is better than Selective Repeat in terms of implementation difficulty.
Acknowledgements Uses independent acknowledgement for each packet Uses cumulative acknowledgements (but may use independent acknowledgements as well) Uses independent acknowledgement for each packet Sending cumulative acknowledgements reduces the traffic in the network but if it is lost, then the ACKs for all the corresponding packets are lost.
Type of Transmission Half duplex Full duplex Full duplex Go back N and Selective Repeat are better in terms of channel usage.

 

Conclusions-

 

  • Go back N is more often used than other protocols.
  • SR protocol is less used because of its complexity.
  • Stop and Wait ARQ is less used because of its low efficiency.
  • Depending on the context and resources availability, Go back N or Selective Repeat is employed.
  • Selective Repeat and Stop and Wait ARQ are similar in terms of retransmissions.
  • Go back N and Selective Repeat are similar in terms of efficiency if sender window sizes are same.
  • SR protocol may be considered as a combination of advantages of Stop and Wait ARQ and Go back N.
  • SR protocol is superior to other protocols but because of its complexity, it is less used.

 

Important Notes-

 

Note-01:

 

Protocols at data link layer like HDLC (Low level protocols) use Go back N.

This is because-

  1. Bandwidth is high
  2. CPU is very busy doing routing job
  3. Error rate is low since out of order packets are not possible in wired medium

 

Note-02:

 

Protocols at transport layer like TCP (High level protocols) use selective repeat.

 

PRACTICE PROBLEMS BASED ON SLIDING WINDOW PROTOCOLS-

 

Problem-01:

 

If the bandwidth between the sender and receiver is sufficient, CPU and buffers are moderate, then which flow control protocol would you suggest to use?

 

Solution-

 

The suggested protocol would be Go back N.

 

Problem-02:

 

If the bandwidth between the sender and receiver is moderate, CPU and buffers are sufficient, then which flow control protocol would you suggest to use?

 

Solution-

 

The suggested protocol would be Selective Repeat.

 

To gain better understanding about sliding window protocols comparison,

Watch this Video Lecture

 

Next Article- Miscellaneous Problems On Flow Control Protocols

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Transmission Control Protocol | Practice Problems

PRACTICE PROBLEMS BASED ON TRANSMISSION CONTROL PROTOCOL-

 

Problem-01:

 

How many TCP connections can be opened between two ports?

  1. Multiple
  2. Single
  3. Zero
  4. None

 

Solution-

 

Option (B) is correct.

 

Problem-02:

 

TCP protects itself from miss delivery by IP with the help of-

  1. Source IP Address in IP header
  2. Destination IP Address in IP header
  3. Pseudo header
  4. Source port and Destination port

 

Solution-

 

Option (C) is correct.

 

Problem-03:

 

What addressing system has topological significance?

  1. Logical or Network Address
  2. LAN or Physical Address
  3. Port Addressing System
  4. Multicast Addressing System

 

Solution-

 

Option (A) is correct.

 

Problem-04:

 

If WAN link is 2 Mbps and RTT between source and destination is 300 msec, what would be the optimal TCP window size needed to fully utilize the line?

  1. 60,000 bits
  2. 75,000 bytes
  3. 75,000 bits
  4. 60,000 bytes

 

Solution-

 

Given-

  • Bandwidth = 2 Mbps
  • RTT = 300 msec

 

Optimal TCP Window Size-

 

Optimal TCP window size

= Maximum amount of data that can be sent in 1 RTT

= 2 Mbps x 300 msec

= 600 x 103 bits

= 60,0000 bits

= 75,000 bytes

 

Thus, Option (B) is correct.

 

Problem-05:

 

Suppose host A is sending a large file to host B over a TCP connection. The two end hosts are 10 msec apart (20 msec RTT) connected by a 1 Gbps link. Assume that they are using a packet size of 1000 bytes to transmit the file. For simplicity, ignore ack packets. At least how big would the window size (in packets) have to be for the channel utilization to be greater than 80%?

  1. 1000
  2. 1500
  3. 2000
  4. 2500

 

Solution-

 

Given-

  • RTT = 20 msec
  • Bandwidth = 1 Gbps
  • Packet size = 1000 bytes
  • Efficiency >= 80%

 

Window Size For 100% Efficiency-

 

For 100% efficiency,

Window size

= Maximum number of bits that can be transmitted in 1 RTT

= 1 Gbps x 20 msec

= (109 bits per sec) x 20 x 10-3 sec

= 20 x 106 bits

= 2 x 107 bits

 

Window Size For 80% Efficiency-

 

For 80% efficiency,

Window size

= 0.8 x 2 x 107 bits

= 1.6 x 107 bits

 

In terms of packets,

Window size

= 1.6 x 107 bits / Packet size

= 1.6 x 107 bits / (1000 x 8 bits)

= 0.2 x 104 packets

= 2000 packets

 

Thus, Option (C) is correct.

 

Problem-06:

 

A TCP machine is sending windows of 65535 B over a 1 Gbps channel that has a 10 msec one way delay.

  1. What is the maximum throughput achievable?
  2. What is the line efficiency?

 

Solution-

 

Given-

  • Window size = 65535 bytes
  • Bandwidth = 1 Gbps
  • One way delay = 10 msec

 

Method-01:

 

Maximum amount of data that can be sent in 1 RTT

= 1 Gbps x (2 x 10 msec)

= (109 bits per sec) x 20 x 10-3 sec

= 20 x 106 bits

= 25 x 105 bytes

 

Amount of data that is actually being sent in 1 RTT = 65535 bytes

 

Thus,

Line Efficiency(η)

= Amount of data being sent in 1 RTT / Maximum amount of data that can be sent in 1 RTT

= 65535 bytes / 25 x 105 bytes

= 0.026214

= 2.62%

 

Now,

Maximum Achievable Throughput

= Efficiency x Bandwidth

= 0.0262 x 1 Gbps

= 26.214 Mbps

 

Method-02:

 

Maximum Achievable Throughput

= Number of bits sent per second

= 65535 B / 20 msec

= (65535 x 8 bits) / (20 x 10-3 sec)

= 26.214 Mbps

 

Now,

Line Efficiency

= Throughput / Bandwidth

= 26.214 Mbps / 1 Gbps

= 26.214 x 10-3

= 0.026214

= 2.62%

 

Next Article- TCP Congestion Control

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

IP Header | IP Fragmentation | Problems

IP Fragmentation-

 

Before you go through this article, make sure that you have gone through the previous article on IP Fragmentation.

 

We have discussed-

  • IP Fragmentation is a process of dividing the datagram into fragments during its transmission.
  • It is performed by intermediary devices at destination side at network layer.

 

Also Read- IP Header

 

In this article, we will discuss practice problems based on IP Header and IP Fragmentation.

 

PRACTICE PROBLEMS BASED ON IP HEADER AND IP FRAGMENTATION-

 

Problem-01:

 

The intermediate routers between source and destination need the following information in IP header-

  1. Version
  2. Protocol
  3. Identification Number
  4. Source IP Address

 

Solution-

 

Option-A:

 

  • Version field indicates the version of IP used.
  • This information is required to process the packet appropriately based on its version.

 

Option-B:

 

  • Protocol field indicates the next level protocol.
  • This information is required by the router to accept or discard the packet if its buffer is full.
  • Based on the priority, router takes its decision.

 

Option-C:

 

  • Identification number field identifies the fragments of the same datagram.
  • This information is required while re-assembling the datagram fragments.

 

Option-D:

 

  • Source IP Address field indicates the IP Address of the source.
  • This information is required by the router to send ICMP packet to the source.
  • ICMP packet informs the source that its packet has been discarded.

 

Thus, All these fields are required in the IP Header.

 

Problem-02:

 

Fragmentation of a datagram is needed in-

  1. Datagram circuit only
  2. Virtual circuit only
  3. Both (A) and (B)
  4. None

 

Solution-

 

  • Each network has its Maximum Transmission Unit (MTU).
  • If the size of data packet is greater than MTU, then it will have divided into fragments to transmit it through the network.
  • So, fragmentation may be required in datagram circuits as well as virtual circuits.
  • Thus, Option (C) is correct.

 

Problem-03:

 

What are all the fields required from IP header to allow the destination to perform reassembly of fragments?

  1. Identification, MF, Offset, Header length and Total length
  2. MF, Offset and Destination IP
  3. MF, Datagram length, Source IP
  4. MF, Options and Offset

 

Solution-

 

Clearly, Option (A) is correct.

 

Problem-04:

 

The checksum in IP must be recomputed at every router because of change in ____ fields.

  1. TTL, Options, Identification Number, Offset
  2. TTL, Options, Datagram Length, Offset
  3. TTL, Options, Data, Offset
  4. TTL, Header Length, Offset, ToS

 

Solution-

 

Clearly, Option (B) is correct.

 

Problem-05:

 

If the value available in “fragment offset” field of IP header is 100, then the number of bytes ahead of this fragment is ___ ?

  1. 100 B
  2. 400 B
  3. 800 B
  4. 200 B

 

Solution-

 

  • Fragment offset field use a scaling factor of 8.
  • If Fragment offset field value = 100, then fragment offset = 8 x 100 = 800.
  • It suggests 800 bytes of data is ahead of this fragment.
  • Thus, Option (C) is correct.

 

Problem-06:

 

When the source does not trust the routers to route properly or source wishes to make sure that the packet does not stray from specified path, what options can be used?

  1. Loose source routing
  2. Trace route
  3. Strict source routing
  4. Internet Time Stamp

 

Solution-

 

Clearly, Option (C) is correct.

 

Problem-07:

 

The checksum computation in IP header includes-

  1. IP header only
  2. IP header and data
  3. IP header and Pseudo header
  4. None

 

Solution-

 

  • Checksum computation in IP header includes IP header only.
  • Errors in the data field are handled by the encapsulated protocol.
  • Thus, Option (A) is correct.

 

Problem-08:

 

Suppose a router receives an IP packet containing 600 data bytes and has to forward the packet to a network with maximum transmission unit of 200 bytes. Assume that IP header is 20 bytes long. What are fragment offset values for divided packets?

  1. 22, 44, 66, 88
  2. 0, 22, 44
  3. 0, 22, 44, 66
  4. 22, 44, 66

 

Solution-

 

Given-

  • MTU size of the destination network = 200 bytes
  • IP header length = 20

 

Now,

  • Maximum amount of data that can be sent in one fragment = 200 – 20 = 180 bytes.
  • Amount of data sent in a fragment must be a multiple of 8.
  • So, maximum data sent that can be in one fragment = 176 bytes.

 

Thus, 4 fragments are created-

  • 1st fragment contains 176 bytes of data.
  • 2nd fragment contains 176 bytes of data.
  • 3rd fragment contains 176 bytes of data.
  • 4th fragment contains 72 bytes of data

 

So,

  • Fragment offset value for 1st fragment = 0
  • Fragment offset value for 2nd fragment = 176 / 8 = 22
  • Fragment offset value for 3rd fragment = (176+176) / 8 = 44
  • Fragment offset value for 4th fragment = (176 + 176 + 176) / 8 = 66

 

Thus, Option (C) is correct.

 

To watch video solution and practice other problems,

Watch this Video Lecture

 

Next Article- Transmission Control Protocol | TCP

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

UDP Protocol | UDP Header | UDP Header Format

Transport Layer Protocols-

 

There are mainly two transport layer protocols that are used on the Internet-

 

 

  1. Transmission Control Protocol (TCP)
  2. User Datagram Protocol (UDP)

 

In this article, we will discuss about User Datagram Protocol (UDP).

Learn about Transmission Control Protocol.

 

UDP Protocol-

 

  • UDP is short for User Datagram Protocol.
  • It is the simplest transport layer protocol.
  • It has been designed to send data packets over the Internet.
  • It simply takes the datagram from the network layer, attaches its header and sends it to the user.

 

Characteristics of UDP-

 

  • It is a connectionless protocol.
  • It is a stateless protocol.
  • It is an unreliable protocol.
  • It is a fast protocol.
  • It offers the minimal transport service.
  • It is almost a null protocol.
  • It does not guarantee in order delivery.
  • It does not provide congestion control mechanism.
  • It is a good protocol for data flowing in one direction.

 

Need of UDP-

 

  • TCP proves to be an overhead for certain kinds of applications.
  • The Connection Establishment Phase, Connection Termination Phase etc of TCP are time consuming.
  • To avoid this overhead, certain applications which require fast speed and less overhead use UDP.

 

UDP Header-

 

The following diagram represents the UDP Header Format-

 

 

1. Source Port-

 

  • Source Port is a 16 bit field.
  • It identifies the port of the sending application.

 

2. Destination Port-

 

  • Destination Port is a 16 bit field.
  • It identifies the port of the receiving application.

 

3. Length-

 

  • Length is a 16 bit field.
  • It identifies the combined length of UDP Header and Encapsulated data.

 

Length = Length of UDP Header + Length of encapsulated data

 

4. Checksum-

 

  • Checksum is a 16 bit field used for error control.
  • It is calculated on UDP Header, encapsulated data and IP pseudo header.
  • Checksum calculation is not mandatory in UDP.

 

Applications Using UDP-

 

Following applications use UDP-

  • Applications which require one response for one request use UDP. Example- DNS.
  • Routing Protocols like RIP and OSPF use UDP because they have very small amount of data to be transmitted.
  • Trivial File Transfer Protocol (TFTP) uses UDP to send very small sized files.
  • Broadcasting and multicasting applications use UDP.
  • Streaming applications like multimedia, video conferencing etc use UDP since they require speed over reliability.
  • Real time applications like chatting and online games use UDP.
  • Management protocols like SNMP (Simple Network Management Protocol) use UDP.
  • Bootp / DHCP uses UDP.
  • Other protocols that use UDP are- Kerberos, Network Time Protocol (NTP), Network News Protocol (NNP), Quote of the day protocol etc.

 

Important Notes-

 

Note-01:

 

Size of UDP Header= 8 bytes

 

  • Unlike TCP header, the size of UDP header is fixed.
  • This is because in UDP header, all the fields are of definite size.
  • Size of UDP Header = Sum of the size of all the fields = 8 bytes.

 

Note-02:

 

UDP is almost a null protocol.

 

This is because-

  • UDP provides very limited services.
  • The only services it provides are checksumming of data and multiplexing by port number.

 

Note-03:

 

UDP is an unreliable protocol.

 

This is because-

  • UDP does not guarantee the delivery of datagram to its respective user (application).
  • The lost datagrams are not retransmitted by UDP.

 

Note-04:

 

Checksum calculation is not mandatory in UDP.

 

This is because-

  • UDP is already an unreliable protocol and error checking does not make much sense.
  • Also, time is saved and transmission becomes faster by avoiding to calculate it.

 

It may be noted-

  • To disable the checksum, the field value is set to all 0’s.
  • If the computed checksum is zero, the field value is set to all 1’s.

 

Note-05:

 

UDP does not guarantee in order delivery.

 

This is because-

  • UDP allows out of order delivery to ensure better performance.
  • If some data is lost on the way, it does not call for retransmission and keeps transmitting data.

 

Note-06:

 

Application layer can perform some tasks through UDP.

 

Application layer can do the following tasks through UDP-

  1. Trace Route
  2. Record Route
  3. Time stamp

 

When required,

  • Application layer conveys to the UDP which conveys to the IP datagram.
  • UDP acts like a messenger between the application layer and the IP datagram.

 

Also Read- TCP Header | IPv4 Header

 

PRACTICE PROBLEMS BASED ON UDP HEADER-

 

Problem-01:

 

Which field is optional in UDP?

  1. Checksum
  2. Destination port
  3. Length
  4. None

 

Solution-

 

  • Checksum calculation is not mandatory in UDP.
  • Thus, Option (A) is correct.

 

Problem-02:

 

The pseudo header of IP is used in-

  1. Only TCP
  2. Only UDP
  3. Both TCP and UDP
  4. None

 

Solution-

 

  • IP Pseudo header is used in both TCP and UDP while calculating checksum.
  • Thus, Option (C) is correct.

 

Problem-03:

 

Broadcasting applications like WHOD (who daemon on UNIX) uses what transport layer protocol?

  1. TCP
  2. UDP
  3. Either TCP or UDP
  4. IGMP

 

Solution-

 

  • Broadcasting and multicasting applications use UDP.
  • Thus, Option (B) is correct.

 

To gain better understanding about UDP Header,

Watch this Video Lecture

 

Next Article- Application Layer Protocols

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Token Ring | Token Passing | Practice Problems

PRACTICE PROBLEMS BASED ON TOKEN RING AND TOKEN PASSING-

 

Before you go through this article, make sure that you have gone through the previous article on Token Passing.

 

Problem-01:

 

Token ring station operates in which of the following modes?

  1. Transit mode
  2. Listen mode
  3. Bypass mode and Receive mode
  4. All of the above

 

Solution-

 

  • In transmit mode, a station transmits the data.
  • In listen mode, a station listens from other station(s).
  • In bypass mode, a station simply bypasses the data packet if it is not meant for it.
  • In receive mode, a station receives the data packet if it is destined to it.

Therefore, a token ring station operates in all these modes.

Thus, Option (D) is correct.

 

Problem-02:

 

Efficiency of the token ring is high if-

  1. Reinsert the token after receiving the last bit of the frame
  2. Reinsert the token after receiving the last bit of the header
  3. Reinsert the token after last bit of the data packet is transferred
  4. Reinsert the token after last bit of the header is transferred

 

Solution-

 

  • There are two strategies used in token ring- Early Token Reinsertion (ETR) and Delayed Token Reinsertion (DTR).
  • Efficiency of token ring is high in Early Token Reinsertion (ETR).

Thus, Option (C) is correct.

 

Problem-03:

 

The sending station in IEEE 802.5 sets the address recognized (A) bit and frame copied (C) bit in MAC header as

  1. 1,0
  2. 0,0
  3. 0,1
  4. 1,1

 

Solution-

 

  • IEEE 802.5 is token ring.
  • Sending station sets both the available bit and copied bit as 0.
  • These bits are modified by the receiving station.
  • If the receiving station is available, it sets the Available bit to 1.
  • If the receiving station successfully copies the data, it sets the Copied bit to 1.

Thus, Option (B) is correct.

 

Problem-04:

 

Which of the following fields in 802.5 MAC header is not included in CRC or FCS?

  1. FC
  2. Data field
  3. FS
  4. SA

 

Solution-

 

  • IEEE 802.5 is token ring.
  • Frame Status (FS) field consists of the Available bit and Copied bit.
  • These two bits are modified by the receiving station.
  • So, CRC is not computed on Frame Status field otherwise receiving station will have to bear the overhead of recomputing the CRC.

Thus, Option (C) is correct.

 

Problem-05:

 

What type of acknowledgement system is used in 802.5?

  1. Cumulative ACK
  2. Independent ACK
  3. Piggybacking ACK
  4. None

 

Solution-

 

  • IEEE 802.5 is token ring.
  • The two bits- Available bit and Copied bit acts as the acknowledgement for the sending station.
  • The value of these bits suggests to the sending station that whether the receiving station has successfully copied the data or not.
  • Because the two bits are contained in the data frame, so we can say that piggybacked acknowledgements are used in token ring.

Thus, Option (C) is correct.

 

Problem-06:

 

In token ring, ______ field is present only in the data / command frame but not in the token frame.

  1. SD
  2. AC
  3. ED
  4. FS

 

Solution-

 

  • Frame status (FS) field is present only in the data / command frame.
  • A token frame consists of only 3 fields- SD, AC and ED.

Thus, Option (D) is correct.

 

Problem-07:

 

Consider a token ring with latency 500 μsec and packet size of 1500 bytes. What is the effective throughput rate for both single active host and for many active hosts that can be achieved if the ring has 3 Mbps bandwidth? Assume the strategy used is delayed token reinsertion.

  1. 2.4 Mbps and 3 Mbps
  2. 2.4 Mbps and 2 Mbps
  3. 2 Mbps and 3 Mbps
  4. 2.4 Mbps and 2.67 Mbps

 

Solution-

 

Given-

  • Ring latency = 500 μsec
  • Packet Size = 1500 bytes
  • Bandwidth = 3 Mbps
  • Strategy used is Delayed Token Reinsertion (DTR)

 

Efficiency of Delayed Token Reinsertion (DTR) strategy is-

 

 

Calculating Transmission delay-

 

We know,

Transmission delay (Tt)

= Packet size / Bandwidth

= 1500 bytes / 3 Mbps

= (1500 x 8 bits) / (3 x 106 bits per sec)

= 4000 μsec

 

Calculating value of ‘a’-

 

We know,

a = Tp / Tt

a = Latency / Tt

a = 500 μsec / 4000 μsec

a = 0.125

 

Calculating Throughput for single active host-

 

For single active host, N = 1.

Substituting N = 1 in efficiency formula, we get-

Efficiency (η)

= 1 / (1 + 2a)

= 1 / (1 + 2 x 0.125)

= 1 / 1.25

= 0.8

 

Now,

Throughput

= Efficiency (η) x Bandwidth

= 0.8 x 3 Mbps

= 2.4 Mbps

 

Calculating Throughput for many active host-

 

For many active host, N = ∞.

Substituting N = ∞ in efficiency formula, we get-

Efficiency (η)

= 1 / (1 + a)

= 1 / (1 + 0.125)

= 1 / 1.125

= 0.89

 

Now,

Throughput

= Efficiency (η) x Bandwidth

= 0.89 x 3 Mbps

= 2.67 Mbps

Thus, Option (D) is correct.

 

Problem-08:

 

In 802.5, the condition to find out the minimum size of the ring is-

  1. Latency of the ring = Transmission delay of the data frame
  2. Latency of the ring = Transmission delay of the token frame
  3. Latency of the ring = RTT
  4. Latency > RTT

 

Solution-

 

  • IEEE 802.5 is token ring.
  • The condition to find out the minimum size of the ring is-

Latency of the ring >= Transmission delay of the token frame

  • In worst case, all the stations goes down and only the monitor station is alive.
  • Monitor station sends the token and the token comes back to it.
  • To avoid the collision between the first and the last bit of the token, propagation delay of the token must be at least equal to its transmission delay.

Thus, Option (B) is correct.

 

Problem-09:

 

The stacking station is a station in 802.5 and it can be described as-

  1. when it drains the frame and creates a token, it then stores both the old and new priority of the token
  2. A station which stack the token till it gets the last bit of the token
  3. It is nothing but monitor station
  4. None of the above

 

Solution-

 

  • IEEE 802.5 is token ring.
  • A station which increases the priority of the token should next decrease the priority of the token.
  • Otherwise once the priority of the token reaches the highest value, it would ever remain there and thus only the station with the highest packet would drain (take) the token and use it.
  • Thus, a stacking station must remember both the old and new priorities so that when it later receives the token with new priority, it changes it to old priority.
  • This is implemented by using 2 stacks. Each station maintains 2 stacks where one station keeps track of the old priority and other stack keeps track of the new priority.

Thus, Option (A) is correct.

 

Problem-10:

 

In early token release, the station releases a token as soon as it completes the frame transmission whether or not the frame header has returned to the station, then what will be the priority of the token released?

  1. The priority in the frame that completes frame transmission
  2. Without changing the priority, token will be released
  3. Default priority is used
  4. The priority in the reservation field of the most recently received frame

 

Solution-

 

Option (D) is correct.

 

Problem-11:

 

Find the efficiency of the ring where data rate of the link is 4 Mbps, number of stations are 20, separated by 100 meters and bit delay in each station is 2.5 bits. Assume early token reinsertion with packet size of 1000 bits and transmission speed is 2 x 108 m/sec.

 

Solution-

 

Given-

  • Data rate = Bandwidth = 4 Mbps
  • Number of stations = 20
  • Distance between two stations = 100 meters
  • Bit delay = 25 bits
  • Packet size = 1000 bits
  • Strategy used is Early Token Reinsertion (ETR)

 

Calculating length of ring wire-

 

Total length of ring wire

= Number of stations x Distance between 2 stations

= 20 x 100 meters

= 2000 meters

= 2 km

 

Calculating Transmission delay-

 

Transmission delay (Tt)

= Packet size / Bandwidth

= 1000 bits / 4 Mbps

= 1000 bits / (4 x 106 bits per sec)

= 250 μsec

 

Calculating Propagation delay-

 

Propagation delay (Tt)

= Distance / Speed

= 2 km / (2 x 108 m/sec)

= (2 x 103 m) / (2 x 108 m/sec)

= 10-5 sec

= 10 μsec

 

Calculating Bit delay in seconds-

 

Bit delay

= 25 bits

= 2.5 bits / 4 Mbps

= 25 bits / (4 x 106 bits per sec)

= 0.625 μsec

 

Calculating Ring latency-

 

Ring latency

= Propagation delay + N x Bit delay

= 10 μsec + 20 x 0.625 μsec

= 10 μsec + 12.5 μsec

= 22.5 μsec

 

Calculating value of ‘a’-

 

a

= Ring latency / Tt

= 22.5 μsec / 250 μsec

= 0.09

 

Calculating Efficiency-

 

Efficiency(η)

= 1 / (1 + a/N)

= 1 / (1 + 0.09 / 20)

= 1 / 1.0045

= 0.9955

= 99.55%

 

Problem-12:

 

A token ring LAN network interconnects M stations using Star Topology in the following way. All the input and output lines of the token ring station interface are connected to a cabinet where the actual ring is placed. Suppose that distance from each station to a cabinet is 100 m and ring latency per station is 8 bits, packets are 1250 B and bandwidth is 25 Mbps.

  1. Find the ring latency normalized to packet transmission time.
  2. Find the minimum number of packets transmitted by stations, if stations are allowed to transmit an unlimited number of packet / token. (v = 2 x 108 m/sec)

 

Solution-

 

Based on the given information, the token ring LAN network looks like-

 

(The sketch is for 4 stations)

 

Part-01:

 

Calculating Transmission delay-

 

Transmission delay

= Packet size / Bandwidth

= 1250 B / 25 Mbps

= (1250 x 8 bits) / (25 x 106 bits per sec)

= 400 μsec

 

Calculating Propagation delay-

 

Propagation delay

= Distance / Speed

= (200 x M meters) / (2 x 108 m/sec)

= (200 x M) / (2 x 108) sec

= 100 x M x 10-8 sec

= M μsec

 

Calculating Bit delay in seconds-

 

Bit delay

= Ring latency per station

= 8 bits

= 8 bits / 25 Mbps

= 0.32 μsec

 

Calculating Ring latency-

 

Ring latency

= Propagation delay + N x Bit delay

= M μsec + M x 0.32 μsec

= 1.32 x M μsec

 

Calculating Ring latency normalized to packet transmission delay-

 

Ring latency normalized to packet transmission time

= Ring latency / Packet transmission time

= 1.32 x M μsec / 400 μsec

= 0.0033 x M

 

Part-02:

 

  • The number of packets a station can transmit after holding a token depends on Token Holding Time and the strategy used.
  • Since no information is given in the question about the Time Holding Time, so we assume that there is no restriction on holding the token.
  • Thus, a station can send infinite number of packets after getting a token.

 

Problem-13:

 

A very heavily loaded 1 km long, 10 Mbps token ring has a propagation speed of 200 m/μsec. 50 stations are uniformly spaced around the ring. Data frames are 256 bits including 32 bits of overhead. Acknowledgements are piggybacked onto the data frames and are thus included as spare bits within the data frames and are effectively free. The token is 8 bits long. Is the effective data rate of this ring higher or lower than the effective data rate of a 10 Mbps CSMA / CD network? Assume ‘Early Token Release’ policy.

 

Solution-

 

Remember

Token Ring always beats the Ethernet in terms of effective bandwidth.

 

Analysis-

 

Efficiency of CSMA / CD-

 

Efficiency of token ring in early token retransmission is given by-

Efficiency(η) = 1 / (1 + 6.44 x a)

This expression is valid when number of stations are very large i.e. N → ∞

 

Efficiency of Token Ring-

 

Case-01:

 

Efficiency of token ring in early token retransmission is given by-

Efficiency(η) = 1 / (1 + a/N)

When N → ∞, Efficiency(η) = 100%

 

Case-02:

 

Efficiency of token ring in delayed token retransmission is given by-

Efficiency(η) = 1 / [1 + a(1 + 1/N)]

When N → ∞, Efficiency(η) = 1 / (1+a)

 

The above analysis clearly shows-

Efficiency of Token Ring in ETR > Efficiency of Token Ring in DTR > Efficiency of Token Ring in CSMA / CD.

 

Problem-14:

 

A fibre optic token ring used as a MAN is 200 km long and runs at 100 Mbps. After sending a frame, a station drains the frame from the ring before regenerating the token. The signal propagation speed in the fibre is 200,000 km/sec and maximum frame size is 1 KB. What is the maximum efficiency at N=1?

 

Solution-

 

Given-

  • Distance = 200 km
  • Bandwidth = 100 Mbps
  • Propagation speed = 200,000 km/sec = 2 x 108 m/sec
  • Frame size = 1 KB
  • Number of stations = 1
  • Strategy used is Delayed Token Reinsertion

 

Calculating Transmission delay-

 

Transmission delay

= Frame size / Bandwidth

= 1 KB / 100 Mbps

= (1 x 210 x 8 bits) / (100 x 106 bits per sec)

= 81.92 μsec

 

Calculating Propagation delay-

 

Propagation delay

= Distance / Speed

= 200 km / (2 x 108 m/sec)

= (200 x 103 m) / (2 x 108 m/sec)

= 10-3 sec

= 1 msec

 

Calculating value of ‘a’-

 

a

= Tp / Tt

= 1 msec / 81.92 μsec

= 0.0122 x 103

= 12.2

 

Calculating Efficiency-

 

Efficiency(η)

= 1 / [1 + a x (1+ 1/N)]

= 1 / [1 + 12.2 x (1+1)]

= 1 / 25.4

= 0.0394

= 3.94%

 

  • The reason behind this much less efficiency is that the distance is too large here.
  • Ethernet and Token Ring are meant for LANs.
  • If used for MANs or WANs, the efficiency will fall drastically.

 

Problem-15:

 

At a propagation speed of 200 m/μsec, what is the effective length added to a ring by a bit delay at each repeater or station for-

  1. 1 Mbps line
  2. 40 Mbps line

 

Solution-

 

Part-01:

 

Effective length added to a ring by a bit delay

= 1 bit / 1 Mbps

= 1 μsec

= 1 μsec x 200 m/μsec

= 200 m

 

Part-02:

 

Effective length added to a ring by a bit delay

= 1 bit / 40 Mbps

= 0.025 μsec

= 0.025 μsec x 200 m/μsec

= 5 m

 

Problem-16:

 

Consider a 10 Mbps token ring LAN with a ring latency of 400 μs. A host that needs to transmit seizes the toke. Then it sends a frame of 1000 bytes, removes the frame after it has circulated all around the ring and finally releases the token. This process is repeated for every frame. Assuming that only a single host wishes to transmit, the effective data rate is _____ .

  1. 1 Mbps
  2. 2 Mbps
  3. 5 Mbps
  4. 6 Mbps

 

Solution-

 

Given-

  • Bandwidth = 10 Mbps
  • Ring latency = 400 μsec
  • Frame size = 1000 bytes
  • Number of stations = 1
  • Strategy used is Delayed Toke Reinsertion

 

Calculating Transmission delay-

 

Transmission delay

= Frame size / Bandwidth

= 1000 bytes / 10 Mbps

= (1000 x 8 bits) / (10 x 106 bits per sec)

= 800 μsec

 

Calculating value of ‘a’-

 

a

= Ring latency / Tt

= 400 μsec / 800 μsec

= 0.5

 

Calculating Efficiency-

 

Efficiency(η)

= 1 / [1 + a x (1+ 1/N)]

= 1 / [1 + 0.5 x (1+1)]

= 1 / 2

= 0.50

= 50%

 

Calculating Effective data rate-

 

Effective data rate

= Throughput

= Efficiency(η) x Bandwidth

= 0.5 x 10 Mbps

= 5 Mbps

Thus, Option (C) is correct.

 

Next Article- Aloha | Pure Aloha | Slotted Aloha

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.