[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange behavior in NAM with LANs.



I think I uncovered some strange behavior in NAM. If you run the script
tcl/ex/vlantest-flat.nam it creates a small 3 node lan which is displayed in
NAM. The beginning of the NAM trace file looks something like this:

V -t * -v 1.0a5 -a 0
A -t * -n 1 -p 0 -o 255 -c 15 -a 1
A -t * -h 1 -m 127 -s 8
n -t * -a 4 -s 4 -S UP -v circle -c black
n -t * -a 0 -s 0 -S UP -v circle -c black
n -t * -a 5 -s 5 -S UP -v circle -c black
n -t * -a 1 -s 1 -S UP -v circle -c black
n -t * -a 2 -s 2 -S UP -v circle -c black
X -t * -n 3 -r 20Mb -D 1ms -o left
L -t * -s 3 -d 0 -o up
L -t * -s 3 -d 1 -o down
L -t * -s 3 -d 2 -o up
l -t * -s 4 -d 1 -S UP -r 20000000 -D 0.002 -o right
l -t * -s 5 -d 2 -S UP -r 20000000 -D 0.002 -o left
+ -t 0 -s 4 -d 1 -p tcp -e 1000 -c 0 -i 0 -a 0 -x {4.0 5.0 0 --------S-F
null}
- -t 0 -s 4 -d 1 -p tcp -e 1000 -c 0 -i 0 -a 0 -x {4.0 5.0 0 --------S-F
null}
h -t 0 -s 4 -d 1 -p tcp -e 1000 -c 0 -i 0 -a 0 -x {4.0 5.0 -1 -----------
null}


Now changing the number of LAN nodes to 4 in line 8  "set opt(node) 4", the
script appears to run but NAM does not appear.  Manually launching NAM with
the vlantest-flat.nam trace file causes an immediate Segmentation fault from
NAM.  The beginning of the NAM trace file now looks like this:

V -t * -v 1.0a5 -a 0
A -t * -n 1 -p 0 -o 255 -c 15 -a 1
A -t * -h 1 -m 127 -s 8
X -t * -n 4 -r 20Mb -D 1ms -o left
L -t * -s 4 -d 0 -o up
L -t * -s 4 -d 1 -o down
L -t * -s 4 -d 2 -o up
L -t * -s 4 -d 3 -o down
n -t * -a 0 -s 0 -S UP -v circle -c black
n -t * -a 5 -s 5 -S UP -v circle -c black
n -t * -a 1 -s 1 -S UP -v circle -c black
n -t * -a 6 -s 6 -S UP -v circle -c black
n -t * -a 2 -s 2 -S UP -v circle -c black
n -t * -a 3 -s 3 -S UP -v circle -c black
l -t * -s 5 -d 1 -S UP -r 20000000 -D 0.002 -o right
l -t * -s 6 -d 2 -S UP -r 20000000 -D 0.002 -o left
+ -t 0 -s 5 -d 1 -p tcp -e 1000 -c 0 -i 0 -a 0 -x {5.0 6.0 0 ----------F
null}

It looks almost identical as the first file except that in this case the
lines beginning with "L" come before the lines that begin with "n". It
appears that ns is recording the Link state before the Node states which NAN
apparently does not like and causes the Seg fault. If I then edit the file
and move the 'L' lines to just after the 'n' lines, NAM happily displays the
simulation. Is this a bug or have I missed something?

I'm using the ns-2.14b-current (9/29/98) and nam-1.0a6-current (10/1/98).

thanks,

art mena
Boeing Reusable Space Systems
USC