VLAN
此内容尚不支持你的语言。
Virtual LAN.
| URL | GET | POST | PATCH | PUT | DELETE |
|---|---|---|---|---|---|
| /rest/v1/rpc/clear-counters-vlan | N | Y | N | N | N |
| /rest/v1/running/interfaces/{name}/vlan-config/{vlan-id} | Y | Y | Y | N | Y |
| /rest/v1/rpc/show-vlan | N | Y | N | N | N |
| /rest/v1/rpc/show-vlan-summary | N | Y | N | N | N |
| /rest/v1/running/vlans/{vlanid} | Y | Y | Y | N | Y |
| /rest/v1/rpc/batch-create-vlan | N | Y | N | N | N |
| /rest/v1/rpc/batch-create-vlan-member | N | Y | N | N | N |
| /rest/v1/rpc/batch-delete-vlan | N | Y | N | N | N |
| /rest/v1/rpc/batch-delete-vlan-member | N | Y | N | N | N |
Examples
Section titled “Examples”Create VLANs 300~305 and 307.
Section titled “Create VLANs 300~305 and 307.”POST HTTPS://{switch IP}/rest/v1/rpc/batch-create-vlan{ "vlan-ranges": "300-305,307"}Create members for VLANs 300~305 and 307.
Section titled “Create members for VLANs 300~305 and 307.”POST HTTPS://{switch IP}/rest/v1/rpc/batch-create-vlan-member{ "interface-name": "Ethernet1", "vlan-ranges": "300-305,307"}.Delete VLANs 300,305~307
Section titled “.Delete VLANs 300,305~307”POST HTTPS://{switch IP}/rest/v1/rpc/batch-delete-vlan{ "vlan-ranges": "300,305-307"}Delete members from VLANs.
Section titled “Delete members from VLANs.”POST HTTPS://{switch IP}/rest/v1/rpc/batch-delete-vlan-member{ "interface-name": "Ethernet1", "vlan-ranges": "300-305,307"}Show vlan summary
Section titled “Show vlan summary”POST HTTPS://{switch IP}/rest/v1/rpc/show-vlan-summaryresponse:
{ "vlan": [ { "vlan-id": 10, "ip-address": [], "proxy-arp": "disable", "description": "", "dhcp-helper-address": [], "member": [ { "port": "Ethernet53:1", "tagging-mode": "untagged" } ] }, { "vlan-id": 200, "ip-address": [], "proxy-arp": "disable", "description": "", "dhcp-helper-address": [], "member": [] } ]}Get all vlans.
Section titled “Get all vlans.”GET HTTPS://{switch IP}/rest/v1/running/vlansresponse:
{ "result": [ { "vlanid": 10, "name": "Vlan10", "mac-limit": 100 }, { "vlanid": 200, "name": "Vlan200" } ]}Create a VLAN.
Section titled “Create a VLAN.”POST HTTPS://{switch IP}/rest/v1/running/vlans/300{"description": "vlan 300"}Modify a VLAN.
Section titled “Modify a VLAN.”PATCH HTTPS://{switch IP}/rest/v1/running/vlans/300{"mac-limit": 12345}Delete a VLAN.
Section titled “Delete a VLAN.”DELETE HTTPS://{switch IP}/rest/v1/running/vlans/100Add a member into a VLAN.
Section titled “Add a member into a VLAN.”POST HTTPS://{switch IP}/rest/v1/running/interfaces/Ethernet2/vlan-config{ "vlan-id": "101", "tagging-mode": "tagged"}Delete a member from a VLAN.
Section titled “Delete a member from a VLAN.”DELETE HTTPS://{switch IP}/rest/v1/running/interfaces/Ethernet1/vlan-config/100Properties Descriptions
Section titled “Properties Descriptions”VLAN configuration
Section titled “VLAN configuration”Tree Diagrams
+--rw vlans +--rw vlan* [vlanid] +--rw vlanid +--ro name? +--rw mac-limit? +--rw mac-learning? +--rw description? +--rw unknown-unicast-action? +--rw unknown-multicast-action? +--rw broadcast-action?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| vlans | M | Path-only node, has no configurable value. | |
| vlanid | M | 1..4094 | (sub-property of vlans) |
| VLAN identity | |||
| name | RO | Vlan1-4094 | (sub-property of vlans) |
| mac-limit | O | 1..131072 | (sub-property of vlans) |
| Limit the number of dynamic MAC addresses to be learned: when the mac number reaches the threshold, dynamic MAC addresses are no longer learned | |||
| mac-learning | O | ”true" | |
| "false” | (sub-property of vlans) | ||
| Set mac-learning mode for vlan, if disable, vlan will not learn mac | |||
| Default value: “true” | |||
| description | O | string | (sub-property of vlans) |
| Set textual description of the vlan | |||
| unknown-unicast-action | O | ”flood" | |
| "drop” | (sub-property of vlans) | ||
| Set the unknown unicast packets forwarding action | |||
| unknown-multicast-action | O | ”flood" | |
| "drop” | (sub-property of vlans) | ||
| Set the unknown multicast packets forwarding action | |||
| broadcast-action | O | ”flood" | |
| "drop” | (sub-property of vlans) | ||
| Set the broadcast packets forwarding action |
VLAN member configuration
Section titled “VLAN member configuration”Tree Diagrams
+--rw interfaces +--rw interface* [name] +--rw name +--rw vlan-config +--rw vlan* [vlan-id] +--rw vlan-id +--rw tagging-mode?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| interfaces | M | Path-only node, has no configurable value. | |
| Interface parameters. | |||
| name | M | Ethernet name | |
| Lag name | (sub-property of interfaces) | ||
| The name of the interface. | |||
| vlan-config | CM | (sub-property of interfaces) | |
| Path-only node, has no configurable value. | |||
Only applicable when {interface} is a Ethernet or PortChannel name. | |||
| VLAN related configuration that is part of the physical Ethernet interface. | |||
| vlan | M | (sub-property of vlan-config) | |
| Path-only node, has no configurable value. | |||
| vlan-id | M | 1..4094 | (sub-property of vlan) |
| VLAN identity | |||
| tagging-mode | O | ”tagged" | |
| "untagged” | (sub-property of vlan) | ||
| Specifies the type of interface as a vlan member | |||
| Default value: “tagged” |
Batch create vlan
Section titled “Batch create vlan”Tree Diagrams
+---x batch-create-vlan | +---w input | +---w vlan-ranges?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| batch-create-vlan | M | Path-only node, has no configurable value. | |
| vlan-ranges | O | a comma-separated list of Vlans (1..4094), optionally in ranges (e.g., 10-50,52) | (sub-property of input) |
| Ranges of VLAN IDs, e.g. 100-200,300-400 |
Batch delete vlan
Section titled “Batch delete vlan”Tree Diagrams
+---x batch-delete-vlan | +---w input | +---w vlan-ranges?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| batch-delete-vlan | M | Path-only node, has no configurable value. | |
| vlan-ranges | O | a comma-separated list of Vlans (1..4094), optionally in ranges (e.g., 10-50,52) | (sub-property of input) |
| Ranges of VLAN IDs, e.g. 100-200,300-400 |
Batch create vlan member
Section titled “Batch create vlan member”Tree Diagrams
+---x batch-create-vlan-member | +---w input | +---w interface-name? | +---w vlan-ranges?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| batch-create-vlan-member | M | Path-only node, has no configurable value. | |
| interface-name | O | Ethernet name | |
| Lag name | (sub-property of input) | ||
| The name of the interface. | |||
| vlan-ranges | O | a comma-separated list of Vlans (1..4094), optionally in ranges (e.g., 10-50,52) | (sub-property of input) |
| Ranges of VLAN IDs, e.g. 100-200,300-400 |
Batch delete vlan member
Section titled “Batch delete vlan member”Tree Diagrams
+---x batch-delete-vlan-member | +---w input | +---w interface-name? | +---w vlan-ranges? | +--ro output | +--ro result?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| batch-delete-vlan-member | M | Path-only node, has no configurable value. | |
| interface-name | O | Ethernet name | |
| Lag name | (sub-property of input) | ||
| The name of the interface. | |||
| vlan-ranges | O | a comma-separated list of Vlans (1..4094), optionally in ranges (e.g., 10-50,52) | (sub-property of input) |
| Ranges of VLAN IDs, e.g. 100-200,300-400 |
Show vlan summary
Section titled “Show vlan summary”Tree Diagrams
+---x show-vlan-summary | +---w input | | +---w vlan-id? | +--ro output | +--ro vlan* [vlan-id] | +--ro vlan-id | +--ro ip-address* | +--ro member* [port] | | +--ro port | | +--ro tagging-mode? | +--ro proxy-arp? | +--ro description? | +--ro dhcp-helper-address*Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-vlan-summary | M | Path-only node, has no configurable value. |
|| vlan-id | O | 1..4094 | (sub-property of input) The specified VLAN ID to show | | vlan | RO | | (sub-property of output) Path-only node, has no configurable value. | | vlan-id | RO | 1..4094 | (sub-property of vlan) | | ip-address | RO | string | (sub-property of vlan) | | member | RO | | (sub-property of vlan) Path-only node, has no configurable value. | | port | RO | string | (sub-property of member) | | tagging-mode | RO | string | (sub-property of member) | | proxy-arp | RO | string | (sub-property of vlan) | | description | RO | string | (sub-property of vlan) | | dhcp-helper-address | RO | string | (sub-property of vlan) |
Show vlan
Section titled “Show vlan”Tree Diagrams
+---x show-vlan | +---w input | | +---w vlan-id | +--ro output | +--ro result?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-vlan | M | Path-only node, has no configurable value. | |
| vlan-id | M | 1..4094 | |
| ”all” | (sub-property of input) | ||
| The VLAN ID to show | |||
| result | RO | string | (sub-property of output) |
| A table that shows information of the specified vlan |
Clear counters vlan
Section titled “Clear counters vlan”Tree Diagrams
+---x clear-counters-vlan +--ro output +--ro data?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| clear-counters-vlan | M | Path-only node, has no configurable value. | |
| RPC for clearing vlan counters | |||
| data | RO | string | (sub-property of output) |
| the result of clear counters vlan. |