pt_apply_hsrp
Configures an HSRP group on a router interface via IOS CLI — version, virtual IP, priority, and preempt — verifying each command. Use dry run to preview the CLI first.
Instructions
Configures one HSRP group on a router interface through IOS CLI, each line verified
(standby version, standby <g> ip|priority|preempt). Measured on a 2911 in PT 9.
router / interface: e.g. "R1", "GigabitEthernet0/0" (pt_query_topology).
group: 0-4095 with version 2. Both routers use the same group and virtual_ip.
virtual_ip: the hosts' gateway. With PT connected it must be a free host address in the interface's live subnet, not the interface's own IP.
priority: 0-255, default 100; the higher one becomes active.
preempt: take over again when this router comes back (default True).
version: 2 (measured). 1 is accepted but NOT verified.
dry_run: validate and return the CLI/payload without sending.
Example (active router; repeat on R2 with priority=100): pt_apply_hsrp(router="R1", interface="GigabitEthernet0/0", group=1, virtual_ip="192.168.1.254", priority=110) Check: pt_cli(device="R1", commands=["show standby brief"]).
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": {
"router": "<router>",
"interface": "<interface>",
"group": "<group>",
"virtual_ip": "<virtual_ip>"
},
"name": "pt_apply_hsrp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | Yes | ||
| router | Yes | ||
| dry_run | No | ||
| preempt | No | ||
| version | No | ||
| priority | No | ||
| interface | Yes | ||
| virtual_ip | Yes |