[Ns-developers] Possible approaches to modelling optical pass through devices

Vedran Miletić rivanvx at gmail.com
Sun Mar 11 04:00:39 PDT 2012


I'm hoping to post somekind of repository with somekind of working
optics, but I have to decide on this before proceeding.

In optics there is a lot switch or hub-like devices with some kind of
"pass through" property, i.e. device just forwards packets (better say
signals but let's ignore this for now) in various ways. Some of them
also have a control plane that understands IP routing and changes
their state in accordance to messages exchanged with peers over IP. I
see a couple of different approaches to modelling this. Let's see an
example with modelling optical cross connect (OXC), which is some kind
of a switch.

First off, modelling switching tables is not a problem, a properly
used std::map<> work just fine here. However, ns-3 architecture (or
optics) does seem tricky. There are three approaches that I see:

1) Introduce class WdmOxcDevice : public Object; this will contain a
list of WdmNetDevices (which are kind of ports) and be used for
handling interconnection between them. There are at least two problems
 * each of WdmNetDevices has it's own MAC address (and it shouldn't)
 * Ipv4GlobalRouting will probably ignore presence of
WdmMyPassThroughDevice and just use WdmNetDevices on a Node as regular
PtP devices
Solution to first one is "ignore MAC address", which is fine but not
in alignment with ns-3 design philosophy of being close to real world.
Solution to second one is to avoid Ipv4GlobalRouting and implent own.
But if I'm going far enough to implement routing that works with this,
I can implement control plane in addition. So I would prefer to make
this data plane something more lowerlayer.

2) Make WdmOxcDevice : public NetDevice and make IsPointToPoint()
return false. This crashes Ipv4GlobalRouting, but that's OK as I
haven't expected anything else. Putting IsBridge() to true requires a
BridgeNetDevice object, which gave me another idea.

3) Make WdmOxcDevice : public Object and add WdmOxcControlNetDevice
that would have PtP connection to peer devices at other Nodes and work
with Ipv4GlobalRouting to handle changing switch forwarding tables.
Would a BridgeNetDevice work for this instead?

And the main question is: if I missed it completely, what is the
general approach to modelling pass through devices in ns-3 and in
which cases and how should one "aggregate" channels, as it was done in

Thanks in advance.


More information about the Ns-developers mailing list