create_vlan
Assign a VLAN to an Ethernet interface with a VLAN ID and optional IP addresses, replacing any existing configuration.
Instructions
Create (or replace) a VLAN on an ethernet interface.
Args: interface: Ethernet interface (e.g. 'eth0'). Cannot be 'all'. vlan_id: VLAN ID (1-4094) addresses: Optional list of IP addresses to assign, each a dict with 'family' (4 or 6), 'local' (IP string), and 'prefixlen' (int). Example: [{"family": 4, "local": "192.168.10.1", "prefixlen": 24}]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vlan_id | Yes | ||
| addresses | No | ||
| interface | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||