搜索
您的当前位置:首页正文

VPCS官方使用指南

来源:二三娱乐
Usage

vpcs [options]

-u udp mode, default

-e tap mode, using /dev/tapx

-s port local udp port, default from 20000

-c port remote udp port(dynamips udp ports), default from 30000 -r file run startup file VPCS[1]> ?

show Print the net configuration of PCs

d Switch to the PC[d], d is digit, range 1 to 9 history List the command history ip [arguments] Configure PC's IP settings

dhcp Configure host/gateway address using DHCP arp Show arp table ping address [options] Ping the network host

tracert address [maxhops] Print the route packets take to network host echo [text] Display text in output

clear [arguments] Clear ip/ipv6, arp/neighbor cache

set [arguments] Set hostname, connection port and echo on or off load filename Load the configuration/script from the file 'filename' save filename Save the configuration to the file 'filename' ver Show version ? Print help quit Quit program VPCS[1]> sh

NAME IP/CIDR GATEWAY MAC LPORT RPORT VPCS1 192.168.1.2/24 192.168.1.1 00:50:79:66:68:00 20000 30000 fe80::2050:79ff:fe66:6800/64

VPCS2 0.0.0.0/0 0.0.0.0 00:50:79:66:68:01 20001 30001 fe80::2050:79ff:fe66:6801/64

2001:1::2050:79ff:fe66:6801/64 eui-64

VPCS3 192.168.11.2/24 192.168.11.1 00:50:79:66:68:02 20002 30002 fe80::2050:79ff:fe66:6802/64 2001:11::2/64 eui-64

VPCS4 192.168.12.2/24 192.168.12.1 00:50:79:66:68:03 20003 30003 fe80::2050:79ff:fe66:6803/64

2001:12::2050:79ff:fe66:6803/64 eui-64

VPCS5 192.168.3.5/24 0.0.0.0 00:50:79:66:68:04 20004 30004 fe80::2050:79ff:fe66:6804/64

VPCS6 192.168.3.6/24 0.0.0.0 00:50:79:66:68:05 20005 30005 fe80::2050:79ff:fe66:6805/64

VPCS7 192.168.4.7/24 0.0.0.0 00:50:79:66:68:06 20006 30006 fe80::2050:79ff:fe66:6806/64

VPCS8 192.168.4.8/24 192.168.4.1 00:50:79:66:68:07 20007 30007 fe80::2050:79ff:fe66:6807/64

VPCS9 192.168.4.9/24 192.168.4.1 00:50:79:66:68:08 20008 30008 fe80::2050:79ff:fe66:6808/64 VPCS[9]> p

ping address [options], Ping the network host, Ctrl+C to stop the command -1 ICMP mode, default -2 UDP mode -3 TCP mode -c count packet count -l size data size

-T ttl set TTL, default 64

-p port source and destination port -f flag tcp head flag, |C|E|U|A|P|R|S|F| bits |7 6 5 4 3 2 1 0| -s winsize tcp window size

-t send packet until interrupt by Ctrl+C

-i ms wait 'ms' milliseconds between sending each packet -w ms wait 'ms' milliseconds to receive the response VPCS[9]> i

ip address [gateway] CIDR, Set the PC's ip, gateway's ip and network mask. dhcp Configure host/gateway address using DHCP, only ipv4 auto Stateless address autoconfiguration, only ipv6

PC will try to get the ipv6 address from the router at startup address [gateway] CIDR set the PC's ip, gateway's ip and network mask

Default IPv4 CIDR is 24, IPv6 is 64. In the ether mode, the ip of the tapx is the maximum host ID of the subnet.

'ip 10.1.1.70 10.1.1.65 26', set the host ip to 10.1.1.70,

the gateway ip to 10.1.1.65, the netmask to 255.255.255.192, the tapx ip to 10.1.1.126 in the ether mode.

If in the ether mode, please run it before the dynamips loads/starts the ios.

When VPCS started, it listens the ports from 20000 to 20008 and wait the dymamips to connet, and send the packets to the ports from 30000 to 30008 which should be listened by the Dynamips.

VPCS looks for the file named 'startup.vpc' in the current directory, and execute the commands in it if you are not set the startup file from the command line. All the commands in the startup file are the internal command of the VPCS. The line started with '#' or '!' will be discarded.

# The startup file of VPCS #

# pc1, ipv4 & ipv6 1

ip 172.16.1.1 172.16.1.10 24 ip 2001:1::10 64 # pc2, using dhcp 2 dhcp # pc3, ipv4 3

ip 172.16.3.3 172.16.3.10 24 # pc4, ipv4 & ipv6 4

ip 192.168.4.4 192.168.4.10 24 ip 2001:4::10 64

# switch to PC1 1

.net file (ether mode), please refer to dynagen for details.

# VLAN lab ghostios = True sparsemem = True [localhost] [[ROUTER sw]] model = 2621

image = /ios.run/c2600-ipbase-mz.123-8.T.bin ram = 128 slot1 = NM-16ESW f1/0 = r1 f0/1

f1/1 = NIO_linux_eth:tap0 f1/2 = NIO_linux_eth:tap1 [[router r1]] model = 2621

image = /ios.run/c2600-i-mz.123-6c.bin ram = 32

slot1 = NM-1FE-TX f0/0 = NIO_linux_eth:tap2

.bat (udp mode)

dynamips-wxp.exe -i R1 -T 2000 -P 2600 -r 64 -c 0x2142 -p 1:NM-16ESW -s 1:0:udp:30000:127.0.0.1:20000 -s 1:1:udp:30001:127.0.0.1:20001

-s 1:2:udp:30002:127.0.0.1:20002 ..\\ios.run\\c2600-te.bin

Dynamips loads ios with NM-16ESW module in slot 1, and listens 30000 to 30002. NM-16ESW is 16 port switch module (from f1/0 to f1/15). '-s 1:0:udp:30000:127.0.0.1:20000' means:

1. this is port 0

2. dynamips (or ios) sends the packets from port 30000 to port 20000 which listens by VPCS (PC1). 3. VPCS (PC1) sends the packets from port 20000 to dynamips.

.net file (udp mode)

# VLAN lab ghostios = True sparsemem = True [localhost] [[ROUTER sw]] model = 2621

image = /ios.run/c2600-ipbase-mz.123-8.T.bin ram = 128 slot1 = NM-16ESW f1/0 = r1 f0/1

f1/1 = NIO_udp:30000:127.0.0.1:20000 f1/2 = NIO_udp:30001:127.0.0.1:20001 idlepc = 0x805785a0 [[router r1]] model = 2621

image = /ios.run/c2600-i-mz.123-6c.bin ram = 32

slot1 = NM-1FE-TX

f0/0 = NIO_udp:30002:127.0.0.1:20002 idlepc = 0x804f4044

Note

 The cygwin1.dll used by VPCS maybe conflicted with the older or other

versions, please keep the LATEST cygwin1.dll in the your PC.

 You should run VPCS before starting the dynamips while using ether mode.

VPCS opens the tap interfaces. And you should know, VPCS will CLOSE the tap interfaces before quit.

MD5

 0.21

vpcs32 20b60d282d81e4ad0568f9f6c2a52cc5 vpcs64 cac354e87d49de7dfda536b5cb73589f vpcs.osx d138f76382cd6dc95e22c6653c3d0cd3 vpcs.exe abc613c61ec737b16f2eeb0aad29e05e cygwin1.dll bc68345f873de78310d324320e82fe65

vpcs.exe is windows program, only udp mode.

Under linux or OSX, maybe you need chmod +x vpcs. vpcs.osx is OS X program, only udp mode. ChangeLog

 version 0.21

1. fix many bugs

 version 0.20b

1. make the external tcp server happy 2. fix a bug of the command history function

 version 0.20a

1. new 'ping' command with many option

2. new 'set', set local/remote port and pc name

3. new 'save' and 'load', save the current configuration or load the configuration

4. new 'clear' to zero ip address, arp table

5. now, can stop the running command such as 'ping' or 'tr' by Ctrl+C

6. fix the bugs: 'queue is full' and coredump caused by entering the command 'ip' without parameter.

7. support stateless auto configuration, get ipv6 prefix from RA. 8. support save/load the commmand history automaticlly.

And Easter Egg for XV Anniversary Memorial. ^_^

 version 0.16c

1. Use the new function to parse IPv6 address

 version 0.16a

1. Support IPv6

 version 0.15a

1. Configure the host ip using dhcp.

 version 0.14g

1. Fix the traceroute loop running bug.

 version 0.14f

1. Fix the traceroute TTL bug.

 version 0.14e

1. Fix the bug, parse 'echo' or 'traceroute' command line error, this bug causes core dump.

 version 0.14d

1. Fix the bug that replys the arp request with broadcast address as the source MAC address. Thanks honza1234@7200emu.hacki.at

 version 0.14c

1. change the TTL to 64

 version 0.14b

1. fix the I/O queue bug

 version 0.14a

1. add 'arp' command, show the arp table, 120 seconds expired. 2. add 'echo' command, send tcp/udp packet to the remote host.

 version 0.13a

1. add 'ping/tracert' local host

2. fix a ping bug, can get echo reply from a non-exist host ip

 version 0.12

1. fix the 'tracert' argument bug

 version 0.11

1. replace a static array

 version 0.10

1. add udp mode

2. can be run on the windows platform 3. support CIDR

 version 0.02

1. Fixed a bug about the history commands

因篇幅问题不能全部显示,请点此查看更多更全内容

Top