McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 6 Physical Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 4 Network Layer.
-
Upload
emerald-kelley -
Category
Documents
-
view
220 -
download
2
Transcript of McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 4 Network Layer.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Chapter 4
Network Layer
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Understand the position of the network layer in the Internet Understand the position of the network layer in the Internet model.model.
Understand the rationale for the existence of the network layer.Understand the rationale for the existence of the network layer.
Understand the concept of host-to-host delivery.Understand the concept of host-to-host delivery.
Understand the duties of the network layer: packetizing, Understand the duties of the network layer: packetizing, addressing, and routing. addressing, and routing.
After reading this chapter, the reader should After reading this chapter, the reader should be able to:be able to:
OOBJECTIVESBJECTIVES
Know which upper-layer protocol can use the services of IP.Know which upper-layer protocol can use the services of IP.
Understand the network layer protocol, IP, used in the Internet.Understand the network layer protocol, IP, used in the Internet.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
INTRODUCTIONINTRODUCTIONINTRODUCTIONINTRODUCTION
4.14.1
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-1
Network layer in the Internet model
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-2
Duties of the network layer
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
ADDRESSINGADDRESSINGADDRESSINGADDRESSING
4.24.2
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
The network addresses The network addresses must be unique.must be unique.
Note:Note:
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Technical Focus:Technical Focus: Binary Notation of IP AddressesBinary Notation of IP Addresses
An 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 00001000
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Technical Focus:Technical Focus: Address SpaceAddress Space
A 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.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-3
Two levels of hierarchy
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
When using two levels of When using two levels of address hierarchy, the address hierarchy, the
common part is referred to common part is referred to as the as the netidnetid or or prefixprefix and and
the variable part is referred the variable part is referred to as the to as the hostidhostid, or , or suffixsuffix..
Note:Note:
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-4
Three levels of hierarchy
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
With three levels of address With three levels of address hierarchy, the common part hierarchy, the common part is referred to as the is referred to as the netidnetid. .
The part common to all The part common to all computers connected to the computers connected to the same subnet is referred to same subnet is referred to
as the subnetid. The unique as the subnetid. The unique part is referred to as the part is referred to as the
hostidhostid..
Note:Note:
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
A packet traveling from the A packet traveling from the source to the destination source to the destination
needs at least four needs at least four addresses: source and addresses: source and
destination port numbers destination port numbers and source and destination and source and destination
IP addresses.IP addresses.
Note:Note:
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-5
DNS example
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
ROUTINGROUTINGROUTINGROUTING
4.34.3
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-6
Example of portion of the Internet
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-7
Routing decisions
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-8
Routing table for router R1
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-9
Routing tables
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Routing tables can be based Routing tables can be based on next-hop routing.on next-hop routing.
Note:Note:
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Routing tables for the Internet Routing tables for the Internet are usually network-specific are usually network-specific
rather than host-specific. The rather than host-specific. The router routes the packet to the router routes the packet to the
final network; it is then final network; it is then broadcast to reach the final broadcast to reach the final
destination. destination.
Network-based routing reduces Network-based routing reduces the size of routing tables.the size of routing tables.
Note:Note:
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-10
Autonomous systems
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Routing in the Internet is Routing in the Internet is hierarchical. Delivery is first hierarchical. Delivery is first
made to the autonomous made to the autonomous system, then to the system, then to the
network, and finally to the network, and finally to the host. Hierarchical routing host. Hierarchical routing
reduces the size of the reduces the size of the routing tables. routing tables.
Note:Note:
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
PACKETIZING:PACKETIZING:IP PROTOCOLIP PROTOCOL
PACKETIZING:PACKETIZING:IP PROTOCOLIP PROTOCOL
4.44.4
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-11
Position of IP in Internet model
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 4-12
IP datagram format
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Technical Focus:Technical Focus: Fields in a DatagramFields in a Datagram
The fields in a datagram are as follows:The fields in a datagram are as follows:
VersionVersion
Header lengthHeader length
Differentiated serviceDifferentiated service
Total lengthTotal length
Identification, flags, and fragmentation offsetIdentification, flags, and fragmentation offset
Time to liveTime to live
ChecksumChecksum
ProtocolProtocol
Source addressSource address
Destination addressDestination address
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
FRAGMENTATIONFRAGMENTATIONFRAGMENTATIONFRAGMENTATION
4.54.5