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.100'

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.100'
    phy-clock-role: phy_clock_auto

1.3. Port Maximum Frame Size

The example below shows how to set the maximum frame size to the standard Ethernet length.

IPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     mchp-velocitysp-port:eth-port/config/max-frame-length"
  : 1518

2. Port Status

Link status for a port is retrieved as shown below.

FETCH request message:

FETCH response message:

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"

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.000'


- ? "/ietf-interfaces:interfaces/interface/ieee802-ethernet-interface:ethernet/\
     duplex"
  : full


- ? "/ietf-interfaces:interfaces/interface/phys-address"
  : 00-11-22-33-44-01

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'

3.5. Clear counters

Counters for a port are cleared as shown below.

POST request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     mchp-velocitysp-port:eth-port/statistics/clear-statistics"
  :