Archive
Group20_Dynamic networks:Stop and Wait arq
*The main advantage of stop-and-wait ARQ is its simplicity. It also requires minimumbuffer size. However, it makes highly inefficient use of communication links.
*Efficiency can be calculated fairly easily. Let the size of the data we want to send be D bits, and the header (used for addressing or error detection, for example) be H bits long.Also let the corresponding acknowledgement packet be A bits in size. We must also take into account the link parameters, propagation time Ts and bit rate B bits/s.
The time taken to complete the transaction is the sum of three terms: the time taken to send the packet, the time taken to send the ack, and the two propagation delays inbetween.
*This gives us t = (D + H)/B + A/B + 2T as the total time. Ideally, the time taken to send D bits of data across a link with bit rate B would be simply D/B. Rearranging these gives a no-retransmission efficiency of:
η = D/(D + H) × 1/(A + 2TB)
*To tackle the problem of damaged frames, say a frame that has been corrupted during the transmission due to noise, there is a concept of NACK frames, i.e. Negative Acknowledge frames.
*Stop-and-wait ARQ is inefficient compared to other ARQs, because the time between packets, if the ACK and the data are received successfully, is twice the transit time (assuming the turnaround time can be zero).
*The throughput on the channel is a fraction of what it could be.When packets require retransmission, efficiency lowers further.
*To solve this problem, one can send more than one packet at a time with a larger sequence number and use one ACK for a set.This is what is done in Go-Back-N ARQ and the Selective Repeat ARQ.
Group20_Dynamic Networks: Stop and Wait ARQ

The principle used in stop and wait ARQ is sometimes referred to as ping-pong behavior (as shown in the figure) i.e request/reply is simple to understand and easy to implement, but not very efficient. In LAN environment with fast links, this isn’t much of a concern, but WAN links will spend most of their time idle, especially if several hops are required.
Major drawback of Stop-and-Wait Flow Control is that only one frame can be in transmission at a time, this leads to inefficiency if propagation delay is much longer than the transmission delay.The main shortcoming of the stop-wait algorithm is thatallows the sender to have only one outstanding frame on the link at a time,and this maybe far below the link’s capacity.
Some protocols pretty much require stop-and-wait behavior. For example, Internet’s Remote Procedure Call (RPC) Protocol is used to implement subroutine calls from a program on one machine to library routines on another machine. Since most programs are single threaded, the sender has little choice but to wait for a reply before continuing the program and possibly sending another request.
Group20_Dynamic Networks:Stop and Wait ARQ
Today in class we were told about some concepts like pipelining, Sliding window protocols and related areas. So i happened to get some information which i think is useful for a good Computer Network student to understand the concepts of ARQ’s.
Sliding Window Protocols : Some Definitions
§ Sequence Number (SN): each frame is assigned a SN that is incremented as each frame is transmitted.
§ Sender Window: Keeps track of SNs for frames that have been sent but not yet acknowledged.
§ Receiver Window: Keeps track of sequence numbers for frames that the receiver is allowed to accept.
§ Maximum Sender Window Size (WS): The maximum number of frames the sender can transmit without receiving any ACKs.
§ Maximum Receiver Window Size (WR): The maximum number of
frames the receiver may receive before returning an ACK to the sender.
Maximum Sender Window Size
§ With maximum window size of 1, the sender waits for an ACK before sending another frame.
§ With maximum window size of WS, the sender can transmit up to WS frames before being blocked.
- allows sender to transmit several frames before receiving an ACK
- also a form of “pipelining” => keeps the link from being idle.
Maximum Receiver Window Size
§ With a maximum window size of 1, the receiver must receive and process every frame in sequence.
§ With a maximum window size of WR, the receiver can receive and process up to framesbefore acknowledging them.
- The receiver can still accept and buffer frames received
after a frame that is lost/erroneous.
- Allow “piggybacking” of ACK onto the header of an outgoing data frame in the reverse direction• Full duplex transmission
Sliding Window Protocol: General Remarks
§ The sending and receiving windows do not necessarily have the same maximum size.
§ Any frame whose SN falls outside of the receiver window is discarded by the receiver.
§ The sender window’s size grows and shrinks as frames are transmitted and acknowledged.
§ Unlike the sender window, the receiver window always remains at its maximum size.
Pipelined Protocols
Sender allows multiple, “in-flight”, yet-to-be-acknowledgeded pkts
- Range of sequence numbers must be increased
- Buffering at sender and/or receiver.
Two generic forms of pipelined (sliding window) protocols:
Go-Back -N and Selective-Repeat.
PIPELINING:
Allow multiple outstanding (un-ACKnowledgeded) frames.


Group20_Dynamic networks:stop and wait ARQ
If we have to code a program for stop and wait arq protocol,then the below given algorithm helps us to provide a framework for the program. Here SN means sequence numbers assigned by the sender to the packets. RN refers to request number assigned by the acknowledged(ACQ) packets.
Stop and Wait Protocol
Algorithm at sender (node A)
(with initial condition SN=0)
- Accept packet from higher layer when available and assign number SN to it
- Transmit packet SN
- Wait for an error free packet from B
i. if received and it contains RN>SN in the request # field, set SN to RN and go to 1.
ii. if not received within given time (TO), go to 2
Stop and Wait
Algorithm at receiver (node B)
(with initial condition RN=0)
1) Whenever an error-free frame is received from A with a sequence #
equal to RN, release received packet to higher layer and increment RN.
2) At arbitrary times, but within bounded delay after receiving any error
free frame from A, transmit a frame to A containing RN in the request #field.
Group20_Dynamic networks:groupA project questions asked
1. When we download files,songs,pictures etc from the internet how are we using FTP since we are sending http requests?
Ans: Http can only send requests and nothign else, the files get downloaded through FTP via certain types of proxies (CERN proxies)which act as translators of converting http requests to ftp requests and download. Http will not download files but users login as annonymous and download them.
2.What is scalability in proxy servers?
Ans: Scalability means we are efficiently distributing the load of requests among a group of servers and then work. So it is like breaking a task into number of sub-tasks and working(Loadbalancing ). Using proxies we increase the accessing speed.
3. What is SSL in http servers?
SSL is Secure Sockets Layer is a type of encoding or encryption mechanism link between a browser and web-server(here http) which remain invisble to the user.It ensures we do not send sensitive data to hackers or unwanted sites.
4. Do we use FTP when we transfer files through g-talk ??
Ans. Yes transferring of files takes place through FTP when we share files through application programs like g-talk.
Group20_Dynamic Networks:group A ppt
Group20_Dynamic Networks:Stop and Wait ARQ
Until now, we had discussed about proxy servers and now it is time to discuss about group B project of ARQ ‘ s and we will see about Stop and Wait ARQ (Automatic Repeat Request).

Automatic repeat request (ARQ) schemes are commonly used in data communication to provide a more efficient communication between a source user and a destination user.Stop-and-wait automatic repreat request (stop-and-wait ARQ) is an error correction technique in which the sender transmits a block of data and then waits for an acknowledgment before transmitting the next block.Two sorts of error could occur. First the frame that arrives at the destination could be damaged. The second sort of error is a damaged acknowledgment. The communicationchannel remains idle while the source is waiting for the acknowledgment. As such, low usage of the available communication bandwidth resulting in an inefficient communication is a problem associated with stop-and-wait.
The above diagram shows the state diagram of stop-wait ARQ.
In SW-ARQ,the transmitter sends a packet to the receiver and waits for its acknowledgment. Based on error-detection results, the receiver generates either a negative acknowledgment (NACK) or a positive acknowledgment
(ACK) for each received packet and sends it over a feedbackchannel. If an ACK is received, the transmitter sends out anext packet; otherwise, if an NACK is received, retransmissionof the same packet will be scheduled immediately.
Group20_Dynamic networks:Mandatory blog
Group name : DYNAMIC NETWORKS
Member names:
Ameet Gondali – 1MS07IS003
Kaushik N – 1MS07IS037
Bhujang R – 1MS07IS016
Pramod M – 1MS07IS070
Group A project : HTTP and FTP proxy servers
Group B project : Stop and wait ARQ
Group A project presentation: Oct 7 2009 ( not completed as of Oct 4 2009)
Group B project presentation: Nov 18 2009(not completed as of Oct 4 2009)
Group A project ppt uploaded : No (as of Oct 4, 2009)
Group B project ppt uploaded : No (as of Oct 4, 2009)
Group A project report : No
Group B project report: No
Group A problems faced and solved : No
Group B problems faced and solved : NO (as of Oct 4, 2009)
Group20_Dynamic networks:http proxy
A proxy server for HTTP requests is typically an HTTP proxy or “web proxy” accepts HTTP requests containing URLs with a special prefix. The proxy removes the prefix and looks for the resulting URL in its local cache (if it is a caching proxy). If found, it returns the document immediately, otherwise it fetches it from the remote server, saves a copy in its cache and returns it to the requester. The cache will usually have an expiry algorithm which flushes documents according to their age, size and access history.
The purpose is to reduce the amount of data flowing over the proxy’s Internet connection and to speed up clients’ access to frequently requested pages, e.g. at an ISP or on a large company’s firewall. The proxy may also reject requests where the URL or content matches certain conditions.
The Apache HTTP server can be configured to act as a proxy server. Another popular software proxy is Squid.
However, their support is not realized at a level of an operating system – in order to use them, you should configure all programs, which should use proxies. In an appropriate way To organize proxies into a chain, it is necessary to organize tunneling of requests: there is created a virtual tunnel, which passes through an HTTP proxy and, using this tunnel, the program can “make a path” through some proxy servers to a specific web server.An HTTP proxy may support SSL (Secure Sockets Layer).
Recent Comments