eNSP Topology Skill
Generate eNSP (Enterprise Network Simulation Platform) topology files as native .topo files that can be opened directly in eNSP.
How to create a topology
- 1. Parse user's request to identify:
- Network devices (routers, switches, PCs, Cloud, etc.)
- Connections between devices
- Optional: text labels, area boxes
- 2. Generate UUIDs for each device using a valid UUID v4 format
- 3. Calculate layout coordinates for devices using auto-layout algorithm
- 4. Build the .topo XML following the format in INLINECODE1
- 5. Write the file to current directory using Write tool
- 6. Open the result - print the file path so user can open it in eNSP
Output format
Always output a .topo file. The user will open it in eNSP for simulation.
Example filenames:
- - INLINECODE3
- INLINECODE4
- INLINECODE5
Device types supported
Routers
| Model | Description | Interface Config |
|---|
| AR201 | Router | Ethernet x8 + Ethernet x1 |
| AR1220 |
Router | 2GE + 8Ethernet |
| AR2220 | Router | GE x1 + GE x2 + Serial x2 |
| AR2240 | Router | GE x1 + GE x2 |
| AR3260 | Router | GE x1 + GE x2 |
| Router | Generic Router | Ethernet x2 + GE x4 + Serial x4 |
| NE40E | Enterprise Router | 10x Ethernet (slot format) |
| NE5000E | Core Router | 10x Ethernet (slot format) |
| NE9000 | Core Router | 10x Ethernet (slot format) |
| R250D | Router | GE x1 |
Switches
| Model | Description | Interface Config |
|---|
| S3700 | Switch | Ethernet x22 + GE x2 |
| S5700 |
Switch | 24GE |
| CE6800 | Data Center Switch | 20x GE (slot format) |
| CE12800 | Data Center Switch | 10x GE (slot format) |
| CX | Switch | 10x Ethernet (slot format) |
Firewalls
| Model | Description | Interface Config |
|---|
| USG5500 | Firewall | GE x9 |
| USG6000V |
Firewall | GE x1 (slot0) + GE x7 (slot1) |
Wireless
| Model | Description | Interface Config |
|---|
| AC6005 | Wireless AC | 8GE |
| AC6605 |
Wireless AC | 24GE |
| AP2050 | Wireless AP | 5GE |
| AP3030 | Wireless AP | 1GE |
| AP4030 | Wireless AP | 2GE |
| AP4050 | Wireless AP | 2GE |
| AP5030 | Wireless AP | 2GE |
| AP6050 | Wireless AP | 2GE |
| AP7030 | Wireless AP | 2GE |
| AP7050 | Wireless AP | 2GE |
| AP8030 | Wireless AP | 3GE |
| AP8130 | Wireless AP | 3GE |
| AP9131 | Wireless AP | 2GE |
| AD9430 | LTE Module | 28GE |
| STA | Wireless Station | Wireless |
| Cellphone | Mobile Device | Wireless |
Endpoints
| Model | Description | Interface Config |
|---|
| PC | PC | 1GE |
| Laptop |
Laptop | 1GE |
| Server | Server | 1Ethernet |
| Client | Client | 1Ethernet |
| MCS | Multicast Server | 1Ethernet |
| Cloud | Cloud/BNI | Ethernet interfaces |
| FRSW | Frame Relay Switch | Serial x16 |
| HUB | Ethernet HUB | Ethernet x16 |
Connection types
| Type | Description |
|---|
| Copper | Ethernet cable |
| Serial |
Serial cable |
| Auto | Auto-detect |
Layout algorithm
Use a simple grid-based auto-layout:
CODEBLOCK0
Adjust positions based on device types and connections to create logical groupings.
Adding text labels (txttips)
Common labels for network diagrams:
- - Loopback addresses: INLINECODE6
- Network segments: INLINECODE7
- Area labels:
Area0, Area1, INLINECODE10 - Device roles:
Core Layer, INLINECODE12
Adding area boxes (shapes)
Use type="1" shapes with appropriate colors to group devices:
- - Same area devices in one rectangle
- Different colors for different areas/zones
File naming
- - Use lowercase with hyphens
- Descriptive name based on topology purpose
- End with
.topo extension
Opening the result
After writing the file, print the absolute path:
CODEBLOCK1
XML format reference
Consult references/topo-reference.md for complete XML structure including:
- - Device XML format with slots and interfaces
- Line XML format with interfacePair details
- Shape XML format for area boxes
- Txttip XML format for text annotations
eNSP拓扑技能
生成eNSP(企业网络仿真平台)拓扑文件,作为原生.topo文件,可直接在eNSP中打开。
如何创建拓扑
- 1. 解析用户请求,识别以下内容:
- 网络设备(路由器、交换机、PC、云等)
- 设备之间的连接
- 可选:文本标签、区域框
- 2. 为每个设备生成UUID,使用有效的UUID v4格式
- 3. 计算设备布局坐标,使用自动布局算法
- 4. 构建.topo XML,遵循references/topo-reference.md中的格式
- 5. 将文件写入当前目录,使用写入工具
- 6. 打开结果 - 打印文件路径,以便用户在eNSP中打开
输出格式
始终输出.topo文件。用户将在eNSP中打开它进行仿真。
示例文件名:
- - simple-network.topo
- ospf-topology.topo
- campus-network.topo
支持的设备类型
路由器
| 型号 | 描述 | 接口配置 |
|---|
| AR201 | 路由器 | 以太网x8 + 以太网x1 |
| AR1220 |
路由器 | 2GE + 8以太网 |
| AR2220 | 路由器 | GE x1 + GE x2 + 串口x2 |
| AR2240 | 路由器 | GE x1 + GE x2 |
| AR3260 | 路由器 | GE x1 + GE x2 |
| Router | 通用路由器 | 以太网x2 + GE x4 + 串口x4 |
| NE40E | 企业路由器 | 10x以太网(插槽格式) |
| NE5000E | 核心路由器 | 10x以太网(插槽格式) |
| NE9000 | 核心路由器 | 10x以太网(插槽格式) |
| R250D | 路由器 | GE x1 |
交换机
| 型号 | 描述 | 接口配置 |
|---|
| S3700 | 交换机 | 以太网x22 + GE x2 |
| S5700 |
交换机 | 24GE |
| CE6800 | 数据中心交换机 | 20x GE(插槽格式) |
| CE12800 | 数据中心交换机 | 10x GE(插槽格式) |
| CX | 交换机 | 10x以太网(插槽格式) |
防火墙
| 型号 | 描述 | 接口配置 |
|---|
| USG5500 | 防火墙 | GE x9 |
| USG6000V |
防火墙 | GE x1(插槽0)+ GE x7(插槽1) |
无线设备
| 型号 | 描述 | 接口配置 |
|---|
| AC6005 | 无线AC | 8GE |
| AC6605 |
无线AC | 24GE |
| AP2050 | 无线AP | 5GE |
| AP3030 | 无线AP | 1GE |
| AP4030 | 无线AP | 2GE |
| AP4050 | 无线AP | 2GE |
| AP5030 | 无线AP | 2GE |
| AP6050 | 无线AP | 2GE |
| AP7030 | 无线AP | 2GE |
| AP7050 | 无线AP | 2GE |
| AP8030 | 无线AP | 3GE |
| AP8130 | 无线AP | 3GE |
| AP9131 | 无线AP | 2GE |
| AD9430 | LTE模块 | 28GE |
| STA | 无线站点 | 无线 |
| Cellphone | 移动设备 | 无线 |
终端设备
笔记本电脑 | 1GE |
| Server | 服务器 | 1以太网 |
| Client | 客户端 | 1以太网 |
| MCS | 组播服务器 | 1以太网 |
| Cloud | 云/BNI | 以太网接口 |
| FRSW | 帧中继交换机 | 串口x16 |
| HUB | 以太网集线器 | 以太网x16 |
连接类型
串行线缆 |
| Auto | 自动检测 |
布局算法
使用基于网格的简单自动布局:
网格间距:水平200px,垂直150px
设备尺寸:约80x60px
起始位置:(100, 100)
对于每一行:
- 水平放置设备,间距200px
- 达到画布宽度(约1200px)时换行
根据设备类型和连接调整位置,创建逻辑分组。
添加文本标签(txttips)
网络图的常见标签:
- - 环回地址:Loopback0:10.0.1.1/24
- 网段:10.0.12.0/24
- 区域标签:Area0、Area1、AS 64512
- 设备角色:核心层、接入层
添加区域框(形状)
使用type=1的形状,配合适当的颜色对设备进行分组:
- - 同一区域的设备放在一个矩形内
- 不同区域/分区使用不同颜色
文件命名
- - 使用小写字母和连字符
- 根据拓扑用途使用描述性名称
- 以.topo扩展名结尾
打开结果
写入文件后,打印绝对路径:
拓扑已保存至:C:\path\to\topology.topo
请在eNSP中打开此文件进行查看和仿真。
XML格式参考
请查阅references/topo-reference.md获取完整的XML结构,包括:
- - 包含插槽和接口的设备XML格式
- 包含interfacePair详细信息的线路XML格式
- 区域框的形状XML格式
- 文本注释的Txttip XML格式