pt_apply_etherchannel
Bundles switch ports into a verified EtherChannel via IOS CLI to aggregate links and optionally configure trunking/VLANs for LACP, PAgP, or static channels.
Instructions
Bundles switch ports into an EtherChannel (Port-channel) through IOS CLI, each line verified. Measured on a 2960-24TT in PT 9; other models are not verified.
switch: switch name in PT.
ports: 2-8 full port names of one speed, e.g. ["FastEthernet0/10", "FastEthernet0/11"]. A contiguous run is sent as
interface range FastEthernet0/10 - 11.group: channel-group number (1-6 on a 2960).
mode: "active"|"passive" (LACP), "desirable"|"auto" (PAgP) or "on" (static). At least one side must be active/desirable: passive+passive or auto+auto never forms. Configure the peer switch the same way (same group mode family, same ports count).
trunk: True puts Port-channel in
switchport mode trunk.allowed_vlans: trunk only, e.g. [10, 20] (
switchport trunk allowed vlan).dry_run: validate and return the CLI/payload without sending.
Check it with pt_cli(device=switch, commands=["show etherchannel summary"]). Example: pt_apply_etherchannel(switch="SW1", ports=["FastEthernet0/10", "FastEthernet0/11"], group=1, mode="active", trunk=True)
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": {
"switch": "<switch>",
"ports": "<ports>"
},
"name": "pt_apply_etherchannel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | active | |
| group | No | ||
| ports | Yes | ||
| trunk | No | ||
| switch | Yes | ||
| dry_run | No | ||
| allowed_vlans | No |