set_link_state
Simulate physical link failure by suspending or restoring a link between network nodes. Use network_id to target the link and boolean to set its state, enabling fault injection testing.
Instructions
Bring a link up or down at the topology layer (physical-style fault
injection). up=True restores the link, up=False suspends it. This is
not the same as disabling an interface inside the device CLI -- the device
sees its port go down, matching a real cable pull. Only affects running nodes.
Use the network_id from connect_nodes / get_lab. Current state is readable
from get_lab (each ethernet has a suspend field: 1=suspended).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"network_id": "<network_id>",
"up": "<up>"
},
"name": "set_link_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| up | Yes | ||
| network_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |