Figure 1-8 Postal Service Forwarding (Routing) Letters
Still thinking about the postal service, consider the difference between the person sending
the letter and the work that the postal service does. The person sending the letters expects
that the postal service will deliver the letter most of the time. However, the person sending
the letter does not need to know the details of exactly what path the letters take. In
contrast, the postal service does not create the letter, but it accepts the letter from the customer.
Then, the postal service must know the details about addresses and postal codes that
group addresses into larger groups, and it must have the ability to deliver the letters.
The TCP/IP application and transport layers act like the person sending letters through the
postal service. These upper layers work the same way regardless of whether the endpoint
host computers are on the same LAN or are separated by the entire Internet. To send a message,
these upper layers ask the layer below them, the network layer, to deliver the message.
The lower layers of the TCP/IP model act more like the postal service to deliver those messages
to the correct destinations. To do so, these lower layers must understand the underlying
physical network because they must choose how to best deliver the data from one host
to another.
So, what does this all matter to networking? Well, the network layer of the TCP/IP networking
model, primarily defined by the Internet Protocol (IP), works much like the postal
service. IP defines that each host computer should have a different IP address, just as the
postal service defines addressing that allows unique addresses for each house, apartment,
and business. Similarly, IP defines the process of routing so that devices called routers can
work like the post office, forwarding packets of data so that they are delivered to the correct
destinations. Just as the postal service created the necessary infrastructure to deliver
letters—post offices, sorting machines, trucks, planes, and personnel—the network layer
defines the details of how a network infrastructure should be created so that the network
can deliver data to all computers in the network.
NOTE TCP/IP defines two versions of IP: IP version 4 (IPv4) and IP version 6 (IPv6). The
world still mostly uses IPv4, so this introductory part of the book uses IPv4 for all references
to IP. Later in this book, Part VIII, “IP Version 6,” discusses this newer version of the
IP protocol.
Chapter 1: Introduction to TCP/IP Networking 27
1
Internet Protocol Addressing Basics
IP defines addresses for several important reasons. First, each device that uses TCP/IP—
each TCP/IP host—needs a unique address so that it can be identified in the network. IP
also defines how to group addresses together, just like the postal system groups addresses
based on postal codes (like ZIP codes in the United States).
To understand the basics, examine Figure 1-9, which shows the familiar web server Larry
and web browser Bob; but now, instead of ignoring the network between these two computers,
part of the network infrastructure is included.
Addresses: 1.__.__.__
Addresses: 3.__.__.__
Addresses: 2.__.__.__
Larry
1.1.1.1
3.3.3.3
Bob
2.2.2.2
R1
R3
R2
Archie
Figure 1-9 Simple TCP/IP Network: Three Routers with IP Addresses Grouped
First, note that Figure 1-9 shows some sample IP addresses. Each IP address has four numbers,
separated by periods. In this case, Larry uses IP address 1.1.1.1, and Bob uses 2.2.2.2.
This style of number is called a dotted-decimal notation (DDN).
Figure 1-9 also shows three groups of addresses. In this example, all IP addresses that
begin with 1 must be on the upper left, as shown in shorthand in the figure as 1. . . .
All addresses that begin with 2 must be on the right, as shown in shorthand as 2. . . .
Finally, all IP addresses that begin with 3 must be at the bottom of the figure.
In addition, Figure 1-9 introduces icons that represent IP routers. Routers are networking
devices that connect the parts of the TCP/IP network together for the purpose of routing
(forwarding) IP packets to the correct destination. Routers do the equivalent of the work
done by each post office site: They receive IP packets on various physical interfaces, make
decisions based on the IP address included with the packet, and then physically forward the
packet out some other network interface.
IP Routing Basics
The TCP/IP network layer, using the IP protocol, provides a service of forwarding IP packets
from one device to another. Any device with an IP address can connect to the TCP/IP
network and send packets. This section shows a basic IP routing example for perspective.
NOTE The term IP host refers to any device, regardless of size or power, that has an IP
address and connects to any TCP/IP network.
28 CCENT/CCNA ICND1 100-105 Official Cert Guide
Figure 1-10 repeats the familiar case in which web server Larry wants to send part of a web
page to Bob, but now with details related to IP. On the lower left, note that server Larry has
the familiar application data, HTTP header, and TCP header ready to send. In addition, the
message now contains an IP header. The IP header includes a source IP address of Larry’s IP
address (1.1.1.1) and a destination IP address of Bob’s IP address (2.2.2.2).
Addresses: 2._____
Larry
1.1.1.1
1 2 3
To 2._____
Send to R2
To 2._____
Send Locally
Always to
R1
Bob
2.2.2.2
IP TCP HTTP
Source 1.1.1.1
Destination 2.2.2.2
R1
R3
R2
Figure 1-10 Basic Routing Example
Step 1, on the left of Figure 1-10, begins with Larry being ready to send an IP packet.
Larry’s IP process chooses to send the packet to some router—a nearby router on the same
LAN—with the expectation that the router will know how to forward the packet. (This
logic is much like you or me sending all our letters by putting them in a nearby mailbox.)
Larry doesn’t need to know anything more about the topology or the other routers.
At Step 2, Router R1 receives the IP packet, and R1’s IP process makes a decision. R1
looks at the destination address (2.2.2.2), compares that address to its known IP routes, and
chooses to forward the packet to Router R2. This process of forwarding the IP packet is
called IP routing (or simply routing).
At Step 3, Router R2 repeats the same kind of logic used by Router R1. R2’s IP process will
compare the packet’s destination IP address (2.2.2.2) to R2’s known IP routes and make a
choice to forward the packet to the right, on to Bob.
You will learn IP to more depth than any other protocol while preparing for CCENT
and CCNA. Practically half the chapters in this book discuss some feature that relates to
addressing, IP routing, and how routers perform routing.
TCP/IP Link Layer (Data Link Plus Physical)
The TCP/IP model’s original link layer defines the protocols and hardware required to
deliver data across some physical network. The term link refers to the physical connections,
or links, between two devices and the protocols used to control those links.
Just like every layer in any networking model, the TCP/IP link layer provides services to
the layer above it in the model. When a host’s or router’s IP process chooses to send an IP
packet to another router or host, that host or router then uses link-layer details to send that
packet to the next host/router.
Chapter 1: Introduction to TCP/IP Networking 29
1
Because each layer provides a service to the layer above it, take a moment to think about
the IP logic related to Figure 1-10. In that example, host Larry’s IP logic chooses to send the
IP packet to a nearby router (R1), with no mention of the underlying Ethernet. The Ethernet
network, which implements link-layer protocols, must then be used to deliver that packet
from host Larry over to router R1. Figure 1-11 shows four steps of what occurs at the link
layer to allow Larry to send the IP packet to R1.
NOTE Figure 1-11 depicts the Ethernet as a series of lines. Networking diagrams often use
this convention when drawing Ethernet LANs, in cases where the actual LAN cabling and
LAN devices are not important to some discussion, as is the case here. The LAN would have
cables and devices, like LAN switches, which are not shown in this figure.
Larry
1.1.1.1
Ethernet IP Packet Eth.
IP Packet
1 Encapsulate
2 Transmit 3
IP Packet
4 De-encapsulate
Receive
R1
Header Trailer
Ethernet IP Packet Eth.
Header Trailer
Figure 1-11 Larry Using Ethernet to Forward an IP Packet to Router R1
Figure 1-11 shows four steps. The first two occur on Larry, and the last two occur on
Router R1, as follows:
Step 1. Larry encapsulates the IP packet between an Ethernet header and Ethernet
trailer, creating an Ethernet frame.
Step 2. Larry physically transmits the bits of this Ethernet frame, using electricity flowing
over the Ethernet cabling.
Step 3. Router R1 physically receives the electrical signal over a cable, and re-creates
the same bits by interpreting the meaning of the electrical signals.
Step 4. Router R1 de-encapsulates the IP packet from the Ethernet frame by removing
and discarding the Ethernet header and trailer.
By the end of this process, the link-layer processes on Larry and R1 have worked together
to deliver the packet from Larry to Router R1.
NOTE Protocols define both headers and trailers for the same general reason, but headers
exist at the beginning of the message and trailers exist at the end.
The link layer includes a large number of protocols and standards. For example, the link
layer includes all the variations of Ethernet protocols, along with several other LAN standards
that were more popular in decades past. The link layer includes wide-area network
30 CCENT/CCNA ICND1 100-105 Official Cert Guide
(WAN) standards for different physical media, which differ significantly compared to LAN
standards because of the longer distances involved in transmitting the data. This layer also
includes the popular WAN standards that add headers and trailers as shown generally in
Figure 1-11—protocols such as the Point-to-Point Protocol (PPP) and Frame Relay. Chapter
2, “Fundamentals of Ethernet LANs,” and Chapter 3, “Fundamentals of WANs,” further
develop these topics for LANs and WANs, respectively.
In short, the TCP/IP link layer includes two distinct functions: functions related to the
physical transmission of the data, plus the protocols and rules that control the use of the
physical media. The five-layer TCP/IP model simply splits out the link layer into two layers
(data link and physical) to match this logic.
TCP/IP Model and Terminology
Before completing this introduction to the TCP/IP model, this section examines a few
remaining details of the model and some related terminology.
Comparing the Original and Modern TCP/IP Models
The original TCP/IP model defined a single layer—the link layer—below the Internet layer.
The functions defined in the original link layer can be broken into two major categories:
functions related directly to the physical transmission of data and those only indirectly
related to the physical transmission of data. For example, in the four steps shown in Figure
1-11, Steps 2 and 3 were specific to sending the data, but Steps 1 and 4—encapsulation and
de-encapsulation—were only indirectly related. This division will become clearer as you
read about additional details of each protocol and standard.
Today, most documents use a more modern version of the TCP/IP model, as shown in
Figure 1-12. Comparing the two, the upper layers are identical, except a name change from
Internet to Network. The lower layers differ in that the single link layer in the original
model is split into two layers to match the division of physical transmission details from
the other functions. Figure 1-12 shows the two versions of the TCP/IP model again, with
emphasis on these distinctions.
TCP/IP
Original
Link
Application
Transport
Internet
TCP/IP
Updated
Application
Transport
Network
Data Link
Physical
Encapsulation, Addressing
Bit Transmission
Figure 1-12 Link Versus Data Link and Physical Layers
Data Encapsulation Terminology
As you can see from the explanations of how HTTP, TCP, IP, and Ethernet do their jobs,
each layer adds its own header (and for data-link protocols, also a trailer) to the data supplied
by the higher layer. The term encapsulation refers to the process of putting headers
(and sometimes trailers) around some data.
Chapter 1: Introduction to TCP/IP Networking 31
1
Many of the examples in this chapter show the encapsulation process. For example,
web server Larry encapsulated the contents of the home page inside an HTTP header in
Figure 1-6. The TCP layer encapsulated the HTTP headers and data inside a TCP header
in Figure 1-7. IP encapsulated the TCP headers and the data inside an IP header in Figure
1-10. Finally, the Ethernet link layer encapsulated the IP packets inside both a header and
a trailer in Figure 1-11.
The process by which a TCP/IP host sends data can be viewed as a five-step process. The
first four steps relate to the encapsulation performed by the four TCP/IP layers, and the
last step is the actual physical transmission of the data by the host. In fact, if you use the
five-layer TCP/IP model, one step corresponds to the role of each layer. The steps are summarized
in the following list: