Where Can I Find NS-3 Sliding Window Simulation Code in C++?

  • Context: C/C++ 
  • Thread starter Thread starter konspapa11
  • Start date Start date
  • Tags Tags
    Network Simulation
Click For Summary

Discussion Overview

The discussion revolves around the implementation of a sliding window protocol simulation using NS-3, a network simulator that utilizes C++. Participants seek assistance in composing the necessary code and understanding the sliding window concept as it applies to network protocols.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses a desire to create a sliding window simulation in C++ for NS-3 and requests help.
  • Another participant explains that NS-3 is a network simulator and suggests that implementing the sliding window protocol will be necessary for the simulation.
  • A participant shares their progress in installing NS-3 and expresses the need to write code for the sliding window protocol while also wanting to measure delay and throughput.
  • Further elaboration on the sliding window method is provided, detailing how packets are buffered and acknowledged in TCP, with an example of how the sliding window operates.
  • One participant requests existing code for the sliding window protocol in NS-3, asking if any resources are available online.

Areas of Agreement / Disagreement

Participants generally agree on the need to implement the sliding window protocol for NS-3 simulations, but there is no consensus on specific code examples or resources available for this purpose. The understanding of the sliding window method varies among participants.

Contextual Notes

Some participants may have varying levels of familiarity with C++ and NS-3, which could affect their ability to implement the sliding window protocol. The discussion does not resolve the specifics of code implementation or available resources.

Who May Find This Useful

Individuals interested in network simulation, particularly those working with NS-3 and the sliding window protocol, may find this discussion relevant.

konspapa11
Messages
2
Reaction score
0
Hello guys i want to compose a code (in C++) for Ns3 to simulate the fuctionality of sliding window , maybe can help me somebody!
 
Technology news on Phys.org
NS3 is a network simulator that works with C++. I have never used it before.
Sliding window can be used in a network protocol for dealing with delayed packets that need to be presented to the application in the order sent.

So tell me about Ns3. Won't you have to implement the a version of the sliding window algorithm/protocol to have Ns3 simulate it?
 
Sliding window Simulate In Ns3

Mrs Scott Thank u for immediately response in my answer, i installed Ns3 in my computer is network simulator, now i must to compose a sliding window code to simulate this in Ns3 and record the measurements of delay and throughput, sliding window operation you can find in this link http://en.wikipedia.org/wiki/Sliding_window_protocol.
 
konspapa11 said:
Mrs Scott Thank u for immediately response in my answer, i installed Ns3 in my computer is network simulator, now i must to compose a sliding window code to simulate this in Ns3 and record the measurements of delay and throughput, sliding window operation you can find in this link http://en.wikipedia.org/wiki/Sliding_window_protocol.
I think I'm catching on to your situation. There seems to be two possible issues.

First: I'm guessing that you have done some C++ coding before - perhaps as part of a college course. But this is the first time you've had to work with a package like Ns3 - where some investigation is needed before you even know where your code goes.

What you need to do is:
1) Get any simulation working. Just so you know what to expect when things are working.
2) Build the sample code and get it working. Almost any package of this sort will have example code - probably supporting TCP-IP or a variant. During the development of Ns3, test cases needed to be developed to verify that Ns3 worked. Those test cases are almost always included as part of the package - in the form of sample code.
3) Make a copy of the sample code and make some small change - build it - run it. This is the equivalent of the "Hello World" exercise. Once you have accomplished this, you have a minimal understanding of the build and run process.

Second: It's not clear from your post whether you understand the "Sliding Window" method. In TCP, packets are numbered. On the receiving side, the packets need to be buffered because they may not be arriving in the correct order. So if packets 1, 3, 4, 8, 9, and 10 have been received, packet 1 can be passed on, but the other packets (3, 5, 8, 9, and 10) need to be held until packet 2 arrives. So packet 1 will be acknowledged and the retransmission of packet 2 will be arranged.

Let's say a sliding window of 8 packets is established. When the connection is first established, the sender can send packets 1 through 8 - but no more. The receiver might then receive 1, 3, 4, and 8. And would immediately acknowledge that packet 1 has been received. The receiver, on learning that packet 1 had been received, would move his sliding window from 1-8 to 2-9, and would then send packet 9. The missing packet 2 would be negotiated in the same way as before.

BTW: I'm a Mr, not a Mrs. But just call me Scott or .Scott.
 
Hello guys,

Can you please compose code of Sliding Window for NS-3? Is there any cource code available in Internet?

Thanks in advance
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 27 ·
Replies
27
Views
17K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
1
Views
3K
  • · Replies 16 ·
Replies
16
Views
5K