The general usage information as RBridge reports by itself is:
$ sudo rbridge -h This is RBridge 8.159 (created 2019/03/08) Copyright (C) 2019 by Inlab Networks GmbH, Germany All rights reserved / Alle Rechte vorbehalten usage: rbridge [options] start|stop|restart|status|control options: [-c <conf>] load specific configuration file [-d] debug mode specials: rbridge -h show this help and usage information rbridge -N show nodeid and exit immediately rbridge -r show release and exit immediately rbridge -s <if> scan LAN for RBridges
- Using the -c option you may specify a different configuration file for “rbridge start” and “rbridge restart”.
- The -d option enters debugging mode (“rbridge start” and “rbridge restart” stay in foregound in that case).
# rbridge -c /home/rbridge/remote-office.conf start #
Starting RBridge: “rbridge start”
The command “rbridge start” starts RBridge on the local machine. This requires root privileges, so it needs to be invoked as super user (root) or by using sudo. If there’s no interface specified, or if there’s no configuration file at all, RBridge will start as a registry which requires no licensing. If RBridge is already running, an appropriate message is shown.
$ sudo rbridge start RBridge: no or invalid license, trial restrictions apply RBridge: going to background ... $ $ sudo rbridge start RBridge: this is a registry, no license required RBridge: going to background ... $ # rbridge start RBridge: valid license RBridge: going to background ... # # rbridge start RBridge: already running with PID 99295 #
Stopping RBridge: “rbridge stop”
The command “rbridge stop” terminates a running RBridge and requires also root privileges.
$ sudo rbridge stop RBridge: shutdown of PID 932 complete $ $ sudo rbridge stop RBridge: not running $ $ rbridge stop RBridge: root permissions required, exiting. $
Restarting RBridge: “rbridge restart”
The command “rbridge restart” restarts a running RBridge. Technically it’s the same as executing a “rbridge stop” followed by a “rbridge start”.
$ sudo rbridge restart RBridge: shutdown of PID 939 complete RBridge: valid license RBridge: going to background ... $
Show RBridge status: “rbridge status”
The command “rbridge status” reports if RBridge is currently running or not. If it’s currently running, the PID of RBridge is displayed. This command requires super user privileges.
# rbridge status RBridge: running with PID 950 # # rbridge status RBridge: not running #
Invoke the RBridge CLI: “rbridge control” (or “rbridge ctl”)
This command enters the RBridge CLI (command line interface) and allows you to enter several one-word commands talking to the currently running RBridge. Typing EOF (control-D) terminates the CLI session. Command line editing using the arrow keys is supported.
$ sudo rbridge ctl RBridge: connected to PID 1049 RBridge> help the following commands are available: copyright show Copyright information hash show forwarding table and MAC filters help (or ?) show this help information license show licensing information log show current log nodeid show nodeid registry show current registry entries uptime show uptime startuplog show startup log status show general status stop stop immediately version show version type EOF to exit. RBridge> ... bye $
The available one-word commands are:
The RBridge copyright information is shown.
$ sudo rbridge ctl RBridge: connected to PID 13206 RBridge> copyright This is RBridge 8.193 (created 2019/03/12) Copyright (C) 2019 by Inlab Networks GmbH, Germany All rights reserved / Alle Rechte vorbehalten RBridge>
This shows the internal forwarding table and the contents of the deny and allow filters.
RBridge> hash forwarding table: 00:0c:29:38:89:a3 en0 00:0c:29:6f:57:c0 en0 80:fa:5b:15:6d:14 REMOTE_PEER 00:0c:29:80:81:43 en0 00:03:ba:27:87:33 en0 00:3e:e1:c0:f0:9a en0 f4:03:43:f0:fc:d2 en0 00:00:5e:00:02:31 en0 34:38:af:59:e5:83 en0 local_rbridge.deny: local_rbridge.allow: remote_rbridge.deny: remote_rbridge.allow: RBridge>
The current licensing status is shown.
RBridge with a valid RBRFNL license looks like this:
RBridge> license valid license (serial=IN1903102) RBridge>
An RBridge endpoint within the 30 day trial period looks like this:
RBridge> license 30 day testing period running, 11 days and 6 hours remaining this RBridge endpoint will terminate in 2496 seconds RBridge>
This shows the most recent log entries. Log messages are being sent to the syslog() as well, but RBridge keeps also its own log message buffer in parallel.
RBridge> log 2019/03/14 13:15:55 5 started (MACOS) 2019/03/14 13:15:56 4 no registry_linkname specified 2019/03/14 13:15:56 5 2097152 keys avaible in /Users/rbridge/keymaterial64mb.bin 2019/03/14 13:15:56 5 67108864 bytes true random key material ready in memory (2097152 keys) 2019/03/14 13:15:57 6 BPF device /dev/bpf2 opened successfully 2019/03/14 13:15:57 6 binding to en0 interface succeeded 2019/03/14 13:15:57 6 BPF buffer length 4096 for interface en0 accepted 2019/03/14 13:15:57 6 promiscuous mode on interface en0 activated 2019/03/14 13:15:57 6 file descriptor 5 ready for interface en0 2019/03/14 13:16:00 5 link ESTABLISHED to nodeid b8:27:eb:dd:49:a9 RBridge>
This displays the nodeid of an RBridge running in bridging mode. The nodeid equals to the MAC address of the interface being forwarded. An RBridge running as a registry doesn’t have a nodeid (and does not need one).
RBridge> nodeid Node-ID (en0 MAC) is f0:18:98:e8:20:ad RBridge>
and on a RBridge registry:
RBridge> nodeid no nodeid available RBridge>
This shows the current registry information on a RBridge in registry mode.
Example (showing a specific nodeid wishing to connect either over IPv4 or IPv6):
RBridge> registry f0:18:98:e8:20:ad 7 active 2a02:810d:2440:36ec:c9c7:2b5e:7496:e724,439 f0:18:98:e8:20:ad 8 active ::ffff:220.127.116.11,439 RBridge>
This shows the RBridge uptime in seconds.
RBridge> uptime uptime is 3992 seconds RBridge>
This shows the separately saved log messages recorded directly after startup. Initially “log” and “startuplog” show the same information.
This shows the general status including all the various packet counters.
RBridge> status AES encryption is ENABLED (true random key material) link ESTABLISHED to nodeid b8:27:eb:dd:49:a9 current peer address: fe80::8674:ce10:3b0:1963%en1,439 packet counter value: 2061 registry_1 address: ::ffff:18.104.22.168,439 registry_2 address: 2a00:1158:3::ba,439 current kernel statistics: 2087 packets received, 0 dropped 191129 bytes locally received from en0 in 2087 packets 170378 bytes locally received from en0 in 1998 packets (and forwarded) 198656 bytes received remotely in 1279 packets 194688 bytes received remotely in 1217 packets (and forwarded) RBridge>
The RBridge endpoint is immediately stopped. This also terminates the CLI frontend.
$ sudo rbridge ctl RBridge: connected to PID 13339 RBridge> stop RBridge: no peer available $
This shows the RBridge release information.
$ sudo rbridge ctl RBridge: connected to PID 13344 RBridge> version this is RBridge 8.194 (created 2019/03/14) RBridge>
“rbridge -N”: Show Nodeid
The command “rbridge -N” displays the nodeid of an RBridge in bridging mode. The nodeid is defined to be the MAC address of the interface that connects to the local LAN for RBridge bridging.
The nodeid basically serves two purposes:
- It’s used at an identifier for DASP communication, and
- it’s used as an identifier for RBridge licensing.
An RBridge running as a registry doesn’t have a nodeid. RBridge does not need to be running in the background for this command. This command should be invoked with root privileges, if rbridge.conf is readable for the invoking user it also works with normal privileges.
# rbridge -N f0:18:98:e8:20:ae #
“rbridge -r”: Show RBridge version / release number
The command “rbridge -r” displays the release (version) number of the installed RBridge. Root permissions are not required.
$ sudo ./rbridge -r 8.191 $
“rbridge -s <if>”: Scan network for other RBridges
The command “rbridge -s <interface>” allows to scan the LAN connected to the specified interface for RBridges in bridging mode. This is helpful to identify any unwanted or secretly installed RBridges forwarding your LAN or, positively, to assure that all required RBridges installed by yourself are operational as intended. This command needs root privileges to execute. There’s no licensing required to run this command, also the 30 day trial license restriction does not apply.
$ sudo rbridge -s en0 scanning for RBridges on en0 (00:3e:e1:c0:f0:9a) ... done: f0:18:98:e8:20:ad one active RBridge found. $ sudo rbridge -s eth0 scanning for RBridges on eth0 (b8:27:eb:dd:49:a9) ... done: no active RBridge found.
Since the reported nodeids are actually MAC addresses, you – or your network administrator – may look up the forwarding tables of your switches to further identify the exact location of an unknown RBridge. Also, the MAC address tells you more about the associated vendor (e.g. “Apple, Inc.” for MAC address f0:18:98:e8:20:ad as in the example above).