Hi all,
I was trying to simulate the following topology:
Node1-----<p2p link>-------Node2-------<p2p link>-------Node3
I wanted to send data from Node 1 to Node 2 for starters and stumbled across the following
1)For the following case:
NetDeviceContainer devices1,devices2;
devices1 = pointToPoint.Install (nodes1.Get(0),nodes1.Get(1));
devices2 = pointToPoint.Install (nodes1.Get(1),nodes1.Get(2));
Ipv4AddressHelper address;
InternetStackHelper stack;
stack.Install (nodes1);
address.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer interfaces1 = address.Assign (devices1);
Ipv4InterfaceContainer interfaces2 = address.Assign (devices2);
My trace file showed the following:
reading from file p2p-0-0.pcap, link-type PPP (PPP)
05:30:01.000000 IP 10.1.1.1.49153 > 10.1.1.2.5000: Flags [S], seq 0, win 65535, length 0
05:30:04.000000 IP 10.1.1.1.49153 > 10.1.1.2.5000: Flags [S], seq 0, win 65535, length 0
and I obviously ended up with Zero throughput.
2)For this set of code:
NetDeviceContainer devices1,devices2;
devices1 = pointToPoint.Install (nodes1.Get(0),nodes1.Get(1));
devices1.Add(pointToPoint.Install (nodes1.Get(1),nodes1.Get(2)));
InternetStackHelper stack;
stack.Install (nodes1);
Ipv4AddressHelper address;
address.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer interfaces1 = address.Assign (devices1);
I again ended up with above result - No data was sent
3)but when i modified the address assigning part and explicitly added devices1.Get(1) to address, the packets were being sent. I have pasted the code below
NetDeviceContainer devices1,devices2;
devices1 = pointToPoint.Install (nodes1.Get(0),nodes1.Get(1));
devices1.Add(pointToPoint.Install (nodes1.Get(1),nodes1.Get(2)));
/************************************************/
InternetStackHelper stack;
stack.Install (nodes1);
Ipv4AddressHelper address;
address.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer interfaces1 = address.Assign (devices1);
interfaces1.Add(address.Assign(devices1.Get(1)));
For just a simple Node1-------Node2 topology , everything works fine (I simple avoided assigning a netdevice/IP address to the Node2---Node3 link in the same code),so i suspect a bug with ipv4interfacecontainer or the netdevicecontainer. If this is a bug , how does one exactly spot the wrong function call or anomaly etc?
[I have attached the complete code of my simulation also (I use ns-3.19).]
Thanks!