Commit b113d029 authored by Shashi Guruprasad's avatar Shashi Guruprasad

Another bug fix. The newly added $ns ip-connect instproc had a bug. The

code originally tried to do a normal $ns connect between traffic agents
attached to simnodes on the same pnode. The problem that I forgot of course
is that partitioned topology is quite disconnected which means that a
packet is forced to exit the pnode and come back to it (in many cases).
In other words, a direct intra pnode path does not exist. The fix is
to just use the IP address based routes always. A similar problem
is encountered in pdns as well. However, since IP address based routing
is not used, there is no simple fix unless I work on it!

The 416 node topology testbed/nse416 is working alright. It mapped to
20 pnodes and as soon as a whole bunch of traffic started up, 7 pnodes
couldn't track real-time and caused a modify. Expt modify happened 3
times but eventually max_retries in my re-swapping code was reached. Need
more measuring, tuning as well as eventrate based re-swapping.
parent 4b9acdc6
...@@ -600,7 +600,7 @@ ...@@ -600,7 +600,7 @@
Classifier/Hash set default_ -1; # none Classifier/Hash set default_ -1; # none
--- dist-ns-allinone-2.26/ns-2.26/tcl/lib/ns-lib.tcl Wed Feb 26 15:09:37 2003 --- dist-ns-allinone-2.26/ns-2.26/tcl/lib/ns-lib.tcl Wed Feb 26 15:09:37 2003
+++ ns-allinone-2.26/ns-2.26/tcl/lib/ns-lib.tcl Thu Dec 4 17:19:59 2003 +++ ns-allinone-2.26/ns-2.26/tcl/lib/ns-lib.tcl Mon Jan 12 00:36:16 2004
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
# -*- Mode:tcl; tcl-indent-level:8; tab-width:8; indent-tabs-mode:t -*- # -*- Mode:tcl; tcl-indent-level:8; tab-width:8; indent-tabs-mode:t -*-
# #
...@@ -630,7 +630,7 @@ ...@@ -630,7 +630,7 @@
# $agent set nodeid_ [$node id] # $agent set nodeid_ [$node id]
} }
@@ -2045,3 +2048,177 @@ @@ -2045,3 +2048,167 @@
} }
} }
...@@ -787,26 +787,16 @@ ...@@ -787,26 +787,16 @@
+} +}
+ +
+Simulator instproc ip-connect { agent ip port } { +Simulator instproc ip-connect { agent ip port } {
+ set localnode [$self ip-to-node $ip] + set ipaton [$self inet-aton $ip]
+ if { $localnode != {} } { + $agent set dst_addr_ $ipaton
+ set localagent [$localnode agent $port] + $agent set dst_port_ $port
+ if { $localagent != {} } { +
+ $self connect $agent $localagent + $agent instvar node_
+ } else { + $node_ instvar nodeiplist_
+ + # We just use one of the IP addresses of src node
+ } + # as the agent's src address
+ } else { + set srcipaton [$self inet-aton [lindex $nodeiplist_ 0]]
+ set ipaton [$self inet-aton $ip] + $agent set agent_addr_ $srcipaton
+ $agent set dst_addr_ $ipaton
+ $agent set dst_port_ $port
+
+ $agent instvar node_
+ $node_ instvar nodeiplist_
+ # We just use one of the IP addresses of src node
+ # as the agent's src address
+ set srcipaton [$self inet-aton [lindex $nodeiplist_ 0]]
+ $agent set agent_addr_ $srcipaton
+ }
+} +}
--- dist-ns-allinone-2.26/ns-2.26/tcl/lib/ns-link.tcl Wed Feb 26 15:09:37 2003 --- dist-ns-allinone-2.26/ns-2.26/tcl/lib/ns-link.tcl Wed Feb 26 15:09:37 2003
+++ ns-allinone-2.26/ns-2.26/tcl/lib/ns-link.tcl Tue Dec 2 00:57:03 2003 +++ ns-allinone-2.26/ns-2.26/tcl/lib/ns-link.tcl Tue Dec 2 00:57:03 2003
...@@ -2395,7 +2385,7 @@ ...@@ -2395,7 +2385,7 @@
icp->icmp_cksum = Internet::in_cksum((u_short*)icp, icp->icmp_cksum = Internet::in_cksum((u_short*)icp,
8 + sizeof(ip) + 8); 8 + sizeof(ip) + 8);
--- /dev/null Wed Jan 7 01:55:37 2004 --- /dev/null Mon Jan 12 00:37:15 2004
+++ ns-allinone-2.26/ns-2.26/emulate/icmp.h Sun Dec 14 20:33:36 2003 +++ ns-allinone-2.26/ns-2.26/emulate/icmp.h Sun Dec 14 20:33:36 2003
@@ -0,0 +1,50 @@ @@ -0,0 +1,50 @@
+/* +/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment