b83b13e724d67b394692f852f4c21ecf.ppt
- Количество слайдов: 18
CS-328 Rlogin & Telnet Protocols
Rlogin • Remote Logon to another Host • RFC 1282 • Well known port : 513
Rlogin Method • Client sends 4 null terminated strings to server – byte of 0 s – logon name of user on client; byte of 0 s – logon name of user on server; byte of 0 s – user’s term type ‘/’ term speed; byte of 0 s • Server responds by sending a byte of 0 s
Rlogin Method (cont) • Server can optionally ask for a password – handled as normal data exchange, no special protocol – passwords are sent as clear text; newer versions use Kerberos • Server usually requests client to send terminals window size
Client responsibilities • send a byte at a time to server; echoing is done by server • text compression and decompression; Nagle’s algorithm
Client commands • Flow Control – Control-S , Control-Q – sent using TCP Urgent – “Raw” mode • Start Stop are sent to server as any other data; server determines the semantics and either uses for flow control or passes to local app (ex EMACS)
Client Commands (cont) – “Cooked” mode • Start/Stop are interpreted at client to start and stop server from sending more data • May lose many characters before server may implement Stop • Control Commands (sent by server) – TCP Urgent • • 02 - client discards all buffered data 10 - enter “raw” mode 20 - enter “cooked” mode 80 - window size request
Telnet • Remote logon to another host • RFCs 854 and 855 • Well known port: 23
Network Virtual Terminal (NVT) • Both Telnet end points implement NVT – can’t rely on option negotiation as one end might be a hardwired terminal (like a TTY) • bi-directional character based device • conceptionally consists of a – keyboard – printer • unspecified line length and page length
NVTs • understands ASCII printable codes (32 -126) and NULL, LF, CR • BELL (7), BS (8), HT(9), VT (11) FF(12) are optional • embedded in line with the above chars are telnet commands
Telnet Commands • commands are placed in the data stream by first inserting an IAC (Interpret as command) character (255) • Commands are of the form: – IAC verb option • to have NVT not interpret 255 as IAC, use two consecutive IACs
Telnet Commands • • • SE-240 - end of subneg. parameters NOP-241 -No Operation Data. Mark-241 -accompanies TCP Urgent Break-243 -Break or Attn Key Interrupt Process-244 -Suspend, terminate remote process
Telnet Commands (more) • Abort Output-245 -complete remote process without output • Are. You. There-246 -rqst remote NVT ot give some sign of life • Erase. Char-247 -tell remote NVY to erase last char • Erase. Line-248 -tell remote NVT to delete last line
Telnet Commands (more) • • Go. Ahead-249 -Go Ahead signal SB-250 -subnegotiation begin WILL-251 -desire to begin performing WONT-252 -refusal to perform DO-253 -reqst other party perform DONT-254 -demand remote stop IAC-255 -Interpret As Command
Option Negotiation Commands • Will-offer to remote to perform – Do-remote agrees – Don’t-remote disagrees to offer • Won’t-offer to remote to not perform – Do-remote disagrees to the offer – Don’t-remote agree to offer
Option Negotiation Commands • Do - request remote to perform – Will- remote agrees to request – Won’t-remote disagrees to request • Don’t-request remote to not perform – Will-remote disagrees to request – Won’t remote agrees to request
Standard Options 0 -Binary Transmission 16 - Output Linefeed Disposition 1 - Echo 17 - Extended ASCII 2 - Reconnection 18 - Logout 3 - Supress GA 19 - Byte Macro 4 - Approx Msg Size 20 - Data Entry Terminal 5 - Status 21 - SUPDUP 6 - Timing Mark 22 - SUPDUP Output 7 - Rem. Control Trans & Echo 23 - Send Location 8 - Outout Line Width 24 - Terminaltype 9 - Output Line Size 25 - End of Record 10 - Output CR Disposition 26 - TACACS User Id 11 - Output Horiz Tab Stops 27 - Output Marking 12 - Output Horiz Tab Disposition 28 - Terminal Location Number 13 - Output Form. Feed Disposition 29 - Telnet 3270 14 - Output Vertical Tabstops 30 - X. 3 PAD 15 - Output Vert Tab Disposition
Suboption Negotiation • Some options can’t be negotiated by simple option negotiation. . . • IAC SB option parameters IAC SE


