Hello,

I am a research student at the King's College London. I built a wired
topology only as enclosed picture 'topology'.
What I want to do is some kind of source routing. Let me give an example.

If you look at the topology I created, and consider node 3 (on the left-hand
side). What I want to do is from this node to route packets coming from node
7 (MAG 0) to node 1 (LMA1), and in the same time route packets coming from
node 8 (MAG1) to node 4.
Maybe one can call it multi-path routing, but I am not sure about it.

I already made up a basic routing, which can be named destination routing,
as follows :
*
# This procedure is used to add explicitly
# routes to a node, overriding the routing
# policy used (e.g. shortest path routing).
# Tested currently with static ns2 routing.
# Essentially, it is used to add policy-routing
# entries in realistic network topologies.
#
# Parameters:
#
#       node: the ns2 node, to which the route
#             entry is added to. This parameter
#             is of type Node.
#       dst: the destination, to which the route
#            entry refers to. This parameter
#             is of type Node.
#       via: the next hope node, that the local node
#            will use to access the destination node.
#            This parameter is of type Node.

proc addExplicitRoute {node dst via } {
       set link2via [$node nexthop2link [$via node-addr]]
       if {$link2via != -1} {
               $node add-route [$dst node-addr] [$link2via head]
       } else {
               puts "Warning: No link exists between node [$node
node-addr] and [$via node-addr]. Explicit route not
added."
       }
} *

It works perfectly as far as we know the destination of the packets. But I
need another parameter which is the source, from which the route entry
refers to.
Does anybody have any idea about this issue?

Thank you very much,
I am looking forward to your answer and your help.

Alexandre Jaron,
MSc student.

Reply via email to