TELNET連接的概念
TELNET同樣是屬于TCP/IP服務中的一項。這個主要管理遠程應用的協(xié)議有什么特殊的功能呢?這里我們就來簡單了解一下TELNET連接的相關作用。首先我們需要知道這個協(xié)議是如何定位的。
TELNET:TCP/IP Terminal Emulation Protocol
TELNET是TCP/IP環(huán)境下的終端仿真協(xié)議,通過TCP建立服務器與客戶機之間的連接。連接之后,TELNET服務器與客戶機進入協(xié)商階段(決定可選項),選定雙方都支持連接操作,每個連接系統(tǒng)可以協(xié)商新可選項或重協(xié)商舊可選項(在任何時候)。通常TELNET任一端盡量執(zhí)行所有可選項以實現(xiàn)系統(tǒng)最大化性能。
一旦建立TELNET連接,連接兩端在網絡虛擬終端(NVT)中可以發(fā)起或中斷。NVT是一種假定設備,它是對規(guī)范終端的標準的、泛網絡的、中間的表示,從而避免了“服務器”與“用戶”需要維護終端和終端處理范例等信息的需要。協(xié)商可選項原則基于這個事實:任何主機都希望在NVT上提供其它可用的服務,以及任何用戶都有精良的終端設備和需要優(yōu)質的服務。
一旦TELNET連接建立,由于每一方都希望從另一方獲得盡可能多的服務,連接雙方間的可選請求會不斷來回傳送。除此之外,這些可選請求還可用于動態(tài)修改連接特性以適應不斷改變的本地環(huán)境。
經過過去20年左右的發(fā)展,當前的TELNET已經是一種多功能仿真器。選項使TELNET連接能傳輸二進制數(shù)據(jù)、支持bytemacros、仿真圖形終端,以及傳送信息以支持集中化終端管理。
TELNET命令采用ASCII文本形式。以下是TELNET命令:
Commands | Code No. DecHex |
Description | |
data | All terminal input/output data. | ||
End subNeg | 240 | FO | End of option subnegotiation command. |
No Operation | 241 | F1 | No operation command. |
Data Mark | 242 | F2 | End of urgent data stream. |
Break | 243 | F3 | Operator pressed the Break key or the Attention key. |
Int process | 244 | F4 | Interrupt current process. |
Abort output | 245 | F5 | Cancel output from current process. |
You there? | 246 | F6 | Request acknowledgment. |
Erase char | 247 | F7 | Request that operator erase the previous character. |
Erase line | 248 | F8 | Request that operator erase the previous line. |
Go ahead! | 249 | F9 | End of input for half-duplex connections. |
SubNegotiate | 250 | FA | Begin option subnegotiation. |
Will Use | 251 | FB | Agreement to use the specified option. |
Won’t Use | 252 | FC | Reject the proposed option. |
Start use | 253 | FD | Request to start using specified option. |
Stop Use | 254 | FE | Demand to stop using specified option. |
IAC | 255 | FF | Interpret as command. |