Saturday, May 7, 2011

Cisco IOU -- Part 3

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)

Examples:

    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”

1 comment:

  1. how to specify tunnel interface on netmap file

    ReplyDelete