1ser2net(8)                  System Manager's Manual                 ser2net(8)
2
3
4

NAME

6       ser2net - Serial to network proxy
7
8

SYNOPSIS

10       ser2net [-c configfile] [-C configline] [-p controlport] [-n] [-d] [-b]
11       [-v] [-P pidfile]
12
13

DESCRIPTION

15       The ser2net daemon allows telnet and tcp  sessions  to  be  established
16       with a unit's serial ports or with an IPMI Serial Over LAN (SOL) inter‐
17       face.
18
19       The program comes up normally as a  daemon,  opens  the  network  ports
20       specified in the configuration file, and waits for connections.  Once a
21       connection occurs, the program attempts to set up  the  connection  and
22       open  the serial port.  If another user is already using the connection
23       or serial port, the connection is refused with an error message.
24
25

OPTIONS

27       -c config-file
28              Set the configuration file to one  other  than  the  default  of
29              sysconfdir/ser2net/ser2net.yaml.   If  the config-file is - then
30              standard input is read as the config file.  See -C for  info  on
31              sysconfdir
32
33       -C sysconfdir
34              Set  the directory where the configuration file and ssl keys are
35              stored.  This is generally /etc/ser2net on Unix-type systems, on
36              Windows  it  is ../etc/ser2net from the executable's location by
37              default.
38
39       -a authdir
40              Set the default directory where  authentication  information  is
41              stored.   This is generally /usr/share/ser2net on Unix-type sys‐
42              tems, on Windows it is ../share/ser2net  from  the  executable's
43              location by default.  This can be overridden in the config file.
44              See the ser2net.yaml.5 for info on what this does.
45
46       -A admin-authdir
47              Set the default directory where the administrator's  authentica‐
48              tion information is stores.  This is sysconfdir/auth by default.
49              This  can  be  overridden  in  the   config   file.    See   the
50              ser2net.yaml.5 for info on what this does.
51
52       -Y yaml-config-string
53              Add  a yaml config string to the end of strings to be processed.
54              This may be  specified  multiple  times  for  multiple  strings.
55              These are appended onto the end of a yaml config file; though if
56              this is specified, the default config file is disabled  and  you
57              have to enable it with the -c option.
58
59              To make things easier to handle, any # in the config string that
60              is not inside quotes (what would normally  start  a  comment  in
61              yaml)  is converted to a new line.  Plus a new line is added af‐
62              ter each separate config string.  So, for instance:
63
64                -Y 'connection: &con01#  accepter: tcp,2013'
65                -Y '  connector: serialdev,/dev/ttyEcho0,9600n81,local'
66                -Y '  options:#    banner: "### A Banner ###\r\n"'
67
68              can be put on the ser2net command line.
69
70       -n     Stops  the  daemon  from  forking  and  detaching from the  con‐
71              trolling terminal. This is useful for running from init.
72
73       -d     Like -n, but also sends the system logs to standard output. This
74              is most useful for debugging purposes.
75
76       -P pidfile
77              If specified, put the process id (pid) of ser2net  in  the  pid‐
78              file, replacing whatever was in that file previously.  A pidfile
79              is not created by default, you must specify this to create  one.
80              Note  also  that  this  filename  must be specific with the full
81              path, as ser2net will change directory to "/" when it becomes  a
82              daemon.
83
84       -u     If  UUCP  locking  is enabled, this will disable the use of UUCP
85              locks.
86
87       -b     Cisco IOS uses a different mechanism  for  specifying  the  baud
88              rates than the mechanism described in RFC2217.  This option sets
89              the IOS version of setting  the  baud  rates.   The  default  is
90              RFC2217's.   Note  that this capability is now handled automati‐
91              cally and this option is ignored.
92
93       -v     Prints the version of the program and exits.
94
95       -t <num threads>
96              Spawn the given number of threads for ser2net to use.   The  de‐
97              fault is 1.  Only valid if pthreads is enabled at build time.
98
99       -p <admin-accepter>
100              Enables the admin interface on the given accepter specification.
101              See "ADMIN CONNECTION" in ser2net.yaml(5) for  more  details  on
102              how  to  configure this, and "ADMIN INTERFACE" below for details
103              on how to use it.
104
105       -s signature
106              Specifies the default RFC2217 signature.
107
108

ADMIN INTERFACE

110       The admin interface provides a simple  interface  for  controlling  the
111       ports  and viewing their status. To accomplish this, it has the follow‐
112       ing commands:
113
114       showport [<network port>]
115              Show information about a port. If no port is  given,  all  ports
116              are displayed.
117
118       showshortport [<network port>]
119              Show information about a port, each port on one line. If no port
120              is given, all ports are displayed.  This can produce  very  wide
121              output.
122
123       help   Display a short list and summary of commands.
124
125       exit   Disconnect from the control port.
126
127       yaml   Go into yaml output mode.  See YAML MODES below.
128
129       version
130              Display the version of this program.
131
132       monitor <type> <network port>
133              Display  all  the  input for a given port on the calling control
134              port.  Only one direction may be monitored at a time.  The  type
135              field  may  be tcp or term and specifies whether to monitor data
136              from the network port or from the serial  port  Note  that  data
137              monitoring is best effort, if the controller port cannot keep up
138              the data will be silently dropped.  A controller may only  moni‐
139              tor  one  thing  and  a  port  may only be monitored by one con‐
140              troller.
141
142       monitor stop
143              Stop the current monitor.
144
145       disconnect <network port>
146              Disconnect the tcp connection on the port.
147
148       setporttimeout <network port> <timeout>
149              Set the amount of time in seconds  before  the  port  connection
150              will be shut down if no activity has been seen on the port.
151
152       setportconfig <network port> <config>
153              Set the port configuration as in the device configuration in the
154              /etc/ser2net/ser2net.yaml  file.   If  conflicting  options  are
155              specified,  the  last  option  will  be the one used.  Note that
156              these will not change until the port is  disconnected  and  con‐
157              nected  again.   Options  300,  1200,  2400,  4800, 9600, 19200,
158              38400, 57600, 115200 set the various baud rates.  The  following
159              speed may be available if your system has the values defined and
160              your hardware  supports  it:  230400,  460800,  500000,  576000,
161              921600,  1000000,  1152000,  1500000, 2000000, 2500000, 3000000,
162              3500000, 4000000.  Parity, databits, and stopbits may be  speci‐
163              fied  in  the  classical  manner after the speed, as in 9600N81.
164              This has the following format: <speed>[N|E|O|M|S[5|6|7|8[1|2]]].
165              Setting  serial  options  this way does not work on SOL, SOL has
166              fixed N81 serial options.  EVEN, ODD, NONE (MARK  and  SPACE  if
167              supported)  set  the parity.  1STOPBIT, 2STOPBITS set the number
168              of stop bits.  7DATABITS, 8DATABITS set the number of data bits.
169              [-]XONXOFF  turns  on (- off) XON/XOFF support.  [-]RTSCTS turns
170              on (- off) hardware flow control.  [-]LOCAL ignores  (-  checks)
171              the modem control lines (DCD, DTR, etc.)
172
173       setportcontrol <network port> <controls>
174              Modify dynamic port controls.  These do not stay between connec‐
175              tions.  Controls are: DTRHI, DTRLO Turns  on  and  off  the  DTR
176              line.  RTSHI, RTSLO Turns on and off the RTS line.
177
178       setportenable <network port> <enable state>
179              Sets  the  port  operation state.  Valid states are: off to shut
180              the network port down, raw to enable the network  port  transfer
181              all I/O as-is, rawlp to enable the network port input and device
182              output without termios setting, and telnet to enable the network
183              port is up run the telnet negotiation protocol on the port.
184
185       reload Causes  ser2net  to  reload its configuration.  Any error output
186              will come out in the output, along with going to syslog.
187
188   YAML MODES
189       If the "yaml" command is issued, echo is turned off and all  output  is
190       YAML compliant.  The form is basically the same as the non-YAML output,
191       with some minor adjustments to make it YAML  compliant.   In  addition,
192       all responses are in the form:
193
194         %YAML 1.1
195         ---
196         response:
197           <response info here>
198         ...
199
200       If  there  is an error, it is returned in the response with the "error"
201       key.  If the command succeeded, no "error" key will be present  in  the
202       response mapping.  The "..." will be at the end of all responses.
203
204       The  following  commands  are available in yaml output mode: exit, ver‐
205       sion, showport, disconnect, setporttimeout, setportenable,  setportcon‐
206       trol, reload,
207
208       If  "%YAML" is seen in the input, YAML input and output modes are acti‐
209       vated, echo is disabled, and all input is expected to be in the form:
210
211         ---
212         command:
213           name: <command name>
214           id: <optional id>
215           parms: [ parm1 [, parm2 [...]]]
216         ...
217
218       The id is optional and will just be  returned  in  the  response.   The
219       parms are optional, too, unless the command requires them.  Extra parms
220       are ignored, along with unknown keys in the main mapping.
221
222       Note that you have to deal with the "->" that is issued when  the  con‐
223       nection  is made, before going into YAML mode, YAML doesn't handle that
224       well.
225
226       In YAML output mode, you will get asynchronous reports  of  connections
227       and disconnections in the form:
228
229         %YAML 1.1
230         ---
231         new connection:
232           name: !!str 'con1'
233           remaddr: !!str 'ipv6,::1,59072'
234         ...
235
236         %YAML 1.1
237         ---
238         disconnect:
239           name: !!str 'con1'
240           remaddr: !!str 'ipv6,::1,59072'
241         ...
242

CONFIGURATION

244       Configuration      is      accomplished      through      the      file
245       /etc/ser2net/ser2net.yaml.  A file with another name  or  path  may  be
246       specified using the -c option.
247
248       The yaml configuration file is described in ser2net.yaml(5)
249
250

SIGNALS

252       SIGHUP
253            If ser2net receives a SIGHUP, it will reread it configuration file
254            and make the appropriate changes.  If  an  in  use  connection  is
255            changed  or  deleted,  the  actual change will not occur until the
256            port is disconnected, except that if you disable a  connection  it
257            will kick the users off.
258
259            ser2net  uses the name (the connection alias) of the connection to
260            tell if it is new, changed or deleted.  If the  new  configuration
261            file  has  a  connection  with  the  same name, it is treated as a
262            change.
263
264            This has some unusual interactions  with  connections  that  allow
265            more  than  one  simultaneous  connection.  It works just like the
266            other port, but the accepter is disabled and new connections  will
267            not be accepted until all the existing connections are closed.
268
269

ERRORS

271       All error output after startup goes to syslog, not standard output, un‐
272       less you use the -d option.
273
274

FILES

276       /etc/ser2net/ser2net.yaml,                    /etc/ser2net/ser2net.key,
277       /etc/ser2net/ser2net.crt, /usr/share/ser2net
278
279

SEE ALSO

281       telnet(1), ser2net.yaml(5), hosts_access(5)
282
283

KNOWN PROBLEMS

285       None.
286
287

AUTHOR

289       Corey Minyard <minyard@acm.org>
290
291
292
293Serial to network proxy            06/02/01                         ser2net(8)
Impressum