你的位置: Home // Dynamips // 使用VPC在dynamips环境中模拟PC

使用VPC在dynamips环境中模拟PC

分享到新浪微博

现在能支持的越来越多,我们可以用来搭建的网络环境也越来越大,但是随着我们模拟的网络的增大,我们PC的内存开始吃紧,更何况有些实验中我们需要有多台PC来配合.于是很多人采取vmware+来做这些实验.VM是内存大户,于是有了VPC.

VPC不同于的Virtual PC,是一个很小的小程序,只有几十KB大小.大家可以使用VPC和dynamsip来配合做一些综合实验.

以下内容为VPC的说明文档.

大家可以在这里下载: vpcs-0.13a

Virtual PC Simulator
The VPCS can simulate up to 9 PCs. You can ping/traceroute them, or ping/traceroute the other hosts/routers from the virtual PCs when you study the routers in the . VPCS is not the traditional PC, is just a program running on the Linux or , and only few network commands can be used in . But VPCS can give you a big hand when you study the devices in the . VPCS can replace the routers or VMware boxes which are used as PCs in the network.

Try VPCS, can save your CPU/Memory. is very small.

Now, VPCS can be run in udp or ether mode. In the udp mode, VPCS sends or receives the packets via udp. In the ether mode, via /dev/tap, not support on the .

Install

Latest version is 0.13a, and unpack .

vpcs.exe is program. vpcs is linux program, maybe you need chmod +x 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( 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.
 hist                       List the history command, use arrow keys to get
                            recently-executed commands.
 ip address gateway [CIDR]  Set the host’s ip, gateway’s ip and network mask.
                            In the ether mode, the ip of the tapx is the maximum
                            host ID of the subnet. Default CIDR is 24.
                            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 tapx ip is 10.1.1.126,
                               the netmask is 255.255.255.192.
 ping address               Ping the network host.
 tracert address [maxhops]  Print the route packets take to network host.
                            default maxhops is 64.
 conf [lport|rport] port    Set local or remote port in the udp mode. ‘conf lport’
                            will close the previous port and reopen the local port.
 ?                          Print help.
 quit                       Quit and close all the port(udp mode) or the tapx(ether mode). Do you remember Mr. Mike Muuss?If in the ether mode, please run before the loads/starts the .

When VPCS started, 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 .

VPCS looks for the file named ‘startup.vpc’ in the current directory, and execute the commands in 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
 #
 1
 ip 172.16.1.1 172.16.1.10 24
 2
 ip 172.16.1.2 172.16.1.10 24
 3
 ip 172.16.1.3 172.16.1.10 24
 # switch to PC1
 1.net file (ether mode), please refer to for details.

 # VLAN lab
 ghostios = True
 sparsemem = True
 [localhost]
  [[ROUTER sw]]
      model = 2621
      image = /.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 = /.run/c2600-i-mz.123-6c.bin
      ram = 32
      slot1 = NM-1FE-TX
      f0/0 = NIO_linux_eth:tap2.bat (udp mode)

  -wxp.exe -i R1 -T 2000 -P 2600 -r 64 -c 0×2142 -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    ..\.run\c2600-te.bin.net file (udp mode)

 # VLAN lab
 ghostios = True
 sparsemem = True
 [localhost]
  [[ROUTER sw]]
      model = 2621
      image = /.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 = 0×805785a0
  [[router r1]]
      model = 2621
      image = /.run/c2600-i-mz.123-6c.bin
      ram = 32
      slot1 = NM-1FE-TX
      f0/0 = NIO_udp:30002:127.0.0.1:20002
      idlepc = 0×804f4044 NOte

To make compatible with , VPCS does NOT use the cygwin1.dll released by cygwin.com. The two files conflicted.
You should run VPCS before starting the while using ether mode. VPCS opens the tap interfaces. And you should know, VPCS will CLOSE the tap interfaces before quit.
ChangeLog

version 0.13a
 1. add ping/tracert local host
 2. fix a ping bug, can get echo reply from a non-exist host ipversion 0.12
 1. fix the ‘tracert’ argument bugversion 0.11
 1. replace a static arrayversion 0.10
 1. add udp mode
 2. can be run on the platform
 3. support CIDRversion 0.02
 1. Fixed a bug about the history commands

本文热度: 1%

相关日志

点击此处,关注我的围脖

5 条评论 to "使用VPC在dynamips环境中模拟PC"

  1. girl 说:

    It s interesting article! Thanks.

    回复该评论

  2. admin 说:

    hoho..
    It is indeed very interesting…
    You can try out

    回复该评论

  3. Girl 说:

    Hmm..
    It seems to be interesting…

    回复该评论

  4. 呵呵,好 说:

    qq:308193637

    回复该评论

  5. 呵呵,好 说:

    你还真买的国外的空间啊
    呵呵!我刚查了,时美国的ip地址
    有时间去我的博客走走
    zeya的seo博客顺便给我留言,别忘了,有机会我们谈谈
    这个站也时我的帮我宣传下
    北京SEO网站排名优化服务

    回复该评论

留下评论

Copyright © 2009 Let's gotolab! . All rights reserved.
Designed by Theme Junkie . Powered by WordPress.