(Somewhat) Frequently Asked
Questions
What is meant by propagation delay, latency, RTT?
Propagation delay is the time it takes for a signal to propagate over (traverse) a given distance. For example, if an electromagnetic wave propagates through a given medium at 2/3 the speed of light and travels for a distance of 100 km, the time to traverse this distance (propagation delay) would be tp = (100 km) (1000 m/km) / 2 x 108 m/s = 0.5 ms.
The RTT is the round trip time, which in this example is 1 ms (2 tp). The latency is defined to be
latency = RTT + transmit time + queuing delay + processing time
In our examples we have ignored queuing delay (assumed lightly loaded network) and neglected processing time (small compared to other times). The latency is the (minimum) time it takes to send a packet and get an acknowledgement back (assuming time to transmit the ACK is also negligible). If we divide the latency by the time to transmit (and neglect the last two terms) we get
latency / ttrans = RTT/ ttrans + 1 = 2 tp/ ttrans + 1 or 1 + 2a where a = tp/ ttrans
The value 1 + 2a is used frequently in our discourse, and is the ratio of the (minimum) time to complete a transmission (and receive an ACK back) to the time of the actual transmission. This figure is used among other things to determine suitable (Sender’s) window size for a sliding window protocol.
What is the major difference between the effect of an
error when the receive window size is 1 (go-back N) and when it is large
(selective repeat)?
Let’s answer this question by looking at a couple of examples:
In the first instance we will take MaxSeq = 8, and the time to transmit a frame to be twice the propagation delay between the sender and receiver. Then
a = tp/ttrans = ˝ , and 1 + 2a = 2, timeout (in pkts) = 3.5
In go-back N we have the sender’s window, Ws = 7 and the receiver’s window, Wr = 1, and in selective repeat, Ws = 4 and Wr = 4. Now suppose in both instances the sender begins sending at frame f0, and frame f2 has an error. In go-back N we have
Sender sends frames f0 .. f6.
ACK1 arrives during the time Sender is transmitting f4
Sender updates Ws to 2 – 0, and continues transmitting.
After transmitting f6 the Sender (awaiting ACK2) times out and begins
retransmitting from f2. (3 frames and the error frame, f2, get discarded.)
In selective-repeat:
Sender sends frames f0 .. f3.
ACK1 arrives after Sender has emptied window. (1 frame time is lost)
(If no ACK is sent the NAK will implicitly ACK previous frames, but
idle period will be 3 frame times.)
Sender updates Ws to 2 – 5 and begins transmitting f4.
NAK2 arrives during time Sender is transmitting f5.
Sender retransmits f2, but Ws is now empty, and Sender awaits further ACKs.
Selective-repeat requires more processing capability (and is
therefore more costly and error prone) but does not give any better utilization
of the channel than go-back N for this value of MaxSeq. (It may be significantly worse than go-back
N if the ratio a is larger.)
In the same scenario when MaxSeq is 128, with a single error and the same delay, transmit time, and timeout parameters, go-back N will still lose 3 frame times plus the error frame, whereas selective-repeat only has to retransmit the error frame. Contrary to the case for the smaller value of MaxSeq, the relative performance of selective-repeat to go-back N improves with larger a and increased queuing delay.
How do we prevent the sender from flooding the receiver
with data faster than the receiver is able to process it?
There are two levels to this question. We have been considering data-link issues where two nodes (switches, routers, directly connected hosts, sender/receiver on a Ethernet) are managing a direct link connection. They are “attached” to a channel of the same bandwidth and using the same protocols to manage this channel. The data link protocol will specify a maximum frame size and a window size for sender and receiver that the switches will be capable of handling. The only recourse that the receiver has when faced with congestion delays is to delay the return of ACKs and discard frames that it is not capable of buffering. This will cause the sender to timeout and retransmit those frames effectively slowing it down. Data link protocols seek to maximize the efficient use of the channel and try to avoid this eventuality.
Your question anticipates the situation where machines of different capabilities, and possibly running different network protocols are connected through a network or an interconnection of networks (not a direct link). This is an important aspect of transport layer protocols such as TCP, and will be discussed in detail in the coming weeks.
Why should tp > ttrans in an ALOHA scheme?
The question should be rephrased why use ALOHA when tp > ttrans?
The network designer has no control over the propagation delay of the underlying channel (satellite, fiber link to distant host) and limited control over the maximum and minimum time to transmit. (The bandwidth of the underlying channel is a given, the max and min packet sizes are limited by buffer capacity, fairness issues, and the length of a contention period.) Given that tp > ttrans and is fixed, and multiple users are sharing a common “channel”, how is that channel most efficiently used?
Suppose we have a satellite channel with 1000 users and ttrans = 50 ms, tp = 250 ms (really 270, but the choice of 250 is to make the numbers simpler) then RTT = 500 ms. Under these conditions, it makes no sense to monitor the channel before transmitting, since that only indicates what was happening 10 transmission periods ago. Instead we must choose either contention or a fixed allotment scheme to allocate this resource.
With pure time division multiplexing, each user gets to transmit for 50 ms every 50 seconds (1000 x 50 ms = 50 sec). With contention, the user learns whether or not it was successful 500 ms ( ˝ second) after transmitting. It would take 100 failures to have a worse response time than for pure TDM. The vulnerable period for pure ALOHA in this scenario is 100 ms (t= ttrans = 50 ms, and vulnerable period = 2t) ALOHA has a maximum utilization of about 18% when the offered load is 1 user/100 ms. This translates to 500 requests (new and retransmits)/ 50 seconds and 90 (successful) pkts. transmitted. With this load, a station would have about 5 –6 failures before a success (see homework problem in assignment due Oct. 11), which means that the response time would be less than 10 seconds (as opposed to the fixed 50 sec for TDM). Under this load, the utilization of the channel would also be much better, because the requests are not coming from 90 different stations, but a smaller group of stations with multiple requests. Performance of pure ALOHA is not great, but given the circumstances (which are inherent in this problem), it works better than the alternatives.
When is circuit switching more efficient than packet
switching and vice versa?
The two types of switching techniques had their roots in different technologies. Circuit switching is used by the telephone companies to service voice traffic. Voice traffic must be real-time, makes modest demand upon bandwidth and other resources, has little variation between average and peak resource needs (per connection), and is tolerant of transmission errors. Data traffic does not require real-time service, places a greater demand upon communication resources (bandwidth), has a much greater variation between peak and average resource needs, and requires essentially error free channels. Packet switching was developed to service data communication.
Characteristics of
Circuit Switching
Characteristics of
Packet Switching
For data transmission, packet switching makes more efficient use of the bandwidth, and is cheaper for the end user.
Explain the difference between virtual circuit and datagram packet switching
There are two different versions of packet switching: datagram and virtual circuit.
Feature Virtual Circuit Datagram
Connection time Call Setup/call disconnect no call setup
required
Addressing packets identified by (local) full address required on
VC number (after setup) all packets
Congestion Control done on a per VC basis packets dropped when
severe congestion occurs
Service options can assign priority and none – no setup therefore
select quality of service no preallocation of resources
options (QOS)
Routing Selected during setup dynamically on an individual
based on selected QOS packet basis – reassembly of
packets into the message may
be required of the user.
Datagram service may be regarded as a best effort service model, but since demands upon the underlying network are minimal, it is best suited for use over a heterogeneous collection of networks with different service models and different levels of service. IP is a datagram service. Datagram service is also appropriate for query based applications such as credit card verification where the message (connection time) is short compared to the setup time. Corporate intranets and other proprietary networks have a single service model, and generally use virtual circuit switching for the advantages listed above.