IS 450/650, Fall 2013, Computer Networks
and the Internet
• Syllabus Overview (Syllabus on Blackboard)
• Chapter 1
Announcements & Reminders:
• 450-1 Homework 1 Due Tuesday 9/17 at 23:59.
• 450-1 (TR) Test 1 Tuesday 10/1
• 450-1 (TR) Test 2 Thursday 11/7
• 450-1 (TR) Final Exam Thursday 12/19 8-10 a.m.
• Suggestion: start homeworks early and send e-mail if
you get stuck.
Cell phones & laptops oﬀ.
Reminder: if printing the notes, consider printing 4-up (4 pages per side) or 2-up or 6-up or some such.
Generated September 16, 2013.
Look at the math review at the course web site. This will
give everyone some idea of the expected background for
• Positional number systems: binary, decimal, hexadecimal
• Counting: how many values can be represented in n
bits? How many bits are needed to represent m different values? • Logarithms and exponentiation
Computer networks are ubiquitous:
• The Internet
• Smart Phones
• LAN Clients and Servers
• Wireless LANs supporting laptops, tablets, e-readers,
– CTIA reports that there are now more wireless devices than people in the US: http://goo.gl/yU8fi • DTV, GPS, HD radio, etc.
• Satellite Radio
• Satellite Phones
• OS Structure
• Growth of Computer Networking
• Complexity in Network Systems
• Mastering the Complexity
• Resource Sharing
So a recent estimate shows about 900M hosts on the Internet. Implications?
The plot is from http://www.isc.org/solutions/survey,
What is the Internet?
What level of abstraction should we consider ﬁrst?
• The Internet is an interconnected collection of networks. • The Internet is a set of nodes and links.
• The Internet is an emergent phenomenon.
– Individual nodes, links, switches, and networks are
– The Internet was not.
Consider a traﬃc jam.
– Cars and highways are engineered.
– Traﬃc jams emerge.
– Cars move forward, ideally.
– Traﬃc jams move backward, often.
Next page: What was the Internet?
What was the Internet, or Arpanet?
Next page, 1982.
Before the Internet we had a variety of one-to-one and
one-to-many communications mechanisms.
• Name some.
• Many-to-one was rudimentary.
– Such as?
The Internet brought us convenient many-to-many and
many to one.
Nodes: PCs, special-purpose hardware, etc.
• hosts or end systems
• switches (broadly speaking: LAN switches, routers,
phone switches, PBXes, etc.)
• communications links
The Internet provides paths or routes between various
• Each path consists of one or more hops along communication links from node-to-node.
Getting Building Blocks to Talk Among
• protocols control sending, receiving of messages
– e.g., TCP, IP, HTTP, Skype, Ethernet, 802.11
• Internet: “network of networks”
– loosely hierarchical
– public Internet versus private intranet
• Internet standards
– RFC: Request for comments
– IETF: Internet Engineering Task Force
– IANA: Internet Assigned Numbers Authority
Aside: About all these Abbreviations
• A typical discussion of networks involves many abbreviations and acronyms. • Largely for tests and quizzes you do not have to memorize these. • If I use too many in class, raise your hand and ask for
a clariﬁcation. Please.
• Pay attention, do the reading and homeworks, review
the slides, and most will stop seeming foreign.
A Service View
The Internet provides a communications infrastructure.
• The infrastructure allows distributed applications
• Web, VoIP, e-mail, games, e-commerce, ﬁle sharing,
Communications services are provided to applications:
• reliable end-to-end (sender to receiver, source to destination) data delivery • best eﬀort (unreliable) data delivery
Support for Common Services
Why do we want to have networks? What good are they?
What do we use networks for?
More speciﬁcally, what do we use the Internet for?
Many diﬀerent sorts of services.
How can one “thing,” the Internet, be good for so many
diﬀerent kinds of services?
• Since many applications perform similar operations, it
makes sense to factor out the common behavior—just
as programmers avoid multiple copies of the same code
by using functions or methods.
• In networks, this is generally done in a layered fashion, in which lower layers provide a foundation for higher
• A neat thing about the Internet is that many of these
layers were essentially designed ca. 1970, and are still
chugging along ﬁne.
• In a sense, the network provides channels that connect two endpoints. Each endpoint is a process on a computer.
When not worried speciﬁcally about implementation, we
can represent a channel with a cloud diagram:
Often we are unconcerned about implementation at some
level or another of a system at any given time. In general,
we prefer to concentrate on just a few details at a time.
Programming languages provide APIs for and applications use various sorts of channels. Diﬀerent APIs support diﬀerent protocols.
From the text: A protocol deﬁnes the format and order
of messages exchanged between two or more communicating entities, as well as actions taken on the the transmission or receipt of a message or other event.
In particular a protocol deﬁnes the syntax and semantics
of a way of communicating.
• Syntax: the structure of each message.
• Semantics: the meaning of each message and each part
of each message.
Section 1.2: The Network Edge
This is also referred to as the last mile.
• Capacity in bits per second, usually b/s or bps.
• Shared or dedicated access?
• Are the systems at a particular location primarily clients or servers?
• Host: an end system, a computer, PC, smart phone,
etc., used as a client or server.
Plugging into the Internet
Last mile links vary greatly in capacity (b/s) and technology. • Dialup: optimistically, 56kb/s
• Satellite: a few hundred kb/s
• DSL a few Mb/s
• Cable, ﬁber, wireless: several Mb/s and up
We can categorize media generically into guided (with
wires, cables, whatever) vs. unguided (without wires).
• twisted-pair copper wires
– Why a pair of wires?
• optical ﬁber
• coaxial cable
Also, hybrid ﬁber cable (HFC), which is coax in neighborhoods and ﬁber to the cable head end • radio—terrestrial or satellite
1.3: The Network Core
• ISP: Internet service provider
• Tier 1 ISP: a top-level ISP. Tier 1 ISP typically don’t pay other providers to carry their traﬃc.
• Tier 2 ISP: an ISP that peers with some ISPs and
must buy transit through others. These are labeled as
regional ISPs in this diagram.
• Access ISP, or tier 3 network is one that purchases
access to the Internet and generally does not peer with
• IXP: Internet Exchange Point, where two or more networks peer. Let’s look at a major tier 1 provider’s network:
Related to trunking is the concept of a backbone.
A backbone is a portion of the network that connects
other parts of the network.
• Often the capacity of the backbone is relatively high.
In the Internet, the tier-1 providers operate the largest
backbones, interconnected at IXPs.
Generally a router will receive a packet and then forward
it along its way.
• Each link has a capacity, measured in bits per second:
b/s or bps. This is a rate, so the text abbreviates it
• Packet lengths are also measured in bits (or bytes).
The text abbreviates this length L.
How long does it take to place a packet on a link? L/R
If a path is n similar hops long, then the time to traverse
the path will be nL/R seconds.
There are other delays, but we will defer discussion of
those for now.
In circuit switched networks,
1. a path (a virtual circuit) from the sender to receiver
2. communications occur, and, ﬁnally,
3. the circuit is torn down.
These are used for point-to-point communications, and
ideally give the illusion of a dedicated line between the
If capacity is allocated when the circuit is set up, then
other traﬃc has little or no eﬀect on traﬃc on an existing circuit.
The PSTN (Publicly-Switched Telephone Network) is circuit switched.
Analogous to Circuit Switching
Analogy: think of a train. Each switch is set properly
before the train reaches the switch.
Each train car can be thought of as an individual packet
• The switch is set.
• Then one or more trains of packets follow the circuit.
In a packet switched network, packets are forwarded independently. • Note: many call this datagram switching.
Each packet has to have complete addressing information
for its sender and receiver.
Packets often compete for network resources.
There is no setup time for the connection: senders just
Analogy: think of the automobile. Routing decisions are
Packet vs. Circuit Switching
• With circuit switching, no communications occur before the circuit is set up—advantage, packet switching. • With circuit switching, a packet needs only a circuit
identiﬁer rather than complete source and destination
addresses—advantage, circuit switching.
• With circuit switching, switch capacity can be reserved
end-to-end through the network—advantage, circuit
A key diﬀerence:
• In circuit switching, the path is set up end-to-end before each individual data packet is sent. • In packet (or datagram) switching, the path is decided
How to Multiplex
How do we share?
Two common ways of multiplexing are (synchronous)
time-division multiplexing (TDM) and frequency-division
In TDM, we divide time into quanta, and assign each
customer one or more quanta.
For example, if multiple hosts share a switch to access
a network, time slot t1 might be reserved for host h1, t2
might be reserved for h2, and so forth, until each host has
had a turn. The we start back with h1 and t1.
This is similar to round-robin scheduling which is widely
used in operating systems.
Frequency Division Multiplexing
In FDM, we allow each host to transmit at a diﬀerent
frequency, e.g., diﬀerent radio and TV stations transmit
at diﬀerent frequencies.
The problem with each scheme is that we waste resources
when a host has nothing to send: an idle workstation, a
silent pause in a phone conversation, etc.
When FDM is used in optical ﬁber, it is called wavelength
TDM Example: T1 (or T3, etc.)
• A T1 line can be used to carry 24 digital voice channels. • A T3 line is equivalent to 28 T1 lines.
• For the duration of a call, 1/24 of a T1 is allocated,
which is just over 4% of the link’s capacity.
• This capacity is tied up even if the two parties on the
connection are silent.
A third form of multiplexing is statistical multiplexing,
where we allow each host to transmit on demand.
• So, a host with something to send does not have to
wait for its turn.
• A host with nothing to send uses no resources.
• But, if multiple hosts try to send at the same time, we
need a scheme for resolving conﬂicts.
Trunking refers to multiple channels, ﬂows, or connections sharing the same wire or bundle of wires. • So this is related to multiplexing.
Examples of trunking:
Networks are roughly hierarchical, with tier-1 ISPs at the
highest levels (center) and regional ISP paying them to
Taming Complexity: Adding Levels to the
Tier 1 ISPs are often referred to as NSPs, network service
Traﬃc May Traverse Many ISPs
Latency (delay) is the time to get from one host to another. Round-trip time (RTT) is the time to get a message from
one host to another, and back again.
Latency has four components:
1. speed of light
2. transmission time of a piece of data, say, a packet
3. queuing delays within the network (hard to model)
4. processing delays (typically at most a few µs)
Speed of Light
• The signal propagation speed depends on the medium,
and ranges from
– 3.0 × 108 m/s in a vacuum and
– around 2.3 × 108 m/s in copper to
– around 2.0 × 108 m/s in ﬁber.
Just for simplicity well generally assume 3.0 × 108 m/s
• Delay = Propagation + Transmit + Queue + Proc.
• Propagation = Distance / SpeedOfLight
• Transmit = Size / (Transmission Rate)
In the text, p. 37:
• transmission delay is L/R
• propagation delay is d/s
• speed of light is c = 3.0 × 108 m/s
For our purposes, for now,
• Delay = Propagation + Transmit
• Delay = d/s + L/R
where propagation and transmit delays are deﬁned as
The mean distance between the Earth
Mars is approximately 225 million km
http://www.universetoday.com/14824/distance-from-earth-to-mars/). Suppose it is necessary to send a 50MB ﬁle to Mars and
that the transfer must complete in at most 30 minutes.
What is the minimum throughput needed (in bits / second) to accomplish this? Note that by “accomplish,” I mean that the ﬁle must be both sent from the Earth station and received on Mars. NB:
8b = 1B (eight bits in a byte)
M = 106
m = 10−3
• Pay attention to units.
• Carry the units through the calculation.
• An answer without units is wrong.
How much does it cost to leave Guatemala? ¿Veinte?
• This is a case where we can’t do much about propagation delay. Are there cases where we can reduce propagation delay?
Congestion occurs when bits ﬂow into a region faster
than they can ﬂow out.
This causes lost packets and generally slows things down
(a node may have to wait before transmitting).
For smaller ﬁles or higher throughput, propagation time
If the transmission time is large, propagation time fades
• When is transmit delay large?
Recall: transmit delay is L/R
• When is propagation delay a large fraction of perceived
Recall: propagation delay d/c
As throughput increases, propagation delay becomes
• Consider the problem of transmitting an 8.4 Mb ﬁle
across the US on a 1 Mb/s link vs. a 1 Gb/s link
w/100 ms one-way delay.
• Could we transmit a ﬁle of this size faster on a 4 Gb/s link than on the 1 Gb/s link?
• How about a bigger ﬁle?
On Queueing Delay
Consider a packet arrival rate of a (measured in packets
per second), average packet length of L (bits), and a link
capacity of R (bits per second).
• La/R ≈ 0: average queueing delay very low
• La/R approaching 1: delays become large
• La/R > 1: more traﬃc than the link can handle,
causing delay to be (theoretically) inﬁnite
Seeing End-to-End Delay
Use traceroute (tracert on Windows) to see the number of nodes from here to yon. Example: traceroute www.example.com
Note traceroute also gives some delay estimates.
How does this manifest itself in web browsing?
NB: the end-to-end throughput is limited by the throughput of the slowest link. • This is true in any pipelined system
> traceroute www.washingtonpost.com
traceroute to www.washingtonpost.com (126.96.36.199), 30 hops max, 60 byte packets
1 188.8.131.52 (184.108.40.206) 27.008 ms 27.188 ms 27.403 ms 2 220.127.116.11 (18.104.22.168) 0.294 ms 0.377 ms 0.408 ms
3 22.214.171.124 (126.96.36.199) 0.324 ms 0.316 ms 0.305 ms
4 188.8.131.52 (184.108.40.206) 0.622 ms 0.615 ms 0.690 ms
5 gig0-2.umbc-core.net.ums.edu (220.127.116.11) 0.569 ms 0.565 ms 0.639 ms
6 ten1-1.umcp-core.net.ums.edu (18.104.22.168) 3.776 ms 3.677 ms 3.602 ms
7 22.214.171.124 (126.96.36.199) 1.183 ms 1.262 ms 1.253 ms 8 dca-edge-18.inet.qwest.net (188.8.131.52) 3.297 ms 3.275 ms 3.305 ms
9 dcp-edge-01.inet.qwest.net (184.108.40.206) 3.700 ms 3.637 ms 3.825 ms
10 220.127.116.11 (18.104.22.168) 3.815 ms 3.474 ms 3.379 ms
11 22.214.171.124 (126.96.36.199) 5.784 ms 5.679 ms 5.710 ms
12 washingtonpost.com (188.8.131.52) 4.071 ms 4.032 ms 4.022 ms
On Windows the command is tracert.
Suppose a 1.536 Mb/s link uses TDM with 24 time slots.
Further suppose it takes 500 ms to establish a circuit.
How long would it take a host to send 640 kb using just
one of the time slots?
• b is bits
• B is bytes
What if the connection is packet switched and there is no
• There is no need to set up circuit in a packet-switched
1.5: Protocols and Layering
Just like we no longer program using zeros and ones, we
rarely think of networking using raw hardware.
We want uniformity: networking should work about the
same regardless of the hardware used.
This suggests that we have a layer of software “above”
the hardware that provides a uniform interface to other
This sort of thing has long been done in computing.
Layering in Operating Systems
One or more layers could be added via virtualization.
Layering Of Network Protocols
We do the same sort of layering in network software: some
layers are apparent to users or application programmers,
and some are hidden, closer to the hardware.
Motivations for layering:
• Division of responsibilities: no one layer is overly complex. • Portability: if the hardware changes, only the bottom
layer(s) have to change.
• Portability II: the same upper layers suﬃce on a wide
variety of hardware platforms.
A protocol is an agreed-upon way of communicating, e.g.,
• ISO: International Organization for Standards, or
L’Organisation internationale de normalisation
• OSI: Open Systems Interconnect
TLA: three letter abbreviation (or acronym)
The OSI Model
This is a reference model rather than a protocol graph.
Reference models are often more appropriate as things to
refer to as opposed to being things to implement.
The OSI Architecture, from the Bottom
The OSI model has seven layers. From the bottom up:
1. The physical layer transmits unstructured bits across
a link via, typically, electromagnetically.
Here we are interested in things like hardware, wires,
hardware, airwaves, ﬁber, etc.
2. The data link layer groups the bits into frames and
delivers each frame to a particular node on a local
area network. Layer 2 often does NIC-to-NIC error
NIC is network interface controller
3. The network layer provides forwarding across interconnected networks. Example: The Internet Protocol (IP)
The network layer focuses on host-to-host communications, perhaps across several interconnected networks.
The OSI Model, Layers Four & Five,
Transport & Session
4. The transport layer provides (perhaps) reliable (perhaps) FIFO communications. • The transport layer focuses on process-to-process
• A connection-oriented transport protocol is the
Transmission Control Protocol, TCP. TCP usually resides on top of IP, a connectionless network layer.
• A connectionless transport protocol is the User
Datagram Protocol, UDP, which is also widelyused on the Internet. 5. The session layer adds support for user sessions, e.g.,
opening, closing, and managing sessions.
The OSI Model, Layers Six & Seven
6. The presentation layer provides for structuring of
messages into ﬁelds (as in object or struct data members). • The presentation layer also performs the conversions between diﬀerent data formats of disparate machines.
• Encryption can also be performed in this layer.
7. The application layer implements protocols designed
to meet communication requirements of speciﬁc applications. The interface of a service is often speciﬁed at this layer. Examples: ftp, telnet, SMTP, HTTP.
In practice, encryption is done in the network layer
(IPsec), the transport layer (TLS/SSL), or the presentation layer. • In the Internet model, the presentation and application layers are conﬂated, so presentation-layer encryption is referred to as application-layer encryption.
Primary Responsibilities, Layers 2–4
2. Link layer: NIC-to-NIC
3. Network layer: host-to-host
4. Transport layer: process-to-process
NIC: network interface controller
On most systems, these three layers are in the OS.
Together, these layers are referred to as a protocol stack.
Communications are at a layer: conceptually, layer 7 of
the sender talks to layer 7 of the receiver, and so forth.
• the link layer frame as an envelope for the network
• the network layer packet as an envelope for the transport layer segment or packet. • the transport layer segment as an envelope for the application layer packet.
An upper layer invoking a lower layer works very much
like a procedure/function/method call in programming,
which is part of the reason we say “protocol stack.”
On the sender, layer i “calls” layer i−1 to send a message to layer i on the receiver.
Each layer places its header information before the message (and before any higher-layer headers) before contacting the lower layer to transmit. Penguin time!
A de Facto Standard
The Internet’s TCP/IP protocols have become the de
facto standard for open system interconnection.
The main tasks of the network layer (Internet Protocol,
IP) is to pack messages into packets and the forwarding
of the packets to destination machines.
IP makes a “best-eﬀort” to forward packets to the next destination, but forwarding is not guaranteed.
• If a router is overrun with packets, it discards them.
• If a router fails, other routers attempt to send packets along alternate paths.
Thus, packets could be duplicated, arrive out of sequence,
or take a relatively long time to arrive.
Above IP is the transport layer, where the Transmission Control Protocol (TCP) eliminates duplicates and reassembles the packets in the correct order.
OSI vs. IP Models Compared
The Internet Protocol Stack
The application layer is in user space. The other layers
are within the OS.
Note the hourglass.
• IP can run on any LAN technology.
• Any transport technology can sit atop IP.
Lower Layers Encapsulate Upper Layers
The link layer carries the network layer which carries the
transport layer which carries the application layer.
The application layer packet is inside the transport layer
packet, which is inside the network layer packet, which is
inside the link layer frame.