Curs PC si internet cap 10.3 IP Addresses within the IP Header

label Cursuri autorenew 29 Sep 2025, 16:55
10.3 IP Addresses within the IP Header 10.3.1 Network layer datagrams Instructor Note The purpose of this target indicator is to subdivide the IP datagram into two major sections: the header information, needed for delivery, and the actual data from the upper layers. World-Wide-Web references are included to allow remediation and extension on the topic of IP addressing. With difficult topics such as IP addressing, multiple presentations on the topic, from different perspectives, may be helpful for some students. The Internet Protocol (IP) is the most popular implementation of a hierarchical network addressing scheme. IP is the network protocol the Internet uses. As information flows down the layers of the OSI model, the data is encapsulated at each layer. At the network layer, the data is encapsulated within packets (also known as datagrams). IP determines the form of the IP packet header (which includes addressing and other control information), but does not concern itself with the actual data -- it accepts whatever is passed down from the higher layers. Figures and explain this further. For more information on IP and IP addressing, visit some of these sites: Web Links IP Addressing Fundamentals Internet Protocols (TCP/IP) IP Address Subnetting Tutorial IP Addressing Architecture 10.3 IP Addresses within the IP Header 10.3.2 Network layer fields Instructor Note The purpose of this target indicator is that the student be able to explain, in detail, what comprises the IP datagram. Relate this datagram -- a layer 3 PDU -- to the frame format diagrams that students studied when learning about layer 2. This will make the concepts of headers and fields more plausible. Have the students pay particular attention to the source and destination IP addresses. Also point out that while the IP datagram looks complicated, all of this "overhead" information is necessary for routing and "best effort delivery" of packets. Also note that the total length in bytes of this "overhead" is typically a small fraction of the total length of the entire packet -- it is mostly carrying upper layer encapsulated data. Call attention to the fact that this seemingly large layer 3 PDU (datagram, packet) acts as "data" for the layer 2 PDU (frames). That is, packets are encapsulated into frames. The Layer 3 packet/datagram becomes the Layer 2 data, which is then encapsulated into frames (as previously discussed). Similarly, the IP packet consists of the data from upper layers plus an IP header, which consists of: version - indicates the version of IP currently used (4 bits) IP header length (HLEN) - indicates the datagram header length in 32 bit words (4 bits) type-of-service - specifies the level of importance that it has been assigned by a particular upper-layer protocol (8 bits) total length - specifies the length of the entire IP packet, including data and header, in bytes (16 bits) identification - contains an integer that identifies the current datagram (16 bits) flags - a 3-bit field in which the 2 low-order bits control fragmentation one bit specifying whether the packet can be fragmented, and the second whether the packet is the last fragment in a series of fragmented packets (3 bits) fragment offset - the field that is used to help piece together datagram fragments (16 bits) time-to-live - maintains a counter that gradually decreases, by increments, to zero, at which point the datagram is discarded, keeping the packets from looping endlessly (8 bits) protocol - indicates which upper-layer protocol receives incoming packets after IP processing has been completed (8 bits) header checksum - helps ensure IP header integrity (16 bits) source address - specifies the sending node (32 bits) destination address - specifies the receiving node (32 bits) options - allows IP to support various options, such as security (variable length) data - contains upper-layer information (variable length, maximum 64 Kb) padding - extra zeros are added to this field to ensure that the IP header is always a multiple of 32 bits Web Links IP Addressing Architecture 10.3 IP Addresses within the IP Header 10.3.3 IP header source and destination fields Instructor Note The purpose of this target indicator is to focus on the source and destination fields of the IP datagram. Their length in IP version 4 is 32 bits; this concept is introduced and the fact that these addresses are necessary for routing is emphasized. The IP address contains the information that is necessary to route a packet through the network. Each source and destination address field contains a 32 bit address. The source address field contains the IP address of the device that sends the packet. The destination field contains the IP address of the device that receives the packet. Web Links IP Addressing Architecture 10.3 IP Addresses within the IP Header 10.3.4 IP address as a 32-bit binary number Instructor Note The purpose of this target indicator is to show the binary format of an IP address. Draw upon the binary math that was taught in Chapter 1. Spend enough time on this diagram to assure that all students have mastered it; all future work involving IP addressing presupposes a complete understanding of the binary format and powers of two involved. An IP address is represented by a 32 bit binary number. As a quick review, remember that each binary digit can be only 0 or 1. In a binary number, the value of the right-most bit (also called the least significant bit) is either 0 or 1. The corresponding decimal value of each bit doubles as you move left in the binary number. So the decimal value of the 2nd bit from the right is either 0 or 2. The third bit is either 0 or 4, the fourth bit 0 or 8, etc ...IP addresses are expressed as dotted-decimal numbers - we break up the 32 bits of the address into four octets (an octet is a group of 8 bits). The maximum decimal value of each octet is 255 (the largest 8 bit binary number would be 11111111, and those bits, from right to left, have decimal values of 1, 2, 4, 8, 16, 32, 64 and 128, totaling 255!).What is the decimal value of the highlighted octet in the graphic? What is the value of the bit on the far left side? The next bit? Since those are the only 2 bits on (or set), then the decimal value is 128+64=192! Web Links Introduction to the Internet Protocols 10.3 IP Addresses within the IP Header 10.3.5 IP address component fields Instructor Note This target indicator introduces two important IP addressing concepts: dotted decimal notation, and the classification of parts of the address as "network" numbers and parts of the address as "host" numbers. Relate the network numbers to the earlier discussion of hierarchical addressing, including the analogy to zip codes. Practicing binary to decimal and decimal to binary conversions would be appropriate here, using the dotted decimal notation. Practice Problems:Convert 1101 0101.1100 0011.0000 1111.0101 0101 to dotted decimal notation. Convert 156.1.149.9 to binary notation. The network number of an IP address identifies the network to which a device is attached, while the host portion of an IP address identifies the specific device on that network. Because IP addresses consist of four octets separated by dots, one, two, or three of these octets may be used to identify the network number. Similarly, up to three of these octets may be used to identify the host portion of an IP address. Web Links Introduction to the Internet Protocols