The PortShare driver for Linux maps the console server serial port to a host tty port. The opengear-serial-client as an open source utility for Linux, AIX, HPUX, SCO, Solaris and UnixWare. This utility can be freely downloaded from http://opengear.com/download/.
This PortShare serial port redirector allows you to use a serial device connected to the remote console server as if it were connected to your local serial port. The opengear-serial-client creates a pseudo tty port, connects the serial application to the pseudo tty port, receives data from the pseudo tty port, transmits it to the console server through network and receives data from the console server through network and transmits it to the pseudo-tty port.
- You first need to setup the console server and attach and configure the remote serial port device i.e. ensure the console server IP configuration is ok and that you can access the unit (ping, telnet...) and configure the console server serial port to RAW or RFC2217 mode
- To install the Opengear PortShare serial client:
- Build and install the package (as root):
$ ./configure && make && make install
Note that the `--prefix=' option is ignored by configure - Configure the devices by editing /etc/portshare-devices (sample configurations and the format is shown below)
- Start the opengear devices:
/usr/local/sbin/portshare-serial-client start
Below are some examples showing the virtual port configuration and using a remote console serial port as a local tty port on the Linux host:
/etc/opengear-devices
devname:cmtype:cmname:physport:type:options
where :
devname -> Device full pathname
rastype -> Console Server type (cm4008 or CM4116 or CM4148)
rasname -> Console Server host name or IP address
physport -> Physical port number on Console Server
type -> Server type : rfc2217 or socket (raw TCP)
opts -> per-port interface options (optional)
To connect via a secure ssh tunnel, use the '-P' parameter as part of "opts", and give the TCP port number used for the local end of the tunnel. e.g. "-P 22222" will attempt to connect to local TCP port 22222. Also set the rasname to "localhost".
Note: The ssh tunnel must already be setup for this to work.
Connect to port 1 on a 48 port Console Server at IP address 10.111.254.1, using RFC2217:
/dev/otty01:cm4148:10.111.254.1:1:rfc2217:-m 1
Connect to port 8 on a 8 port Console Server at IP address 10.111.254.2, using RFC2217:
/dev/otty02:cm4008:10.111.254.2:8:rfc2217:-m 1
Create an ssh tunnel from localhost to an Opengear Console Server. This tunnel connects to serial port 3 on the console manager and uses rfc2217. The rfc2217 TCP port base on the Opengear console manager is set to 9000. The local TCP port used for the tunnel is 12345.
ssh -L 12345:10.111.254.3:9003 @10.111.254.3 -N
Now use this tunnel to make the connection:
/dev/otty03:cm4008:localhost:3:rfc2217:-P 12345 - Build and install the package (as root):
Comments
0 comments
Article is closed for comments.