📄 ser2net.8
字号:
.TH ser2net 1 06/02/01 "Serial to network proxy".SH NAMEser2net \- Serial to network proxy.SH SYNOPSIS.B ser2net[\-c configfile] [\-p controlport] [\-n].SH DESCRIPTIONThe.BR ser2netdaemon allows telnet and tcp sessions to be established with a unit'sserial ports..PPThe program comes up normally as a daemon, opens the TCP portsspecified in the configuration file, and waits for connections. Oncea connection occurs, the program attempts to set up the connection andopen the serial port. If another user is already using the connectionor serial port, the connection is refused with an error message..SH OPTIONS.TP.I "\-c config\-file"Set the configuration file to one other than the default of.BR "/etc/ser2net.conf".TP.I \-nStops the daemon from forking and detaching from the controllingterminal. This is useful for running from init..TP.I \-dLike -n, but also sends the system logs to standard output. This ismost useful for debugging purposes..TP.I \-uIf UUCP locking is enabled, this will disable the use of UUCP locks..TP.I \-bCisco IOS uses a different mechanism for specifying the baud ratesthan the mechanism described in RFC2217. This option sets the IOSversion of setting the baud rates. The default is RFC2217's..TP.I \-vPrints the version of the program and exits..TP.I \-p portEnables the control port and sets the TCP port to listen to for thecontrol port. A port number may be of the form [host,]port, such as127.0.0.1,2000or localhost,2000. If this is specified, it will only bind to theIP address specified for the port. Otherwise, it will bind to all theports on the machine..SH CONTROL PORTThe control port provides a simple interface for controlling the ports and viewing their status. To accomplish this, it has the following commands:.TP.B showport [<TCP port>]Show information about a port. If no port is given, all ports are displayed..TP.B showshortport [<TCP port>]Show information about a port, each port on one line. If no port is given,all ports are displayed. This can produce very wide output..TP.B helpDisplay a short list and summary of commands..TP.B exitDisconnect from the control port..TP.B versionDisplay the version of this program..TP.B monitor <type> <tcp port>Display all the input for a given port onthe calling control port. Only one direction may be monitoredat a time. The type field may be .I tcpor.I termand specifieswhether to monitor data from the TCP port or from the serial portNote that data monitoring is best effort, if the controller portcannot keep up the data will be silently dropped. A controllermay only monitor one thing and a port may only be monitored byone controller..TP.B monitor stopStop the current monitor..TP.B disconnect <tcp port>Disconnect the tcp connection on the port..TP.B setporttimeout <tcp port> <timeout>Set the amount of time in seconds before the port connection will beshut down if no activity has been seen on the port..TP.B setportconfig <tcp port> <config>Set the port configuration as in the device configuration in the.BR /etc/ser2net.conffile. If conflicting options are specified, the last option willbe the one used. Note that these will not change until the portis disconnected and connected again. Options.I 300, 1200, 2400, 4800, 9600, 19200, 38400, 115200set the various baud rates..I EVEN, ODD, NONEset the parity..I 1STOPBIT, 2STOPBITSset the number of stop bits..I 7DATABITS, 8DATABITSset the number of data bits..I [-]XONXOFFturns on (- off) XON/XOFF support..I [-]RTSCTSturns on (- off) hardware flow control..I [-]LOCALignores (- checks) the modem control lines (DCD, DTR, etc.).TP.B setportcontrol <tcp port> <controls>Modify dynamic port controls. These do not stay between connections.Controls are:.I DTRHI, DTRLOTurns on and off the DTR line..I RTSHI, RTSLOTurns on and off the RTS line..TP.B setportenable <tcp port> <enable state>Sets the port operation state. Valid states are:.I offto shut the TCP port down,.I rawto enable the TCP port transfer all I/O as-is,.I rawlpto enable the TCP port input and device output without termios setting, and.I telnetto enable the TCP port is up run the telnet negotiation protocol on the port..SH CONFIGURATIONConfiguration is accomplished through the file.BR /etc/ser2net.conf .A file with another name or path may be specified using the.I \-coption. This file consists of one or more entries with the followingformat:.IP<TCP port>:<state>:<timeout>:<device>:<options>.PPor.IPBANNER:<banner name>:<banner text>.PP.SS FIELDS.TP.I "TCP port"Name or number of the TCP/IP port to accept connections from for thisdevice. A port number may be of the form [host,]port, such as 127.0.0.1,2000or localhost,2000. If this is specified, it will only bind to theIP address specified for the port. Otherwise, it will bind to all theports on the machine..TP.I stateEither .BR rawor.BR rawlpor.BR telnetor.BR off..I offdisables the port from accepting connections. It can be turnedon later from the control port..I rawenables the port and transfers all data as-is between the port andthe long..I rawlpenables the port and transfers all input data to device,device is open without any termios setting. It allow to use /dev/lpXdevices and printers connected to them..I telnetenables the port and runs the telnet protocol on the port to set uptelnet parameters. This is most useful for using telnet..TP.I deviceThe name of the device to connect to. This must be in the form of.BR /dev/<device> ..TP.I "device configuration options"Sets operational parameters for the serial port. Options.I 300, 1200, 2400, 4800, 9600, 19200, 38400, 115200set the various baud rates..I EVEN, ODD, NONEset the parity..I 1STOPBIT, 2STOPBITSset the number of stop bits..I 7DATABITS, 8DATABITSset the number of data bits..I [-]XONXOFFturns on (- off) XON/XOFF support..I [-]RTSCTSturns on (- off) hardware flow control..I [-]LOCALignores (- checks) the modem control lines (DCD, DTR, etc.).I remctlallows remote control of the serial port parameters via RFC 2217. Seethe README for more info..I <banner name>displays the given banner when a user connects to the port..TP.I "banner name"A name for the banner; this may be used in the options of a port..TP.I "banner text"The text to display as the banner. This may contain normal "C" escapestrings, and it may also contain, \\d for the device name and \\p forthe TCP port number of the given connection..PPBlank lines and lines starting with `#' are ignored..SH SECURITYser2net uses the tcp wrappers interface to implement host-based security.See hosts_access(5) for a description of the file setup. Two daemons areused by ser2net, "ser2net" is for the data ports and "ser2net-control"is for the control ports..SH "SIGNALS".TP 0.5i.B SIGHUPIf ser2net receives a SIGHUP, it will reread it configuration fileand make the appropriate changes. If an inuse port is changed or deleted,the actual change will not occur until the port is disconnected..SH "Error"Almost all error output goes to syslog, not standard output..SH "FILES"/etc/ser2net.conf.SH "SEE ALSO"telnet(1), hosts_access(5).SH "KNOWN PROBLEMS"None..SH AUTHOR.PPCorey Minyard <minyard@acm.org>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -