文章详细内容

2009-02-13 15:23 

Help for Cisco router simulator (dynamips-0.2.7)
思科路由器模拟器(dynamips-0.2.7)帮助
================================================
================================================
Authors of this document: Fabien Devaux, Christophe Fillot, MtvE
文档作者:Fabien Devaux, Christophe Fillot, MtvE

Emulated hardware
*****************
The emulator currently supports the following platforms:
  - Cisco 7200 (NPE-100 to NPE-400)
  - Cisco 3600 (3620, 3640 and 3660)
  - Cisco 2691
  - Cisco 3725
  - Cisco 3745
By default, a Cisco 7206VXR with NPE-200 (256 Mb of DRAM) is emulated. To emulate another platform, use the "-P" command line option (for example,"-P 3725" or "-P 3600").
For the 7200, you can change the NPE type with the "-t" option. It is possible to select "npe-100", "npe-150", "npe-175", "npe-200", "npe-225", "npe-300" and "npe-400". The "npe-g1" is not working.
For the 3600, a 3640 with 128 Mb is emulated by default. You can change this with the "-t" option and by specifying "3620" or "3660".
Don't forget to set the chassis type depending on your IOS image, a c3660 image will not run on c3640 hardware and vice-versa.
Remark: PCMCIA card emulation is not supported yet with Cisco 3600.

虚拟的硬件
*****************
    现阶段,这个模拟器支持以下平台:
  - Cisco 7200 (NPE-100 to NPE-400)
  - Cisco 3600 (3620, 3640 and 3660)
  - Cisco 2691
  - Cisco 3725
  - Cisco 3745
    默认情况下,模拟出的是带有NPE-200(256Mb DRAM)的思科7206VXR。如果要模拟其他的平台,需使用"-P"命令行选项(例如,"-P 3725"或"-P 3600")。
    对于7200,你可以使用"-t"选项改变NPE类型。NPE类型可以选择"npe-100"、"npe-150"、"npe-175"、"npe-200"、"npe-225"、"npe-300"和"npe-400"。"NPE-g1"不能运行。
    对于3600,默认情况下会模拟出一个带有128MB闪存的3640。你可以使用"-t"选项及指定"3620"或"3660"来改变它。
    不要忘记根据你的IOS镜像来设置芯片类型,c3660镜像不能运行在c3640硬件上,反之亦然。
    注意:不支持在Cisco 3600上模拟PCMCIA卡。

Command Line Options overview
*****************************

  -l       : Set logging file (default is dynamips_log.txt)
  -j                 : Disable the JIT compiler, very slow
  --exec-area : Set the exec area size (default: 64 Mb)
  --idle-pc      : Set the idle PC (default: disabled)
  --timer-itv   : Timer IRQ interval check (default: 1000)
  -i       : Set instance ID
  -r       : Set the virtual RAM size
  -o       : Set the virtual ROM size
  -n     : Set the NVRAM size
  -c       : Set the configuration register
  -m       : Set the MAC address of the chassis (default: automatically generated)
  -C       : Import an IOS configuration file into NVRAM
  -X                 : Do not use a file to simulate RAM (faster)
  -R       : Load an alternate ROM (default: embedded)
  -k      : Set the clock divisor (default: 4)

  -T           : Console is on TCP   -U        : Console in on serial interface (default is on the terminal)

  -A           : AUX is on TCP   -B        : AUX is on serial interface (default is no AUX port)

  --disk0      : Set PCMCIA ATA disk0: size
  --disk1      : Set PCMCIA ATA disk1: size

  -a       : Virtual ATM switch configuration file
  -f       : Virtual Frame-Relay switch configuration file
  -E       : Virtual Ethernet switch configuration file
  -b       : Virtual bridge configuration file
  -e                 : Show network device list of the host machine

Options specific to the Cisco 7200 series:
  -t       : Select NPE type (default: "npe-200")
  -M       : Select Midplane ("std" or "vxr")
  -p        : Define a Port Adapter
  -s         : Bind a Network IO interface to a Port Adapter

Options specific to the Cisco 3600 series ("dynamips -P 3600 --help"):
  -t   : Select Chassis type (default: "3640")
  --iomem-size : IO memory (in percents, default: 5)
  -p        : Define a Network Module
  -s         : Bind a Network IO interface to a Network Module

Options specific to the Cisco 2691 series ("dynamips -P 2691 --help"):
  --iomem-size : IO memory (in percents, default: 5)
  -p        : Define a Network Module
  -s         : Bind a Network IO interface to a Network Module

Options specific to the Cisco 3725 series ("dynamips -P 3725 --help"):
  --iomem-size : IO memory (in percents, default: 5)
  -p        : Define a Network Module
  -s         : Bind a Network IO interface to a Network Module

Options specific to the Cisco 3745 series ("dynamips -P 3745 --help"):
  --iomem-size : IO memory (in percents, default: 5)
  -p        : Define a Network Module
  -s         : Bind a Network IO interface to a Network Module

命令行选项概述
*****************************

  -l       :设置日志文件(默认为dynamips_log.txt)
  -j                 : 禁用JIT编译器,非常慢
  --exec-area : 设置执行区域大小(默认:64Mb)
  --idle-pc      : 设置空闲PC(默认:禁用)
  --timer-itv   : 中断请求间隔检查时间(默认:1000)
  -i       : 设置实例ID
  -r       : 设置RAM大小
  -o       : 设置ROM大小
  -n     : 设置NVRAM大小
  -c       : 设置配置寄存器
  -m       : 设置芯片MAC地址(默认:自动生成)
  -C       : 导入一个IOS配置文件到NVRAM中
  -X                 : 不要使用文件来模拟RAM(更快)
  -R       : 加载一个交变ROM(默认:集成的)
  -k      : 设置分时器(默认:4)

  -T           : 控制台端口在TCP <端口>上
  -U        : 控制台商品在串行接口 上(默认是在终端上)

  -A           : AUX在TCP <端口>上
  -B        : AUX在串行接口 上(默认是在终端上)

  --disk0      : 设置PCMCIA ATA 磁盘0: 容量
  --disk1      : 设置PCMCIA ATA 磁盘1: 容量

  -a       : 虚拟ATM交换机配置文件
  -f       : 虚拟帧中继交换机配置文件
  -E       : 虚拟以太网交换机配置文件
  -b       : 虚拟桥配置文件
  -e                 : 显示主机网络设置列表

Cisco 7200系列特有的选项:
  -t       : 选择NPE类型(默认:"npe-200")
  -M       : 选择Midplane("std"或"vxr")
  -p        : 定义一个端口适配器
  -s         : 绑定一个网络IO接口到一个端口适配器

Cisco 3600系列特有的选项("dynamips -P 3600 --help"):
  -t   : 选择芯片类型(配置:"3640")
  --iomem-size : IO内存(单位为百分比,默认:5)
  -p        : 定义一个网络模块
  -s         : 绑定一个网络IO接口到一个网络模块
Cisco 2691系列特有的选项("dynamips -P 2691 --help"):
  --iomem-size : IO内存(单位为百分比,默认:5)
  -p        : 定义一个网络模块
  -s         : 绑定一个网络IO接口到一个网络模块

Cisco 3725系列特有的选项("dynamips -P 3725 --help"):
  --iomem-size : IO内存(单位为百分比,默认:5)
  -p        : 定义一个网络模块
  -s         : 绑定一个网络IO接口到一个网络模块

Cisco 3745系列特有的选项("dynamips -P 3745 --help"):
  --iomem-size : IO内存(单位为百分比,默认:5)
  -p        : 定义一个网络模块
  -s         : 绑定一个网络IO接口到一个网络模块
Command Line Options details
****************************
-k :
   Specify the clock divider (integer) based on the host clock. Alter the value to match the CISCO clock with the real time. The command "show clock" at the IOS' CLI will help you set this value.

--idle-pc :
   The "idle PC" feature allows you to run a router instance without having a 100% CPU load. This implies that you can run a larger number of instances per real machine. To determine the "idle PC", start normally the emulator with your Cisco IOS image, and a totally IOS empty configuration (although not mandatory, this will give better results). When the image is fully booted, wait for the "Press RETURN to get started!" message prompt, but do not press Enter key. Wait about 5 seconds, then press "Ctrl-] + i". Some statistics will be gathered during 10 seconds. At the end, the emulator will display a list of possible values to pass to the "--idle-pc" option. You may have to try some values before finding the good one. To check if the idle PC value is good, just boot the Cisco IOS image, and check your CPU load when the console prompt is available. If it is low, you have found a good value, keep it preciously.

   Important remarks:
   ==================
      * An "idle PC" value is *specific* to a Cisco IOS image. You cannot boot a different IOS image without proceeding as described above.
      * Do not run the process while having the "autoconfiguration" prompt.

--exec_area :
   The exec area is a pool of host memory used to store pages translated by the JIT (they contain the native code corresponding to MIPS code pages).

命令行选项详述
****************************
-k :
   根据主机时钟指定时钟分频器(整数)。改变其值以匹配拥有真实时间的思科时钟。

--idle-pc :
   "idle PC"特色功能允许你在不需要100%CPU负荷的情况下运行一路由器实例。这意味着你可以在一台真正的机器上运行更多的实例。为了确定"idle PC"值,先按常规使用你的思科IOS镜像运行模拟器,等待“按回车键开始”的消息提示,但不要按回车键。等待大约5秒钏,然后按"Ctrl-]+i"。一些统计数会在10秒内收集。最后,模拟器会显示一个可以传递给"--idle-pc"选项的可能值的列表。你可能必须尝试这些值然后才能找到一个合适的值。为了检验此值是否合适,只需启动思乎IOS镜像,并在控制台提示出现时检查CPU负荷。如果CPU负荷低,则证明你找到了一个合适的值,并珍惜地保存它。

   特别注意:
   ==================
      * 一个"idle PC"是针对一个思科IOS镜像的。你不能在没有进行上面描述的操作前启动一个不同的IOS镜像。
      * 当有"autoconfiguration"提示时不要运行那个进程。

--exec_area :
   执行区域是一个用来存储JIT编译页(JIT编译页包含本地代码,这与MIPS代码页对应)的主机内存池。

Cisco 7200 Port Adapter Description " ":
------------------------------------------------
   Format: slot:pa_driver
   slot: the number of the physical slot (starts from 0)
   pa_driver: the name of a Port Adapter driver in:
        - C7200-IO-FE  (FastEthernet, slot 0 only)
        - PA-FE-TX     (FastEthernet, slots 1 to 6)
        - PA-4E        (Ethernet, 4 ports)
        - PA-8E        (Ethernet, 8 ports)
        - PA-4T+       (Serial, 4 ports)
        - PA-8T        (Serial, 8 ports)
        - PA-A1        (ATM)

Cisco 7200 端口适配器描述 " ":
------------------------------------------------
   格式:插槽:端口适配器驱动
   插槽:物理插槽号(从0开始)
   端口适配器驱动:端口适配器驱动名称
        - C7200-IO-FE  (FastEthernet, slot 0 only)
        - PA-FE-TX     (FastEthernet, slots 1 to 6)
        - PA-4E        (Ethernet, 4 ports)
        - PA-8E        (Ethernet, 8 ports)
        - PA-4T+       (Serial, 4 ports)
        - PA-8T        (Serial, 8 ports)
        - PA-A1        (ATM)

Cisco 3600 Network Module Description "":
--------------------------------------------------
   Format: slot:nm_driver
   slot: the number of the physical slot (starts from 0)
   nm_driver: the name of a Network Module driver in:
        - NM-1E        (Ethernet, 1 port)
        - NM-4E        (Ethernet, 4 ports)
        - NM-1FE-TX    (FastEthernet, 1 port)
        - NM-4T        (Serial, 4 ports)
        - NM-16ESW     (Ethernet switch module, 16 ports)
        - Leopard-2FE  (Cisco 3660 FastEthernet in slot 0, automatically used)

思科3600网络模块描述 "":
--------------------------------------------------
   格式:插槽:网络模块驱动
   插槽:物理插槽号(从0开始)
   网络模块驱动:网络模块驱动名称
        - NM-1E        (Ethernet, 1 port)
        - NM-4E        (Ethernet, 4 ports)
        - NM-1FE-TX    (FastEthernet, 1 port)
        - NM-4T        (Serial, 4 ports)
        - NM-16ESW     (Ethernet switch module, 16 ports)
        - Leopard-2FE  (Cisco 3660 FastEthernet in slot 0, automatically used)

Cisco 2691/3725/3745 Network Module Description "":
------------------------------------------------------------
   Format: slot:nm_driver
   slot: the number of the physical slot (starts from 0)
   nm_driver: the name of a Network Module driver in:
        - NM-1FE-TX    (FastEthernet, 1 port)
        - NM-4T        (Serial, 4 ports)
        - NM-16ESW     (Ethernet switch module, 16 ports)
        - GT96100-FE   (2 integrated ports, automatically used)

思科2691/3725/3745 网络模块描述"":
------------------------------------------------------------
   格式: 插槽:网络模块驱动
   插槽: 物理插槽号(从0开始)
   网络模块驱动:网络模块驱动名称 
        - NM-1FE-TX    (FastEthernet, 1 port)
        - NM-4T        (Serial, 4 ports)
        - NM-16ESW     (Ethernet switch module, 16 ports)
        - GT96100-FE   (2 integrated ports, automatically used)

NIO binding to Port Adapter " " and Network Modules "":
----------------------------------------------------------------------

   Format: slot:port:netio_type[:netio_parameters]
   slot: the number of the physical slot (starts from 0)
   port: the port in the specified slot (starts from 0)
   netio_type : host interface for communication
        unix::
           Use unix sockets for local communication.
           is created and represents the local NIC.
           is the file used by the other interface.
           (ex. "/tmp/local:/tmp/remote")

        vde::
           For use with UML (User-Mode-Linux) or VDE switches.
           VDE stands for "Virtual Distributed Ethernet".
           Please refer to : http://sourceforge.net/projects/vde/

        tap:
           Use a virtual ethernet device for communication.
           is the name of the tap device (ex. "tap0")

        gen_eth:
           Use a real ethernet device for communication, using libpcap 0.9
           or WinPcap. Works on Windows and Unix systems.         

           is the name of the Ethernet device (ex. "eth0")

           The device list can be found using the "-e" option.

        linux_eth:
           Use a real ethernet device for communication (Linux specific).
           is the name of the Ethernet device (ex. "eth0")

        udp:::
           Use an UDP socket for connection between remote instances.
           is the port we listen to.
           is the host listening the port you want to connect to.
           is the port you want to connect to.
    (ex. "1000:somehost:2000" and "2000:otherhost:1000" on the other
           side)

        tcp_cli::            Client side of a tcp connection.
           is the ip address of the server.
           is the port to connect to.

        tcp_ser:            Server side of a tcp connection.
           is the port to listen to.

        null
           Dummy netio (used for testing/debugging), no parameters needed.

NIO绑定到端口适配器" "和网络模块"":
----------------------------------------------------------------------
   格式:插槽:端口:NIO类型[:NIO参数]
   插槽:物理插槽号(从0开始)
   端口:指定插槽中的端口(从0开始)
   NIO类型:用来通信的主机接口
        unix::
           Use unix sockets for local communication.
           is created and represents the local NIC.
           is the file used by the other interface.
           (ex. "/tmp/local:/tmp/remote")

        vde::
           For use with UML (User-Mode-Linux) or VDE switches.
           VDE stands for "Virtual Distributed Ethernet".
           Please refer to : http://sourceforge.net/projects/vde/

        tap:
           Use a virtual ethernet device for communication.
           is the name of the tap device (ex. "tap0")

        gen_eth:
           Use a real ethernet device for communication, using libpcap 0.9
           or WinPcap. Works on Windows and Unix systems.         

           is the name of the Ethernet device (ex. "eth0")

           The device list can be found using the "-e" option.

        linux_eth:
           Use a real ethernet device for communication (Linux specific).
           is the name of the Ethernet device (ex. "eth0")

        udp:::
           Use an UDP socket for connection between remote instances.
           is the port we listen to.
           is the host listening the port you want to connect to.
           is the port you want to connect to.
    (ex. "1000:somehost:2000" and "2000:otherhost:1000" on the other
           side)

        tcp_cli::            Client side of a tcp connection.
           is the ip address of the server.
           is the port to connect to.

        tcp_ser:            Server side of a tcp connection.
           is the port to listen to.

        null
           Dummy netio (used for testing/debugging), no parameters needed.

VTTY binding to real serial port device "":
----------------------------------------------------
   Format: {:baudrate{:databits{:parity{:stopbits{:hwflow}}}}}}
   ...
   ...
   ...
   ...
   ...
   Note that the device field is mandatory, however other fields are optional. (dynamips will default to 9600, 8, N, 1, no hardware flow control)
   Note that access to the escape commands (described below) through a serial port are deliberately prevented, as the escape commands interfere with serial encapsulation protocols.
VTTY绑定到真实的串口设备"":
----------------------------------------------------
   格式:<设备>{:波特速率{:数据位数{:奇偶校验{:停止位{:硬件流控}}}}}}
   设备: 字符设备名称,例如/dev/ttyS0
   波特速率: 波特速率
   数据位数: 数据位数
   奇偶校验: 数据奇偶校验: N=无, O=奇, E=偶,
   停止位: 停止位
   硬件流量控制: 硬件流量控制(0=停用,1=启用)
   注意,设备字段是必需的,而其他字段是可选的。(dynamips默认设置为9600,8,N,1,停用硬件流量控制)
   注意,通过一个串行端口访问“退出命令”(下面有描述)是被特意阻止的,因为退出命令与串行封装协议有冲突。

Escape commands
***************
You can press ^] (Ctrl + ]) at any time, followed by one of these characters:
o : Show the VM object list
d : Show the device list
r : Dump MIPS CPU registers
t : Dump MIPS TLB entries
m : Dump the latest memory accesses
s : Suspend CPU emulation
u : Resume CPU emulation
q : Quit the emulator
b : Dump the instruction block tree
h : JIT hash table statistics
l : MTS64 cache statistics
c : Write IOS configuration to disk (ios_cfg.txt)
j : Non-JIT mode statistics
i : Determine an idling pointer counter
x : Experimentations (can crash the box!)
^]: Send ^]
If you press an unrecognized key, help will be shown.
Note: on Windows, it may be the "Ctrl + $" sequence.

退出命令
***************
    你可在任何时候按^] (Ctrl + ]),紧接着按这些字符之一:
o : 显示VM对象列表
d : 显示设备列表
r : 清除MIPS CPU 寄存器
t : 清除 MIPS TLB 入口
m : 清除最近的内存访问
s : 中止CPU模拟
u : 恢复CPU模拟
q : 退出模拟器
b : 清除指令块树
h : JIT hash表统计信息
l : MTS64 缓存统计信息
c : 写IOS配置到磁盘(ios_cfg.txt)
j : 非JIT模式统计信息
i : 确定一个空闲点计数器
x : 试验(会使用box崩溃)
^]: 发送^]
    如果你按一个不可识别的键,帮助信息将会显示。
    注意:在Windows中,它可能是"Ctrl + $"组合键。

Virtual Bridge
**************

The virtual bridge is used to emulate a shared network between emulator instances. Any emulator instance can act as a virtual bridge. The configuration file (specified by the "-b" option) contains a list of NetIO descriptors, with the following syntax:
   interface_name:netio_type[:netio_parameters]

Example:

# Connection to instance "I0"
I0:udp:10000:127.0.0.1:10001

# Connection to instance "I1"
I1:udp:10002:127.0.0.1:10003

# Connection to instance "I2"
I2:udp:10004:127.0.0.1:10005

The "I0" instance would be launched with the following parameters:
   dynamips ios.bin -p 1:PA-FE-TX -s 1:0:udp:10001:127.0.0.1:10000

虚拟桥
**************
    虚拟桥是用来模拟两个模拟器实例共享的网络。任何一个模拟器实例都可以作为一个虚拟桥。配置文件(由"-b"选项指定)包含一个NetIO描述列表,语法如下:
   接口名称:NIO类型[:NIO参数]

例子:
# Connection to instance "I0"
I0:udp:10000:127.0.0.1:10001

# Connection to instance "I1"
I1:udp:10002:127.0.0.1:10003

# Connection to instance "I2"
I2:udp:10004:127.0.0.1:10005

"I0"实例可使用以下参数启动:
   dynamips ios.bin -p 1:PA-FE-TX -s 1:0:udp:10001:127.0.0.1:10000

Virtual Ethernet switch
***********************
The virtual ethernet switch is used to emulate an Ethernet network between emulator instances. This switch supports access and trunk ports (802.1Q). ISL will be available in a future release. Any emulator instance can act as a virtual ethernet switch. The configuration file (specified by the "-E" option) contains a list of NetIO descriptors (representing interfaces) and a list of interface properties (access/trunk port, VLAN info...)

The interface definition is similar to Port Adapters:
    IF:interface_name:netio_type[:netio_parameters]

1) Configuring an Access Port
syntax: ACCESS:interface_name:vlan_id
2) Configuration a 802.1Q Trunk Port
syntax: DOT1Q:interface_name:native_vlan

The native VLAN is not tagged. On Cisco devices, by default the native VLAN is VLAN 1.

Example of configuration file:
IF:E0:udp:10000:127.0.0.1:10001
IF:E1:udp:10002:127.0.0.1:10003
IF:E2:gen_eth:eth0

DOT1Q:E0:1
ACCESS:E1:4
DOT1Q:E2:1

虚拟以太网交换机
***********************
    虚拟以太网交换机被用来模拟模拟器实例之间的以太网络。这个交换机支持访问和主干端口(802.1Q)。ISL将在未来的发行版本可以使用。任何虚拟器实例都可以做为一个虚拟以太网交换机。配置文件(由"-E"选项指定)包含一个NetIO描述(它代表接口)列表和一个接口属性(访问/主干端口,VLAN信息...)列表。
    接口定义类似于端口适配器:
    IF:接口名称:NIO类型[:NIO参数]

1) 配置一个访问端口
语法:ACCESS:接口名称:VLAN-ID
2) 配置一个802.1Q主干端口
语法:DOT1Q:接口名称:本地VLAN

    本地VLAN是未标记的。在思科设备中,本地VLAN默认为VLAN1。

配置文件的例子:
IF:E0:udp:10000:127.0.0.1:10001
IF:E1:udp:10002:127.0.0.1:10003
IF:E2:gen_eth:eth0

DOT1Q:E0:1
ACCESS:E1:4
DOT1Q:E2:1

Virtual ATM switch
******************
The virtual ATM switch fabric is used to emulate an ATM backbone between emulator instances. The use of this virtual switch is not mandatory, you can directly connect emulator instances for point-to-point ATM connections. Please note that only basic VP/VC switching is supported, there is no support for ILMI/QSAAL/... or other specific ATM protocols.
Any emulator instance can act as a virtual ATM switch.

Example of configuration file (specified by the "-a" option):
# Virtual Interface List
IF:A0:udp:10001:127.0.0.1:10000
IF:A1:udp:10002:127.0.0.1:10003
IF:A2:udp:10004:127.0.0.1:10005

# VP connection between I0 and I1
VP:A0:10:A1:20
VP:A1:20:A0:10

# VP connection between I0 and I2
VP:A0:11:A2:30
VP:A2:30:A0:11

# VC connection between I1 and I2
VC:A1:5:2:A2:7:3
VC:A2:7:3:A1:5:2

In this example, we have 3 virtual interfaces, A0, A1 and A2. The syntax for interface definition is similar to Port Adapters:
   IF:interface_name:netio_type[:netio_parameters]

You can do VP switching or VC switching:
1) VP switching
syntax: VP:input_if:input_vpi:output_if:output_vpi
2) VC switching
syntax: VC:input_if:input_vpi:input_vci:output_if:output_vpi:output_vci

虚拟ATM交换机
******************
    虚拟ATM交换机结构被用来模拟多个模拟器实例之间的ATM骨干网。这个虚拟交换机并不是必须使用的,你可以以点对点ATM连接直接连接虚拟器实例。请注意,只支持基本的VP/VC交换,不支持ILMI/QSAAL/...或其他殊死的ATM协议。
    任何虚拟器实例都可以做为一个虚拟ATM交换机。

    配置文件(由"-a"选项指定)的例子:
# Virtual Interface List
IF:A0:udp:10001:127.0.0.1:10000
IF:A1:udp:10002:127.0.0.1:10003
IF:A2:udp:10004:127.0.0.1:10005

# VP connection between I0 and I1
VP:A0:10:A1:20
VP:A1:20:A0:10

# VP connection between I0 and I2
VP:A0:11:A2:30
VP:A2:30:A0:11

# VC connection between I1 and I2
VC:A1:5:2:A2:7:3
VC:A2:7:3:A1:5:2

    在这个例子中,我们有3个虚拟接口,A0,A1和A2。接口定义语法类似于端口适配器:
   IF:接口名称:NIO类型[:NIO参数]

    你可以做VP交换和VC交换:
1) VP 交换
    语法:VP:输入接口:输入VPI:输出接口:输出VPI
2) VC 交换机
    语法:VC:输入接口:输入VPI:输入VCI:输出接口:输出VPI:输出VCI

Testing the Virtual ATM switch with one dynamips instance
*********************************************************
(Contribution of Mtv Europe)

Virtual ATM switch configuration file ("atm.cfg"):
IF:A0:udp:10003:127.0.0.1:10001
IF:A1:udp:10004:127.0.0.1:10002                                               
# a0/vpi=1/vci=100 connects to a1/vpi=2/vci=200
VC:A0:1:100:A1:2:200                                                          
VC:A1:2:200:A0:1:100

Invoking dynamips:
./dynamips -p 1:PA-A1 -s 1:0:udp:10001:127.0.0.1:10003 \
           -p 2:PA-A1 -s 2:0:udp:10002:127.0.0.1:10004 \
           -a atm.cfg IOS.BIN

(note input ports of IOS interfaces are output ports of ATM switch
interfaces, and vice versa).

IOS configuration:
ip cef
ip vrf test
 rd 1:1
 route-target both 1:1
int a1/0
 no shut
int a1/0.2 p
 ip addr 1.1.1.1 255.255.255.0
 pvc 1/100
interface a2/0
 no shut
interface a2/0.2 p
 ip vrf forwarding test
 ip addr 1.1.1.2 255.255.255.0
 pvc 2/200
!
# ping 1.1.1.2
!!!!!

使用一个dynamips实例测试虚拟ATM交换机
*********************************************************
(Contribution of Mtv Europe)

    虚拟ATM交换机配置文件("atm.cfg"):
IF:A0:udp:10003:127.0.0.1:10001
IF:A1:udp:10004:127.0.0.1:10002                                               
# a0/vpi=1/vci=100 connects to a1/vpi=2/vci=200
VC:A0:1:100:A1:2:200                                                          
VC:A1:2:200:A0:1:100

    调用dynamips:
./dynamips -p 1:PA-A1 -s 1:0:udp:10001:127.0.0.1:10003 \
           -p 2:PA-A1 -s 2:0:udp:10002:127.0.0.1:10004 \
           -a atm.cfg IOS.BIN

    (注意IOS接口的输入端口是ATM交换机接口的输出商品,反之亦然)。

    IOS 配置:
ip cef
ip vrf test
 rd 1:1
 route-target both 1:1
int a1/0
 no shut
int a1/0.2 p
 ip addr 1.1.1.1 255.255.255.0
 pvc 1/100
interface a2/0
 no shut
interface a2/0.2 p
 ip vrf forwarding test
 ip addr 1.1.1.2 255.255.255.0
 pvc 2/200
!
# ping 1.1.1.2
!!!!!

Virtual Frame-Relay switch
**************************

The virtual Frame-Relay switch fabric is used to emulate a Frame-Relay backbone between emulator instances. The use of this virtual switch is not mandatory, you can directly connect emulator instances with appropriate IOS configuration.
Any emulator instance can act as a virtual Frame-Relay switch.
There is only a basic implementation of the LMI protocol (ANSI Annex D), which is probably not conforming but works with Cisco IOS. Fortunately, Cisco IOS is able to detect automatically the LMI protocol.

Example of configuration file (specified by the "-f" option):
# Virtual Interface List
IF:S0:udp:10001:127.0.0.1:10000
IF:S1:udp:10002:127.0.0.1:10003

# DLCI switching between S0 and S1
VC:S0:200:S1:100
VC:S1:100:S0:200

In this example, we have 2 virtual interfaces, S0 and S1. The syntax for interface definition is similar to Port Adapters:
   IF:interface_name:netio_type[:netio_parameters]

DLCI switching syntax:
   VC:input_if:input_dlci:output_if:output_dlci

In the example above, the switch is configured to switch packets received on interface S0 with DLCI 200 to interface S1 with DLCI 100, and vice-versa.

虚拟帧中继交换机
**************************
    虚拟帧中继交换机结构被用来模拟一个虚拟器实例之间的帧中继骨干网。此虚拟交换机不是必需的,你可以用适当的IOS配置直接连接虚拟器实例。
    任何一个虚拟器实例都可以做为一个虚拟器帧中继交换机。
    只有一个LMI协议的基本实现方法,此实现方法可能不符合思科IOS,但却可以工作。幸运的是,思科IOS可以自动检测LMI协议。

    配置文件(由"-f"选项指定)的例子:
# Virtual Interface List
IF:S0:udp:10001:127.0.0.1:10000
IF:S1:udp:10002:127.0.0.1:10003

# DLCI switching between S0 and S1
VC:S0:200:S1:100
VC:S1:100:S0:200

   在这个例子中,我们有2个虚拟接口,S0和S1。接口定义语法类似于端口适配器:
   IF:接口名称:NIO类型[:NIO参数]

   DLCI交换语法:
   VC:输入接口:输入DLCI:输出接口:输出DLCI

   在这个例子中,交换机被配置用来交换接口S0(用DLCI 200)和接口S1(用DLCI 100)接收的数据包,反之亦然。

== EOF ==

== 结束 ==

推荐(0)
收藏
分享至: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 添加到饭否 QQ书签 POCO网摘 Digbuzz我挖网 

随机本博客日志

Blog@35上的相关日志

  • 没有系统相关日志

最近读者

最近还没有登录用户看过这篇文章

发表评论