WR Switch: How-To Use a WR Switch

THIS HOWTO IS DEPRECATED

This is just a short list of things I found useful

Login to a Switch

  • ssh via the management port
  • serial console via the miniUSB port labelled "test" - 115200 8N1
    • linux: minicom -D /dev/ttyUSB...
    • XP: Hyperterm
    • Win7: PuTTY (supports serial console!)

Slave and Master Ports

Typically, the first port is configured as slave and the others as master. Hence, the first port on WR grandmaster can't be used to connect a WR device. This can be changed in /wr/etc/wrsw_hal.conf.

Force DHCP Request

To be done via the serial port:
# ifconfig eth0 up
# udhcpc eth0
# ifconfig eth0

Text Editing

I hate VI: I use # nano

Extremely Basic Logging and Monitoring

  • # ifconfig
  • # wr_mon
  • # wr_date
  • # rtu_stat
  • # dmesg
  • # ifconfig to check states of ports
  • Interesting log files might be generated by the WR Hardware Abstraction Layer, WR Routing Table Unit and WR PTP Daemon. Have a look at /wr/sbin/start-daemons.sh, which can be modified. Logfiles should go to /dev/kmsg. Reboot then,
    • # cat /dev/kmsg (all kind of log stuff)
    • # cat /dev/kmsg | grep hal_ports.c (Hardware Abstraction Layer daemon)
    • # cat /dev/kmsg | grep rtu_fd.c (White Rabbit Switch Routing Table Unit)
    • #cat /dev/kmsg | grep rtud.c (White Rabbit Switch Routing Table Unit)
    • #cat /dev/kmsg | grep ptp (White Rabbit PTP daemon, comment: log to /dev/kmsg only for debugging, see /wr/sbin/start-daemons.sh)
    • ... in case /dev/kmsg remains pretty unfilled, it smells like some WR daemons have not (yet?) been started.

Daemons

In case you are missing a WR link, and/or wr_mon yields a message like Can't establish WRIPC connection to the PTP daemon!, then some of the daemons might be missing. Have a look at /wr/sbin/start-daemons.sh and look for the daemons via ps aux or top. Eventuelly you have to start them by hand. Sometimes, rebooting helps.

Desperation

  • reboot
  • ask you local expert
  • ...

Screenshot

Try wr_mon.
Good
If you see the following, there are good chances that you connected your brand-new switch to a clock-master via wr0 and the WR link has been created successfully.
WR Switch Sync Monitor v 1.0 [q = quit]

Switch ports:

  wr0: Link up    mode: WR Slave   Locked  Calibrated
  wr1: Link down  mode: WR Master  NoLock  Uncalibrated
  wr2: Link down  mode: WR Master  NoLock  Uncalibrated
  wr3: Link down  mode: WR Master  NoLock  Uncalibrated
  wr4: Link down  mode: WR Master  NoLock  Uncalibrated
  wr5: Link down  mode: WR Master  NoLock  Uncalibrated
  wr6: Link down  mode: WR Master  NoLock  Uncalibrated
  wr7: Link down  mode: WR Master  NoLock  Uncalibrated
  wr8: Link down  mode: WR Master  NoLock  Uncalibrated
  wr9: Link down  mode: WR Master  NoLock  Uncalibrated
 wr10: Link down  mode: WR Master  NoLock  Uncalibrated
 wr11: Link down  mode: WR Master  NoLock  Uncalibrated
 wr12: Link down  mode: WR Master  NoLock  Uncalibrated
 wr13: Link down  mode: WR Master  NoLock  Uncalibrated
 wr14: Link down  mode: WR Master  NoLock  Uncalibrated
 wr15: Link down  mode: WR Master  NoLock  Uncalibrated
 wr16: Link down  mode: WR Master  NoLock  Uncalibrated
 wr17: Link down  mode: WR Master  NoLock  Uncalibrated

Synchronization status:

Servo state:               TRACK_PHASE
Phase tracking:            ON
Synchronization source:    wr0

Timing parameters:

Round-trip time (mu):      1165.27 nsec
Master-slave delay:        576.69 nsec
Link length:               112 meters
Master PHY delays:         TX: 0.00 nsec, RX: 172.00 nsec
Slave PHY delays:          TX: 0.00 nsec, RX: 160.00 nsec
Total link asymmetry:      11.89 nsec
Clock offset:              0.00 nsec
Phase setpoint:            0.69 nsec
Skew:                      0.00 nsec
Servo update counter:      83 times

Good or Bad
If you see this, your brand-new switch is not connected to a clock-master. Either the switch acts as a grandmaster clock, then things might be fine. Or your switch acts as a boundary clock, then things are not fine since there is no WR link to a master established
.
R Switch Sync Monitor v 1.0 [q = quit]

Switch ports:

  wr0: Link down  mode: WR Slave   NoLock  Uncalibrated
  wr1: Link up    mode: WR Master  NoLock  Calibrated
  wr2: Link down  mode: WR Master  NoLock  Uncalibrated
  wr3: Link down  mode: WR Master  NoLock  Uncalibrated
  wr4: Link down  mode: WR Master  NoLock  Uncalibrated
  wr5: Link down  mode: WR Master  NoLock  Uncalibrated
  wr6: Link up    mode: WR Master  NoLock  Calibrated
  wr7: Link down  mode: WR Master  NoLock  Uncalibrated
  wr8: Link down  mode: WR Master  NoLock  Uncalibrated
  wr9: Link down  mode: WR Master  NoLock  Uncalibrated
 wr10: Link down  mode: WR Master  NoLock  Uncalibrated
 wr11: Link down  mode: WR Master  NoLock  Uncalibrated
 wr12: Link down  mode: WR Master  NoLock  Uncalibrated
 wr13: Link down  mode: WR Master  NoLock  Uncalibrated
 wr14: Link down  mode: WR Master  NoLock  Uncalibrated
 wr15: Link down  mode: WR Master  NoLock  Uncalibrated
 wr16: Link down  mode: WR Master  NoLock  Uncalibrated
 wr17: Link down  mode: WR Master  NoLock  Uncalibrated

Synchronization status:

Master mode or sync info not valid

-- DietrichBeck - 25 Jan 2013
Topic revision: r6 - 19 Jun 2019, DietrichBeck
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback