SlideShare a Scribd company logo
Chapter 2
Network Architecture
To engineer and build a system as complex as the Internet, en-
gineers try to break a single challenging problem into a set of
smaller problems that can be solved independently and then put
back together to solve the original large problem. The engineers
who built the first internets broke the overall problem into four
basic subproblems that could be worked on independently by
dif-
ferent groups.
!"#$%&'"(
)&&*+,#(+'$
-$(."$.(/'"0
1+$0
Figure 2.1: The Four-Layer TCP/IP Model
They gave these four areas of engineering the following names:
(1) Link, (2) Internetwork, (3) Transport, and (4) Application.
We
visualize these different areas as layers stacked on top of each
other, with the Link layer on the bottom and the Application
layer
on the top. The Link layer deals with the wired or wireless con-
nection from your computer to the local area network and the
Application layer is what we as end users interact with. A web
13
14 CHAPTER 2. NETWORK ARCHITECTURE
browser is one example of an application in this Internet
architec-
ture.
We informally refer to this model as the “TCP/IP model” in
refer-
ence to the Transport Control Protocol (TCP) used to implement
the Transport layer and Internet Protocol (IP) used to implement
the Internetwork layer.
We will take a quick look at each of the layers, starting from
the
“bottom” of the stack.
2.1 The Link Layer
The Link layer is responsible for connecting your computer to
its
local network and moving the data across a single hop. The
most common Link layer technology today is wireless network-
ing. When you are using a wireless device, the device is only
sending data a limited distance. A smartphone communicates
with a tower that is a few kilometers away. If you are using
your
smartphone on a train, it needs to switch to a new tower every
few minutes when the train is moving. A laptop that is
connected
to a WiFi network is usually communicating with a base station
within 200 meters. A desktop computer that is connected using
a wired connection is usually using a cable that is 100 meters
long or shorter. Link layer technologies are often shared
amongst
multiple computers at the same location.
The Link layer needs to solve two basic problems when dealing
with these shared local area networks. The first problem is how
to encode and send data across the link. If the link is wireless,
engineers must agree on which radio frequencies are to be used
to transmit data and how the digital data is to be encoded in the
radio signal. For wired connections, they must agree on what
voltage to use on the wire and how fast to send the bits across
the wire. For Link layer technologies that use fiber optics, they
must agree on the frequencies of light to be used and how fast
to
send the data.
In addition to agreeing on how to send data using a shared
medium such as a wireless network, they also need to agree on
how to cooperate with other computers that might want to send
data at the same time. If all the computers on the network tried
to transmit whenever they had data to send, their messages
would collide. The result would be chaos, and receiving stations
would only receive noise. So we need to find a fair way to allow
each station to wait its turn to use the shared network.
2.1. THE LINK LAYER 15
The idea of breaking a large message into packets and then
send-
ing each packet separately makes this sharing easier. If only one
computer wants to send data, it will send its packets one right
after another and move its data across the network as quickly as
it can. But if three computers want to send data at the same
time,
each computer will send one packet and then wait while the
other
two computers send packets. After each of the other computer s
sends a packet, the first computer will send its next packet. This
way the computers are sharing access to the network in a fair
way.
But how does a computer know if other computers want to send
data at the same time? Engineers designed an ingenious method
to solve this problem called “Carrier Sense Multiple Access
with
Collision Detection”, or CSMA/CD. It is a long name for a
simple
and elegant concept. When your computer wants to send data,
it first listens to see if another computer is already sending data
on the network (Carrier Sense). If no other computer is sending
data, your computer starts sending its data. As your computer is
sending data it also listens to see if it can receive its own data.
If
your computer receives its own data, it knows that the channel
is still clear and continues transmitting. But if two computers
started sending at about the same time, the data collides, and
your computer does not receive its own data. When a collision
is
detected, both computers stop transmitting, wait a bit, and retry
the transmission. The two computers that collided wait different
lengths of time to retry their transmissions to reduce the
chances
of a second collision.
When your computer finishes sending a packet of data, it pauses
to give other computers that have been waiting a chance to send
data. If another computer senses that your computer has stopped
sending data (Carrier Sense) and starts sending its own packet,
your computer will detect the other computer’s use of the net-
work and wait until that computer’s packet is complete before
attempting to send its next packet.
This simple mechanism works well when only one computer
wants to send data. It also works well when many computers
want to send data at the same time. When only one computer is
sending data, that computer can make good use of the shared
network by sending packets one after another, and when many
computers want to use the shared network at the same time,
each computer gets a fair share of the link.
Some link layers, like a cellular connection for a smartphone, a
WiFi connection, or a satellite or cable modem, are shared con-
16 CHAPTER 2. NETWORK ARCHITECTURE
Figure 2.2: Carrier Sense/Collision Detection
nections and need techniques like CSMA/CD to insure fair
access
to the many different computers connected to the network.
Other
link layers like fiber optic cables and leased lines are generally
not shared and are used for connections between routers. These
non-shared connections are still part of the Link layer.
The engineers working on Link layer technologies focus solving
the issues so computers can transmit data across a single link
that ranges in distance from a few meters to as long as hundreds
of kilometers. But to move data greater distances, we need to
send our packets through multiple routers connected by multiple
link layers. Each time our packet passes through another link
layer from one router to another we call it a “hop”. To send data
halfway around the world, it will pass through about 20 routers,
or make 20 “hops”.
2.2 The Internetwork Layer (IP)
Once your packet destined for the Internet makes it across the
first link, it will be in a router. Your packet has a source
address
2.2. THE INTERNETWORK LAYER (IP) 17
and destination address and the router needs to look at the des -
tination address to figure out how to best move your packet to-
wards its destination. With each router handling packets
destined
for any of many billions of destination computers, it’s not
possible
for every router to know the exact location and best route to ev-
ery possible destination computer. So the router makes its best
guess as to how to get your packet closer to its destination.
Each of the other routers along the way also does its best to get
your packet closer to the destination computer. As your packet
gets closer to its final destination, the routers have a better idea
of exactly where your packet needs to go. When the packet
reaches the last link in its journey, the link layer knows exactly
where to send your packet.
We use a similar approach to route ourselves when going on
hol-
iday. A holiday trip also has many hops. Perhaps the first hop is
driving your car or taking a cab or bus to a train station. Then
you take a local train from your small town to a larger city. In
the
larger city you take a long-distance train to a large city in
another
country. Then you take another local train to the small village
where you will stay for your holiday. When you get off the
train,
you take a bus, and when you get off the bus, you walk to your
hotel.
If you were on the train between the two large cities and you
asked the conductor the exact location of your hotel in the small
village, the conductor would not know. The conductor only
knows
how to get you closer to your destination, and while you are on
the long-distance train that is all that matters. When you get on
the bus at your destination village, you can ask the bus driver
which stop is closest to your hotel. And when you get off the
bus
at the right bus stop, you can probably ask a person on the street
where to find the hotel and get an exact answer.
The further you are from your destination, the less you need to
know the exact details of how to get there. When you are far
away, all you need to know is how to get “closer” to your
destina-
tion. Routers on the Internet work the same way. Only the
routers
that are closest to the destination computer know the exact path
to that computer. All of the routers in the middle of the journey
work to get your message closer to its destination.
But just like when you are traveling, unexpected problems or
de-
lays can come up that require a change in plans as your packets
are sent across the network.
Routers exchange special messages to inform each other about
18 CHAPTER 2. NETWORK ARCHITECTURE
Figure 2.3: A Multi-Step Trip
any kind of traffic delay or network outage so that packets can
be switched from a route that is no longer working to a different
route. The routers that make up the core of the Internet are
smart
and adapt quickly to both small and large outages or failures of
network connections. Sometimes a connection slows down be-
cause it is overloaded. Other times a connection is physically
bro-
ken when a construction crew mistakenly digs up a buried wire
and cuts it. Sometimes there is a natural disaster like a
hurricane
or typhoon that shuts down the routers and links in a large ge-
ographical area. The routers quickly detect these outages and
reroute around them if possible.
But sometimes things go wrong and packets are lost. Dealing
with
lost packets is the reason for the next layer in our architecture.
2.3 The Transport Layer (TCP)
The Internetwork layer is both simple and complex. It looks at
a packet’s destination address and finds a path across multiple
network hops to deliver the packet to the destination computer.
2.3. THE TRANSPORT LAYER (TCP) 19
But sometimes these packets get lost or badly delayed. Other
times the packets arrive at their destination out of order because
a later packet found a quicker path through the network than an
earlier packet. Each packet contains the source computer’s ad-
dress, the destination computer’s address, and an offset of
where
this packet “fits” relative to the beginning of the message.
Know-
ing the offset of each packet from the beginning of the message
and the length of the packet, the destination computer can
recon-
struct the original message even if the packets were received
out
of order.
As the destination computer reconstructs the message and deliv-
ers it to the receiving application, it periodically sends an
acknowl-
edgement back to the source computer indicating how much of
the message it has received and reconstructed. But if the des-
tination computer finds that parts of the reconstructed message
are missing, this probably means that these packets were lost
or badly delayed. After waiting a bit, the destination computer
sends a request to the source computer to resend the data that
seems to be missing.
The sending computer must store a copy of the parts of the orig-
inal message that have been sent until the destination computer
acknowledges successful receipt of the packets. Once the source
computer receives the acknowledgment of successful receipt of
a portion of the message, it can discard the data that has been
acknowledged and send some more data.
The amount of data that the source computer sends before wait-
ing for an acknowledgement is called the “window size”. If the
window size is too small, the data transmission is slowed
because
the source computer is always waiting for acknowledgments. If
the source computer sends too much data before waiting for an
acknowledgment, it can unintentionally cause traffic problems
by
overloading routers or long-distance communication lines. This
problem is solved by keeping the window size small at the
begin-
ning and timing how long it takes to receive the first
acknowledge-
ments. If the acknowledgments come back quickly, the source
computer slowly increases the window size and if the acknowl -
edgements come back slowly, the source computer keeps the
window size small so as not to overload the network. Just like at
the Link layer, a little courtesy on the Internet goes a long way
toward ensuring good use of the shared network infrastructure.
This strategy means that when the network has high-speed con-
nections and is lightly loaded the data will be sent quickly, and
if the network is heavily loaded or has slow connections the
data
20 CHAPTER 2. NETWORK ARCHITECTURE
will be slowed down to match the limitations of the network
con-
nections between the source and destination computers.
2.4 The Application Layer
The Link, Internetwork, and Transport layers work together to
quickly and reliably move data between two computers across
a shared network of networks. With this capability to move data
reliably, the next question is what networked applications will
be
built to make use of these network connections.
When the first widely used Internet came into being in the mid-
1980s, the first networked applications allowed users to log in
to
remote computers, transfer files between computers, send mail
between computers, and even do real-time text chats between
computers.
In the early 1990s, as the Internet came to more people and
com-
puters’ abilities to handle images improved, the World Wide
Web
application was developed by scientists at the CERN high-
energy
physics facility. The web was focused on reading and editing
net-
worked hypertext documents with images. Today the web is the
most common network application in use around the world. But
all the other older Internet applications are still in wide use.
Each application is generally broken into two halves. One half
of
the application is called the “server”. It runs on the destination
computer and waits for incoming networking connections. The
other half of the application is called the “client” and runs on
the
source computer. When you are browsing the web using
software
like Firefox, Chrome, or Internet Explorer, you are running a
“web
client” application which is making connections to web servers
and displaying the pages and documents stored on those web
servers. The Uniform Resource Locators (URLs) that your web
browser shows in its address bar are the web servers that your
client is contacting to retrieve documents for you to view.
When we develop the server half and the client half of a net-
worked application, we must also define an “application
protocol”
that describes how the two halves of the application will
exchange
messages over the network. The protocols used for each applica -
tion are quite different and specialized to meet the needs of the
particular application. Later we will explore some of these
Appli-
cation layer protocols.
2.5. STACKING THE LAYERS 21
2.5 Stacking the Layers
We usually show the four different layers (Link, Internetwork,
Transport, and Application) stacked on top of each other with
the Application layer at the top and the Link layer at the
bottom.
The reason we show them this way is because each layer makes
use of the layers above and below it to achieve networked
communications.
All four layers run in your computer where you run the client
ap-
plication (like a browser), and all four layers also run in the
des-
tination computer where the application server is running. You
as the end user interact with the applications that make up the
top layer of the stack, and the bottom layer represents the WiFi,
cellular, or wired connection between your computer and the
rest
of the Internet.
The routers that forward your packets from one to another to
move your packets towards their destination have no
understand-
ing of either the Transport or Application layers. Routers oper-
ate at the Internetwork and Link layers. The source and destina-
tion addresses at the Internetwork layer are all that is needed
for
routers to move your packets across the series of links (hops) to
get them to the destination. The Transport and Application lay-
ers only come into play after the Internetwork layer delivers
your
packets to the destination computer.
If you wanted to write your own networked application, you
would
likely only talk to the Transport layer and be completely uncon-
cerned about the Internetwork and Link layers. They are essen-
tial to the function of the Transport layer, but as you write your
program, you do not need to be aware of any of the lower-layer
details. The layered network model makes it simpler to write
net-
worked applications because so many of the complex details of
moving data from one computer to another can be ignored.
Up next, we will talk about these four layers in more detail.
2.6 Glossary
client: In a networked application, the client application is the
one that requests services or initiates connections.
fiber optic: A data transmission technology that encodes data
using light and sends the light down a very long strand of thin
22 CHAPTER 2. NETWORK ARCHITECTURE
glass or plastic. Fiber optic connections are fast and can cover
very long distances.
offset: The relative position of a packet within an overall mes -
sage or stream of data.
server: In a networked application, the server application is the
one that responds to requests for services or waits for incoming
connections.
window size: The amount of data that the sending computer is
allowed to send before waiting for an acknowledgement.
2.7 Questions
You can take this quiz online at http://www.net-intro.com/quiz/
1. Why do engineers use a “model” to organize their approach
to solving a large and complex problem?
a) Because it allows them to build something small and test it
in a wind tunnel
b) Because talking about a model delays the actual start of the
hard work
c) Because they can break a problem down into a set of smaller
problems that can be solved independently
d) Because it helps in developing marketing materials
2. Which is the top layer of the network model used by TCP/IP
networks?
a) Application
b) Transport
c) Internetwork
d) Link
3. Which of the layers concerns itself with getting a packet of
data across a single physical connection?
a) Application
b) Transport
c) Internetwork
2.7. QUESTIONS 23
d) Link
4. What does CSMA/CD stand for?
a) Carrier Sense Multiple Access with Collision Detection
b) Collision Sense Media Access with Continuous Direction
c) Correlated Space Media Allocation with Constant Division
d) Constant State Multiple Address Channel Divison
5. What is the goal of the Internetwork layer?
a) Insure that no data is lost while enroute
b) Get a packet of data moved across multiple networks from
its source to its destination
c) Make sure that only logged-in users can use the Internet
d) Insure than WiFi is fairly shared across multiple computers
6. In addition to the data, source, and destination addresses,
what else is needed to make sure that a message can be
reassembled when it reaches its destination?
a) An offset of where the packet belongs relative to the begin-
ning of the message
b) A location to send the data to if the destination computer is
down
c) A compressed and uncompressed version of the data in the
packet
d) The GPS coordinates of the destination computer
7. What is “window size”?
a) The sum of the length and width of a packet
b) The maximum size of a single packet
c) The maximum number of packets that can make up a mes-
sage
d) The maximum amount of data a computer can send before
receiving an acknowledgement
8. In a typical networked client/server application, where does
the client application run?
a) On your laptop, desktop, or mobile computer
24 CHAPTER 2. NETWORK ARCHITECTURE
b) On a wireless access point
c) On the closest router
d) In an undersea fiber optic cable
9. What does URL stand for?
a) Universal Routing Linkage
b) Uniform Retransmission Logic
c) Uniform Resource Locator
d) Unified Recovery List
Chapter 1
Introduction
Using the Internet seems pretty easy. We go to a web address
and up comes a page. Or we go to our favorite social site and
see pictures of our friends, families, and pets. But it takes a lot
of complex software and hardware to make the Internet seem so
simple. The design of the technologies that make today’s Inter-
net work started in the 1960s, and there were over 20 years of
research into how to build internetworking technologies before
the first “Internet” was built in the late 1980s by academics in a
project called NSFNet. Since then, the research and
development
into improving network technologies has continued as networks
have become far larger and faster and globally distributed with
billions of computers.
In order to better understand how today’s Internet works, we
will
take a look at how humans and computers have communicated
using technology over the years.
1.1 Communicating at a Distance
Imagine a group of five people in a room sitting in a circle. As
long
as they are courteous and don’t have more than one
conversation
at the same time, it’s quite natural for any person to talk to any
other person in the room. They just need to be able to hear each
other and coordinate how to use the shared space in the room.
But what if we put these people in different rooms so they can
no longer see or hear each other? How could pairs of people
communicate with each other then? One way might be to run a
wire between each pair of people with a microphone on one end
and a speaker on the other end. Now everyone could still hear
all
1
2 CHAPTER 1. INTRODUCTION
the conversations. They would still need to be courteous to
make
sure that there was only one conversation going on at the same
time.
Each person would need four speakers (one for each of the other
people) and enough pieces of wire to connect all the
microphones
and speakers. This is a problem with five people and it gets far
worse when there are hundreds or thousands of people.
Using wires, microphones, and speakers is how early telephone
systems from the 1900s allowed people to make phone calls.
Be-
cause they could not have separate wires between every pair of
telephones, these systems did not allow all pairs of people to be
connected at the same time. Each person had a single
connection
to a human “operator”. The operator would connect two wires
to-
gether to allow a pair of people to talk, and then disconnect
them
when the conversation was finished.
Figure 1.1: Connecting Using Telephone Operators
The first local telephone systems worked well when a
customer’s
home or business was close to the operator’s building and a
wire
could be strung directly from the operator’s building to the per -
son’s home.
1.1. COMMUNICATING AT A DISTANCE 3
But what if thousands people who are hundreds of kilometers
apart need to be able to communicate? We can’t run 100-
kilometer wires from each home to a single central office. What
the telephone companies did instead was to have many central
offices and run a few wires between the central offices, then
share connections between central offices. For long distances, a
connection might run through a number of central offices.
Before
the advent of fiber optic, long-distance telephone calls were
carried between cities on poles with lots of separate wires. The
number of wires on the poles represented the number of possible
simultaneous long-distance phone calls that could use those
wires.
Figure 1.2: Long-Distance Telephone Poles
Since the cost of the wires went up as the length of the wire
increased, these longer connections between offices were quite
expensive to install and maintain, and they were scarce. So in
the
early days of telephones, local calls were generally quite
inexpen-
sive. But long-distance calls were more expensive and they were
charged by the minute. This made sense because each minute
you talked on a long-distance call, your use of the long-distance
wires meant no one else could use them. The telephone compa-
nies wanted you to keep your calls short so their long-distance
lines would be available for other customers.
When telephone companies started using fiber optic, more ad-
vanced techniques were used to carry many simultaneous long-
distance conversations on a single fiber. When you look at an
old
4 CHAPTER 1. INTRODUCTION
photo and see lots of wires on a single pole, it generally means
they were telephone wires and not used to carry electricity.
1.2 Computers Communicate Differently
When humans talk on the phone, they make a call, talk for a
while, and then hang up. Statistically, most of the time, humans
are not talking on the phone. At least they weren’t before ev-
eryone had smartphones. But computers, including the applica-
tions on your smartphone, communicate differently than humans
do. Sometimes computers send short messages to check if an-
other computer is available. Computers sometimes send
medium-
sized information like a single picture or a long email message.
And sometimes computers send a lot of information like a whole
movie or a piece of software to install that might take minutes
or
even hours to download. So messages between computers can
be short, medium, or long.
In the earliest days of connecting computers to one another,
pairs
of computers were connected with wires. The simplest way to
send data from one computer to another was to line up the out-
going messages in a queue and send the messages one after
another as fast as the computers and the wires could carry the
data. Each message would wait for its turn until the messages
ahead of it were sent, and then it would get its chance to be sent
across the connection.
When the computers were in the same building, the building
owner could run wires to connect them. If the computers were
in the same town, the owners of the computers generally had
to lease wires from the telephone companies to connect their
computers. They often would have the phone company connect
the wires together in their central office so that it was not
necessary for one computer to “dial” the other computer to
send data. These leased lines were convenient for computer
communications because they were “always on”, but they were
also quite expensive because they were used 24 hours a day.
When the computers were even farther away, in different cities,
the leased lines were extended using the longer wires connect-
ing the central offices. Since there were so few wires between
central offices, these long-distance leased lines were quite ex-
pensive and their cost increased dramatically as the length of
the
leased line increased. But if you had enough money, you could
lease direct connections between your computers so they could
1.3. EARLY WIDE AREA STORE-AND-FORWARD
NETWORKS 5
exchange data. This worked pretty well as long as you were
only
using one brand of computers, because each computer company
had their own way of using telephone wires to connect their
com-
puters together and send data.
1.3 Early Wide Area Store-and-Forward
Networks
In the 1970s and 1980s, people working at universities around
the world wanted to send each other data and messages using
these computer-to-computer connections. Since the cost for each
connection was so high and increased with distance, computers
generally only had connections to other nearby computers. But
if the computer that you were connected to was connected to
another computer and that computer in turn was connected to
another computer, and so on, you could send a message a long
distance as long as each of the computers along the route of the
message agreed to store and forward your message.
Figure 1.3: Store-and-Forward Networks
Over time, with relatively few connections you could send data
long distances across a patchwork of network connections as
long
as you were patient. Along the way, after your message reached
one computer, it would have to wait until its turn came to be
sent to the next computer along the route. A message would
arrive at an intermediate computer, be stored for a while
(perhaps
hours, depending on traffic), and then be forwarded one more
connection (or “hop”).
6 CHAPTER 1. INTRODUCTION
Sending entire messages one at a time this way, a message
might
take minutes, hours, or even days to arrive at its ultimate desti -
nation, depending on the traffic at each of the hops. But even if
it took a few hours for an email message to find its way from
one
part of the country to another, this was still much quicker and
easier than sending a letter or postcard.
1.4 Packets and Routers
The most important innovation that allowed messages to move
more quickly across a multi-hop network was to break each
mes-
sage into small fragments and send each fragment individually.
In networking terms, these pieces of messages are called “pack-
ets”. The idea of breaking a message into packets was pioneered
in the 1960s, but it was not widely used until the 1980s because
it
required more computing power and more sophisticated
network-
ing software.
When messages are broken into packets and each packet is sent
separately, if a short message was sent after a large message
had begun, the short message did not have to wait until the
entire
long message was finished. The first packet of the short
message
only had to wait for the current packet of the large message to
be
finished. The system alternated sending packets from the long
and short messages until after a while the short message was
completely sent and the long message resumed making full use
of the network connection.
Breaking the message into packets also greatly reduced the
amount of storage needed in the intermediate computers be-
cause instead of needing to store an entire message for as long
as a few hours, the intermediate computer only needed to store
a few packets for a few seconds while the packets waited for
their turns on the outbound link.
As networks moved away from the store-and-forward approach,
they started to include special-purpose computers that special-
ized in moving packets. These were initially called “Interface
Mes-
sage Processors” or “IMPs” because they acted as the interface
between general-purpose computers and the rest of the network.
Later these computers dedicated to communications were called
“routers” because their purpose was to route the packets they
received towards their ultimate destination.
By building routers that specialized in moving packets across
mul-
tiple hops, it became simpler to connect computers from
multiple
1.5. ADDRESSING AND PACKETS 7
Figure 1.4: Sending Packets
vendors to the same network. To connect any computer to the
network, now all you needed to do was connect it to one router
and then the rest of the communication details were handled by
the other routers.
When multiple computers at one location were connected to-
gether in a “Local Area Network” (or LAN) using physical
wiring,
you would connect a router to the local area network. By
sending
data through the router, all the computers on the local area
network could send data across the “Wide Area Network” (or
WAN).
1.5 Addressing and Packets
In the early store-and-forward networks it was important to
know
the source and destination computers for every message. Each
computer was given a unique name or number that was called
the “address” of the computer. To send a message to another
computer, you needed to add the source and destination address
to the message before sending the message along its way. By
having a source and destination address in each message, the
computers that stored and forwarded the message would be able
to pick the best path for the message if more than one path was
8 CHAPTER 1. INTRODUCTION
available.
When a long message was split into much smaller packets and
each packet was sent individually, the source and destination
ad-
dresses had to be added to each packet, so that routers could
choose the best path to forward each packet of the message. In
addition to the source and destination addresses, it was also
nec-
essary to add data to each packet indicating the “offset” or po-
sition of the packet in the overall message so that the receiving
computer could put the packets back together in the right order
to reconstruct the original message.
1.6 Putting It All Together
So when we combine all this together we can understand the ba-
sic operation of today’s Internet. We have specialized
computers
called “routers” that know how to route packets along a path
from
a source to a destination. Each packet will pass through multiple
routers during its journey from the source computer to the desti -
nation computer.
Even though the packets may be part of a larger message, the
routers forward each packet separately based on its source and
destination addresses. Different packets from the same message
may take different routes from the source to the destination.
And
sometimes packets even arrive out of order; a later packet might
arrive before an earlier packet, perhaps because of a data
“traffic
jam”. Each packet contains an “offset” from the beginning of
the
message so that the destination computer can reassemble the
packets in the correct order to reconstruct the original message.
By creating a network using multiple short hops, the overall
cost
of communicating across a large geographical area could be
spread across a large number of connecting groups and individ-
uals. Normally, packets would find the shortest path between
the source and destination, but if a link on that path was an
overloaded or broken, the routers could cooperate and reroute
traffic to take slightly longer paths that would get packets from
a
source to a destination as quickly as possible.
The core of the Internet is a set of cooperating routers that
move
packets from many sources to many destinations at the same
time. Each computer or local area network is connected to a
router that forwards the traffic from its location to the various
des-
tinations on the Internet. A router might handle data from a
single
1.7. GLOSSARY 9
Figure 1.5: Connecting Around the World
computer like a smartphone, from several computers in the same
building, or from thousands of computers connected to a univer-
sity campus network. The term “Internet” comes from the idea
of
“internetworking”, which captures the idea of connecting many
networks together. Our computers connect to local networks and
the Internet connects the local networks together so all of our
computers can talk to each other.
1.7 Glossary
address: A number that is assigned to a computer so that mes-
sages can be routed to the computer.
hop: A single physical network connection. A packet on the In-
ternet will typically make several “hops” to get from its source
computer to its destination.
LAN: Local Area Network. A network covering an area that is
limited by the ability for an organization to run wires or the
power
of a radio transmitter.
leased line: An “always up” connection that an organization
leased from a telephone company or other utility to send data
across longer distances.
10 CHAPTER 1. INTRODUCTION
operator (telephone): A person who works for a telephone com-
pany and helps people make telephone calls.
packet: A limited-size fragment of a large message. Large mes-
sages or files are split into many packets and sent across the
Internet. The typical maximum packet size is between 1000 and
3000 characters.
router: A specialized computer that is designed to receive
incom-
ing packets on many links and quickly forward the packets on
the
best outbound link to speed the packet to its destination.
store-and-forward network: A network where data is sent
from one computer to another with the message being stored
for relatively long periods of time in an intermediate computer
waiting for an outbound network connection to become
available.
WAN: Wide Area Network. A network that covers longer dis-
tances, up to sending data completely around the world. A WAN
is generally constructed using communication links owned and
managed by a number of different organizations.
1.8 Questions
You can take this quiz online at http://www.net-intro.com/quiz/
1. What did early telephone operators do?
a) Maintained cell phone towers
b) Connected pairs of wires to allow people to talk
c) Installed copper wire between cities
d) Sorted packets as they went to the correct destination
2. What is a leased line?
a) A boundary between leased and owned telephone equip-
ment
b) A connection between a keyboard and monitor
c) A wire that ran from one phone company office to another
d) An “always on” telephone connection
3. How long might a message be stored in an intermediate com-
puter for a store-and-forward network?
1.8. QUESTIONS 11
a) less than a second
b) no more than four seconds
c) less than a minute
d) possibly as long as several hours
4. What is a packet?
a) A technique for wrapping items for shipping
b) A small box used for storage
c) A portion of a larger message that is sent across a network
d) The amount of data that could be stored on an early punched
card
5. Which of these is most like a router?
a) A mail sorting facility
b) A refrigerator
c) A high-speed train
d) An undersea telecommunications cable
6. What was the name given to early network routers?
a) Interfaith Message Processors
b) Internet Motion Perceptrons
c) Instant Message Programs
d) Interface Message Processors
7. In addition to breaking large messages into smaller seg-
ments to be sent, what else was needed to properly route
each message segment?
a) A source and destination address on each message segment
b) An ID and password for each message segment
c) A small battery to maintain the storage for each message
segment
d) A small tracking unit like a GPS to find lost messages
8. Why is it virtually free to send messages around the world
using the Internet?
a) Because governments pay for all the connections
b) Because advertising pays for all the connections
c) Because so many people share all the resources
d) Because it is illegal to charge for long-distance connections
12 CHAPTER 1. INTRODUCTION
Chapter 2Network ArchitectureTo engineer and build a s

More Related Content

PDF
Network internet
PDF
Networks internet
PPT
Basics of networking and routing
PDF
CCNA Report
PPTX
Network essentials chapter 4
PDF
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
PPT
Chapter 4
PDF
Network Basics (slides)
Network internet
Networks internet
Basics of networking and routing
CCNA Report
Network essentials chapter 4
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
Chapter 4
Network Basics (slides)

Similar to Chapter 2Network ArchitectureTo engineer and build a s (20)

PPT
Concept of networking
PDF
Osi layer notes
PPTX
BCE L-1 networking fundamentals 111.pptx
PPT
introduction to networking powerpoint presenytation
PDF
Networking Standards ( Osi Layers )
PPTX
Introduction to Networking.pptx
PPTX
Network essentials chapter 3
PPT
Ccna Presentation
PPT
Slides internet technology
PDF
Introduction to Computer Networking basics.pdf
PPTX
Media Access Layer
PPT
06 - OSI Model.ppt
PPT
06 - OSI Model.ppt
PDF
Networking fundamentalsss
PPT
Unit i packet switching networks
PPT
Intro_Net_91407 (2).ppt
PPT
Intro_Net_91407.ppt
PPT
Intro_Net_91407.ppt
PPT
Bachelor of Technology Computer Networking .ppt
PPT
Intro_Net_91407.ppt
Concept of networking
Osi layer notes
BCE L-1 networking fundamentals 111.pptx
introduction to networking powerpoint presenytation
Networking Standards ( Osi Layers )
Introduction to Networking.pptx
Network essentials chapter 3
Ccna Presentation
Slides internet technology
Introduction to Computer Networking basics.pdf
Media Access Layer
06 - OSI Model.ppt
06 - OSI Model.ppt
Networking fundamentalsss
Unit i packet switching networks
Intro_Net_91407 (2).ppt
Intro_Net_91407.ppt
Intro_Net_91407.ppt
Bachelor of Technology Computer Networking .ppt
Intro_Net_91407.ppt
Ad

More from EstelaJeffery653 (20)

DOCX
Individual ProjectMedical TechnologyWed, 9617Num.docx
DOCX
Individual ProjectThe Post-Watergate EraWed, 3817Numeric.docx
DOCX
Individual ProjectArticulating the Integrated PlanWed, 31.docx
DOCX
Individual Multilingualism Guidelines1)Where did the a.docx
DOCX
Individual Implementation Strategiesno new messagesObjectives.docx
DOCX
Individual Refine and Finalize WebsiteDueJul 02View m.docx
DOCX
Individual Cultural Communication Written Assignment  (Worth 20 of .docx
DOCX
Individual ProjectThe Basic Marketing PlanWed, 3117N.docx
DOCX
Individual ProjectFinancial Procedures in a Health Care Organiza.docx
DOCX
Individual Expanded Website PlanView more »Expand view.docx
DOCX
Individual Expanded Website PlanDueJul 02View more .docx
DOCX
Individual Communicating to Management Concerning Information Syste.docx
DOCX
Individual Case Analysis-MatavIn max 4 single-spaced total pag.docx
DOCX
Individual Assignment Report Format• Report should contain not m.docx
DOCX
Include LOCO api that allows user to key in an address and get the d.docx
DOCX
Include the title, the name of the composer (if known) and of the .docx
DOCX
include as many events as possible to support your explanation of th.docx
DOCX
Incorporate the suggestions that were provided by your fellow projec.docx
DOCX
inal ProjectDUE Jun 25, 2017 1155 PMGrade DetailsGradeNA.docx
DOCX
include 1page proposal- short introduction to research paper and yo.docx
Individual ProjectMedical TechnologyWed, 9617Num.docx
Individual ProjectThe Post-Watergate EraWed, 3817Numeric.docx
Individual ProjectArticulating the Integrated PlanWed, 31.docx
Individual Multilingualism Guidelines1)Where did the a.docx
Individual Implementation Strategiesno new messagesObjectives.docx
Individual Refine and Finalize WebsiteDueJul 02View m.docx
Individual Cultural Communication Written Assignment  (Worth 20 of .docx
Individual ProjectThe Basic Marketing PlanWed, 3117N.docx
Individual ProjectFinancial Procedures in a Health Care Organiza.docx
Individual Expanded Website PlanView more »Expand view.docx
Individual Expanded Website PlanDueJul 02View more .docx
Individual Communicating to Management Concerning Information Syste.docx
Individual Case Analysis-MatavIn max 4 single-spaced total pag.docx
Individual Assignment Report Format• Report should contain not m.docx
Include LOCO api that allows user to key in an address and get the d.docx
Include the title, the name of the composer (if known) and of the .docx
include as many events as possible to support your explanation of th.docx
Incorporate the suggestions that were provided by your fellow projec.docx
inal ProjectDUE Jun 25, 2017 1155 PMGrade DetailsGradeNA.docx
include 1page proposal- short introduction to research paper and yo.docx
Ad

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
master seminar digital applications in india
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Institutional Correction lecture only . . .
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Classroom Observation Tools for Teachers
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Cell Structure & Organelles in detailed.
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
master seminar digital applications in india
Abdominal Access Techniques with Prof. Dr. R K Mishra
A systematic review of self-coping strategies used by university students to ...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial diseases, their pathogenesis and prophylaxis
STATICS OF THE RIGID BODIES Hibbelers.pdf
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Pharma ospi slides which help in ospi learning
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Institutional Correction lecture only . . .
O5-L3 Freight Transport Ops (International) V1.pdf
Anesthesia in Laparoscopic Surgery in India
Final Presentation General Medicine 03-08-2024.pptx
Final Presentation General Medicine 03-08-2024.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Classroom Observation Tools for Teachers
Microbial disease of the cardiovascular and lymphatic systems
Cell Structure & Organelles in detailed.

Chapter 2Network ArchitectureTo engineer and build a s

  • 1. Chapter 2 Network Architecture To engineer and build a system as complex as the Internet, en- gineers try to break a single challenging problem into a set of smaller problems that can be solved independently and then put back together to solve the original large problem. The engineers who built the first internets broke the overall problem into four basic subproblems that could be worked on independently by dif- ferent groups. !"#$%&'"( )&&*+,#(+'$ -$(."$.(/'"0 1+$0 Figure 2.1: The Four-Layer TCP/IP Model They gave these four areas of engineering the following names: (1) Link, (2) Internetwork, (3) Transport, and (4) Application.
  • 2. We visualize these different areas as layers stacked on top of each other, with the Link layer on the bottom and the Application layer on the top. The Link layer deals with the wired or wireless con- nection from your computer to the local area network and the Application layer is what we as end users interact with. A web 13 14 CHAPTER 2. NETWORK ARCHITECTURE browser is one example of an application in this Internet architec- ture. We informally refer to this model as the “TCP/IP model” in refer- ence to the Transport Control Protocol (TCP) used to implement the Transport layer and Internet Protocol (IP) used to implement the Internetwork layer. We will take a quick look at each of the layers, starting from the
  • 3. “bottom” of the stack. 2.1 The Link Layer The Link layer is responsible for connecting your computer to its local network and moving the data across a single hop. The most common Link layer technology today is wireless network- ing. When you are using a wireless device, the device is only sending data a limited distance. A smartphone communicates with a tower that is a few kilometers away. If you are using your smartphone on a train, it needs to switch to a new tower every few minutes when the train is moving. A laptop that is connected to a WiFi network is usually communicating with a base station within 200 meters. A desktop computer that is connected using a wired connection is usually using a cable that is 100 meters long or shorter. Link layer technologies are often shared amongst multiple computers at the same location. The Link layer needs to solve two basic problems when dealing
  • 4. with these shared local area networks. The first problem is how to encode and send data across the link. If the link is wireless, engineers must agree on which radio frequencies are to be used to transmit data and how the digital data is to be encoded in the radio signal. For wired connections, they must agree on what voltage to use on the wire and how fast to send the bits across the wire. For Link layer technologies that use fiber optics, they must agree on the frequencies of light to be used and how fast to send the data. In addition to agreeing on how to send data using a shared medium such as a wireless network, they also need to agree on how to cooperate with other computers that might want to send data at the same time. If all the computers on the network tried to transmit whenever they had data to send, their messages would collide. The result would be chaos, and receiving stations would only receive noise. So we need to find a fair way to allow each station to wait its turn to use the shared network.
  • 5. 2.1. THE LINK LAYER 15 The idea of breaking a large message into packets and then send- ing each packet separately makes this sharing easier. If only one computer wants to send data, it will send its packets one right after another and move its data across the network as quickly as it can. But if three computers want to send data at the same time, each computer will send one packet and then wait while the other two computers send packets. After each of the other computer s sends a packet, the first computer will send its next packet. This way the computers are sharing access to the network in a fair way. But how does a computer know if other computers want to send data at the same time? Engineers designed an ingenious method to solve this problem called “Carrier Sense Multiple Access with Collision Detection”, or CSMA/CD. It is a long name for a simple
  • 6. and elegant concept. When your computer wants to send data, it first listens to see if another computer is already sending data on the network (Carrier Sense). If no other computer is sending data, your computer starts sending its data. As your computer is sending data it also listens to see if it can receive its own data. If your computer receives its own data, it knows that the channel is still clear and continues transmitting. But if two computers started sending at about the same time, the data collides, and your computer does not receive its own data. When a collision is detected, both computers stop transmitting, wait a bit, and retry the transmission. The two computers that collided wait different lengths of time to retry their transmissions to reduce the chances of a second collision. When your computer finishes sending a packet of data, it pauses to give other computers that have been waiting a chance to send data. If another computer senses that your computer has stopped sending data (Carrier Sense) and starts sending its own packet,
  • 7. your computer will detect the other computer’s use of the net- work and wait until that computer’s packet is complete before attempting to send its next packet. This simple mechanism works well when only one computer wants to send data. It also works well when many computers want to send data at the same time. When only one computer is sending data, that computer can make good use of the shared network by sending packets one after another, and when many computers want to use the shared network at the same time, each computer gets a fair share of the link. Some link layers, like a cellular connection for a smartphone, a WiFi connection, or a satellite or cable modem, are shared con- 16 CHAPTER 2. NETWORK ARCHITECTURE Figure 2.2: Carrier Sense/Collision Detection nections and need techniques like CSMA/CD to insure fair access to the many different computers connected to the network. Other
  • 8. link layers like fiber optic cables and leased lines are generally not shared and are used for connections between routers. These non-shared connections are still part of the Link layer. The engineers working on Link layer technologies focus solving the issues so computers can transmit data across a single link that ranges in distance from a few meters to as long as hundreds of kilometers. But to move data greater distances, we need to send our packets through multiple routers connected by multiple link layers. Each time our packet passes through another link layer from one router to another we call it a “hop”. To send data halfway around the world, it will pass through about 20 routers, or make 20 “hops”. 2.2 The Internetwork Layer (IP) Once your packet destined for the Internet makes it across the first link, it will be in a router. Your packet has a source address 2.2. THE INTERNETWORK LAYER (IP) 17
  • 9. and destination address and the router needs to look at the des - tination address to figure out how to best move your packet to- wards its destination. With each router handling packets destined for any of many billions of destination computers, it’s not possible for every router to know the exact location and best route to ev- ery possible destination computer. So the router makes its best guess as to how to get your packet closer to its destination. Each of the other routers along the way also does its best to get your packet closer to the destination computer. As your packet gets closer to its final destination, the routers have a better idea of exactly where your packet needs to go. When the packet reaches the last link in its journey, the link layer knows exactly where to send your packet. We use a similar approach to route ourselves when going on hol- iday. A holiday trip also has many hops. Perhaps the first hop is driving your car or taking a cab or bus to a train station. Then you take a local train from your small town to a larger city. In
  • 10. the larger city you take a long-distance train to a large city in another country. Then you take another local train to the small village where you will stay for your holiday. When you get off the train, you take a bus, and when you get off the bus, you walk to your hotel. If you were on the train between the two large cities and you asked the conductor the exact location of your hotel in the small village, the conductor would not know. The conductor only knows how to get you closer to your destination, and while you are on the long-distance train that is all that matters. When you get on the bus at your destination village, you can ask the bus driver which stop is closest to your hotel. And when you get off the bus at the right bus stop, you can probably ask a person on the street where to find the hotel and get an exact answer. The further you are from your destination, the less you need to
  • 11. know the exact details of how to get there. When you are far away, all you need to know is how to get “closer” to your destina- tion. Routers on the Internet work the same way. Only the routers that are closest to the destination computer know the exact path to that computer. All of the routers in the middle of the journey work to get your message closer to its destination. But just like when you are traveling, unexpected problems or de- lays can come up that require a change in plans as your packets are sent across the network. Routers exchange special messages to inform each other about 18 CHAPTER 2. NETWORK ARCHITECTURE Figure 2.3: A Multi-Step Trip any kind of traffic delay or network outage so that packets can be switched from a route that is no longer working to a different route. The routers that make up the core of the Internet are smart
  • 12. and adapt quickly to both small and large outages or failures of network connections. Sometimes a connection slows down be- cause it is overloaded. Other times a connection is physically bro- ken when a construction crew mistakenly digs up a buried wire and cuts it. Sometimes there is a natural disaster like a hurricane or typhoon that shuts down the routers and links in a large ge- ographical area. The routers quickly detect these outages and reroute around them if possible. But sometimes things go wrong and packets are lost. Dealing with lost packets is the reason for the next layer in our architecture. 2.3 The Transport Layer (TCP) The Internetwork layer is both simple and complex. It looks at a packet’s destination address and finds a path across multiple network hops to deliver the packet to the destination computer. 2.3. THE TRANSPORT LAYER (TCP) 19 But sometimes these packets get lost or badly delayed. Other
  • 13. times the packets arrive at their destination out of order because a later packet found a quicker path through the network than an earlier packet. Each packet contains the source computer’s ad- dress, the destination computer’s address, and an offset of where this packet “fits” relative to the beginning of the message. Know- ing the offset of each packet from the beginning of the message and the length of the packet, the destination computer can recon- struct the original message even if the packets were received out of order. As the destination computer reconstructs the message and deliv- ers it to the receiving application, it periodically sends an acknowl- edgement back to the source computer indicating how much of the message it has received and reconstructed. But if the des- tination computer finds that parts of the reconstructed message are missing, this probably means that these packets were lost
  • 14. or badly delayed. After waiting a bit, the destination computer sends a request to the source computer to resend the data that seems to be missing. The sending computer must store a copy of the parts of the orig- inal message that have been sent until the destination computer acknowledges successful receipt of the packets. Once the source computer receives the acknowledgment of successful receipt of a portion of the message, it can discard the data that has been acknowledged and send some more data. The amount of data that the source computer sends before wait- ing for an acknowledgement is called the “window size”. If the window size is too small, the data transmission is slowed because the source computer is always waiting for acknowledgments. If the source computer sends too much data before waiting for an acknowledgment, it can unintentionally cause traffic problems by overloading routers or long-distance communication lines. This problem is solved by keeping the window size small at the begin-
  • 15. ning and timing how long it takes to receive the first acknowledge- ments. If the acknowledgments come back quickly, the source computer slowly increases the window size and if the acknowl - edgements come back slowly, the source computer keeps the window size small so as not to overload the network. Just like at the Link layer, a little courtesy on the Internet goes a long way toward ensuring good use of the shared network infrastructure. This strategy means that when the network has high-speed con- nections and is lightly loaded the data will be sent quickly, and if the network is heavily loaded or has slow connections the data 20 CHAPTER 2. NETWORK ARCHITECTURE will be slowed down to match the limitations of the network con- nections between the source and destination computers. 2.4 The Application Layer The Link, Internetwork, and Transport layers work together to
  • 16. quickly and reliably move data between two computers across a shared network of networks. With this capability to move data reliably, the next question is what networked applications will be built to make use of these network connections. When the first widely used Internet came into being in the mid- 1980s, the first networked applications allowed users to log in to remote computers, transfer files between computers, send mail between computers, and even do real-time text chats between computers. In the early 1990s, as the Internet came to more people and com- puters’ abilities to handle images improved, the World Wide Web application was developed by scientists at the CERN high- energy physics facility. The web was focused on reading and editing net- worked hypertext documents with images. Today the web is the most common network application in use around the world. But
  • 17. all the other older Internet applications are still in wide use. Each application is generally broken into two halves. One half of the application is called the “server”. It runs on the destination computer and waits for incoming networking connections. The other half of the application is called the “client” and runs on the source computer. When you are browsing the web using software like Firefox, Chrome, or Internet Explorer, you are running a “web client” application which is making connections to web servers and displaying the pages and documents stored on those web servers. The Uniform Resource Locators (URLs) that your web browser shows in its address bar are the web servers that your client is contacting to retrieve documents for you to view. When we develop the server half and the client half of a net- worked application, we must also define an “application protocol” that describes how the two halves of the application will exchange
  • 18. messages over the network. The protocols used for each applica - tion are quite different and specialized to meet the needs of the particular application. Later we will explore some of these Appli- cation layer protocols. 2.5. STACKING THE LAYERS 21 2.5 Stacking the Layers We usually show the four different layers (Link, Internetwork, Transport, and Application) stacked on top of each other with the Application layer at the top and the Link layer at the bottom. The reason we show them this way is because each layer makes use of the layers above and below it to achieve networked communications. All four layers run in your computer where you run the client ap- plication (like a browser), and all four layers also run in the des- tination computer where the application server is running. You
  • 19. as the end user interact with the applications that make up the top layer of the stack, and the bottom layer represents the WiFi, cellular, or wired connection between your computer and the rest of the Internet. The routers that forward your packets from one to another to move your packets towards their destination have no understand- ing of either the Transport or Application layers. Routers oper- ate at the Internetwork and Link layers. The source and destina- tion addresses at the Internetwork layer are all that is needed for routers to move your packets across the series of links (hops) to get them to the destination. The Transport and Application lay- ers only come into play after the Internetwork layer delivers your packets to the destination computer. If you wanted to write your own networked application, you would likely only talk to the Transport layer and be completely uncon- cerned about the Internetwork and Link layers. They are essen-
  • 20. tial to the function of the Transport layer, but as you write your program, you do not need to be aware of any of the lower-layer details. The layered network model makes it simpler to write net- worked applications because so many of the complex details of moving data from one computer to another can be ignored. Up next, we will talk about these four layers in more detail. 2.6 Glossary client: In a networked application, the client application is the one that requests services or initiates connections. fiber optic: A data transmission technology that encodes data using light and sends the light down a very long strand of thin 22 CHAPTER 2. NETWORK ARCHITECTURE glass or plastic. Fiber optic connections are fast and can cover very long distances. offset: The relative position of a packet within an overall mes - sage or stream of data.
  • 21. server: In a networked application, the server application is the one that responds to requests for services or waits for incoming connections. window size: The amount of data that the sending computer is allowed to send before waiting for an acknowledgement. 2.7 Questions You can take this quiz online at http://www.net-intro.com/quiz/ 1. Why do engineers use a “model” to organize their approach to solving a large and complex problem? a) Because it allows them to build something small and test it in a wind tunnel b) Because talking about a model delays the actual start of the hard work c) Because they can break a problem down into a set of smaller problems that can be solved independently d) Because it helps in developing marketing materials 2. Which is the top layer of the network model used by TCP/IP networks?
  • 22. a) Application b) Transport c) Internetwork d) Link 3. Which of the layers concerns itself with getting a packet of data across a single physical connection? a) Application b) Transport c) Internetwork 2.7. QUESTIONS 23 d) Link 4. What does CSMA/CD stand for? a) Carrier Sense Multiple Access with Collision Detection b) Collision Sense Media Access with Continuous Direction c) Correlated Space Media Allocation with Constant Division d) Constant State Multiple Address Channel Divison 5. What is the goal of the Internetwork layer?
  • 23. a) Insure that no data is lost while enroute b) Get a packet of data moved across multiple networks from its source to its destination c) Make sure that only logged-in users can use the Internet d) Insure than WiFi is fairly shared across multiple computers 6. In addition to the data, source, and destination addresses, what else is needed to make sure that a message can be reassembled when it reaches its destination? a) An offset of where the packet belongs relative to the begin- ning of the message b) A location to send the data to if the destination computer is down c) A compressed and uncompressed version of the data in the packet d) The GPS coordinates of the destination computer 7. What is “window size”? a) The sum of the length and width of a packet b) The maximum size of a single packet
  • 24. c) The maximum number of packets that can make up a mes- sage d) The maximum amount of data a computer can send before receiving an acknowledgement 8. In a typical networked client/server application, where does the client application run? a) On your laptop, desktop, or mobile computer 24 CHAPTER 2. NETWORK ARCHITECTURE b) On a wireless access point c) On the closest router d) In an undersea fiber optic cable 9. What does URL stand for? a) Universal Routing Linkage b) Uniform Retransmission Logic c) Uniform Resource Locator d) Unified Recovery List
  • 25. Chapter 1 Introduction Using the Internet seems pretty easy. We go to a web address and up comes a page. Or we go to our favorite social site and see pictures of our friends, families, and pets. But it takes a lot of complex software and hardware to make the Internet seem so simple. The design of the technologies that make today’s Inter- net work started in the 1960s, and there were over 20 years of research into how to build internetworking technologies before the first “Internet” was built in the late 1980s by academics in a project called NSFNet. Since then, the research and development into improving network technologies has continued as networks have become far larger and faster and globally distributed with billions of computers. In order to better understand how today’s Internet works, we will take a look at how humans and computers have communicated using technology over the years.
  • 26. 1.1 Communicating at a Distance Imagine a group of five people in a room sitting in a circle. As long as they are courteous and don’t have more than one conversation at the same time, it’s quite natural for any person to talk to any other person in the room. They just need to be able to hear each other and coordinate how to use the shared space in the room. But what if we put these people in different rooms so they can no longer see or hear each other? How could pairs of people communicate with each other then? One way might be to run a wire between each pair of people with a microphone on one end and a speaker on the other end. Now everyone could still hear all 1 2 CHAPTER 1. INTRODUCTION the conversations. They would still need to be courteous to make sure that there was only one conversation going on at the same
  • 27. time. Each person would need four speakers (one for each of the other people) and enough pieces of wire to connect all the microphones and speakers. This is a problem with five people and it gets far worse when there are hundreds or thousands of people. Using wires, microphones, and speakers is how early telephone systems from the 1900s allowed people to make phone calls. Be- cause they could not have separate wires between every pair of telephones, these systems did not allow all pairs of people to be connected at the same time. Each person had a single connection to a human “operator”. The operator would connect two wires to- gether to allow a pair of people to talk, and then disconnect them when the conversation was finished. Figure 1.1: Connecting Using Telephone Operators The first local telephone systems worked well when a customer’s
  • 28. home or business was close to the operator’s building and a wire could be strung directly from the operator’s building to the per - son’s home. 1.1. COMMUNICATING AT A DISTANCE 3 But what if thousands people who are hundreds of kilometers apart need to be able to communicate? We can’t run 100- kilometer wires from each home to a single central office. What the telephone companies did instead was to have many central offices and run a few wires between the central offices, then share connections between central offices. For long distances, a connection might run through a number of central offices. Before the advent of fiber optic, long-distance telephone calls were carried between cities on poles with lots of separate wires. The number of wires on the poles represented the number of possible simultaneous long-distance phone calls that could use those wires.
  • 29. Figure 1.2: Long-Distance Telephone Poles Since the cost of the wires went up as the length of the wire increased, these longer connections between offices were quite expensive to install and maintain, and they were scarce. So in the early days of telephones, local calls were generally quite inexpen- sive. But long-distance calls were more expensive and they were charged by the minute. This made sense because each minute you talked on a long-distance call, your use of the long-distance wires meant no one else could use them. The telephone compa- nies wanted you to keep your calls short so their long-distance lines would be available for other customers. When telephone companies started using fiber optic, more ad- vanced techniques were used to carry many simultaneous long- distance conversations on a single fiber. When you look at an old 4 CHAPTER 1. INTRODUCTION
  • 30. photo and see lots of wires on a single pole, it generally means they were telephone wires and not used to carry electricity. 1.2 Computers Communicate Differently When humans talk on the phone, they make a call, talk for a while, and then hang up. Statistically, most of the time, humans are not talking on the phone. At least they weren’t before ev- eryone had smartphones. But computers, including the applica- tions on your smartphone, communicate differently than humans do. Sometimes computers send short messages to check if an- other computer is available. Computers sometimes send medium- sized information like a single picture or a long email message. And sometimes computers send a lot of information like a whole movie or a piece of software to install that might take minutes or even hours to download. So messages between computers can be short, medium, or long. In the earliest days of connecting computers to one another, pairs of computers were connected with wires. The simplest way to
  • 31. send data from one computer to another was to line up the out- going messages in a queue and send the messages one after another as fast as the computers and the wires could carry the data. Each message would wait for its turn until the messages ahead of it were sent, and then it would get its chance to be sent across the connection. When the computers were in the same building, the building owner could run wires to connect them. If the computers were in the same town, the owners of the computers generally had to lease wires from the telephone companies to connect their computers. They often would have the phone company connect the wires together in their central office so that it was not necessary for one computer to “dial” the other computer to send data. These leased lines were convenient for computer communications because they were “always on”, but they were also quite expensive because they were used 24 hours a day. When the computers were even farther away, in different cities, the leased lines were extended using the longer wires connect-
  • 32. ing the central offices. Since there were so few wires between central offices, these long-distance leased lines were quite ex- pensive and their cost increased dramatically as the length of the leased line increased. But if you had enough money, you could lease direct connections between your computers so they could 1.3. EARLY WIDE AREA STORE-AND-FORWARD NETWORKS 5 exchange data. This worked pretty well as long as you were only using one brand of computers, because each computer company had their own way of using telephone wires to connect their com- puters together and send data. 1.3 Early Wide Area Store-and-Forward Networks In the 1970s and 1980s, people working at universities around the world wanted to send each other data and messages using these computer-to-computer connections. Since the cost for each
  • 33. connection was so high and increased with distance, computers generally only had connections to other nearby computers. But if the computer that you were connected to was connected to another computer and that computer in turn was connected to another computer, and so on, you could send a message a long distance as long as each of the computers along the route of the message agreed to store and forward your message. Figure 1.3: Store-and-Forward Networks Over time, with relatively few connections you could send data long distances across a patchwork of network connections as long as you were patient. Along the way, after your message reached one computer, it would have to wait until its turn came to be sent to the next computer along the route. A message would arrive at an intermediate computer, be stored for a while (perhaps hours, depending on traffic), and then be forwarded one more connection (or “hop”).
  • 34. 6 CHAPTER 1. INTRODUCTION Sending entire messages one at a time this way, a message might take minutes, hours, or even days to arrive at its ultimate desti - nation, depending on the traffic at each of the hops. But even if it took a few hours for an email message to find its way from one part of the country to another, this was still much quicker and easier than sending a letter or postcard. 1.4 Packets and Routers The most important innovation that allowed messages to move more quickly across a multi-hop network was to break each mes- sage into small fragments and send each fragment individually. In networking terms, these pieces of messages are called “pack- ets”. The idea of breaking a message into packets was pioneered in the 1960s, but it was not widely used until the 1980s because it required more computing power and more sophisticated network-
  • 35. ing software. When messages are broken into packets and each packet is sent separately, if a short message was sent after a large message had begun, the short message did not have to wait until the entire long message was finished. The first packet of the short message only had to wait for the current packet of the large message to be finished. The system alternated sending packets from the long and short messages until after a while the short message was completely sent and the long message resumed making full use of the network connection. Breaking the message into packets also greatly reduced the amount of storage needed in the intermediate computers be- cause instead of needing to store an entire message for as long as a few hours, the intermediate computer only needed to store a few packets for a few seconds while the packets waited for their turns on the outbound link. As networks moved away from the store-and-forward approach,
  • 36. they started to include special-purpose computers that special- ized in moving packets. These were initially called “Interface Mes- sage Processors” or “IMPs” because they acted as the interface between general-purpose computers and the rest of the network. Later these computers dedicated to communications were called “routers” because their purpose was to route the packets they received towards their ultimate destination. By building routers that specialized in moving packets across mul- tiple hops, it became simpler to connect computers from multiple 1.5. ADDRESSING AND PACKETS 7 Figure 1.4: Sending Packets vendors to the same network. To connect any computer to the network, now all you needed to do was connect it to one router and then the rest of the communication details were handled by the other routers.
  • 37. When multiple computers at one location were connected to- gether in a “Local Area Network” (or LAN) using physical wiring, you would connect a router to the local area network. By sending data through the router, all the computers on the local area network could send data across the “Wide Area Network” (or WAN). 1.5 Addressing and Packets In the early store-and-forward networks it was important to know the source and destination computers for every message. Each computer was given a unique name or number that was called the “address” of the computer. To send a message to another computer, you needed to add the source and destination address to the message before sending the message along its way. By having a source and destination address in each message, the computers that stored and forwarded the message would be able to pick the best path for the message if more than one path was
  • 38. 8 CHAPTER 1. INTRODUCTION available. When a long message was split into much smaller packets and each packet was sent individually, the source and destination ad- dresses had to be added to each packet, so that routers could choose the best path to forward each packet of the message. In addition to the source and destination addresses, it was also nec- essary to add data to each packet indicating the “offset” or po- sition of the packet in the overall message so that the receiving computer could put the packets back together in the right order to reconstruct the original message. 1.6 Putting It All Together So when we combine all this together we can understand the ba- sic operation of today’s Internet. We have specialized computers called “routers” that know how to route packets along a path from a source to a destination. Each packet will pass through multiple
  • 39. routers during its journey from the source computer to the desti - nation computer. Even though the packets may be part of a larger message, the routers forward each packet separately based on its source and destination addresses. Different packets from the same message may take different routes from the source to the destination. And sometimes packets even arrive out of order; a later packet might arrive before an earlier packet, perhaps because of a data “traffic jam”. Each packet contains an “offset” from the beginning of the message so that the destination computer can reassemble the packets in the correct order to reconstruct the original message. By creating a network using multiple short hops, the overall cost of communicating across a large geographical area could be spread across a large number of connecting groups and individ- uals. Normally, packets would find the shortest path between the source and destination, but if a link on that path was an
  • 40. overloaded or broken, the routers could cooperate and reroute traffic to take slightly longer paths that would get packets from a source to a destination as quickly as possible. The core of the Internet is a set of cooperating routers that move packets from many sources to many destinations at the same time. Each computer or local area network is connected to a router that forwards the traffic from its location to the various des- tinations on the Internet. A router might handle data from a single 1.7. GLOSSARY 9 Figure 1.5: Connecting Around the World computer like a smartphone, from several computers in the same building, or from thousands of computers connected to a univer- sity campus network. The term “Internet” comes from the idea of “internetworking”, which captures the idea of connecting many
  • 41. networks together. Our computers connect to local networks and the Internet connects the local networks together so all of our computers can talk to each other. 1.7 Glossary address: A number that is assigned to a computer so that mes- sages can be routed to the computer. hop: A single physical network connection. A packet on the In- ternet will typically make several “hops” to get from its source computer to its destination. LAN: Local Area Network. A network covering an area that is limited by the ability for an organization to run wires or the power of a radio transmitter. leased line: An “always up” connection that an organization leased from a telephone company or other utility to send data across longer distances. 10 CHAPTER 1. INTRODUCTION operator (telephone): A person who works for a telephone com-
  • 42. pany and helps people make telephone calls. packet: A limited-size fragment of a large message. Large mes- sages or files are split into many packets and sent across the Internet. The typical maximum packet size is between 1000 and 3000 characters. router: A specialized computer that is designed to receive incom- ing packets on many links and quickly forward the packets on the best outbound link to speed the packet to its destination. store-and-forward network: A network where data is sent from one computer to another with the message being stored for relatively long periods of time in an intermediate computer waiting for an outbound network connection to become available. WAN: Wide Area Network. A network that covers longer dis- tances, up to sending data completely around the world. A WAN is generally constructed using communication links owned and managed by a number of different organizations.
  • 43. 1.8 Questions You can take this quiz online at http://www.net-intro.com/quiz/ 1. What did early telephone operators do? a) Maintained cell phone towers b) Connected pairs of wires to allow people to talk c) Installed copper wire between cities d) Sorted packets as they went to the correct destination 2. What is a leased line? a) A boundary between leased and owned telephone equip- ment b) A connection between a keyboard and monitor c) A wire that ran from one phone company office to another d) An “always on” telephone connection 3. How long might a message be stored in an intermediate com- puter for a store-and-forward network? 1.8. QUESTIONS 11 a) less than a second
  • 44. b) no more than four seconds c) less than a minute d) possibly as long as several hours 4. What is a packet? a) A technique for wrapping items for shipping b) A small box used for storage c) A portion of a larger message that is sent across a network d) The amount of data that could be stored on an early punched card 5. Which of these is most like a router? a) A mail sorting facility b) A refrigerator c) A high-speed train d) An undersea telecommunications cable 6. What was the name given to early network routers? a) Interfaith Message Processors b) Internet Motion Perceptrons c) Instant Message Programs
  • 45. d) Interface Message Processors 7. In addition to breaking large messages into smaller seg- ments to be sent, what else was needed to properly route each message segment? a) A source and destination address on each message segment b) An ID and password for each message segment c) A small battery to maintain the storage for each message segment d) A small tracking unit like a GPS to find lost messages 8. Why is it virtually free to send messages around the world using the Internet? a) Because governments pay for all the connections b) Because advertising pays for all the connections c) Because so many people share all the resources d) Because it is illegal to charge for long-distance connections 12 CHAPTER 1. INTRODUCTION