After reading this chapter, the reader should be able to:
Understand the position of the network layer in the Internet
model.
Understand the rationale for the existence of the network layer.
Understand the concept of host-to-host delivery.
Understand the duties of the network layer: packetizing,
addressing, and routing.
Understand the network layer protocol, IP, used in the Internet.
Know which upper-layer protocol can use the services of IP.
29 trang |
Chia sẻ: thuongdt324 | Lượt xem: 516 | Lượt tải: 0
Bạn đang xem trước 20 trang tài liệu Network Layer, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Chapter 4Network LayerUnderstand the position of the network layer in the Internet model.Understand the rationale for the existence of the network layer.Understand the concept of host-to-host delivery.Understand the duties of the network layer: packetizing, addressing, and routing. After reading this chapter, the reader should be able to:OBJECTIVESKnow which upper-layer protocol can use the services of IP.Understand the network layer protocol, IP, used in the Internet.INTRODUCTION4.1Figure 4-1Network layer in the Internet modelFigure 4-2Duties of the network layerADDRESSING4.2The network addresses must be unique.Note:Technical Focus: Binary Notation of IP AddressesAn IP address is stored as a binary number in the computer. A 4-part dotted-decimal address can be converted to binary if we replace each part by its binary equivalent. The following shows the IP address 10.34.234.8 in dotted-decimal and binary notation: 10.34.224.8 00001010 00100010 11100000 00001000Technical Focus: Address SpaceA protocol such as IP that defines addresses has an address space. An address space is the total number of addresses available to the protocol. If a protocol uses N bits to define an address, the address space is 2N because each bit can have two different values (0 and 1); N bits can have 2N values.The Internet uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more than 4 billion). This means that theoretically, if there were no restrictions, more than 4 billion devices could be connected to the Internet.Figure 4-3Two levels of hierarchyWhen using two levels of address hierarchy, the common part is referred to as the netid or prefix and the variable part is referred to as the hostid, or suffix. Note:Figure 4-4Three levels of hierarchyWith three levels of address hierarchy, the common part is referred to as the netid. The part common to all computers connected to the same subnet is referred to as the subnetid. The unique part is referred to as the hostid.Note:A packet traveling from the source to the destination needs at least four addresses: source and destination port numbers and source and destination IP addresses.Note:Figure 4-5DNS exampleROUTING4.3Figure 4-6Example of portion of the InternetFigure 4-7Routing decisionsFigure 4-8Routing table for router R1Figure 4-9Routing tablesRouting tables can be based on next-hop routing.Note:Routing tables for the Internet are usually network-specific rather than host-specific. The router routes the packet to the final network; it is then broadcast to reach the final destination. Network-based routing reduces the size of routing tables.Note:Figure 4-10Autonomous systemsRouting in the Internet is hierarchical. Delivery is first made to the autonomous system, then to the network, and finally to the host. Hierarchical routing reduces the size of the routing tables. Note:PACKETIZING:IP PROTOCOL4.4Figure 4-11Position of IP in Internet modelFigure 4-12IP datagram formatTechnical Focus: Fields in a DatagramThe fields in a datagram are as follows:VersionHeader lengthDifferentiated serviceTotal lengthIdentification, flags, and fragmentation offsetTime to liveChecksumProtocolSource addressDestination addressFRAGMENTATION4.5