It is currently Mon Nov 18, 2019 10:40 pm


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Using VPCS 0.5a1 with GNS3
PostPosted: Sat Aug 10, 2013 4:56 pm 
Offline

Joined: Sat Aug 10, 2013 4:44 pm
Posts: 1
1. Download VPCS sources from http://sourceforge.net/projects/vpcs/ - click on the Code tab, select the Trunk Folder, find the "Download Snapshot" Link and click on it.

2. Decompress it (You can do it in GUI)

3. Open a terminal and go into "src" directory

4. Run following command:

make -f Makefile.linux
Code:
./mk.sh

[2014-09-30: Edit by RedNectar: ./mk.sh will work on all versions, not just linux]

5. Now you can see two executable files ("hv" and "vpcs").
Now you see an executable file ("vpcs")
[2014-09-30: Edit by RedNectar: hv is deprecated since v0.5b2]


6. Run "hv" as follows:
Run the VPCS in hypervisor mode as folows:
[2014-09-30: Edit by RedNectar: hv is deprecated since v0.5b2. The hypervisor function is activated by a -H parameter now]
./hv
Code:
./vpcs -H 21000


Now you can see following message

"VPCS Hypervisor is listening on port 21000"

[2014-09-30: Edit by RedNectar: Activating the hypervisor produces no output now]

7. Run following command:

Code:
      telnet localhost 21000


Now you are connected to VPCS hypervisor and you get a HV> prompt.

8. Type following command at the HV> prompt:

Code:
      vpcs


Now you can see following message:

100-VPCS started with -p 21001 -s 20000 -c 30000

9. Open another terminal and run following command:
[2014-09-30: Edit by RedNectar: Opening another terminal is optional now. You can issue the telnet (or rlogin) command from within the hypervisor itself]

Code:
      telnet localhost 21001

After few messages you will get following prompt:

VPCS[1]>

10. To create first PC with IP: 192.168.0.1/24 and GW:192.168.0.254 enter following:

Code:
   ip 192.168.0.1 192.168.0.254 24


and first PC will be created.

11. To create second PC type 2 and press Enter key. Then you will get following prompt:

Code:
      VPCS[2]>

Now you can set ip address as you in step 10.

12. Start GNS3 go to Symbol Library. Choose Symbol Manager on the Edit menu after opening GNS3.

Click the computer symbol under Available symbols, then click right arrow button between the windows. This will move the symbol into the Customized nodes column. In the Name box, type PC. Use the drop-down arrow to change the type to Cloud, if necessary. Click the Apply button. Then click OK. In the GNS3 Nodes Types column, you should now see a computer icon.

{ Extracted from http://www.gns3.net/documentation/gns3/ ... opologies/ }

13. Drag a switch and several PCs to into the workspace.

14. When you connect PCs to switch use following ports:

PC1: nio_udp:30000:127.0.0.1:20000
PC2: nio_udp:30001:127.0.0.1:20001
PC3: nio_udp:30002:127.0.0.1:20002

and so on.


15. Now you can select second terminal where you specified the ip addresses of PCs and use ping commands to ping between you PCs. For example, if ip address of first PC is 192.168.0.1 then you can select second PC as follows:

VPCS[1]> 2
VPCS[2]> ping 192.168.0.1

Or you can connect your switch to a router and configure it and test the connectivity.

Please consider this as a guide line to work with VCPS. If you need any help please post it for a reply.




Last edited by rednectar on Tue Sep 30, 2014 10:24 am, edited 2 times in total.
Added link and instructions to download source - put code in code blocks, edited version number


Top
 Profile  
 
 Post subject: Re: Using VPCS 0.5a1 with GNS3
PostPosted: Mon Aug 12, 2013 10:29 am 
Offline

Joined: Fri Mar 05, 2010 11:33 am
Posts: 1494
Location: Australia
Nice post Ajith.

Actually, from step 12 onwards it is easier than you think - you can just add a Host device (you don't have to play with a the symbol manager) and you will find it is already preconfigured with a bunch of ports, including the nine base ports for VPCS.
Attachment:
vpcs.jpg
vpcs.jpg [ 75.81 KiB | Viewed 7786 times ]

Also you don't HAVE to use the hv command - you can run vpcs as a stand alone application, and if you install it in your path (eg /usr/bin/) then you can access the VPCS command interface directly from the GNS3 Tools | VPCS menu option.

The hv command gives you a hypervisor which makes it a convenient way to run multiple VPCS sessions if you need more than 9 virtual PCs.

_________________
RedNectar
http://rednectar.net
@rednectarchris
GNS3 WorkBench-a VMware image of Ubuntu with GNS3 and VPCS installed and a collection of exercises/labs


Top
 Profile  
 
 Post subject: Re: Using VPCS 0.5a1 with GNS3
PostPosted: Wed Aug 14, 2013 10:35 pm 
Offline

Joined: Thu Jul 26, 2012 11:19 pm
Posts: 143
Location: U.K.
Thanks both for an interesting insight to vpcs and hv.

I just grabbed the code to have a go at building it on Centos 6.4. My build initially failed, had to install glibc-static as vpcs makes a statically-linked binary (which means it should run on any Linux system without any dependency issues).

I then re-built it without static linking (reduces the size from 800k to 100k) and put the binaries in /usr/local/bin. Launching hv then complained "Can not resolve the path: hv". Discovered that it needs to be launched with hv -f /usr/local/bin/vpcs and all is now well.

I can only see hv listening on 0.0.0.0 ipv4, not ipv6 ::1. telnet locahost tries the ipv6 address first before falling back to the ipv4 address - better to telnet to 127.0.0.1 21000

Nick.

_________________
GNS3 0.8.4 running on Windows 8.1
GNS3 0.8.4 running on CentOS 6.5


Top
 Profile  
 
 Post subject: Re: Using VPCS 0.5a1 with GNS3
PostPosted: Wed Aug 14, 2013 10:49 pm 
Offline

Joined: Fri Mar 05, 2010 11:33 am
Posts: 1494
Location: Australia
Yep. It's very much IPv4 dependant - and even the IPv6 functions are VERY basic. I did a tutorial once - bit old now just google "vpcs tutorial" and you'll find it.

_________________
RedNectar
http://rednectar.net
@rednectarchris
GNS3 WorkBench-a VMware image of Ubuntu with GNS3 and VPCS installed and a collection of exercises/labs


Top
 Profile  
 
 Post subject: Re: Using VPCS 0.5a1 with GNS3
PostPosted: Thu Aug 15, 2013 10:47 am 
Offline

Joined: Sun Sep 16, 2012 9:55 pm
Posts: 541
Location: England
nickbeee wrote:
I just grabbed the code to have a go at building it on Centos 6.4. My build initially failed, had to install glibc-static as vpcs makes a statically-linked binary (which means it should run on any Linux system without any dependency issues).


It's interesting you mention this as i'm in the process of building a deb package for vpcs. In your opinion would it be better to build statically-linked or dynamic?

_________________
Daniel
Forum Moderator & Debian Package Maintainer for GNS3, Dynamips & VPCS.
Standalone DEB Packages are available from http://gns3.serverb.co.uk - To be updated!


Top
 Profile  
 
 Post subject: Re: Using VPCS 0.5a1 with GNS3
PostPosted: Thu Aug 15, 2013 4:42 pm 
Offline

Joined: Thu Jul 26, 2012 11:19 pm
Posts: 143
Location: U.K.
claydon_dan wrote:
It's interesting you mention this as i'm in the process of building a deb package for vpcs. In your opinion would it be better to build statically-linked or dynamic?


If you're building a package then you could make it dynamic as long as it checks for library dependencies (however that works in Debian. I'm still figuring out package building...).

The diff to my Makefile:
Code:
8c8
< LDFLAGS=-lpthread -lutil -s -static
---
> LDFLAGS=-lpthread -lutil


Nick.



_________________
GNS3 0.8.4 running on Windows 8.1
GNS3 0.8.4 running on CentOS 6.5


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO