[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Using Raw IP in emulator



I have just looked at the code of the Pcap network object and found the
Network/Pcap/File object. This could be the thing I am looking for.
I have two questions concerning this object:

1) The manual mentions that a tcpdump-like trace file can be used. What is
the exact format and how can I tell the object it has to use a specific
file.
2) If I understand correctly the object can use the tcpdump info to generate
the real-life packets which can be sent to e.g. a Raw IP socket.

So if I understand correctly I can generate my own tracefile in a
tcpdump-like format and replay this using Network/Pcap/File, is this
correct?
If this is the case it saves me a lot of coding to get what I want so any
additional info would be greatly appreciated.

Thanx,
Mark Janssen

----- Original Message -----
From: Alefiya Hussain <[email protected]>
To: Mark Janssen <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, April 18, 2001 6:01 PM
Subject: Re: [ns] Using Raw IP in emulator


>
> To contact the "real-world" node from ns you would require to generate
> UDP-IP packets destined for 10.0.0.2 and then write them out on the raw
> socket.
>
> This functionality is currently not available in ns.
>
> ns emulation currently picks up packets from the network using pcap ,
> passes them through ns simulator and then put it back on the network.
>
> Hence you could emulate the following currently:
>
> 10.0.0.1 - - - - - n2----------n1 - - - - - - 10.0.0.2
> PCAP       Network/IP
>
> I hope that helps,
> - Alefiya
>
> On Wed, 18 Apr 2001, Mark Janssen wrote:
>
> > Hello all,
> >
> > I have succeeded in compiling nse on FreeBSD 4.2 and all seems to work
just fine.
> > Now I have a question on raw-ip ports.
> > I want to achieve the following.
> > I want to connect two nodes with eachother. n2 will be connected to a
CBR source and n1 to a raw ip object.
> > The traffic should then be sent on the real network to another machine
with ip 10.0.0.2. So graphically:
> >
> > n2----------------n1 - - - - - - - - - - - - 10.0.0.2
> > CBR            Network/IP
> >
> > How can I achieve this? I have looked at the examples but that are
mostly opposite
>  situations where the ip sockets forward traffic which has been recieved
by a PCAP agent.
> > But I don't want to use captured traffic. I want to generate my own,
>  which leaves me puzzled. How can I set the destination IP-address of the
CBR traffic?
> >
> > Any help would be greatly appreciated.
> >
> > Best regards,
> >
> > Mark Janssen
> >
>
>