CSCE515ComputerNetworkProgramming

上传人:大米 文档编号:567509469 上传时间:2024-07-20 格式:PPT 页数:27 大小:210.54KB
返回 下载 相关 举报
CSCE515ComputerNetworkProgramming_第1页
第1页 / 共27页
CSCE515ComputerNetworkProgramming_第2页
第2页 / 共27页
CSCE515ComputerNetworkProgramming_第3页
第3页 / 共27页
CSCE515ComputerNetworkProgramming_第4页
第4页 / 共27页
CSCE515ComputerNetworkProgramming_第5页
第5页 / 共27页
点击查看更多>>
资源描述

《CSCE515ComputerNetworkProgramming》由会员分享,可在线阅读,更多相关《CSCE515ComputerNetworkProgramming(27页珍藏版)》请在金锄头文库上搜索。

1、CSCE 515:Computer Network ProgrammingChin-Tser Huanghuangctcse.sc.eduUniversity of South Carolina4/14/20052Telnet and RloginnBoth are used to remote login across networkntelnet is standard application provided by almost every TCP/IP implementationnCan work between hosts running different OSsnCan neg

2、otiate options to determine features provided by each endnrlogin is from BSD and was designed to work between Unix systems only4/14/20053Telnet Client and ServerTelnetclientterminaldriverTCP/IPkerneluser at aterminalTelnetserverTCP/IPpseudo-terminaldriverkernelloginshell4/14/20054Rlogin ProtocolnSpe

3、cified in RFC 1282nUse a single TCP connectionnProtocol between client and server after connection is set upnClient writes 4 strings to server na byte of 0nlogin name of user on client, terminated by a byte of 0nlogin name of user on server, terminated by a byte of 0nname of users terminal type, a s

4、lash, terminal speed, terminated by a byte of 0nServer responds with a byte of 0nOptionally server can ask user for a passwordnServer sends a request to client asking for terminals window size4/14/20055Server to Client CommandsnNeed to mark command bytes because only one TCP connection is usednUse T

5、CPs urgent mode to mark command bytesnTo send a command to client, server enters urgent mode and makes command byte the last byte of urgent datanFour command bytesn0x02: client flushes outputn0x10: client stops performing flow controln0x20: client resumes flow controln0x80: client sends current wind

6、ow size to server immediately and notifies server if changing window size nOut-of-band signaling4/14/20056Server to Client CommandsnNeed to mark command bytes because only one TCP connection is usednUse TCPs urgent mode to mark command bytesnTo send a command to client, server enters urgent mode and

7、 makes command byte the last byte of urgent datanFour command bytesn0x02: client flushes outputn0x10: client stops performing flow controln0x20: client resumes flow controln0x80: client sends current window size to server immediately and notifies server if changing window size nOut-of-band signaling

8、4/14/20057Client to Server CommandnWhen client receives command 0x80 from server, client needs to send window size to servernThis command needs to be markedn2 bytes of 0xff n2 flag bytes of ASCII char sn4 16-bit values: #rows, #chars per row, #pixels in X direction, #pixels in Y directionnIn-band si

9、gnaling4/14/20058Rlogin Client EscapenTalk to client directly instead of sending the input to servernStart with a tilde nFollowed by one of four charactersn.: terminate clientnEOF (Ctrl-D): terminate clientnJob control suspend char (Ctrl-Z): suspend clientnJob control delayed suspend char (Ctrl-Y):

10、suspend only client input but keep server output4/14/20059Telnet ProtocolnSpecified in RFC 854nDesigned to work between any host and any terminalnNeed to define lowest common denominator terminal called network virtual terminal (NVT)nClient maps users terminal type to NVTnServer maps NVT into its te

11、rminal typenUse NVT ASCII, the 7-bit US variant of ASCII character set, but also allow 8-bit data transmission4/14/200510Telnet CommandsnIn-band signaling for both directionsnStart with an IAC (interpret as command) byte 0xffnNext byte is command bytenTo send data byte 0xff, send two consecutive byt

12、es of 0xff4/14/200511Telnet Option NegotiationnEither side can send request to other sidenFour different requests for any given optionnWILL: sender wants to enable optionnDO: sender wants receiver to enable optionnWONT: sender wants to disable optionnDONT: sender wants receiver to disable option4/14

13、/200512Telnet Option NegotiationnEither side can send request to other sidenFour different requests for any given optionnWILL: sender wants to enable optionnDO: sender wants receiver to enable optionnWONT: sender wants to disable optionnDONT: sender wants receiver to disable option4/14/200513Telnet

14、OptionsOption IDName1echo3suppress go ahead5status6timing mark24terminal type31window size32terminal speed33remote flow control34linemode36environment variables4/14/200514Telnet Suboption NegotiationnUsed for options that require more information than just “enable” or “disable”nFor example,client: s

15、erver: server: client: 4/14/200515Telnet Operation ModenFour operation modesnHalf-duplexnCharacter at a timenLine at a timenLinemode4/14/200516Telnet Client EscapenTalk to client directly instead of sending the input to servernNormal client escape char is Ctrl-nCan type commands to change settings o

16、r print information4/14/200517File Transfer Protocol (FTP)nInternet standard for file transfernDesigned to work between different systems but support limited number of file types and structuresnUse two TCP connectionsnControl connectionnClient active open to TCP port 21 of servernStay up all the tim

17、e of communicationnIP TOS should be “minimize delay”nData connectionnCreated each time a file is transferrednIP TOS should be “maximize throughput”4/14/200518File Transfer Protocol (FTP)nInternet standard for file transfernDesigned to work between different systems but support limited number of file

18、 types and structuresnUse two TCP connectionsnControl connectionnClient active open to TCP port 21 of servernStay up all the time of communicationnIP TOS should be “minimize delay”nData connectionnCreated each time a file is transferrednIP TOS should be “maximize throughput”4/14/200519FTP Client and

19、 Serveruser at aterminalserverprotocol interpreterserverdata transferfunctionserveruserprotocol interpreteruserdata transferfunctionclientuserinterfacefilesystemfilesystemdata connectioncontrol connection(FTP commands, FTP replies)4/14/200520FTP Data RepresentationnFour dimensions determine how file

20、 is transferred and storednFile type: ASCII file, EBCDIC file, binary file, local filenFormat control: nonprint, telnet format control, Fortran carriage controlnStructure: file structure, record structure, page structurenTransmission mode: stream mode, block mode, compressed modenTypical implementat

21、ion restricts to ASCII or binary, nonprint, file structure, stream mode4/14/200521FTP CommandsnCommands are sent in NVT ASCII with a pair of CR, LF at end of each linenCommands are 3 or 4 bytes of ASCII chars, some require optional arguments4/14/200522FTP Repliesn3-digit numbers with optional messag

22、eReplyDescription1yzpositive preliminary reply2yzpositive completion reply3yzpositive intermediate reply4yztransient negative completion reply5yzpermanent negative completion replyx0zsyntax errorsx1zinformationx2zconnectionsx3zauthentication and accountingx4zunspecifiedx5zfile system status4/14/2005

23、23FTP Connection ManagementnThree uses for data connectionnSending file from client to servernSending file from server to clientnSending a listing of files or directories from server to clientnClient chooses an ephemeral port, sends it to server across control connection, and passive open for data c

24、onnectionnServer receives this port number from control connection, and active open to that port on client 4/14/200524FTP Connection ManagementnThree uses for data connectionnSending file from client to servernSending file from server to clientnSending a listing of files or directories from server t

25、o clientnClient chooses an ephemeral port, sends it to server across control connection, and passive open for data connectionnServer receives this port number from control connection, and active open to that port on client 4/14/200525Anonymous FTPnA server can allow anyone to login and use FTP to tr

26、ansfer filesnTo use anonymous FTP, login with “anonymous” as username and an email address as passwordnSome anonymous FTP server denies client from a host that does not have valid hostname4/14/200526Secure Shell (SSH)nOperate over TCP/IP connection or other reliable but insecure transport layers to

27、support secure remote login, secure file transfer and other secure servicesnCan automatically encrypt, authenticate, and compress transmitted datanThree major componentsnTransport Layer Protocol to provide server authentication, confidentiality, and integritynUser Authentication Protocol to provide authentication of client-side user to servernConnection Protocol to multiplex encrypted channels to logical channels4/14/200527Next ClassnSimple mail transfer protocol (SMTP)nSimple network management protocol (SNMP)nRead TI Ch. 25, 28

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号