Lecture-6

  • Uploaded by: api-3701823
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lecture-6 as PDF for free.

More details

  • Words: 1,102
  • Pages: 19
Lecture-6 IP Datagram, Address Resolution Protocol (ARP) , RARP

The Function of Packets in Network Communications • Large amounts of data sent as one large unit tie up the network and make timely interaction and communications impossible because one computer is flooding the cable with data. • The impact of retransmitting large units of data further multiplies network traffic. • When the network operating system at the sending computer breaks the data into packets, it adds special control information to each frame.

Advantages of Packets • This makes it possible to: – Send the original, disassembled data in small chunks. – Reassemble the data in the proper order when it reaches its destination. – Check the data for errors after it has been reassembled.

Packet Structure • Packets can contain several types of data including: – Information, such as messages or files. – Certain types of computer control data and commands, such as service requests. – Session control codes, such as error correction, that indicate the need for a retransmission.

Packet Structure

Packet Components • All packets have certain components in common. – A source address that identifies the sending computer. – The data that is intended for transmission. – A destination address that identifies the recipient. – Instructions that tell network components how to pass the data along. – Information that tells the receiving computer how to connect the packet to other packets in order to reassemble the

Header • The header includes: – An alert signal to indicate that the packet is being transmitted. – The source address. – The destination address. – Clock information to synchronize transmission.

Data • This describes the actual data being sent. This part of the packet varies in size, depending on the network. The data section on most networks varies from 512 bytes—or 0.5 kilobytes (KB)—to 4 KB. • Because most original data strings are much longer than 4k, data must be broken into chunks small enough to be put into packets. It takes many packets to complete the transmission of a large file.

Trailer • The exact content of the trailer varies depending on the communication method, or protocol. However, the trailer usually contains an error-checking component called a cyclical redundancy check (CRC). • The CRC is a number produced by a mathematical calculation on the packet at its source. When the packet arrives at its destination, the calculation is made again. If the results of both calculations are the same, this indicates that the data in the packet has remained stable.

ARP • Before an IP packet can be forwarded to another host, the hardware address of the receiving machine must be known. • The ARP determines hardware address (MAC addresses) that correspond to an IP address. If ARP does not contain the address in its own cache, it broadcasts a request for the address.

• All hosts on the network process the request and, if they contain a map to that address, pass the address back to the requestor. The packet is then sent on its way, and the new information address is stored in the router's cache.

Reverse Address Resolution Protocol (RARP) • A RARP server maintains a database of machine numbers in the form of an ARP table (or cache) which is created by the system administrator. In contrast to ARP, the RARP protocol provides an IP number to a requesting hardware address.

• When the RARP server receives a request for an IP number from a node on the network, it responds by checking its routing table for the machine number of the requesting node and sending the appropriate IP number back to the requesting node.

Details Of IP Datagram • ip version (4 bits) The ip protocol version. Currently 4 as of 1979 (rfc 791). • ip header length (4 bits) Total header length in 32 bit words. Usually five (5) (since you hardly ever use options). Sort of silly because values of 0-4 cannot be used. Perhaps these could be used as some sort of biased value to extend the length of the header? • type of service (8 bits) Describes how the packet should be handled in transit (speed vs. reliability vs. throughput).

• total packet length (16 bits) Packet length in bytes up to 65535 (includes the bytes in the header). You won't probably won't see many packets this big because ethernet framing doesn't let you have anything more than 1500 and modem links are usually set much lower (about 296 perhaps?) for responsiveness. So larger poackets would always get fragemented and that's something to avoid. If possible. • identification (16 bits) An identifying number to be used to reassemble fragmented packets. • fragmentation flags (3 bits) Flags controlling whether a packet is fragmented and/or may be fragmented.

• fragmentation offset (13 bits) Measured in units of 8 octets (or bytes) is simply a sequence number for the bytes in this packet when reassembling. The first offset will be zero. • time to live (8 bits) Maximum life of a packet. If this field is zero, the packet is destroyed. Usually decremented by one when passed from one hop to the next (unless bridging). • protocol (8 bits) The protocol used in the data portion (see "assigned numbers" rfc 790 or 1010 or

• header checksum (16 bits) A sixteen bit checksum on the ip header only. The ttl field changes at each hop so this needs to be recomputed on each hop. "The checksum field is the 16 bit one's complement of the one's complement sum of all 16 bit words in the header. For purposes of computing the checksum, the value of the checksum field is zero." (At least, according to rfc 791). My interpretation: one's complement each sixteen bit word in the header, add all these quantities (drop carries) and then one's complement that sum.

• source address & • destination address (32 bits each) The ip addresses of the ultimate sending and receiving hosts of the packet. In network byte order (of course) which is just another way of saying big endian, but it's more politically correct. • options (variable, up to 40 bytes) The first byte (if any options bytes are present) is the option type byte laid out

• padding (variable, fills out the 32 bit words) I'm pretty sure this is ignored so it probably doesn't matter but just make it all zeroes anyway, okay? It just makes the header an even 32 bit length. • data (variable, up to 65535 - header bytes) This is where all your data goes. Whatever ip can package (see the

Related Documents

Lecture6
June 2020 10
Lecture6
November 2019 10
Lecture6-ieee802
November 2019 15
Avr Lecture6
November 2019 13
Lecture6-lans
May 2020 8