Click here to Skip to main content
Click here to Skip to main content

Go-Back-N Simulator

, 6 May 2007
Rate this:
Please Sign up or sign in to vote.
GO - BACK - N Simulator

Sample Image - gbn.jpg

Introduction

This is a GO-BACK-N simulation writen in C# 2.0. Go-Back-N ARQ is a specific instance of the Automatic Repeat-reQuest (ARQ) Protocol, in which the sending process continues to send a number of frames specified by a window size without receiving an ACK packet from the receiver. The receiver process keeps track of the sequence number of the next frame it expects to receive, and sends that number with every ACK it sends. If a frame from the sender does not reach the receiver, the receiver will stop acknowledging received frames. Once the sender has sent all of the frames in its window, it will detect that all of the frames since the first lost frame are outstanding, and will go back to sequence number of the last ACK it received from the receiver process and fill its window starting with that frame and continue the process over again.

Work Structure


The simulation includes two different programs. One of them does server operations and the other one does client operations. Firstly client accepts a 10240(40*256) Bytes long file. It splits these bytes into 40 segments. Then user selects the probability of corruption while client is sending segments to the server, the probability of corruption while server is sending acknowledges to the client side and window size which determines the number of segments that are sent in the same time.

The client sends segments to the server with the probability of corruption that user has chosen. If packets are dropped, acknowledges are not sent back to client. If packets are received, server can not send acknowledges to client side. Because of the probability of corruption in acks, acks can be dropped.

After all segments are sent, user can defrag all segments and get the file.

Multi threads are used to send segments.

Conclusion

This simulation performs an unreliable channel using TCP!!! Packets and acknowledges are consciously dropped to show working structure of Go-Back-N.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Mustafa Sait Ozen
Software Developer (Senior)
Turkey Turkey
He has graduated from Anadolu University Electrical and Electronics Engineering Deparment in 2005 and got his Master Degree from same department in July 2008. Now he is working as a Software Specialist in TUBITAK Marmara Research Center Technology Free Zone.
Follow on   Twitter

Comments and Discussions

 
GeneralNot a quality article. PinmemberRob Graham6-May-07 16:52 
GeneralRe: Not a quality article. PinmemberMustafa Sait Ozen6-May-07 22:23 
GeneralRe: Not a quality article. Pinmemberplutoa1009-May-07 16:01 
QuestionStop and wait Pinmemberkuzman22-Mar-07 15:07 
AnswerRe: Stop and wait PinmemberMustafa Sait Ozen23-Mar-07 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 6 May 2007
Article Copyright 2006 by Mustafa Sait Ozen
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid