Hello everyone,
I'm currently considering using ns3 to simulate a particularly odd
network I want to see if this is possible, and if so, what would be
the best way to go about doing so.
The network that I'm trying to simulate is a token-ring type network
that was implemented and ran on some microprocessors linked together
over RS232 type links(a ring of four at the time). I have the code
that ran on those processors(it's written in c) and it seperates
network from physical from application so porting to a different
underlying technology isn't that hard. However, some assumptions are
made(and correct me if I'm wrong) in ns3 like the fact that each
packet must contain a protocol number which don't fully suit me.
>
> I don't want to put ip or arp over my protocol. What I'm trying to do
> is simulate a full fledged protocol stack(from layer 2 all the way
> up). The token ring is actually a replacement for layer 3 not layer
> 2.
Well, you don't need to use the ns-3 Node and NetDevice class then. All
you need to do is reuse only the src/simulator, src/core, and src/common
code.
Mathieu
> Well, okay then. So how do I learn how to use these? All the examples
> provided use the node abstraction and most of the documentation refers
> to it. So how do I start off with this? I'm not really familiar with
> ns3. So what should I read(source code is an option, of course, but it
> helps if I have a higher level description of how things work
> together)
Well, you are saying that you don't need ip, you don't need to interface
with other ns-3 models, so, all you need is samples/main-simulator.cc
Or, maybe, you want to simulate networks with mixes of your stuff and
other ns-3 network models ? If so, how do you plan to make them
inter-operate at the networking level ?
Mathieu
Mathieu
>
>
>
>
>
>
>
>
> >
>
> Yep, that's exactly what I want to do, implement a different layer 3(A
> token ring network rather than an IP based network with routers and
> whatnot). Where nodes on the ring communicate via point to point
> channels to their neighbours. I'll take a look at the way
> ipv4-l3-protocol works and see if I can figure this out.
And to allow an application to send traffic to this layer 3, you will
need to create a SocketFactory. i.e., see Ipv4RawSocketFactoryImpl
Mathieu
>