Stack configuration for NSC TCP

222 views
Skip to first unread message

Fabian Nack

unread,
Jun 11, 2012, 9:15:33 AM6/11/12
to omn...@googlegroups.com
Hi,

I'm currently working on a simulation of the bufferbloat phenomenon in OMNet++ using the INET Framework. To get results with more relevance to real world scenarios I've added the "network simulation cradle" as a 3rd party enhancement. Using the "liblinux2.6.26.so" from NSC TCP works so far but I couldn't find a possibility to change the stack's parameters for my simulation (like you could with sysctl).
Does anyone know whether there exists a possibility to change the parameters for the stacks provided by nsc in the INET Framework?

Thanks,
Fabian

Böjthe Zoltán (Urdeso Bt.)

unread,
Jun 12, 2012, 4:59:53 AM6/12/12
to omn...@googlegroups.com
Hi,

The sysctl settings via NED parameters currently not implemented in TCP_NSC.
You can add next patch at the end of TCP_NSC::initialize() function in transport/tcp_nsc/TCP_NSC.cc for change sysctl parameters.

#####################
    pStackM->if_attach(localInnerIpS.str().c_str(), localInnerMaskS.str().c_str(), 1500);
    pStackM->add_default_gateway(localInnerGwS.str().c_str());

+    int err =  pStackM->sysctl_set("name","value");       // one or more lines, both parameters are cstring!

    isAliveM = true;
}
#####################

The accepted values for name parameter found in nsc-0.5.2/linux-2.6.26/nsc/sysctl.c file, see  nsc_linux_sysctl_map[] in code.


Zoltan Bojthe



2012/6/11 Fabian Nack <fabia...@googlemail.com>

--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp

Fabian Nack

unread,
Jun 12, 2012, 11:16:52 AM6/12/12
to omn...@googlegroups.com
Thanks, that was exactly what I was searching for! A first test seemed to work perfectly.

NOMEE

unread,
Jun 15, 2012, 9:25:32 AM6/15/12
to omn...@googlegroups.com
Hi Fabian,

I am using Omnet++ and Inet framework for my masters project. I want to ask a question about TCP_NSC as I want to simulate the behaivior of real time TCP implementations. Can you tell me please how can I make it working? I have download the NSC copy from the website and un tar it and run the python script which are mentioned on the /inet/3rdparty/README file but after that when I rebuild INET, it shows errors. Do I need to include any library in Makefile of Inet?

Please help, I would be greatful.

Thanks
NoMEE

Fabian Nack

unread,
Jun 17, 2012, 2:08:14 PM6/17/12
to omn...@googlegroups.com
Hey NoMEE,

at what point do the errors occur (and what do they state)? While you make the inet framework or while trying to run your project? For me, to get NSC to work, I added the -DWITH_TCP_NSC option to the opp_makemake in the makefile of the inet framework and followed the instructions in the 3rdparty/README file. You can use "python scons.py" to build all provided stacks or for example "python scons.py linux-2.6.26" to just build one of the stacks. Afterwards you should be able to make the inet framework (like in the README instructions). Now, to use the nsc stacks in your project you have to set your LD_LIBRARY_PATH to the folder containing your stack's .so file (which was created inside the python script). Afterwards you should be able to set the stack in your projects ini file like this:
**.tcpType = "TCP_NSC"
**.tcp.stackName = "liblinux2.6.26.so"
For me, some errors occured inside the IDE's view because the include of the nsc project's files interferred with some of my includes but normally you shouldn't be forced to solve them to run your simulation.

Fabian

NOMEE

unread,
Jun 18, 2012, 11:09:39 AM6/18/12
to omn...@googlegroups.com
Hi Farbian,

Thanks for your reply. I have followed the instructions from the README file, but I am stuck with how to use this -DWITH_TCP_NSC option in my makefile of Inet? Right now my opp_makemake option in the inet Makefile looks like this

makefiles:
        cd src && opp_makemake -f --deep --make-so -o inet -O out $$NSC_VERSION_DEF

where should I add DWITH_TCP_NSC option in the above command of opp_makemake?

Cheers,
Noman

Fabian Nack

unread,
Jun 19, 2012, 6:26:50 AM6/19/12
to omn...@googlegroups.com
You can add it like this:
makefiles:
    cd src && opp_makemake -f --deep --make-so -DWITH_TCP_NSC -o inet -O out $$NSC_VERSION_DEF

You can use opp_makemake -h in your terminal to see the help for opp_makemake and to get a further understanding of the available options. So after using the python script in the nsc directory in your 3rdparty folder and adding this option to opp_makemake, you should be able to call:
1. make cleanall
2. make makefiles
3. make

If more problems occur, I would ask you to open another thread in this googlegroup, because this one is already marked as answered and you would probably get more help in the new thread.

Fabian

NOMEE

unread,
Jun 19, 2012, 5:43:13 PM6/19/12
to omn...@googlegroups.com

Fabian,

Thanks. I am facing more issues that I have posted on a new thread. Would appreciate if you can have a look

The subject of my new thread is: TCP_NSC issue while making INET folder

NOMEE

NOMEE

unread,
Jun 20, 2012, 9:12:19 AM6/20/12
to omn...@googlegroups.com


Fabian,

You said in your reply that:


Now, to use the nsc stacks in your project you have to set your LD_LIBRARY_PATH to the folder containing your stack's .so file

How to do this? I am running tcpclientserver example of INET but it is showing me errors

The loading of NSC stack is unsuccessful: liblinux2.6.26.so: cannot open shared object file: No such file or directory
Check the LD_LIBRARY_PATH or stackname!
Reply all
Reply to author
Forward
Message has been deleted
0 new messages