GNS3 Link Management
Create and manage links between node interfaces in GNS3 projects. Build network topologies by connecting devices and isolate nodes for testing.
When to Use
- Connecting two network devices together
- Building out a network topology
- Viewing existing connections in a lab
- Removing links between devices
- Isolating a node without deleting its links
- Re-enabling links after isolation testing
MCP Server
- Command:
python3 -u mcp-servers/gns3-mcp-server/gns3_mcp_server.py (stdio transport)
- Requires:
GNS3_URL, GNS3_USER, GNS3_PASSWORD environment variables
Available Tools
| Tool |
Parameters |
What It Does |
gns3_list_links |
project_id |
List all links with connected nodes and interfaces |
gns3_create_link |
project_id, node1, port1, node2, port2 |
Create a link between two interfaces |
gns3_delete_link |
project_id, link_id |
Delete a link |
gns3_isolate_node |
project_id, node_id, isolate |
Disable/enable all links to a node |
Interface Name Formats
The tools support multiple interface naming conventions:
| Format |
Example |
Adapter |
Port |
| eth# |
eth0, eth1 |
0 |
0, 1 |
| Ethernet# |
Ethernet0 |
0 |
0 |
| Gi#/# |
Gi0/0, Gi0/1 |
0 |
0, 1 |
| GigabitEthernet#/# |
GigabitEthernet0/0 |
0 |
0 |
| Fa#/# |
Fa0/0, Fa0/1 |
0 |
0, 1 |
| e# |
e0, e1 |
0 |
0, 1 |
| port# |
port0, port1 |
0 |
0, 1 |
| #/# |
0/0, 0/1 |
0 |
0, 1 |
Workflow Examples
Build a Topology
# Connect router to switch
"Connect router1 Gi0/0 to switch1 eth0 in routing-test"
# Connect switch to another router
"Connect switch1 eth1 to router2 Gi0/0 in routing-test"
# Connect hosts to switch
"Connect host1 eth0 to switch1 eth2 in routing-test"
View Topology
# List all connections
"List all links in routing-test"
Isolate for Testing
# Isolate a node (disable all its links)
"Isolate router1 in routing-test"
# Test behavior with router1 disconnected...
# Re-enable links
"Unisolate router1 in routing-test"
Clean Up
# Remove a specific link
"Delete the link between router1 and switch1 in routing-test"
Integration with Other Skills
- gns3-project-lifecycle: Create project first
- gns3-node-operations: Add nodes before connecting them
- gns3-packet-capture: Capture traffic on links
Error Handling
| Error Code |
Meaning |
Resolution |
| GNS3_NOT_FOUND |
Node or link doesn't exist |
Check names/IDs |
| GNS3_CONFLICT |
Interface already connected |
Check existing links first |
| GNS3_VALIDATION |
Invalid interface format |
Use supported naming conventions |
Notes
- Links can only be created between existing nodes
- Each interface can only have one link
- Isolating a node disables links without deleting them
- Link IDs are UUIDs - use
gns3_list_links to find them
- All operations logged to GAIT audit trail
1---2name: gns3-link-management3description: Manage GNS3 links - connect/disconnect node interfaces, isolate nodes4license: Apache-2.05---6
7# GNS3 Link Management
8
9Create and manage links between node interfaces in GNS3 projects. Build network topologies by connecting devices and isolate nodes for testing.
10
11## When to Use
12
13- Connecting two network devices together
14- Building out a network topology
15- Viewing existing connections in a lab
16- Removing links between devices
17- Isolating a node without deleting its links
18- Re-enabling links after isolation testing
19
20## MCP Server
21
22- **Command**: `python3 -u mcp-servers/gns3-mcp-server/gns3_mcp_server.py` (stdio transport)
23- **Requires**: `GNS3_URL`, `GNS3_USER`, `GNS3_PASSWORD` environment variables
24
25## Available Tools
26
27| Tool | Parameters | What It Does |
28|------|------------|--------------|
29| `gns3_list_links` | project_id | List all links with connected nodes and interfaces |
30| `gns3_create_link` | project_id, node1, port1, node2, port2 | Create a link between two interfaces |
31| `gns3_delete_link` | project_id, link_id | Delete a link |
32| `gns3_isolate_node` | project_id, node_id, isolate | Disable/enable all links to a node |
33
34## Interface Name Formats
35
36The tools support multiple interface naming conventions:
37
38| Format | Example | Adapter | Port |
39|--------|---------|---------|------|
40| eth# | eth0, eth1 | 0 | 0, 1 |
41| Ethernet# | Ethernet0 | 0 | 0 |
42| Gi#/# | Gi0/0, Gi0/1 | 0 | 0, 1 |
43| GigabitEthernet#/# | GigabitEthernet0/0 | 0 | 0 |
44| Fa#/# | Fa0/0, Fa0/1 | 0 | 0, 1 |
45| e# | e0, e1 | 0 | 0, 1 |
46| port# | port0, port1 | 0 | 0, 1 |
47| #/# | 0/0, 0/1 | 0 | 0, 1 |
48
49## Workflow Examples
50
51### Build a Topology
52
53```bash
54# Connect router to switch
55"Connect router1 Gi0/0 to switch1 eth0 in routing-test"
56
57# Connect switch to another router
58"Connect switch1 eth1 to router2 Gi0/0 in routing-test"
59
60# Connect hosts to switch
61"Connect host1 eth0 to switch1 eth2 in routing-test"
62```
63
64### View Topology
65
66```bash
67# List all connections
68"List all links in routing-test"
69```
70
71### Isolate for Testing
72
73```bash
74# Isolate a node (disable all its links)
75"Isolate router1 in routing-test"
76
77# Test behavior with router1 disconnected...
78
79# Re-enable links
80"Unisolate router1 in routing-test"
81```
82
83### Clean Up
84
85```bash
86# Remove a specific link
87"Delete the link between router1 and switch1 in routing-test"
88```
89
90## Integration with Other Skills
91
92- **gns3-project-lifecycle**: Create project first
93- **gns3-node-operations**: Add nodes before connecting them
94- **gns3-packet-capture**: Capture traffic on links
95
96## Error Handling
97
98| Error Code | Meaning | Resolution |
99|------------|---------|------------|
100| GNS3_NOT_FOUND | Node or link doesn't exist | Check names/IDs |
101| GNS3_CONFLICT | Interface already connected | Check existing links first |
102| GNS3_VALIDATION | Invalid interface format | Use supported naming conventions |
103
104## Notes
105
106- Links can only be created between existing nodes
107- Each interface can only have one link
108- Isolating a node disables links without deleting them
109- Link IDs are UUIDs - use `gns3_list_links` to find them
110- All operations logged to GAIT audit trail