-
Notifications
You must be signed in to change notification settings - Fork 35
Port mirroring and sFlow
OPX supports network monitoring features such as sFlow and port mirroring which monitor and capture network traffic in the system. It also provides tools to collect port and VLAN statistics, and port media information.
Mirroring copies packets from a mirroring source port to a mirroring destination port. In local port mirroring, packets are forwarded from a source port to a destination port on the same system.
In remote port mirroring, mirrored packets are forwarded using a dedicated L2 VLAN.
User application can provision mirroring capabilities using the CPS API:
- Create a mirroring session
- Update a mirroring session
- Delete a mirroring session
See Programming examples for information on how to program port mirroring using the CPS API.
NOTE: OPX does not support Linux modeling of port mirroring.
sFlow monitors network traffic by sampling incoming and outgoing packets on physical ports. User applications can provision sFlow functionality using the CPS API:
- Enable packet sampling on a physical port
- Disable packet sampling on a physical port
- Set the sampling interval rate
- Forward the sampled packet to an IP address/port
See Programming examples for information on how to program sFlow using the CPS API.
NOTE: OPX does not support Linux modeling of sFlow.
OPX provides scripts to view statistical information about ports, VLANs, and installed transceivers.
- Display port statistics for all or a specified Linux interface which maps to physical ports. Enter a
filter_list
value to display specified statistics.
$ opx-show-stats if_stat [iface_name] {filter_list}
- Display statistics and media information from a Linux interface which maps to a physical port. The output is a subset of the
opx-show-stats
output for the same physical port interface
$ opx-ethtool [-v | -e | -s | -S]
-
-v
— displays version information -
-e
— displays media information from EEPROM -
-s
— displays port speed, duples, and auto-negotiation settings -
-S
— displays port statistics -
Display statistics from all or a specified VLAN. Enter a
filter_list
value to display specified statistics.
$ opx-show-stats vlan_stat [vlan_ifname] {filter_list}
- Delete port statistics for all or a specified Linux interface — command does not support deleting VLAN statistics.
$ opx-show-stats clear [iface_name]
$ opx-show-stats if_stat e101-001-0
Key:
opx-stats/interface/ip/in-discards = 0
opx-stats/interface/ether-octets = 13442942147
opx-stats/interface/ether-out/pkts-64-octets = 0
opx-stats/interface/ether-collisions = 0
...
opx-stats/interface/if-in-multicast-pkts = 0
opx-stats/interface/ether-in/pkts-64-octets = 0
opx-stats/interface/ether-in/pkts-512-to-1023-octets = 0
$ opx-show-stats vlan_stat br1
Key:
opx-stats/vlan/time-stamp: 1455586573
opx-stats/vlan/in-octets: 16381983058
opx-stats/vlan/in-pkts: 16101053
opx-stats/vlan/out-octets: 55146334258
opx-stats/vlan/out-pkts: 67419926
$ opx-show-stats clear e101-001-0
Success
$ opx-ethtool -S e101-001-0
Statistics for interface e101-001-0
Ether statistics:
rx_bytes: 9185614848
rx_no_errors: 0
tx_no_errors: 9003181
tx_total_collision: 0
rx_undersize_packets: 0
rx_jabbers: 0
rx_fragments: 0
rx_align_errors: 0
rx_discards: 0
rx_mcast_packets: 35445
$ opx-ethtool -e e101-001-0
Show media info for e101-001-0
if_index is 17
Key: 2.19.1245389.1245248.1245249.1245250.
opx-pas/media/rate-identifier = 0
opx-pas/media/oper-status = 0
opx-pas/media/category = 3
opx-pas/media/voltage-state = 1
opx-pas/media/bias-low-warning-threshold =
opx-pas/media/vendor-pn = 568400002
opx-pas/media/current-temperature = ??
opx-pas/media/insertion-cnt = 0
opx-pas/media/voltage-low-warning-threshold =
opx-pas/media/cc_ext = 162
opx-pas/media/length-om2 = 0
opx-pas/media/length-om3 = 0
opx-pas/media/rx-power-low-alarm-threshold =
opx-pas/media/length-om1 = 0
opx-pas/media/vendor-id = AP
opx-pas/media/media-category/sfp-plus/br-max = 0
opx-pas/media/connector = 33
opx-pas/media/ext-transceiver = 0
opx-pas/media/vendor-Specific =
ffffffffffffff00000000000000000000000000000000000000000000000000
opx-pas/media/media-category/sfp-plus/br-min = 0
opx-pas/media/encoding = 0
opx-pas/media/tx-power-high-warning-threshold =
opx-pas/media/vendor-name = Amphenol
opx-pas/media/rx-power-low-warning-threshold =
opx-pas/media/slot = 1
opx-pas/media/port = 1
opx-pas/media/vendor-rev = 4700
opx-pas/media/slot = 1
opx-pas/media/port = 1
opx-pas/media/tx-power-low-alarm-threshold =
opx-pas/media/bias-low-alarm-threshold =
opx-pas/media/capability = 6
opx-pas/media/media-category/sfp-plus/sff-8472-compliance = 0
opx-pas/media/diag-mon-type = 0
opx-pas/media/temp-state = 1
opx-pas/media/type = 43
opx-pas/media/media-category/qsfp-plus/wavelength-tolerance = 0
opx-pas/media/ext-identifier = 0
opx-pas/media/temp-low-warning-threshold =
opx-pas/media/voltage-high-warning-threshold =
opx-pas/media/temp-high-alarm-threshold =
opx-pas/media/length-sfm = 0
opx-pas/media/rate-select-state = 0
opx-pas/media/rx-power-measurement-type = 0
opx-pas/media/wavelength = 0
opx-pas/media/cc_base = 54
opx-pas/media/temp-low-alarm-threshold =
opx-pas/media/tx-power-low-warning-threshold =
opx-pas/media/insertion-timestamp = 0
opx-pas/media/current-voltage =
opx-pas/media/bias-high-alarm-threshold =
opx-pas/media/high-power-mode = 1
opx-pas/media/br-nominal = 0
opx-pas/media/options = 0
opx-pas/media/rx-power-high-warning-threshold =
opx-pas/media/date-code = 3131303632322000
opx-pas/media/present = 1
opx-pas/media/transceiver = 0000000000000000205c
opx-pas/media/length-cable = 2
opx-pas/media/voltage-high-alarm-threshold =
opx-pas/media/identifier = 12
opx-pas/media/voltage-low-alarm-threshold =
opx-pas/media/dell-qualified = 0
opx-pas/media/length-sfm-km = 0
opx-pas/media/rx-power-high-alarm-threshold =
opx-pas/media/admin-status = 0
opx-pas/media/serial-number = APF11240020140
opx-pas/media/tx-power-high-alarm-threshold =
opx-pas/media/temp-high-warning-threshold =
opx-pas/media/bias-high-warning-threshold =
opx-pas/media/enhanced-options = 0
opx-pas/media/media-category/qsfp-plus/max-case-temp = 70
$ opx-show-stats clear e101-001-0
Success
© 2019 OpenSwitch project. All information is contributed to and made available by OPX under the Creative Commons Attribution 4.0 International License (available at http://creativecommons.org/licenses/by/4.0/).
- Home
- System overview
- Software releases
- Hardware support
- FAQs
- Install
- Build
- Configure
- Develop
- Administer
- Troubleshoot
- Software compatibility
- Contribute
- DevOps
- Join