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

In summary, Mrs Scott wants to compose a code for Ns3 to simulate the fuctionality of sliding window. She has never used it before and is trying to figure out what she needs to do to get the code working. She has test cases that are included with the package, but she needs to make a copy of the code and make some small changes to get it to work.
  • #1
konspapa11
2
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
  • #2
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?
 
  • #3
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.
 
  • #4
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.
 
  • #5
Hello guys,

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

Thanks in advance
 

1. What is NS3 and how does it work?

NS3, or Network Simulator 3, is a discrete-event network simulator used for research and development of network protocols and systems. It works by simulating the behavior of a network over time, taking into account various factors such as packet loss, congestion, and routing algorithms.

2. What are the benefits of using NS3 for network simulation?

NS3 offers a wide range of benefits, including the ability to simulate complex and large-scale networks, support for multiple network protocols and technologies, and the ability to customize and extend its functionalities through the use of modules and programming languages such as C++ and Python.

3. How does NS3 compare to other network simulators?

One of the main advantages of NS3 over other network simulators is its open-source nature, allowing for easy customization and development. It also offers a high level of accuracy and realism in its simulations, making it a popular choice for network research and development.

4. Can NS3 be used for both wired and wireless networks?

Yes, NS3 has the capability to simulate both wired and wireless networks, making it a versatile tool for network research. It supports various wireless technologies such as Wi-Fi, LTE, and 5G, and also allows for the simulation of hybrid networks combining both wired and wireless components.

5. Is NS3 suitable for beginners in network simulation?

While NS3 may have a steeper learning curve compared to other network simulators, it is still suitable for beginners. It offers comprehensive documentation and resources for learning and has a large community of users who can provide support and guidance. Additionally, the flexibility and extensibility of NS3 make it a valuable tool for both beginners and experienced users in network simulation.

Similar threads

  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
3
Views
890
Replies
9
Views
936
  • Programming and Computer Science
2
Replies
50
Views
3K
  • Programming and Computer Science
Replies
27
Views
14K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
22
Views
2K
  • Programming and Computer Science
Replies
1
Views
926
  • Programming and Computer Science
Replies
2
Views
1K
Back
Top