wiki:Resources/Notes/SerialConsole

Node Serial Console

Some devices, like the USRP N310 and USRP 2974, have a serial console redirect that allows "out of band" access to their onboard system in case of network misconfiguration. The serial console is relatively slow and is not meant for normal experiment use. However, in cases where a device is no longer accessible via SSH, its serial console may be used to perform the repairs necessary to restore normal SSH access.

The serial console of a node is accessible from the console machine of the node's testbed. First turn the node on using OMF on the console machine. Then use telnet to connect to the correct port exposed by the node's CM (chassis manager).

username@console:~$ telnet <cm-address> <port>

To figure out which CM to use, follow these exmaples:

Node Name CM Address
sdr1-s3-lg1.bed.cosmos-lab.org cm-s3-lg1.bed.cosmos-lab.org
sdr2-md1.bed.cosmos-lab.org cm-md1.bed.cosmos-lab.org

The port number is determined as follows:

Node Name Port
sdr1-… 10001
sdr2-… 10002

A single CM may be responsible for 2 or more nodes, hence the use of port numbers to differentiate between the nodes themselves.

Example

To connect to the serial console of sdr2-md1.bed.cosmos-lab.org:

First turn on the node:

username@console:~$ omf tell -a on -t sdr2-md1.bed.cosmos-lab.org

Then connect to the serial console of sdr2-md1.bed.cosmos-lab.org, which is served by cm-md1.bed.cosmos-lab.org on port 10002:

username@console:~$ telnet cm-md1.bed.cosmos-lab.org 10002

This will be followed by some messages and finally a 'Connected' greeting indicating the connection was successful.

Trying 10.109.11.1...
Connected to cm-md1.bed.cosmos-lab.org.
Escape character is '^]'.
Connected to USRP 2974 Serial Console

At this point, you should be able to login using the username and password you would use when SSH-ing to a node (usually 'root' and no password) and perform the necessary tasks to make the node accessible via SSH again.

If you get nothing after the 'Connected' greeting and no response to keyboard input, make sure that you turned the node on. It is also possible that serial redirection is not enabled on the system image used on the node, in which case this method will not work.

Exit the Serial Console

To disconnect from the node's serial console, use ctrl + ] to bring up the telnet prompt:

telnet>

Then type q and press Enter to exit.

telnet> q
Connection closed.
username@console:~$ 
Last modified 4 years ago Last modified on May 12, 2020, 12:35:54 AM
Note: See TracWiki for help on using the wiki.