Notes on arbitrary node addressing in ns

I modified the ns source code such that arbitrary node addresses could be specified. The syntax that works is as follows:

set node [$ns node 1.3.4.5]
    

or

set node [$ns node 4598]
    

Clearly, the second variant is not so useful.

The addressing scheme that I chose simply maps dotted quad notation into a 32-bit long and stores this as the addr. A couple of helper functions were written to convert from dotted quad to integer and vice versa.

I compiled and ran the software. I tried to validate it with ns, but it caused some things to break. The following tests failed: test-all-wireless-lan.tcl, test-all-wireless-lan-newnode.tcl, test-all-greis.tcl . Note that test-all-webcache.tcl and test-all-aimd.tcl were broken before: these do not seem to be broken now - I do not know why this is the case. The wireless lan test suite breaks because it uses (to some extent) hierarchical addressing, but not within the context of hierarchical routing (I think). This caused a clash with my new addressing mechanism. The greis test used dynamic routing, and this seemed to break with the new addressing mechanism. Again, I'm not sure why. I don't know why the wireless-lan-newode test failed.


Sean Murphy
Last modified: Mon Jun 26 10:36:20 BST 2000