in network

OF-DPA with ONL Cheat Sheet

本篇是記錄於 ONL 上的 OF-DPA 常用的指令小抄,對 Troubleshooting 會非常有幫助

Environment

Cheat Sheet

Set Base configuration

  1. vi /etc/network/interfaces
auto ma1
iface ma1 inet static
address 192.168.11.2
netmask 255.255.255.0
gateway 192.168.11.254
dns-nameservers 192.168.100.1

Rate Limit

  • Setting Rate Limit per queue
    • client_queue_config <queueId> <intIfNum> <minRate> <maxRate>
    • queyeID := [ 0 – 7 ]
    • ex: client_queue_config 0 2 1 1000
    • Queue 0, Port 2, 1 means minimal 0.1%, 1000 means Maximum 100%
    • Min and Max queue rates must range between 1-1000
  • Show Rate Limit per queue
    • client_queue_config <queueId> <intIfNum>
    • ex: client_queue_config 1 1
    • Show Queue 1, Port 1 min/Max rate

OF Agent App

  • Enable ofagentapp service
    • via CLI
    • launcher ofagentapp --controller=<CONTROLLER_IP>:6653 --listen=<SWITCH_MA1_IP>:6653
    • via INIT
    • service ofagentd restart
    • The ofagent.conf at /etc/ofagent/ofagent.conf
    • More detailes How to enable debugging mode on OF-DPA
  • Stop ofagentapp
    • pkill ofagentapp

Port Speed

  • Change Port Speed per Port
    • vi /etc/accton/ofdpa.conf
...
# port_speed_<port>= Speed
# Speed := { 1000 | 10000 | 40000 }
...
# Default value in AS5712-54X is port_speed=10000
port_speed_3=1000   # front port 3
port_speed_4=10000   # front port 4
...
  • Change Port Mode per Port
    • vi /etc/accton/ofdpa.conf
...
# port_mode_<port> = Speed_Type [Interface Type]
# Speed_Type:= { 1x40g | 4x10g }
# Interface Type := { CR | CR4 | SR | SR4 | LR | LR4 | KR | KR4 | SFI | XFI | ... }
...
port_mode_1=1x40g
port_mode_2=1x40g if=SR4
port_mode_3=4x10g #Breakout cable
...

Dump BRCM Informations

  • Dump Port Table
    • client_port_table_dump
  • Dump Meter Table
    • client_meter_dump
  • Dump Flow Table
    • client_flowtable_dump
  • Dump Group Table
    • client_grouptable_dump
  • Dump Tunnel
    • client_tunnel_dump
  • Dump OAM
    • client_oam_dump
  • Dump Class Color Table
    • client_classcolortable_dump
  • Show physical port mapping
    • client_drivport -a
  • Enable sFlow
    • client_sflow
  • Purge all configuration
    • client_cfg_purge

BRCM Diag Shell with ONL

  • NOTE: Please launch ofagentapp first in backaground
  • Show processes status
    • client_drivshell ps
  • Show port config
    • client_drivshell port <port_number>
  • Show usage command
    • client_drivshell help
  • Redirect log to other devices (ex: /dev/console)
    • client_drivshell log f=/dev/console
    • You can use command tty to find your teletype device name currently
    • Tips: client_drivshell log f=$(tty)

NOS Information

  • Show Platform Information with ONL
    • onl-platform-show
  • Show sysconfig with ONL
    • onl-sysconfig

Mount Disk

  • Change w/r permission on disk
    1. vi /etc/mtab.yml
    2. onl-mount mount all
  • Check mount status
    • mount
  • Check partition status
    • df -h

ONL Platform Information

  • Show ONL information for human read
    • onlpdump -r
  • Show Hardware information
    • onlpdump -s
  • Show SFP information
    • onlpdump -S

Only launch OF-DPA without OpenFlow

  • Start OF-DPA without OpenFlow agent
KERNEL_MODS=/lib/modules/`uname -r`/ofdpa
insmod $KERNEL_MODS/linux-kernel-bde.ko dmasize=32M maxpayload=128
insmod $KERNEL_MODS/linux-user-bde.ko
  • Check Status
lsmod
client_drivshell ps

Reference