The Dynamips hypervisor mode used by GNS3 uses a TCP/IP communications channel. This means that GNS3 may run on one machine, while the Dynamips emulator may run on a different machine. Choose IOS images and hypervisor on the Edit menu in GNS3. Under the Hypervisors tab, manually specify a hypervisor.
Here we recorded a 2 new hypervisors which will listen respectively on port 7211 and 7212 on the “remote_host” machine. You can also specify the fully qualified path to the working directory where the hypervisors will store all of their generated files on the Dynamips host. Be sure to use the correct directory separation character for the platform. You must use a DNS name or an IP address in the Host text box.
Base UDP is the base port for UDP NIOs that Dynamips uses to make the connections between your nodes. Dynamips will use a UDP port for each end of a link. For example, six UDP ports are used for a full meshed lab of 3 routers and a base udp of 10000.
NIO stands for Network I/O. These are the network interfaces coded in Dynamips that allow it to communicate in many ways, such as Ethernet, UDP, or TCP.
Here is an output of the netstat command that shows you the connections between the nodes and the UDP port picked up by Dynamips.
udp localhost:10000 localhost:10001 ESTABLISHED udp localhost:10001 localhost:10000 ESTABLISHED udp localhost:10002 localhost:10003 ESTABLISHED udp localhost:10003 localhost:10002 ESTABLISHED udp localhost:10004 localhost:10005 ESTABLISHED udp localhost:10005 localhost:10004 ESTABLISHED
Now let’s imagine you want to run two connected IOS instances which are separately created on 2 different hypervisors on the same host, and you choose the same UDP base for the hypervisors. Each hypervisor will try to take the same UDP port (10000 in the previous example) for each end of the connection and, of course, this will collide because Dynamips thinks they are different servers and therefore those UDP ports are safe to re-use.
Base console is the TCP base port that the hypervisor will use when you open a console on an IOS. This value shouldn’t collide because GNS3 uses the following formula to affect a console port to each router: base port + router id (which is unique). So it is safe to use the same value for every hypervisor.
Once your hypervisors are recorded, you can bind them to your IOS images. Select your image, uncheck the Use the hypervisor manager option, and then choose your hypervisor in the list. You may choose more than one hypervisor by holding the Ctrl key down. GNS3 will automatically load balance based on memory consumption. Now every router that is configured with this IOS image is able to communicate with the hypervisor(s).
Note: be sure that any host-based firewalls running on all your Dynamips servers (for example, XP SP2’s firewall) are permitting the necessary traffic. This includes the Dynamips server port (defaults to TCP 7200), the console ports (e.g. TCP 2000, 2001, …) and the ports used by the NIO connections between interfaces, which start at UDP 10000 and work up from there.