[Ns-developers] GSOC 2012 NAT model implementation

Tommaso Pecorella tpecorella at mac.com
Sun Mar 25 08:15:45 PDT 2012


Hi,

I don't want to really modify any behavior, but if you take a look at the IPjournal papers I linked in the idea's page, you'll find how many different behaviors a NAT can exhibit. That's what makes STUN so complex and unpredictable. What's interesting is the "what if" case: "what if this NAT would work as a full cone instead of as a restricted cone ?"

NATs are one of the most used network devices, and one of the less understood by "normal" users, so...

If you need suggestions to refine your proposal, feel free to send an e-mail to the list.

We'll also organize some timeslots in IRC or some other virtual place to meet the mentors.

Cheers,

T.
 

On 25 Mar 2012, at 17:03, anush vishwanath wrote:

> Hi Tommaso,
> Thank you so much for making this absolutely clear to me now.
> I'd love to get selected to the ns3 organization.You guys do such good work and are so friendly :)
> I'l giv my best in the proposal and hope to get selected :)
> another question:
> what exactly do you guys mean by modify its behavior???
> 
> On Sun, Mar 25, 2012 at 8:23 PM, Tommaso Pecorella <tpecorella at mac.com> wrote:
> Hi Anush,
> 
> that's NSC, so Network Simulation Cradle. it's not using ns-3 to "do the job", but the linux kernel itself. While using NSC is perfectly fine, it does not represent a model, but a real implementation. So exploring different behaviors is a pain. Plus NSC is not always built and used. Plus using NSC is not that obvious how to chain two NATs with completely different behaviors.
> 
> That's basically the real reason about the GSOC project: to be able to use a NAT (and to modify its behavior). You can (and should) of course use the real linux implementation as a guideline, but not all the NATs are linux-based :(
> 
> Cheers,
> 
> T.
> 
> 
> On 25 Mar 2012, at 16:47, anush vishwanath wrote:
> 
>> Hi Tommaso,
>> I found the Linux NAT implementation in the following directory:
>> ns-allinone-3.13/nsc-0.5.2/linux-2.6.18/net/ipv4/netfilter
>> but like you said i guess it was jus implemented on the netfilter module
>> I shall surely look into the code and see how the same functionality can be integrated into the current n3 system.
>> Thank you for clearing up my doubt about what exactly the problem statement was :)
>> Regards,
>> Anush V
>> 
>> On Sun, Mar 25, 2012 at 8:01 PM, Tommaso Pecorella <tpecorella at mac.com> wrote:
>> Hi Anush,
>> 
>> can you point me to the files you're mentioning ?
>> 
>> I'm pretty sure there's not this kind of functionality in ns-3, even if (of course) there are the relevant IP layers.
>> 
>> In order to successfully implement a NAT, you'll need IP and port mangling.
>> 
>> There is an old repository (http://code.nsnam.org/tomh/ns-3-netfilter/) where a simple netfilter was implemented, but lacking the NAT features.
>> 
>> Now, since Linux does the NAT inside netfilter (well, not exactly, but close to), I'd start by looking at that code and checking where it's the best place to handle the NAT thing. Mind that the repository is *really* old, so you'll need to take the code in thee and adapt it to run on the newest ns-3-dev, and that's not a simple copy-paste. Anyway, it's a start.
>> 
>> Best regards,
>> 
>> T.
>> 
>> 
>> 
>> On 25 Mar 2012, at 15:49, anush vishwanath wrote:
>> 
>>> Hello Lalith,
>>> The problem statement to this project says "to be able to mimic the Linux
>>> NAT behaviour"..
>>> so what i did was i went and read about the complete implementation details
>>> on how connections are maintained and NAT is used in Linux..
>>> I had downloaded the ns3 source code like i mentioned earlier.I saw that
>>> the ns 3 code had the same files which Linux uses for NAT
>>> implementation..so if these files already exist in ns 3 what exactly needs
>>> to be done???what does the project require to be done??
>>> 
>>> Reagrds,
>>> Anush V
>>> 
>>> On Sun, Mar 25, 2012 at 12:53 PM, Lalith Suresh <suresh.lalith at gmail.com>wrote:
>>> 
>>>> Hi Anush,
>>>> 
>>>> On Wed, Mar 21, 2012 at 5:53 PM, anush vishwanath
>>>> <anush.pasteface at gmail.com> wrote:
>>>>> Hello ns-developers,
>>>>> I had mailed you a couple of days back regarding my interest to work for
>>>>> ns3 organisation in the upcoming GSOC 2012.
>>>>> I understand the need to have the NAT functionality to be built into ns3
>>>> as
>>>>> this is being widely used by a lot of people in the world even today.
>>>> IPv6
>>>>> might make NAT redundant but untill the time when the entire world
>>>> switches
>>>>> to IPv6 we must live with NAT and simulations incvolving NAT become
>>>>> important to incorporate into ns3.
>>>>> Tasks already completed:
>>>>> 
>>>>>  - downloaded and built the source code of latest ns3 version
>>>>>  - read the recommended books on the ideas page for GSOC 2012 with
>>>>>  respect to this project
>>>>>  - read the ns3 tutorial and understood the structuring of the varioius
>>>>>  modules under ns3
>>>>> 
>>>>> I would be happy if someone could guide me as to what exactly should i do
>>>>> to be able to come out with a good proposal for this project.
>>>>> 
>>>> 
>>>> I'm pretty sure you will need to look at [1] and take it from there
>>>> for this project. Look at the Ipv4L3Protocol class
>>>> (src/internet/model/ipv4-l3-protocol.cc), and you'll find a bunch of
>>>> netfilter 'hooks' in the code.
>>>> 
>>>> I suggest having a look at our application template and begin filling
>>>> it up. It would be easier to start from a draft.
>>>> 
>>>> [1] http://code.nsnam.org/tomh/ns-3-netfilter/
>>>> 
>>>>> 
>>>>> Regards,
>>>>> Anush V
>>>>> 3rd Year student,
>>>>> PES Institute of Technology,
>>>>> Bangalore, India
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Lalith Suresh
>>>> www.lalith.in
>>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> *Science is the poetry of reality.........*
>> 
>> --------------------------------------------------------------
>> 
>> The nice thing about standards is that there are so many to choose from.
>> And if you really don't like all the standards you just have to wait another year until the one arises you are looking for.
>> -- A. Tanenbaum, "Introduction to Computer Networks"
>> 
>> --------------------------------------------------------------
>> 
>> Tommaso Pecorella - Ph.D.
>> 
>> Assistant professor
>> Dpt. Elettronica e Telecomunicazioni
>> Università di Firenze
>> 
>> CNIT - Università di Firenze Unit
>> 
>> via di S. Marta 3
>> 50139, Firenze
>> ITALY
>> 
>> email: tommaso.pecorella at unifi.it
>>        tommaso.pecorella at cnit.it
>> 
>> phone : +39-055-4796412
>> mobile: +39-320-4379803
>> fax   : +39-055-494569
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> -- 
>> Science is the poetry of reality.........
> 
> --------------------------------------------------------------
> 
> The nice thing about standards is that there are so many to choose from.
> And if you really don't like all the standards you just have to wait another year until the one arises you are looking for.
> -- A. Tanenbaum, "Introduction to Computer Networks"
> 
> --------------------------------------------------------------
> 
> Tommaso Pecorella - Ph.D.
> 
> Assistant professor
> Dpt. Elettronica e Telecomunicazioni
> Università di Firenze
> 
> CNIT - Università di Firenze Unit
> 
> via di S. Marta 3
> 50139, Firenze
> ITALY
> 
> email: tommaso.pecorella at unifi.it
>        tommaso.pecorella at cnit.it
> 
> phone : +39-055-4796412
> mobile: +39-320-4379803
> fax   : +39-055-494569
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Science is the poetry of reality.........

--------------------------------------------------------------

The nice thing about standards is that there are so many to choose from.
And if you really don't like all the standards you just have to wait another year until the one arises you are looking for.
-- A. Tanenbaum, "Introduction to Computer Networks"

--------------------------------------------------------------

Tommaso Pecorella - Ph.D.

Assistant professor
Dpt. Elettronica e Telecomunicazioni
Università di Firenze

CNIT - Università di Firenze Unit

via di S. Marta 3
50139, Firenze
ITALY

email: tommaso.pecorella at unifi.it
       tommaso.pecorella at cnit.it

phone : +39-055-4796412
mobile: +39-320-4379803
fax   : +39-055-494569








More information about the Ns-developers mailing list