Those of you who use Dynamips and Dynagen are familiar with the .net files that are necessary for the virtual routers to interoperate (example). Cisco IOU also uses a file, named “NETMAP” to describe the virtual topology.
Here’s a simple NETMAP file:
101:0 101:18 102:2 102:0
There are two routers represented here, identified by “application ID” values 101 and 102 (which you pass to the IOU images when starting them up).
The first and last lines represent an interface which is connected to nothing. The second line shows that the interface on 101 identified by 18 is connected to the interface on 102 identified by 2. Where do these numbers come from you ask?
Unlike Dynamips/Dynagen, “NETMAP” does not use interface names but, rather, interface IDs. The IDs are not tied to a specific interface type (e.g. Serial or Ethernet). When launching an IOU instance, you can specify (via the command-line) which interfaces you want and how many. The ID used for Serial1/2 and Ethernet1/2 would be the same and, as such, it’s impossible to have both of those interfaces in an single instance.
To calculate the ID used by “interface x/y”, you would use the following formula:
id = x + (y * 16)
- interface 0/0 = 0
- interface 0/3 = 48
- interface 1/2 = 33
- interface 12/1 = 28
Based on this formula, we can see that in the second line of the example NETMAP file, 101’s interface 2/1 is connected to 102’s interface 2/0.
Using this formula (and the resulting values), it should be fairly easily to construct your own NETMAP files from scratch.
Note that you can’t, unfortunately, “bridge” an IOU instance to a physical network without the use of another piece of software named “IOUlive”.