Hey,
I'm trying to simulate the following network topology:
+---------+.1 +----------+ .17+---------+
| +-------------+.2 .18 -------------+ |
| End | | | | End |
| Node +-------------+.3 .19 -------------+ Node |
| |.1 | | .17| |
+---------+ +----------+ +---------+
subnet A subnet B
P2P P2P
There are 3 node, the left node is node 0, the right in is node 1, and node 2 in the middle.
Between nodes 0,2 and 1,2 there are 2 P2P connections, and on the end nodes both devices have the same IP.
I gave an example - there are 2 subnets in my case, and each of the end nodes receives the same ip (X.1 for node 0, X.17 for node 2).
The middle node is used as a router.
All of node's devices are connected to the same remote router (in the above example all links connected to node 0 will be connected on the other side to node 2).
Routing configuration:
Config::SetDefault ("ns3::Ipv4GlobalRouting::FlowEcmpRouting",BooleanValue(true));
Config::SetDefault ("ns3::Ipv4GlobalRouting::RespondToInterfaceEvents", BooleanValue (true));
When I'm sending a packet from node 0 to node 1, it looks like it knows it has 2 routes, and it uses 5-tuple hash to choose
one of the routes, but it seems that both routes have the same source device id (meaning the packet is sent on the same network device).
I'll add that when I have a single P2P connection on each subnet my simulation runs as expected, I'm now tweaking the code a bit to try and make it work with multiple P2P connections.
I'm trying to get ECMP routing, where packets from node0 and node2 can be sent from either one of the devices (depending on the udp source port).
My questions are -
1. Is this the right way to simulate multiple network devices with the same ip on a single node?
2. How can I tell if node 0 is actually sending packets on both interfaces, and not only on one of the interfaces? I'm sending multiple packets with different udp source port.
Please let me know if there are any technical details missing in my questions.
Thank you for your help,
Ofri