数据通信基础:第20章 网络层协议_第1页
数据通信基础:第20章 网络层协议_第2页
数据通信基础:第20章 网络层协议_第3页
数据通信基础:第20章 网络层协议_第4页
数据通信基础:第20章 网络层协议_第5页
已阅读5页,还剩29页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、数据通信基础第20章 (网络层协议) Network Layer Protocols20120305Chapter 20Network LayerProtocols:ARP, IPv4, ICMPv4 20120305Figure 20.1 Protocols at network layer20120305Address Resolution Protocol (ARP)Problem if a host wants to contact a known destination IP address, what MAC address should it put in the Etherne

2、t frame ?Solution it should use ARP to broadcast a message to all hosts on the network asking for the MAC address of the given IP address(it must be a broadcast why?)20120305Figure 20.2 ARP operationIP address of Host B20120305Figure 20.3 ARP packetEthernet = type 1IPv4 is type 080016These two lengt

3、hs define the size of the rest of the packet16bitsNote: 4 byte boundaries are used on this type of diagram20120305Figure 20.4 Encapsulation of ARP packetNote that the ARP packet is the data for an Ethernet frame this is EncapsulationARP/RARPtype20120305Figure 20.5 Four cases using ARPAll the above r

4、equire ARP to discover the MAC address to be inserted into the Ethernet frame20120305An ARP request is broadcast it must be, since it does not know the MAC address yet the broadcast MAC address is 11111111111116 (48 bits)An ARP reply is unicast it replies to the address that made the requestNote:201

5、20305Example 1A host with IP address 130.23.3.20 and physical address B23455102210 has a packet to send to another host with IP address 130.23.43.25 and physical address A46EF45983AB. The two hosts are on the same Ethernet network. Show the ARP request and reply packets encapsulated in Ethernet fram

6、es. SolutionFigure 20.6 shows the ARP request and reply packets. Note that the ARP data field in this case is 28 bytes, and that the individual addresses do not fit in the 4-byte boundary. That is why we do not show the regular 4-byte boundaries for these addresses. Note that we use hexadecimal for

7、every field except the IP addresses. 20120305Figure 20.6 Example 1Do not conveniently fit into 4 byte boundaryA request does not fill this part in, since it is unknownThis is the required MAC address2012030520.2 IPv4 protocolDatagram the equivalent of an Ethernet frame is called a datagram or a pack

8、et at layer 3Fragmentation the process of breaking up large datagrams so that they can be transferred over a given network link20120305Figure 20.7 IP datagram20120305VER IP version, currently 4HLEN header length expressed in 4 byte blocks note that options make the header length variableDS defines q

9、uality of service (QoS)Total length field defines the total length of the datagram including the headerTime to live (TTL) decremented after each hop avoids packets circulating endlesslyProtocol being carried e.g. TCP, UDP, ICMP, etc.20120305Figure 20.8 Multiplexing20120305Figure 20.9 Example of chec

10、ksum calculationNOTE:Only the HEADER has any kind of error detection IP is NOT responsible for checking or correcting dataAt the next hop, the Sum is recalculated and added to the received checksum. If the answer is not zero, the packet is discarded.The checksum changes at each router, because the T

11、TL changes each time.20120305Figure 20.10 MTUThe data link layer will have a maximum frame size (this varies depending on layer 2 protocol). This affects the maximum data payload, or MTU maximum transfer unit.The diagram above illustrates E N C A P S U L A T I O N - the layer 3 datagram becomes the

12、layer 2 data20120305Figure 20.11 Fragmentation exampleWhen a packet is fragmented at layer 3, each fragments offset needs to be stored within the fragmented packet so that it can be reconstructed later.The fragmented packet also needs to record which original packet it belonged to hence the need for

13、 the Identification fieldThe flags field contains bits which indicate that there are more fragments to come, or that fragmentation is not allowed2012030520.3 ICMPInternet Control Message ProtocolTypes of Messages: Error reporting QueryEncapsulation20120305ICMP always reports error messages to the or

14、iginal source.Cannot routeLimited Flow controlTTL down to zeroHeader errorHost is using wrong default routerThere is no formal flow control or congestion control mechanism in IP. Source-Quench simple reports the problem to the source20120305Figure 20.14 Query messagesUsed in ping and tracertTo deter

15、mine round trip timeTo determine subnet maskHosts use solicitation messages to ask where routers are.Routers use advertisement to say where they areICMP Query messages always expect a reply2012030520.4 IPv6IPv6 AddressesCategories of AddressesIPv6 Packet FormatFragmentationICMPv6Transition20120305Fi

16、gure 20.15 IPv6 addressHexadecimal Colon Notation=20120305Figure 20.16 Abbreviated address20120305Figure 20.17 Abbreviated address with consecutive zerosOnly one string of zeros can be abbreviated.20120305Figure 20.18 CIDR address20120305Categories of IPv6 AddressesUnicast AddressSpecific computerAnycast Address (NEW TYPE)Any computer in a groupMulticast AddressAll computers in a group20120305Figure 20.19 Format of an IPv6 datagram20120305Figure 20.20 Comparison of network layers in version 4 and version 6A

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论