Switch Interface Port
Port interfaces are the physical Ethernet ports of the switch.
The following examples operate on the first port ('1') of the switch.
1. Port Configuration
1.1. Port Administrative State
The administrative state can be used to force a port down. By default, ports are enabled and become operational when connected to a compatible link partner. The administrative state is disabled as shown below.
IPATCH request message:
- ? "/ietf-interfaces:interfaces/interface[name='1']/enabled"
: false
The administrative state is retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/enabled"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/enabled"
: false
1.2. Port Speed
The example below shows how to set the port speed to 100 Mbps and disable auto-negotiation.
IPATCH request message:
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-ethernet-interface:ethernet/auto-negotiation/enable"
: false
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/config/speed"
: '0.1'
The port speed and other parameters are retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/config"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/\
config"
: max-frame-length: 10240
duplex: full
speed: '0.1'
phy-clock-role: phy_clock_auto
plca:
admin-state: false
node-count: 8
node-id: 255
to-timer: 32
burst-max: 0
burst-timer: 128
2. Port Status
2.1. Port Link Status
Link status for a port is retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/oper-status"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/oper-status"
: up
2.2. Port Detailed Status
Detailed status for a port is retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/oper-status"
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/status"
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-ethernet-interface:ethernet/speed"
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-ethernet-interface:ethernet/duplex"
- "/ietf-interfaces:interfaces/interface[name='1']/phys-address"
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/sqi-value"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/oper-status"
: up
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/\
status"
: flow-control: disabled
oper-info: oper_speed_mgmt_based
- ? "/ietf-interfaces:interfaces/interface/ieee802-ethernet-interface:ethernet/\
speed"
: '1.0'
- ? "/ietf-interfaces:interfaces/interface/ieee802-ethernet-interface:ethernet/\
duplex"
: full
- ? "/ietf-interfaces:interfaces/interface/phys-address"
: 00-11-22-33-44-01
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/test/\
sqi-value"
: 6
3. Port Counters
Statistics counters are provided per switch port:
-
RMON counters (RFC 2819)
-
Interfaces group counters (RFC 2863)
-
Ethernet-like interface counters (RFC 3635)
-
Bridge discard counter (RFC 4188)
-
Frame Preemption counters (IEEE 802.3br)
-
Traffic class counters (proprietary)
It is possible to clear all counters for a given port.
The examples below retrieve various counters from a switch port. These frames have been received by the port prior to the accesses shown:
-
One frame with unicast DMAC and length 64
-
One frame with multicast DMAC and length 128
-
One frame with broadcast DMAC and length 256
3.1. RMON, Frame Preemption and traffic class counters
RMON, Frame Preemption and traffic class counters are retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/statistics"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/\
statistics"
: rx-64-octets: '1'
rx-65-127-octets: '0'
rx-128-255-octets: '1'
rx-256-511-octets: '1'
rx-512-1023-octets: '0'
rx-1024-1518-octets: '0'
rx-1519-max-octets: '0'
rx-fragments: '0'
rx-jabbers: '0'
tx-64-octets: '0'
tx-65-127-octets: '0'
tx-128-255-octets: '0'
tx-256-511-octets: '0'
tx-512-1023-octets: '0'
tx-1024-1518-octets: '0'
tx-1519-max-octets: '0'
traffic-class:
- traffic-class: 0
rx-packets: '3'
tx-packets: '0'
- traffic-class: 1
rx-packets: '0'
tx-packets: '0'
- traffic-class: 2
rx-packets: '0'
tx-packets: '0'
- traffic-class: 3
rx-packets: '0'
tx-packets: '0'
- traffic-class: 4
rx-packets: '0'
tx-packets: '0'
- traffic-class: 5
rx-packets: '0'
tx-packets: '0'
- traffic-class: 6
rx-packets: '0'
tx-packets: '0'
- traffic-class: 7
rx-packets: '0'
tx-packets: '0'
rx-mm-fragments: '0'
rx-mm-asm-packets: '0'
rx-mm-asm-errors: '0'
rx-mm-smd-errors: '0'
tx-mm-fragments: '0'
tx-mm-holds: '0'
3.2. Interface group counters
Interface group counters are retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/statistics"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/statistics"
: in-octets: '448'
in-unicast-pkts: '1'
in-broadcast-pkts: '1'
in-multicast-pkts: '1'
in-discards: 0
in-errors: 0
in-unknown-protos: 0
out-octets: '0'
out-unicast-pkts: '0'
out-broadcast-pkts: '0'
out-multicast-pkts: '0'
out-discards: 0
out-errors: 0
3.3. Ethernet-like interface counters
Ethernet-like interface counters are retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-ethernet-interface:ethernet/statistics/frame"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/ieee802-ethernet-interface:ethernet/\
statistics/frame"
: in-total-frames: '3'
in-error-fcs-frames: '0'
in-error-undersize-frames: '0'
in-error-oversize-frames: '0'
out-frames: '0'
Pause frame counters are retrieved as shown below:
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-ethernet-interface:ethernet/flow-control/pause/statistics"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/ieee802-ethernet-interface:ethernet/\
flow-control/pause/statistics"
: in-frames-pause: '0'
out-frames-pause: '0'
3.4. Bridge counter
The bridge discard counter is retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
ieee802-dot1q-bridge:bridge-port/statistics/discard-inbound"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
statistics/discard-inbound"
: '0'
4. Port Test
The port test feature provides diagnostic primitives to verify the physical-layer integrity of an Ethernet port. Two test modes are available:
-
One-shot tests — a single action triggers the test and stores the result. The result remains readable until the next invocation.
-
Multi-step tests — individual primitives (loopbacks, PRBS generators, isolation) are enabled and disabled independently, allowing custom diagnostic sequences.
| Activating any test mode may temporarily disrupt normal traffic on the tested port. |
4.1. Signal Quality Indicator
The Signal Quality Indicator (SQI) reflects the received signal quality as measured by the copper PHY. A value of 0xFF indicates that the PHY did not return a valid reading.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/sqi-value"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/test/\
sqi-value"
: 6
4.2. One-Shot Tests
A one-shot test is started by invoking the activate action with the desired
mode.
The optional pattern selects the PRBS polynomial for PRBS-based modes and is
ignored for other modes.
The test runs to completion and the result is stored as read-only state.
4.2.1. Cable Diagnostic
The port is isolated during the test, meaning frames are not forwarded to and from the port. The cable diagnostic test is executed. It reports whether a link was detected and, for each pair, the fault status and estimated cable length in metres.
| The cable diagnostic can take up to 4 seconds to complete as it tests each wire pair in sequence. |
POST request message:
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/one-shot-test/activate"
: input:
mode: cable-diag
The result is retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/one-shot-test/cable-diag"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/test/\
one-shot-test/cable-diag"
: link: true
pair-result:
- index: 1
status: ok
length: 0
- index: 2
status: ok
length: 0
- index: 3
status: ok
length: 0
- index: 4
status: abnorm
length: 0
4.2.2. Host-Side Loop Frame Test
The port is isolated during the test, meaning frames are not forwarded to and from the port. The host-side loop is created, meaning frames generated against the line are looped back to the host. Frames are generated at line speed for a predefined time. The host-side loop is then removed. A healthy loopback path yields equal transmit and receive frame counts.
POST request message:
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/one-shot-test/activate"
: input:
mode: host-side-loop-frame
The result is retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/one-shot-test/host-side-loop-frame"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/test/\
one-shot-test/host-side-loop-frame"
: tx-frame-count: '708037'
rx-frame-count: '708037'
4.2.3. Frame Generator Test
The port is isolated during the test, meaning frames are not forwarded to and from the port. Frames are generated against the line at line speed for a predefined time. A line-side loopback or a looping cable must be present before running this test.
POST request message:
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/one-shot-test/activate"
: input:
mode: frame-gen
The result is retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/one-shot-test/frame-gen"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/test/\
one-shot-test/frame-gen"
: tx-frame-count: '704860'
rx-frame-count: '0'
4.2.4. PRBS Generator Test
The port is isolated during the test, meaning frames are not forwarded to and from the port. The PRBS pattern is generated against the line for a predefined time. A line-side loopback or a looping cable must be present before running this test.
POST request message:
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/one-shot-test/activate"
: input:
mode: prbs-gen
pattern: prbs7
The result is retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/one-shot-test/prbs-gen"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/test/\
one-shot-test/prbs-gen"
: error-count: 0
4.3. Multi-Step Test
The multi-step test exposes individual diagnostic primitives that can be
combined in any order.
Each primitive is controlled by a dedicated action with a boolean active
input.
The current state of all primitives is reflected in the status container,
and accumulated PRBS error counts are available in the result container.
The following test scenarios are supported. "Near end" refers to the device under test; "far end" refers to the remote link partner.
- Line-side loop one-shot frame test
-
Near end: isolate(true) Far end: line-side-loop(active=true, position=loop-outer) Near end: one-shot-test(frame-gen) Fetch one-shot-test-result/frame-gen Far end: line-side-loop(false) Near end: isolate(false) - Line-side loop one-shot PRBS test
-
Near end: isolate(true) Far end: line-side-loop(active=true, position=loop-outer) Near end: one-shot-test(prbs-gen) Fetch one-shot-test-result/prbs-gen Far end: line-side-loop(false) Near end: isolate(false) - Line-side loop contiguous switch PRBS test
-
Near end: isolate(true) Far end: line-side-loop(active=true, position=loop-outer) Near end: prbs-switch(true) prbs-switch(false) Fetch multi-step-test/result/prbs-switch-error-count Far end: line-side-loop(false) Near end: isolate(false) - Line-side loop contiguous PHY-host-to-switch PRBS test
-
Near end: line-side-loop(active=true, position=loop-inner) prbs-phy-host(true) prbs-phy-host(false) line-side-loop(false) Fetch multi-step-test/result/prbs-phy-host-error-count - Bidirectional contiguous switch-to-switch PRBS test
-
Far end + Near end: prbs-switch(true) prbs-switch(false) Fetch multi-step-test/result/prbs-switch-error-count - Bidirectional contiguous switch-to-PHY-host PRBS test
-
Near end: prbs-switch(true) prbs-phy-host(true) prbs-switch(false) prbs-phy-host(false) Fetch multi-step-test/result/prbs-switch-error-count Fetch multi-step-test/result/prbs-phy-host-error-count
4.3.1. Port Isolation
Port isolation disconnects the port from the switch fabric so that no normal traffic is forwarded during testing.
POST request message (enable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/isolate"
: input:
active: true
POST request message (disable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/isolate"
: input:
active: false
4.3.2. Line-Side Loopback
The line-side loopback reflects frames arriving from the cable back toward the remote link partner without entering the switch fabric.
Position 'loop-outer' means that the loop is positioned in the PHY if there is any. Otherwise in the switch. Position 'loop-inner' means that the loop is positioned in the switch.
POST request message (enable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
line-side-loop"
: input:
active: true
position: loop-outer
POST request message (disable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
line-side-loop"
: input:
active: false
position: loop-outer
4.3.3. Host-Side Loopback
The host-side loopback reflects frames from the switch fabric back to the switch without reaching the line side.
POST request message (enable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
host-side-loop"
: input:
active: true
POST request message (disable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
host-side-loop"
: input:
active: false
4.3.4. PHY Host-Side PRBS
Enables the PHY-internal PRBS generator and checker on the host-side SerDes.
The accumulated error count is available in the result container while the
engine is active.
POST request message (enable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
prbs-phy-host"
: input:
active: true
pattern: prbs7
POST request message (disable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
prbs-phy-host"
: input:
active: false
4.3.5. Switch-Side PRBS
Enables the switch-side PRBS generator and checker toward the PHY line side.
The accumulated error count is available in the result container while the
engine is active.
POST request message (enable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
prbs-switch"
: input:
active: true
pattern: prbs15
POST request message (disable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
prbs-switch"
: input:
active: false
4.3.6. PHY Host-Side PRBS Error Injection
Triggers a contiguous insertion of bit errors in the PHY host-side PRBS stream.
When active is true, the error injection is enabled and errors are
injected periodically.
When active is false, error injection is disabled.
POST request message (enable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
prbs-phy-host-error"
: input:
active: true
POST request message (disable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
prbs-phy-host-error"
: input:
active: false
4.3.7. Switch-Side PRBS Error Injection
Triggers a contiguous insertion of bit errors in the switch-side PRBS stream.
When active is true, the error injection is enabled and errors are
injected periodically.
When active is false, error injection is disabled.
POST request message (enable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
prbs-switch-error"
: input:
active: true
POST request message (disable):
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/actions/\
prbs-switch-error"
: input:
active: false
4.3.8. Multi-Step Test Status and Results
The active state of all primitives and the accumulated PRBS error counts are retrieved as shown below.
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/status"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/test/\
multi-step-test/status"
: isolate: false
line-side-loop: false
line-side-loop-position: loop-outer
host-side-loop: false
prbs-switch: false
prbs-switch-pattern: prbs15
prbs-phy-host: false
prbs-phy-host-pattern: prbs15
FETCH request message:
- "/ietf-interfaces:interfaces/interface[name='1']/\
mchp-velocitysp-port:eth-port/test/multi-step-test/result"
FETCH response message:
- ? "/ietf-interfaces:interfaces/interface/mchp-velocitysp-port:eth-port/test/\
multi-step-test/result"
: prbs-switch-error-count: 0
prbs-phy-host-error-count: 65535