• 使用VPC在dynamips环境中模拟PC


    使用VPC在dynamips环境中模拟PC

    现在dynamips能支持的IOS越来越多,我们可以用来搭建的网络环境也越来越大,但是随着我们模拟的CISCO网络的增大,我们PC的内存开始吃紧,更何况有些实验中我们需要有多台PC来配合.于是很多人采取vmware+dynamips来做这些实验.VM是内存大户,于是有了VPC.
    VPC不同于microsoft的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 Cisco routers in the Dynamips. VPCS is not the traditional PC, it is just a program running on the Linux or Windows, and only few network commands can be used in it. But VPCS can give you a big hand when you study the Cisco devices in the Dynamips. VPCS can replace the routers or VMware boxes which are used as PCs in the Dynamips network.
    Try VPCS, it can save your CPU/Memory. It 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 Windows.
    Install
    Latest version is 0.13a, download and unpack it.
    vpcs.exe is windows 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(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.
    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 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
    #
    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 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 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   ..\ios.run\c2600-te.bin.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 = 0×805785a0
    [[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 = 0×804f4044 NOte
    To make compatible with dynamips, VPCS does NOT use the cygwin1.dll released by cygwin.com. The two files conflicted.
    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.
    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 windows platform
    3. support CIDRversion 0.02
    1. Fixed a bug about the history commands

  • 相关阅读:
    springboot 登录实现源代码解析
    Jmeter 在 beanshell 脚本中写日志
    JMETER 使用JDBC查找数据作为参数
    【驱动】linux下I2C驱动架构全面分析
    【驱动】linux系统下nand flash驱动程序框架
    【驱动】总线设备框架
    【驱动】按键中断异步通知实现
    【驱动】input子系统整体流程全面分析(触摸屏驱动为例)
    【驱动】input子系统全面分析
    【socket】小项目-智能点餐系统
  • 原文地址:https://www.cnblogs.com/jjkv3/p/1173234.html
Copyright © 2020-2023  润新知