Simulation of TCP variants in ns3

1,386 views
Skip to first unread message

Pradeep Chhetri

unread,
Oct 27, 2010, 11:12:31 PM10/27/10
to ns-3-...@googlegroups.com
Hello Everybody

I want to simulate one packet loss,two packet loss in different TCP variants(TCP Tahoe,TCP Reno) and want to produce the desired output as graph.
I don't know how to simulate these things in ns3. Please anybody help me. I am not getting how to implement the same and even donot know how to start on this.Is there any header files for the same so that you can directly include them.

Thanks

--
Pradeep Chhetri



Pradeep Chhetri

unread,
Oct 28, 2010, 10:43:00 AM10/28/10
to ns-3-...@googlegroups.com

Please someone help. It's urgent. Reply even if you have any idea.

Regards
--
Pradeep Chhetri







--
Pradeep Chhetri

"Atlast it's only one peer who actually devotes everything to you"

vishal kajjam

unread,
Oct 28, 2010, 11:42:12 AM10/28/10
to ns-3-...@googlegroups.com
Hi Pradeep
Ns 3 has supports tcp tahoe and NSC stack. You should go through he
tcp-large-transfer example in the wireless folder.

On Thursday, October 28, 2010, Pradeep Chhetri

> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To post to this group, send email to ns-3-...@googlegroups.com.
> To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
>

Pradeep Chhetri

unread,
Oct 28, 2010, 11:58:12 AM10/28/10
to ns-3-...@googlegroups.com


Thanks Vishal a lot.

Pradeep Chhetri

unread,
Oct 28, 2010, 12:06:52 PM10/28/10
to ns-3-...@googlegroups.com
Hello Vishal

Whether ns3 has support for tcp reno, tcp new reno and tcp vegas or not. I am new to ns3.

Regards

---
Pradeep Chhetri
Computer Science and Engineering

Lalith Suresh

unread,
Oct 28, 2010, 12:44:50 PM10/28/10
to ns-3-...@googlegroups.com
Hello,

On Thu, Oct 28, 2010 at 5:06 PM, Pradeep Chhetri <pradeep....@gmail.com> wrote:
Hello Vishal

Whether ns3 has support for tcp reno, tcp new reno and tcp vegas or not. I am new to ns3.

There is presently a code review [0] going on for a complete refactoring of the TCP code. This will provide you with what you're looking for. If you're interested, you could download the patch set, apply it to your ns-3 branch, and work on it. It doesn't have TCP-Vegas yet, but has the Reno, New Reno and Tahoe variants. Else, you could always use the NSC stack.

 

Regards

---
Pradeep Chhetri
Computer Science and Engineering

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.



--
Lalith Suresh
Department of Computer Science and Engineering
Instituto Superior Técnico
www.lalith.in

jihen saoudi

unread,
Oct 28, 2010, 12:58:28 PM10/28/10
to ns-3-...@googlegroups.com
Hi Pradeep,
You can check this link ... it contains the TCP Vegas version
http://groups.google.com/group/ns-3-users/files?report=1&&sort=author
exactly in the files:
1. tcp-socket-impl.cc.diff
2. tcp-socket-impl.h.diff

good luck

2010/10/28 Pradeep Chhetri <pradeep....@gmail.com>

Pradeep Chhetri

unread,
Oct 28, 2010, 12:59:19 PM10/28/10
to ns-3-...@googlegroups.com


Thanks a lot Lalith Sir
--
Pradeep Chhetri



jihen saoudi

unread,
Oct 28, 2010, 1:01:53 PM10/28/10
to ns-3-...@googlegroups.com
Hi Pradeep,
You can check this link ... it contains the TCP Vegas version
http://groups.google.com/group/ns-3-users/files?report=1&&sort=author
exactly in the files:
1. tcp-socket-impl.cc.diff
2. tcp-socket-impl.h.diff

good luck

2010/10/28 Pradeep Chhetri <pradeep....@gmail.com>


Thanks a lot Lalith Sir
--
Pradeep Chhetri

Pradeep Chhetri

unread,
Oct 28, 2010, 11:30:17 PM10/28/10
to ns-3-...@googlegroups.com
Hello Lalith Sir

I downloaded the file "issue1702042_168002.diff" from the link which you provided. Then i patched it using the following command.

root@pradeep-laptop:/home/pradeep/Downloads/ns-allinone-3.9/ns-3.9# patch -p0 <issue1702042_168002.diff

This command is executing properly and the older files are also changed accordingly in the internet-stack directory.

Then I again built it from the very beginning by first deleting the build directory.
And giving the command

root@pradeep-laptop:/home/pradeep/Downloads/ns-allinone-3.9# ./build.py

This time its giving a series of errors.

Its the error regarding the parameters which are changed when i patched.

I am not getting how to solve this.Please help me sir.

Regards

----
Pradeep Chhetri








Pradeep Chhetri

unread,
Oct 29, 2010, 8:12:02 AM10/29/10
to ns-3-...@googlegroups.com
Please somebody tell me how to apply a patch? I am getting error while following the below mentioned procedure.
--
Pradeep Chhetri

In the world of Linux, who needs Windows and Gates...

Leandro Melo de Sales

unread,
Oct 29, 2010, 8:30:03 AM10/29/10
to ns-3-...@googlegroups.com

Hi,
   For someone to help you, please provide the output for the errors.

Leandro.

Pradeep Chhetri

unread,
Oct 29, 2010, 8:48:05 AM10/29/10
to ns-3-...@googlegroups.com
This is the output generated on giving the command after first applying the patch:

root@pradeep-laptop:/home/pradeep/Downloads/ns-allinone-3.9# ./build.py


[ 579/1367] cxx: src/common/output-stream-wrapper.cc -> build/debug/src/common/output-stream-wrapper_1.o
[ 656/1367] cxx: src/node/tcp-socket.cc -> build/debug/src/node/tcp-socket_1.o
[ 662/1367] cxx: src/node/simple-net-device.cc -> build/debug/src/node/simple-net-device_1.o
[ 678/1367] cxx: src/internet-stack/tcp-test.cc -> build/debug/src/internet-stack/tcp-test_1.o
[ 679/1367] cxx: src/internet-stack/udp-test.cc -> build/debug/src/internet-stack/udp-test_1.o
[ 684/1367] cxx: src/internet-stack/tcp-header.cc -> build/debug/src/internet-stack/tcp-header_1.o
[ 689/1367] cxx: src/internet-stack/tcp-l4-protocol.cc -> build/debug/src/internet-stack/tcp-l4-protocol_1.o
[ 696/1367] cxx: src/internet-stack/tcp-socket-factory-impl.cc -> build/debug/src/internet-stack/tcp-socket-factory-impl_1.o
[ 723/1367] cxx: src/internet-stack/tcp-socket-base.cc -> build/debug/src/internet-stack/tcp-socket-base_1.o
[ 724/1367] cxx: src/internet-stack/tcp-rfc793.cc -> build/debug/src/internet-stack/tcp-rfc793_1.o
[ 725/1367] cxx: src/internet-stack/tcp-tahoe.cc -> build/debug/src/internet-stack/tcp-tahoe_1.o
[ 726/1367] cxx: src/internet-stack/tcp-reno.cc -> build/debug/src/internet-stack/tcp-reno_1.o
[ 727/1367] cxx: src/internet-stack/tcp-newreno.cc -> build/debug/src/internet-stack/tcp-newreno_1.o
[ 728/1367] cxx: src/internet-stack/tcp-rx-buffer.cc -> build/debug/src/internet-stack/tcp-rx-buffer_1.o
[ 729/1367] cxx: src/internet-stack/tcp-tx-buffer.cc -> build/debug/src/internet-stack/tcp-tx-buffer_1.o
[ 730/1367] cxx: src/internet-stack/nsc-tcp-socket-impl.cc -> build/debug/src/internet-stack/nsc-tcp-socket-impl_1.o
[ 764/1367] cxx: src/routing/olsr/test/bug780-test.cc -> build/debug/src/routing/olsr/test/bug780-test_1.o
In file included from ../src/internet-stack/nsc-tcp-socket-impl.h:30,
                 from ../src/internet-stack/nsc-tcp-socket-impl.cc:29:
../src/internet-stack/tcp-typedefs.h:34: error: conflicting declaration ‘CLOSED’
debug/ns3/tcp-socket.h:40: error: ‘ns3::CLOSED’ has a previous declaration as ‘ns3::TcpStates_t ns3::CLOSED’
../src/internet-stack/tcp-typedefs.h:35: error: conflicting declaration ‘LISTEN’
debug/ns3/tcp-socket.h:41: error: ‘ns3::LISTEN’ has a previous declaration as ‘ns3::TcpStates_t ns3::LISTEN’
../src/internet-stack/tcp-typedefs.h:36: error: conflicting declaration ‘SYN_SENT’
debug/ns3/tcp-socket.h:42: error: ‘ns3::SYN_SENT’ has a previous declaration as ‘ns3::TcpStates_t ns3::SYN_SENT’
../src/internet-stack/tcp-typedefs.h:37: error: conflicting declaration ‘SYN_RCVD’
debug/ns3/tcp-socket.h:43: error: ‘ns3::SYN_RCVD’ has a previous declaration as ‘ns3::TcpStates_t ns3::SYN_RCVD’
../src/internet-stack/tcp-typedefs.h:38: error: conflicting declaration ‘ESTABLISHED’
debug/ns3/tcp-socket.h:44: error: ‘ns3::ESTABLISHED’ has a previous declaration as ‘ns3::TcpStates_t ns3::ESTABLISHED’
../src/internet-stack/tcp-typedefs.h:39: error: conflicting declaration ‘CLOSE_WAIT’
debug/ns3/tcp-socket.h:45: error: ‘ns3::CLOSE_WAIT’ has a previous declaration as ‘ns3::TcpStates_t ns3::CLOSE_WAIT’
../src/internet-stack/tcp-typedefs.h:40: error: conflicting declaration ‘LAST_ACK’
debug/ns3/tcp-socket.h:46: error: ‘ns3::LAST_ACK’ has a previous declaration as ‘ns3::TcpStates_t ns3::LAST_ACK’
../src/internet-stack/tcp-typedefs.h:41: error: conflicting declaration ‘FIN_WAIT_1’
debug/ns3/tcp-socket.h:47: error: ‘ns3::FIN_WAIT_1’ has a previous declaration as ‘ns3::TcpStates_t ns3::FIN_WAIT_1’
../src/internet-stack/tcp-typedefs.h:42: error: conflicting declaration ‘FIN_WAIT_2’
debug/ns3/tcp-socket.h:48: error: ‘ns3::FIN_WAIT_2’ has a previous declaration as ‘ns3::TcpStates_t ns3::FIN_WAIT_2’
../src/internet-stack/tcp-typedefs.h:43: error: conflicting declaration ‘CLOSING’
debug/ns3/tcp-socket.h:49: error: ‘ns3::CLOSING’ has a previous declaration as ‘ns3::TcpStates_t ns3::CLOSING’
../src/internet-stack/tcp-typedefs.h:45: error: conflicting declaration ‘LAST_STATE’
debug/ns3/tcp-socket.h:51: error: ‘ns3::LAST_STATE’ has a previous declaration as ‘ns3::TcpStates_t ns3::LAST_STATE’
../src/internet-stack/tcp-typedefs.h: In constructor ‘ns3::SA::SA()’:
../src/internet-stack/tcp-typedefs.h:87: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in initialization
../src/internet-stack/nsc-tcp-socket-impl.cc: In constructor ‘ns3::NscTcpSocketImpl::NscTcpSocketImpl()’:
../src/internet-stack/nsc-tcp-socket-impl.cc:80: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in initialization
cc1plus: warnings being treated as errors
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘virtual int ns3::NscTcpSocketImpl::Close()’:
../src/internet-stack/nsc-tcp-socket-impl.cc:267: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc:281: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in assignment
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘virtual int ns3::NscTcpSocketImpl::Connect(const ns3::Address&)’:
../src/internet-stack/nsc-tcp-socket-impl.cc:308: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in assignment
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘virtual int ns3::NscTcpSocketImpl::Send(ns3::Ptr<ns3::Packet>, uint32_t)’:
../src/internet-stack/nsc-tcp-socket-impl.cc:318: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc:318: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc:318: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc:327: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘virtual int ns3::NscTcpSocketImpl::Listen()’:
../src/internet-stack/nsc-tcp-socket-impl.cc:382: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in assignment
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘void ns3::NscTcpSocketImpl::NSCWakeup()’:
../src/internet-stack/nsc-tcp-socket-impl.cc:394: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in assignment
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘void ns3::NscTcpSocketImpl::CompleteFork()’:
../src/internet-stack/nsc-tcp-socket-impl.cc:494: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc:495: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in assignment
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘bool ns3::NscTcpSocketImpl::Accept()’:
../src/internet-stack/nsc-tcp-socket-impl.cc:532: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc:536: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘bool ns3::NscTcpSocketImpl::ReadPendingData()’:
../src/internet-stack/nsc-tcp-socket-impl.cc:565: error: comparison between ‘enum ns3::States_t’ and ‘enum ns3::TcpStates_t’
../src/internet-stack/nsc-tcp-socket-impl.cc:577: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in assignment
../src/internet-stack/nsc-tcp-socket-impl.cc:588: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in assignment
../src/internet-stack/nsc-tcp-socket-impl.cc: In member function ‘bool ns3::NscTcpSocketImpl::SendPendingData()’:
../src/internet-stack/nsc-tcp-socket-impl.cc:653: error: cannot convert ‘ns3::TcpStates_t’ to ‘ns3::States_t’ in assignment
Waf: Leaving directory `/home/pradeep/Downloads/ns-allinone-3.9/ns-3.9/build'
Build failed:  -> task failed (err #1):
    {task: cxx nsc-tcp-socket-impl.cc -> nsc-tcp-socket-impl_1.o}
Traceback (most recent call last):
  File "./build.py", line 117, in <module>
    sys.exit(main(sys.argv))
  File "./build.py", line 108, in main
    build_ns3(config)
  File "./build.py", line 56, in build_ns3
    run_command(["python", "waf"])
  File "/home/pradeep/Downloads/ns-allinone-3.9/util.py", line 24, in run_command
    raise CommandError("Command %r exited with code %i" % (argv, retval))
util.CommandError: Command ['python', 'waf'] exited with code 1

Lalith Suresh

unread,
Oct 29, 2010, 9:13:25 AM10/29/10
to ns-3-...@googlegroups.com
Hello,

I've never tried this myself, will probably give it a shot later in the day and get back to you. Meanwhile, it would be nice if anyone who's worked on this code could clarify here.
 



--
Pradeep Chhetri

In the world of Linux, who needs Windows and Gates...

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

Lalith Suresh

unread,
Oct 29, 2010, 5:30:57 PM10/29/10
to ns-3-...@googlegroups.com
Hello,

On Fri, Oct 29, 2010 at 1:12 PM, Pradeep Chhetri <pradeep....@gmail.com> wrote:
Please somebody tell me how to apply a patch? I am getting error while following the below mentioned procedure.


I just tried applying the patch using "patch -p1 < blah.diff", and tried building an ns-3-dev repo with './waf'. It compiled without any glitches. Make sure you're applying the patch correctly and try again.

 

Pradeep Chhetri

unread,
Oct 31, 2010, 2:17:01 AM10/31/10
to ns-3-...@googlegroups.com
Thanks Lalith Sir Finally I compiled it without any problem.

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
Reply all
Reply to author
Forward
0 new messages