Mirror
URLs Summary
Section titled “URLs Summary”| URL | GET | POST | PATCH | PUT | DELETE |
|---|---|---|---|---|---|
| /rest/v1/running/mirror | Y | N | Y | N | N |
| /rest/v1/running/mirror/session/{name} | Y | Y | Y | N | Y |
| /rest/v1/rpc/show-mirror | N | Y | N | N | N |
Examples
Section titled “Examples”Show mirror
Section titled “Show mirror”POST HTTPS://{switch IP}/rest/v1/rpc/show-mirrorGet all mirror sessions
Section titled “Get all mirror sessions”GET HTTPS://{switch IP}/rest/v1/running/mirrorCreate a mirror session
Section titled “Create a mirror session”POST HTTPS://{switch IP}/rest/v1/running/mirror/session{ "name": 3, "type": "SPAN", "direction": "TX", "dst-port": "Ethernet11", "egress-queue": 3}Properties Descriptions
Section titled “Properties Descriptions”Mirror Session
Section titled “Mirror Session”Tree Diagrams
+--rw mirror +--rw session* [name] +--rw name +--rw type +--rw commit? +--rw direction? +--rw dst-port +--rw src-port* +--rw dst-ip +--rw gre-type? +--rw ip-dscp +--rw ip-ttl +--rw src-ip +--rw egress-queue?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| mirror | M | Path-only node, has no configurable value. Top-level configuration for the mirror. | |
| session | M | (sub-property of mirror) Path-only node, has no configurable value. | |
| name | M | 1..63 | (sub-property of session) Identify different mirror sessions. |
| type | M | ”SPAN""ERSPAN” | (sub-property of session) Mirror type. |
| direction | CO | ”RX""TX""BOTH” | (sub-property of session) Only applicable when type = “SPAN”. Direction of mirror(default both). Default value: “BOTH” |
| dst-port | CM | Ethernet name”CPU” | (sub-property of session) Only applicable when type = “SPAN”. Set span mirror destination. |
| src-port | CO | Ethernet name | (sub-property of session) Only applicable when type = “SPAN”. Set span mirror session source. |
| dst-ip | CM | A.B.C.D | (sub-property of session) Only applicable when type = “ERSPAN”. Set erspan mirror destination IP. |
| gre-type | CO | a 4-digit hex number prefixed with ‘0x’ (e.g., 0x1A3F) | (sub-property of session) Only applicable when type = “ERSPAN”. Set erspan gre type. |
| ip-dscp | CM | 0..63 | (sub-property of session) Only applicable when type = “ERSPAN”. Set erspan ip differentiated services code point. |
| ip-ttl | CM | 1..255 | (sub-property of session) Only applicable when type = “ERSPAN”. Set erspan ip ttl. |
| src-ip | CM | A.B.C.D | (sub-property of session) Only applicable when type = “ERSPAN”. Set erspan mirror source IP. |
| egress-queue | O | 0..7 | (sub-property of session) Set erspan port egress queue. |
show-mirror
Section titled “show-mirror”Tree Diagrams
+---x show-mirror +---w input | +---w session-name? +--ro output +--ro session* [name] +--ro name +--ro type? +--ro status? +--ro dst-port? +--ro src-port* +--ro direction? +--ro egress-queue? +--ro src-ip? +--ro dst-ip? +--ro gre-type? +--ro dscp? +--ro ttl?Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-mirror | M | Path-only node, has no configurable value. Show mirror sessions information. | |
| session-name | O | 1..63 | (sub-property of input) Identify different mirror sessions. |
| session | RO | (sub-property of output) Path-only node, has no configurable value. | |
| name | RO | 1..63 | (sub-property of session) Identify different mirror sessions. |
| type | RO | ”SPAN""ERSPAN” | (sub-property of session) Mirror type. |
| status | RO | string | (sub-property of session) Mirror session active status. |
| dst-port | RO | string | (sub-property of session) Span mirror destination. |
| src-port | RO | string | (sub-property of session) Span mirror source. |
| direction | RO | string | (sub-property of session) Direction of mirror. |
| egress-queue | RO | 0..7 | (sub-property of session) Egress queue. |
| src-ip | RO | A.B.C.D | (sub-property of session) Erspan mirror source IP. |
| dst-ip | RO | A.B.C.D | (sub-property of session) Erspan mirror destination IP. |
| gre-type | RO | a 4-digit hex number prefixed with ‘0x’ (e.g., 0x1A3F) | (sub-property of session) Erspan gre type. |
| dscp | RO | 0..63 | (sub-property of session) Erspan ip differentiated services code point. |
| ttl | RO | 1..255 | (sub-property of session) Erspan ip ttl. |