A very simple and lightweight ping/traceroute-capable host for your GNS3 LAB. Nice to have!

I’ve been using GN3/Dynamips occasionally to verify ideas in IP routing implemented with Cisco IOS. Whenever I needed to simulate a host within my setups I’ve used routers with IP routing disabled. However, this is a total waste of CPU which is rather valuable resource in a laptop-based GNS3 environment like mine. A simple and very lightweight PC simulator called VPCS comes very handy in situations where ping and traceroute are all you basically need to test your design and network behaviour.

VPCS can simulate up to 9 PCs. Each of them uses a pair of UDP ports to talk and listen to Cisco routers that run in GNS3 environment. Virtual PC number n (where n = 0, 1, …, 8) listens on the UDP port 20000+n and waits for the Dynamips to connect. It sends the packets to the UDP port 30000+n. In GNS3 each PC is represented as a Cloud service with a NIO UDP interface (Network Input and Output for UDP) with local port 30000+n and remote port 20000+n. This is how it looks like in GNS3:

C1 node in GNS3

Here is a very trivial example that shows, how VPCS can be used to simulate a host:

GNS3 with 2 VPCs

Two PCs are connected with a IPv6 router configured like this:
ipv6 unicast-routing
ipv6 cef
!
interface FastEthernet0/0
 no ip address
 ipv6 address 2001:DB8:1::/64
 ipv6 enable
!
interface FastEthernet0/1
 no ip address
 ipv6 address 2001:DB8:2::/64
 ipv6 enable
!

VPCS runs as a standalone program on my PC. Both virtual PCs are automatically configured by SLAAC and they can communicate with each other. In the example below I’ve tried a basic ping and traceroute from PC 2:
$ vpcs

Welcome to Virtual PC Simulator, version 0.5b0
Dedicated to Daling.
Build time: Sep 20 2013 08:39:41
Copyright (c) 2007-2013, Paul Meng (mirnshi@gmail.com)
All rights reserved.

VPCS is free software, distributed under the terms of the "BSD" licence.
Source code and license can be found at vpcs.sf.net.
For more information, please visit wiki.freecode.com.cn.

Press '?' to get help.

VPCS[1]>
VPCS[1]> ip auto
GLOBAL SCOPE      : 2001:db8:1:0:2050:79ff:fe66:6800/64
ROUTER LINK-LAYER : ca:00:5c:4a:00:08

VPCS[1]> 2
VPCS[2]> ip auto
GLOBAL SCOPE      : 2001:db8:2:0:2050:79ff:fe66:6801/64
ROUTER LINK-LAYER : ca:00:5c:4a:00:06

VPCS[2]> show ipv6

NAME              : VPCS[2]
LINK-LOCAL SCOPE  : fe80::250:79ff:fe66:6801/64
GLOBAL SCOPE      : 2001:db8:2:0:2050:79ff:fe66:6801/64
ROUTER LINK-LAYER : ca:00:5c:4a:00:06
MAC               : 00:50:79:66:68:01
LPORT             : 20001
RHOST:PORT        : 127.0.0.1:30001
MTU:              : 1500

VPCS[2]> show ipv6 all

NAME   IP/MASK                              ROUTER LINK-LAYER  MTU
VPCS1  fe80::250:79ff:fe66:6800/64
       2001:db8:1:0:2050:79ff:fe66:6800/64  ca:00:5c:4a:00:08  1500
VPCS2  fe80::250:79ff:fe66:6801/64
       2001:db8:2:0:2050:79ff:fe66:6801/64  ca:00:5c:4a:00:06  1500
VPCS3  fe80::250:79ff:fe66:6802/64
VPCS4  fe80::250:79ff:fe66:6803/64
VPCS5  fe80::250:79ff:fe66:6804/64
VPCS6  fe80::250:79ff:fe66:6805/64
VPCS7  fe80::250:79ff:fe66:6806/64
VPCS8  fe80::250:79ff:fe66:6807/64
VPCS9  fe80::250:79ff:fe66:6808/64

VPCS[2]> ping 2001:db8:1:0:2050:79ff:fe66:6800

2001:db8:1:0:2050:79ff:fe66:6800 icmp6_seq=1 ttl=62 time=55.691 ms
2001:db8:1:0:2050:79ff:fe66:6800 icmp6_seq=2 ttl=62 time=19.342 ms
2001:db8:1:0:2050:79ff:fe66:6800 icmp6_seq=3 ttl=62 time=20.390 ms
2001:db8:1:0:2050:79ff:fe66:6800 icmp6_seq=4 ttl=62 time=18.130 ms
2001:db8:1:0:2050:79ff:fe66:6800 icmp6_seq=5 ttl=62 time=20.266 ms

VPCS[2]> trace 2001:db8:1:0:2050:79ff:fe66:6800

trace to 2001:db8:1:0:2050:79ff:fe66:6800, 64 hops max
 1 2001:db8:2::   4.427 ms  9.111 ms  9.011 ms
 2 2001:db8:1:0:2050:79ff:fe66:6800   19.590 ms  20.363 ms  19.345 ms

VPCS[2]>


References

Advertisements