版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Chapter 2TCP/IP协议1.5 TCPIP协议根底互联网协议IP和传输控制协议TCP是互联网协议族中最为有名的两个协议,其运用非常广泛,它可以用于任何相互衔接的计算机网络系统之间的通讯,对局域网LAN和广域网WAN都有非常好的效果。 1.5 TCPIP协议根底1.5.1 TCPIP与OSI参考模型 TCP/IP协议和OSI模型的对应关系TCPIP协议 OSI模型 FTP,TELNET,SMTP,RPC,SNMP,DNS,TFTP,BOOTP,HTTP 应用层TCP,UDP 传输层IP(ICMP,IGMP),(ARP,RARP) 网络层1.5 TCPIP协议根底 TCP/IP的主要协议
2、之间的相关性 图中每个封锁的多边形对应了一个协议,并且位于它所直接运用的协议之上。如 SMTP依赖于TCP,而TCP依赖于IP。 1.5 TCPIP协议根底TCP/IP的层次构造 l运用层。向用户提供一组常用的运用程序。2传输层TCP和UDP。提供应用程序间的通讯,提供了可靠的传输UDP不能提供可靠的传输等。3网络层IP。担任数据包的寻径功能,以保证数据包可靠到达目的主机,假设不能到达,那么向源主机发送过失控制报文。4网络接口层 。这是TCPIP软件的最低层,担任接纳IP数据包并经过网络发送之,或者从网络上接纳物理帧,抽出IP数据包,并把它交给IP层。 1.5 TCPIP协议根底1.5.2 网
3、络层IP层 将一切的低层的物理实现隐藏起来,作用是将数据包从源主机发送出去,并且使这些数据包独立地到达目的主机。在数据包传送过程中,即使是延续的数据包,也能够走过不同的途径,到达目的主机的顺序也会不同于它们被发送时的顺序。 1.5 TCPIP协议根底 TCP/IP数据流程 1.5 TCPIP协议根底 IP数据包一个IP数据包由包头和数据体两部分组成。包头由20字节的固定部分和变长的可选项成。 1.5 TCPIP协议根底 IP地址在Internet中,每一台主机都有一个独一的地址,网关经常有不止一个的地址。地址由两部分组成:网络号和主机号。这种组合是独一的,以使每一个IP地址表示Internet
4、中的唯一台主机。一切IP地址都是32位长。IP地址分为五类,平常运用的是A,B,C三类地址 地址类型地址形式AN.H.H.HBN.N.H.HCN.N.N.H1.5 TCPIP协议根底 IP层的其它一些协议 ICMPInternet控制信息协议用来传送一些关于网络和主机的控制信息。如目的主机是不可到达的、路由的重定向等。ARP地址解析协议用来将IP地址映射成相应的主机 MAC地址。RARP反向地址解析协议用来将物理地址映射成32位的IP地址。 1.5 TCPIP协议根底1.5.3 传输层TCP和UDP TCPTCP协议,即传输控制协议,是一个可靠的、面向衔接的协议。它允许在Internet上两台
5、主机间信息的无过失传输。 UDP无衔接方式,即UDP方式,当源主机有数据时,就发送。它不论发送的数据包能否到达目的主机,数据包能否出错,收到数据包的主机也不会通知发送方能否正确收到了数据,因此,这是一种不可靠的数据传输方式。 1.5 TCPIP协议根底1.5.4 运用层协议Telnet,也就是虚终端效力。它允许一台主机上的用户登录进另一台远程主机,并在远程主机中任务,而用户当前所运用的主机好象仅仅是远程主机的一个终端。FTP,即文件传输协议。提供了一个有效的途径,将数据从一台主机传送到另一台主机。文件传输有文本和二进制两种方式。文本方式用来传输文本文件,并实现一些格式转换。SMTP,即电子邮件
6、效力运用缺省的端口25,以电子数据的方式,运用户快速、方便地传送信息。即使相隔大洲、大洋,电子邮件也可以在短短的几分钟内到达接纳方的电子信箱。,即超文本传输协议,用来在WWW效力器上获得用超文本标志言语书写的页面。Early protocol suiteUniversalIntroduction to TCP/IPHostInternetTCP/IPHostTCP/IP 协议栈7654325432ApplicationPresentationSessionTransportNetworkData LinkPhysical1ApplicationTransportInternetData Lin
7、kPhysical1运用层 Overview*Used by the routerApplicationTransportInternetData LinkPhysicalFile Transfer- TFTP *- FTP *- NFS- SMTPRemote Login- Telnet *- rlogin *Network Management- SNMP *Name Management- DNS*传输层 OverviewTransmission ControlProtocol (TCP)User Datagram Protocol (UDP)ApplicationTransportIn
8、ternetData LinkPhysical面向衔接、可靠的无衔接,不可靠的TCP传输控制协议面向衔接的先建立衔接,后传数据经过三次握手建立衔接可靠的发送数据后,必需等待确认后才继续发送等不到确认,会重传数据TCP Segment FormatSource port (16)Destination port (16)Sequence number (32)Headerlength (4)Acknowledgement number (32)Reserved (6)Code bits (6)Window (16)Checksum (16)Urgent (16)Options (0 or 32
9、if any)Data (varies)20BytesBit 0Bit 15Bit 16Bit 31Port NumbersTCPPort NumbersFTPTransportLayerTELNETDNSSNMPTFTPSMTPUDPApplicationLayer2123255369161RIP520TCP Port NumbersSourcePortDest.PortHost A102823SPDPHost ZTelnet ZDest. port = 23.Send packet to my Telnet application.Send SYN (seq=100 ctl=SYN)SYN
10、 receivedHost AHost BTCP 三次握手1Send SYN (seq=100 ctl=SYN)SYN receivedSend SYN, ACK (seq=300 ack=101 ctl=syn,ack)Host AHost BSYN received12TCP Three Way Handshake/Open ConnectionSend SYN (seq=100 ctl=SYN)SYN receivedSend SYN, ACK (seq=300 ack=101 ctl=syn,ack)Established(seq=101 ack=301 ctl=ack)Host AH
11、ost B123SYN receivedTCP Three Way Handshake/Open ConnectionTCP Simple AcknowledgmentWindow size = 1 Sender ReceiverTCP Simple AcknowledgmentWindow size = 1 Sender ReceiverSend 1Receive 1TCP Simple AcknowledgmentWindow size = 1 Sender ReceiverSend 1Receive 1Receive ACK 2 Send ACK 2TCP Simple Acknowle
12、dgmentWindow size = 1 Sender ReceiverSend 1Receive 1Receive ACK 2 Send ACK 2Send 2Receive 2TCP Simple AcknowledgmentWindow size = 1 Sender ReceiverSend 1Receive 1Receive ACK 2 Send ACK 2Send 2Receive 2Receive ACK 3Send ACK 3TCP Simple AcknowledgmentWindow size = 1 Sender ReceiverSend 1Receive 1Recei
13、ve ACK 2 Send ACK 2Send 2Receive 2Receive ACK 3Send ACK 3Send 3Receive 3Window size = 1 Sender ReceiverSend 1Receive 1Receive ACK 2 Send ACK 2Send 2Receive 2Receive ACK 3Send ACK 3Send 3Receive 3Receive ACK 4Send ACK 4TCP Simple AcknowledgmentTCP Sequence and Acknowledgment NumbersSourcePortDest.Por
14、tSequence#Acknowledgement#SourceDest.Seq.Ack.102823101I justsent #10.TCP Sequence and Acknowledgment NumbersI just got #10,now I need #11.SourcePortDest.PortSequence#Acknowledgement#102823SourceDest.10Seq.1Ack.102823SourceDest.11Seq.1Ack.I justsent #10.TCP Sequence and Acknowledgment NumbersSourcePo
15、rtDest.PortSequence#Acknowledgement#102823SourceDest.11Seq.2Ack.102823SourceDest.10Seq.1Ack.102823SourceDest.11Seq.1Ack.I just got #10,now I need #11.I justsent #11.TCP Sequence and Acknowledgment NumbersSourcePortDest.PortSequence#Acknowledgement#102823SourceDest.11Seq.2Ack.102823SourceDest.10Seq.1
16、Ack.102823SourceDest.11Seq.1Ack.102823SourceDest.12Seq.2Ack.I just got #11,now I need #12.I justsent #11.TCP WindowingSenderReceiverTCP WindowingWindow size = 3Send 2SenderReceiverWindow size = 3Send 1Window size = 3Send 3Window size = 3Send 2TCP WindowingSenderWindow size = 3Send 1Window size = 3Se
17、nd 3ACK 3Window size = 2Packet 3 isDroppedReceiverWindow size = 3Send 2TCP WindowingSenderWindow size = 3Send 1Window size = 3Send 3ACK 3Window size = 2Packet 3 isDroppedWindow size = 3Send 4Window size = 3Send 3ReceiverWindow size = 3Send 2TCP WindowingSenderWindow size = 3Send 1Window size = 3Send
18、 3ACK 3Window size = 2Packet 3 isDroppedWindow size = 3Send 4Window size = 3Send 3ACK 5Window size = 2ReceiverUDP用户数据报协议面向无衔接发送数据之前不需求建立衔接直接发送不可靠没有发送确认没有重传机制由上层协议控制纠错重传Segment尺寸小,发送速度快传呼,短信No sequence or acknowledgment fieldsUDP Segment FormatSource port (16)Destination port (16)Length (16)Data (if
19、any)1Bit 0Bit 15Bit 16Bit 31Checksum (16)8Bytes网络层 IPOverviewOSI 网络层对应 TCP/IP internet 层Internet Protocol (IP)Internet Control MessageProtocol (ICMP)Address ResolutionProtocol (ARP)Reverse AddressResolution Protocol (RARP)ApplicationTransportInternetData LinkPhysicalIP层的主要协议IP协议-Internet Protocol控制数
20、据的路由与转发ICMP协议-Internet控制音讯协议测试网络连通性的协议,前往目的不可到达、Echo、超时等音讯Ping,Trcert,PathpingARP协议-地址解析协议RARP协议-反向地址解析协议IP DatagramVersion(4)Destination IP Address (32)Options (0 or 32 if any)Data (varies if any)1Bit 0Bit 15Bit 16Bit 31HeaderLength (4)Priority & Type of Service (8)Total Length (16)Identification (
21、16)Flags(3)Fragment offset (13)Time to live (8)Protocol (8)Header checksum (16)Source IP Address (32)20BytesDetermines destination upper-layer protocol Protocol FieldTransportLayerInternetLayerTCPUDPProtocolNumbersIP176Internet Control Message ProtocolApplicationTransportInternetData LinkPhysicalDes
22、tination UnreachableEcho (Ping)OtherICMP1Address Resolution ProtocolIP: = ?I need the Ethernet address of .Address Resolution ProtocolIP: = ?I heard that broadcast. The message is for me. Here is my Ethernet address.I need the Ethernet address of .Address Resolution ProtocolIP: Ethernet: 0800.0020.1
23、111 IP: = ?I heard that broadcast. The message is for me. Here is my Ethernet address.I need the Ethernet address of .Address Resolution ProtocolMap IP EthernetLocal ARPIP: Ethernet: 0800.0020.1111 IP: = ?I heard that broadcast. The message is for me. Here is my Ethernet address.I need the Ethernet
24、address of .Reverse ARPEthernet: 0800.0020.1111 IP = ?What is my IP address?Reverse ARPEthernet: 0800.0020.1111 IP = ?What is my IP address?I heard that broadcast. Your IP address is 5.Reverse ARPEthernet: 0800.0020.1111IP: 5Ethernet: 0800.0020.1111 IP = ?What is my IP address?I heard that broadcast
25、. Your IP address is 5.Reverse ARPMap Ethernet IPEthernet: 0800.0020.1111IP: 5Ethernet: 0800.0020.1111 IP = ?What is my IP address?I heard that broadcast. Your IP address is 5.网络中独一路由选择的根据Location is represented by an addressIP 地址SADAHDRDATAIP Addressing 255255 255 255DottedDecimalMaximumNetworkHost
26、32 bitsIP Addressing 255255 255 255DottedDecimalMaximumNetworkHost1286432168421 11111111 11111111 11111111 11111111Binary32 bits1891617242532128643216842112864321684211286432168421IP Addressing 255255 255 255DottedDecimalMaximumNetworkHost1286432168421 11111111 11111111 11111111 11111111 10101100 00
27、010000 01111010 11001100Binary32 bits 172 16 122 204ExampleDecimalExampleBinary1891617242532128643216842112864321684211286432168421Class A: Class B: Class C: Class D: Multicast Class E: ResearchIP Address ClassesNetworkHostHostHostNetworkNetworkHostHostNetworkNetworkNetworkHost8 bits8 bits8 bits8 bi
28、tsIP Address Classes1Class A:Bits:0NNNNNNNHostHostHost891617242532Range (1-126)1Class B:Bits:10NNNNNNNetworkHostHost891617242532Range (128-191)1Class C:Bits:110NNNNNNetworkNetworkHost891617242532Range (192-223)1Class D:Bits:1110MMMMMulticast GroupMulticast GroupMulticast Group891617242532Range (224-
29、239)Host Addresses02118E1172.161212NetworkHost.NetworkInterfaceE0E1Routing TableE0 11111111Determining Available Host Addresses 172 16 0 0 10101100 00010000 00000000 0000000016151413121110 987654321NetworkHost 00000000 00000001 11111111 11111111 11111111 11111110. 00000000 00000011 11111101123655346
30、553565536-.265534N2N-2 = 216-2 = 65534IP Address Classes ExerciseAddressClassNetworkHost004620IP Address Classes Exercise AnswersAddressClassNetworkHost004620ABCCBNonexistent0046Network Addressing without Subnets.5354Network Addressing with SubnetsSubnet Addressing00600050E0172.16NetworkNetworkInter
31、faceE0E1New Routing Table 2160Host.E1Subnet Addressing00600050E0E1172.162160NetworkHost.NetworkInterfaceE0E1New Routing TableSubnetSubnet Mask1721600255255002552552550IPAddressDefaultSubnetMask8-bitSubnetMaskNetworkHostNetworkHostNetworkSubnetHostAlso written as “/16 where 16 represents the number o
32、f 1s in the mask.Also written as “/24 where 24 represents the number of 1s in the mask. 11111111 111111110000000000000000Decimal Equivalents of Bit Patterns10000000=12811000000=19211100000=22411110000=24011111000=24811111100=25211111110=25411111111=255128 643216842116NetworkHost172001010110011111111
33、10101100000100001111111100010000000000000000000010100000000000000000000000000010Subnet Mask without Subnets60 NetworkNumberSubnets not in usethe defaultNetwork number extended by eight bitsSubnet Mask with Subnets16NetworkHost60 17220101011001111111110101100000100001111111100010000111111110000001010
34、100000000000000000000000000010SubnetNetworkNumber128192224240248252254255Subnet Mask with Subnets (cont.)NetworkHost60 92101011001111111110101100000100001111111100010000111111110000001010100000110000001000000000000010SubnetNetwork number extended by ten bits161722128NetworkNumber12819222424024825225
35、4255128192224240248252254255Subnet Mask ExerciseAddressSubnet MaskClassSubnet002Subnet Mask Exercise AnswersAddressSubnet MaskClassSubnet002BAABroadcast Addresses55(Directed broadcast)55(Local network broadcast)X55(All subnets broadcast)Addressing Summary Example1617221601010110000010000101000000000
36、0010HostMaskSubnetBroadcastLastFirst609241Addressing Summary Example1010110011111111000100001111111111111111101000001100000000000010HostMaskSubnetBroadcastLastFirst609212161722160Addressing Summary Example1010110011111111000100001111111111111111101000001100000000000010HostMaskSubnetBroadcastLastFirs
37、t60921237161722160Addressing Summary Example101011001111111100010000111111111111111110100000110000001000000000000010HostMaskSubnetBroadcastLastFirst60921234161722160Addressing Summary Example10101100111111110001000011111111111111111010000011000000100000000000001010111111HostMaskSubnetBroadcastLastFi
38、rst6092123456161722160Addressing Summary Example1010110011111111000100001111111111111111101000001100000010000000000000101011111110000001HostMaskSubnetBroadcastLastFirst6092123456161722160Addressing Summary Example101011001111111100010000111111111111111110100000110000001000000000000010101111111000000110111110HostMaskSubnetBroadcastLastFirst60921234567161722160Addressing Summary Example101011001111111110101100000100001111111100010000111111110000001010100000110000001000000000000010101011000001000000000010101111111
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 小学语文教学法-习题答案 项目一
- 《肌肉卫星细胞与肌腱干细胞生物学特性检测及其在肌肉和肌腱损伤动物模型上的研究》
- 小学教育学 教案 项目八 教育评价
- 《黔东北农村留守儿童权益保障研究》
- 2024年度学术不端检测与论文辅助写作服务合同
- 郑州大学《物联网安全技术》2021-2022学年期末试卷
- 郑州大学《图案基础》2021-2022学年第一学期期末试卷
- 阻燃皮带合同范本
- 会展租凭合同范本
- 郑州大学《企业战略管理》2022-2023学年第一学期期末试卷
- 第一单元-青春时光(大单元教学设计)-七年级道德与法治下册同步备课系列(部编版)
- csgo比赛策划方案
- 《住房社会救助》课件
- 软件招标方案技术方案
- 100个红色经典故事【十八篇】
- 《行政执法培训资料》课件
- 5G网络安全架构设计
- 2024电力人工智能样本增广技术架构要求
- 特种设备安全法全文
- 变电运维管理规定(试行)第3分册组合电器运维细则
- 泰语专业大学生职业生涯规划书
评论
0/150
提交评论