SlideShare a Scribd company logo
Fundamentals Of Computer
Networking And Internetworking
Prof. Douglas Comer
Purdue University
http://www.cs.purdue.edu/people/comer
 Copyright 2014 by Douglas Comer And Pearson Education. All rights reserved.
MODULE I
Introductions, Course Overview,
Approaches To Networking, Open And
Closed Systems, Protocols, And Layering
Computer Networks and Internets -- Module 1 1 Spring, 2014
Copyright  2014. All rights reserved.
Introductions
d Professor
d TAs
d Students
Computer Networks and Internets -- Module 1 2 Spring, 2014
Copyright  2014. All rights reserved.
Course
Overview
Topic And Scope
Computer networks and internets: an overview of concepts,
terminology, and technologies that form the basis for digital
communication in individual networks and the global Internet
Computer Networks and Internets -- Module 1 4 Spring, 2014
Copyright  2014. All rights reserved.
You Will Learn
d Fundamental principles
d Concepts
d Terminology (lots of it)
d Key aspects of networking
Computer Networks and Internets -- Module 1 5 Spring, 2014
Copyright  2014. All rights reserved.
The Five Key Aspects Of Networking
d Data communications: signals over wires and bits over
signals
d Networks: packets over bits
d Internets: datagrams over packets
d Network programming: application data over the Internet
d Cross-functional concepts and technologies: network
configuration, control, and management
Computer Networks and Internets -- Module 1 6 Spring, 2014
Copyright  2014. All rights reserved.
Features Of The Course
d Covers all of networking and internetworking from media to
applications
d Examines each of the underlying technologies
d Focuses on concepts and principles that apply across
vendors and products
d Provides perspective and shows how the pieces fit together
d Explains how an Internet is built from heterogeneous
networks
Computer Networks and Internets -- Module 1 7 Spring, 2014
Copyright  2014. All rights reserved.
What You Will Not Learn
d Commercial aspects
– Vendors
– Products
– Prices
– Markets and marketing
d How to engineer network equipment
d How to configure/operate networks
d How to design new protocols
Computer Networks and Internets -- Module 1 8 Spring, 2014
Copyright  2014. All rights reserved.
Practice Sessions (Aka Labs)
d Form an important part of the course
d You will
– Build network programs
– Capture and analyze packets
– Learn about protocols
Computer Networks and Internets -- Module 1 9 Spring, 2014
Copyright  2014. All rights reserved.
Background Expected
d Our goal is breadth rather than depth
d Only a few basics are needed
– Ability to program in C
– A glancing acquaintance with data structures and
pointers
– A minor brush with algebra
– A basic understanding of operating systems
d The major requirement is a desire to learn
Computer Networks and Internets -- Module 1 10 Spring, 2014
Copyright  2014. All rights reserved.
Summary Of The Course
d Explores all aspects of networking and internetworking
d Gives concepts and principles
d Focuses on the big picture
d Includes lots of programming exercises
d Moves rapidly and covers lots of vocabulary
Computer Networks and Internets -- Module 1 11 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
Historic Approaches
To Networking
How Should A Network Be Structured?
Computer Networks and Internets -- Module 1 14 Spring, 2014
Copyright  2014. All rights reserved.
How Should A Network Be Structured?
d The early phone company answer
– Data networking is like telephone calls
– We will devise and offer various data services
– Charges will depend on distance and duration
– You only need 128 Kbps
Computer Networks and Internets -- Module 1 14 Spring, 2014
Copyright  2014. All rights reserved.
How Should A Network Be Structured?
d The early phone company answer
– Data networking is like telephone calls
– We will devise and offer various data services
– Charges will depend on distance and duration
– You only need 128 Kbps
d The early computer vendor answer
– A network connects computers in your organization
– We will devise all the necessary equipment and software
– You only need to connect our computers
– You only need to run our applications
Computer Networks and Internets -- Module 1 14 Spring, 2014
Copyright  2014. All rights reserved.
How Should A Network Be Structured?
(continued)
d The early network equipment vendor answer
– The network is independent of computers
– We will create network equipment and interface
hardware that connects computers to our network
– We will build device drivers for your operating system
– You only need to use our network
Computer Networks and Internets -- Module 1 15 Spring, 2014
Copyright  2014. All rights reserved.
Some Resulting Commercial Network Systems
d Apple Computer Appletalk
d Banyan Vines
d Digital Equipment Corporation DECNET
d IBM SNA
d Novell Netware
d Ungermann Bass NET/ One
d Xerox XNS
Computer Networks and Internets -- Module 1 16 Spring, 2014
Copyright  2014. All rights reserved.
The Researcher’s Answer
d Although we have computers at multiple sites, we reject the
phone company’s approach
d Because we use diverse computer architectures, we reject
the computer vendors’ approach
d Because a variety of network technologies are possible, we
reject the network vendors’ approach
d A variety of applications are possible
d Let’s experiment with new technologies (short distance as
well as long distance) and new applications
Computer Networks and Internets -- Module 1 17 Spring, 2014
Copyright  2014. All rights reserved.
Some Resulting Research Projects
d Xerox Palo Alto Research Center
– Ethernet
d MIT and elsewhere
– Token passing ring networks
d Department of Defense
– ARPANET
– SATNET
– Packet radio net
– The global Internet
Computer Networks and Internets -- Module 1 18 Spring, 2014
Copyright  2014. All rights reserved.
Open Vs. Closed Networking
d Closed networks
– Vertical approach
– Each vendor designs/ builds their own
– Given technology owned by vendor
– Vendor may license technology to other groups
d Open networks
– Competitive approach
– Multiple groups collaborate to define a technology
– To insure interoperability, specifications written in
standards documents that are available to everyone
– Companies build products according to standards
Computer Networks and Internets -- Module 1 19 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
Protocol Standards
And Protocol Design
Why Standardize?
d Networking supports communication among multiple
entities
d Agreement needed to make communication correct, efficient,
and meaningful
Computer Networks and Internets -- Module 1 22 Spring, 2014
Copyright  2014. All rights reserved.
Which Organizations Issue Standards?
d IEEE (Institute of Electrical and Electronics Engineers)
d IETF (Internet Engineering Task Force)
d ITU (International Telecommunications Union)
d ISO (International Organization for Standardization)
d W3C (World Wide Web Consortium)
d ...and many others
Computer Networks and Internets -- Module 1 23 Spring, 2014
Copyright  2014. All rights reserved.
Standards And Standardization
d Joke: why is networking so difficult?
Computer Networks and Internets -- Module 1 24 Spring, 2014
Copyright  2014. All rights reserved.
Standards And Standardization
d Joke: why is networking so difficult?
d Because there are so many standards from which to choose
Computer Networks and Internets -- Module 1 24 Spring, 2014
Copyright  2014. All rights reserved.
Protocol
d Each protocol specifies how to handle one aspect of
communication
d A protocol can specify
– Low-level details such as voltage and frequency
– High-level details such as format visible to a user
d Many individual communication protocol standards exist
d Set of protocols designed to work together is known as a
suite
– Example: TCP/ IP Internet protocol suite
Computer Networks and Internets -- Module 1 25 Spring, 2014
Copyright  2014. All rights reserved.
Two Key Properties That Protocols Specify
d Syntax
– Format of each message
– Representation of data items
– Encoding of bits in electromagnetic signals
d Semantics
– Meaning of each message
– Procedures used to exchange messages
– Actions to take when an error occurs
Computer Networks and Internets -- Module 1 26 Spring, 2014
Copyright  2014. All rights reserved.
Steps In Protocol Design
d Look at the facilities the underlying hardware provides
Computer Networks and Internets -- Module 1 27 Spring, 2014
Copyright  2014. All rights reserved.
Steps In Protocol Design
d Look at the facilities the underlying hardware provides
d Imagine an abstract communication mechanism as a user
would like it to work
Computer Networks and Internets -- Module 1 27 Spring, 2014
Copyright  2014. All rights reserved.
Steps In Protocol Design
d Look at the facilities the underlying hardware provides
d Imagine an abstract communication mechanism as a user
would like it to work
d Design an efficient implementation of the abstraction
Computer Networks and Internets -- Module 1 27 Spring, 2014
Copyright  2014. All rights reserved.
Steps In Protocol Design
d Look at the facilities the underlying hardware provides
d Imagine an abstract communication mechanism as a user
would like it to work
d Design an efficient implementation of the abstraction
d The key to success: choose a good abstraction
Computer Networks and Internets -- Module 1 27 Spring, 2014
Copyright  2014. All rights reserved.
Why Protocol Design Is Difficult
d Multiple implementations of a protocol will exist
d Implementations will be created by a multiple
individuals/organizations
d There are many details to consider
d Key tradeoff
– A specification that dictates all possible details restricts
implementations
– A specification that does not specify enough details is
ambiguous and leads to incompatible implementations
Computer Networks and Internets -- Module 1 28 Spring, 2014
Copyright  2014. All rights reserved.
Maximizing Interoperability
d Design principle that maximizes interoperability (due to
Postel)
Be conservative in what you send
and be liberal in what you accept.
Computer Networks and Internets -- Module 1 29 Spring, 2014
Copyright  2014. All rights reserved.
Protocol Layering
and Layering Models
Protocol Layering
d Needed because communication is complex
d Intended primarily for protocol designers
d Divides communication into intellectually manageable
pieces
d Provides a conceptual framework that can help us
understand protocols
d Ideally, layering is invisible once protocols have been
designed
d Notes:
– Layering gives a guideline, not a rigid framework
– Optimizations may violate strict layering
Computer Networks and Internets -- Module 1 31 Spring, 2014
Copyright  2014. All rights reserved.
Two Layering Models
d Internet protocols use a 5-layer reference model
d ISO and the ITU defined a 7-layer model
Computer Networks and Internets -- Module 1 32 Spring, 2014
Copyright  2014. All rights reserved.
Two Layering Models
d Internet protocols use a 5-layer reference model
d ISO and the ITU defined a 7-layer model
Computer Networks and Internets -- Module 1 32 Spring, 2014
Copyright  2014. All rights reserved.
Internet Reference Model
Application
Transport
Internet
Network Interface
Physical
LAYER 1
LAYER 2
LAYER 3
LAYER 4
LAYER 5
d Descriptive model formed after TCP/IP protocols were
devised
d Used in practice
Computer Networks and Internets -- Module 1 33 Spring, 2014
Copyright  2014. All rights reserved.
Physical Layer
d Underlying transmission media
d Electromagnetic energy and its use
d Representation of information in signals
d Electrical properties such as radio frequencies and voltage
d Associated hardware
Computer Networks and Internets -- Module 1 34 Spring, 2014
Copyright  2014. All rights reserved.
Network Interface Layer
d Communication between a computer and network hardware
d Also called data link or MAC layer
d Mechanisms for gaining access to shared media
d Hardware (MAC) addressing
d Packet (frame) formats
d Packet (frame) types and demultiplexing
d Error detection
Computer Networks and Internets -- Module 1 35 Spring, 2014
Copyright  2014. All rights reserved.
Internet Layer
d Communication between a pair of computers across the
Internet
d Internet packet format (datagram)
d Internet addressing model and address assignment
d Forwarding of Internet packets
d Dividing an Internet packet into smaller packets for
transmission
d Error detection and reporting
Computer Networks and Internets -- Module 1 36 Spring, 2014
Copyright  2014. All rights reserved.
Transport Layer
d Communication between a pair of applications
d Demultiplexing among multiple destinations on a computer
d Reliable delivery and retransmission
d Mechanisms to control data rate and avoid congestion
Computer Networks and Internets -- Module 1 37 Spring, 2014
Copyright  2014. All rights reserved.
Application Layer
d Format and representation of data and messages
d Procedures applications follow to
– Transfer data
– Handle errors or unexpected conditions
d Meaning of messages exchanged
d Internet infrastructure such as routing and DNS
Computer Networks and Internets -- Module 1 38 Spring, 2014
Copyright  2014. All rights reserved.
General Idea
d Each computer contains an entire set of layered protocols
d When an application sends a message
– The message passes down through the layered protocols
– A given layer adds information and forms a packet
– The computer transmits the final packet
d When a packet arrives
– The packet passes up through the protocol layers
– A given layer performs processing and passes the packet
up to the next layer
– The application receives the message that was sent
Computer Networks and Internets -- Module 1 39 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Protocol Software On A Computer
Application
Transport
Internet
Net. Interface
Application
Transport
Internet
Net. Interface
Physical Network
Computer 1 Computer 2
d Protocols on a computer arranged in a conceptual stack
Computer Networks and Internets -- Module 1 40 Spring, 2014
Copyright  2014. All rights reserved.
Packet Headers As A Packet Passes
Across The Internet
d One header prepended by each layer when message sent
d Result: headers are nested with lowest-layer header
appearing first
message the application sent
1: Physical header (possible, but not typical)
2: Network Interface header
3: Internet header
4: Transport header
Computer Networks and Internets -- Module 1 41 Spring, 2014
Copyright  2014. All rights reserved.
Layering Principle
d Layered protocols enforce an invariant:
Layer N at the destination receives an exact copy of the
message sent by layer N at the source. All headers and other
modifications added by lower layers at the source must be
removed by lower layers at the destination.
d Allows protocol designer to focus on one layer at a time
Computer Networks and Internets -- Module 1 42 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of The Layering Principle
Application
Transport
Internet
Net. Interface
Application
Transport
Internet
Net. Interface
SOURCE DESTINATION
Physical Network
identical message
identical packet
identical datagram
identical frame
Computer Networks and Internets -- Module 1 43 Spring, 2014
Copyright  2014. All rights reserved.
Do We Understand Layering?
Computer Networks and Internets -- Module 1 44 Spring, 2014
Copyright  2014. All rights reserved.
Do We Understand Layering?
No!
Computer Networks and Internets -- Module 1 44 Spring, 2014
Copyright  2014. All rights reserved.
A Few Subtle Complications Of Layering
Computer Networks and Internets -- Module 1 45 Spring, 2014
Copyright  2014. All rights reserved.
A Few Subtle Complications Of Layering
d Layering diagrams are abstract and simplistic
Computer Networks and Internets -- Module 1 45 Spring, 2014
Copyright  2014. All rights reserved.
A Few Subtle Complications Of Layering
d Layering diagrams are abstract and simplistic
d Details and exceptions complicate practical systems
Computer Networks and Internets -- Module 1 45 Spring, 2014
Copyright  2014. All rights reserved.
A Few Subtle Complications Of Layering
d Layering diagrams are abstract and simplistic
d Details and exceptions complicate practical systems
d Four examples
– Cross-layer communication
– Multiple protocols per layer
– Layering in an Internet
– Technologies that intertwine layers
Computer Networks and Internets -- Module 1 45 Spring, 2014
Copyright  2014. All rights reserved.
Example Of Cross-Layer Communication
d Facts
– A transport protocol selects amount of data to send in
each packet
– To optimize performance, ensure packets are full
d Unfortunately
– To find maximum packet size, transport protocol must
interact with a lower layer
Computer Networks and Internets -- Module 1 46 Spring, 2014
Copyright  2014. All rights reserved.
Multiple Protocols Per Layer
d Consider a typical computer
d User can run multiple applications simultaneously
– Email
– Web browser
d Computer can connect to multiple physical networks
– Wired Ethernet
– Wi-Fi wireless network
d Other layers have multiple protocols as well
Computer Networks and Internets -- Module 1 47 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Multiple Protocols At Each Layer
appl1 appl2 appl3
TCP UDP
IPv4 IPv6
wired interface wireless interface
Application
Transport
Internet
Net. Interface
Ethernet Wi-Fi Network
COMPUTER
Computer Networks and Internets -- Module 1 48 Spring, 2014
Copyright  2014. All rights reserved.
Layering In An Internet
d Our layering diagrams only show two computers connected
to a network
d The Internet contains multiple networks interconnected by
routers
d Routers only need layer 2 and layer 3 software to forward
packets across the Internet
Computer Networks and Internets -- Module 1 49 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Layers Used To Forward
Packets Across The Internet
application application
transport transport
Internet Internet
Internet
net interface net interface
net interface
net 1 net 2
Host A Host B
router
d In practice, routers do more than forward packets
d We will learn more later in the course
Computer Networks and Internets -- Module 1 50 Spring, 2014
Copyright  2014. All rights reserved.
Technologies That Intertwine Layers
d Cross-layer functions
– Routing protocols operate at layer 5 but change layer 3
forwarding tables
– Address resolution maps layer 3 addresses to layer 2
addresses
d Layer circularities
– Tunneling can be used to send IPv6 (a layer 3 protocol)
over IPv4 (another layer 3 protocol)
– Virtual Private Networks (VPNs) send IP over IP
Computer Networks and Internets -- Module 1 51 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Layering Used By A VPN
VPN
appl1 appl2
transport
Internet Internet
net interface
Physical net
Computer Networks and Internets -- Module 1 52 Spring, 2014
Copyright  2014. All rights reserved.
ISO 7-Layer Reference Model
Application
Presentation
Session
Transport
Network
Data Link
Physical
LAYER 1
LAYER 2
LAYER 3
LAYER 4
LAYER 5
LAYER 6
LAYER 7
d Prescriptive model formed before protocols were devised
d Created by committee vote
Computer Networks and Internets -- Module 1 53 Spring, 2014
Copyright  2014. All rights reserved.
ISO 7-Layer Reference Model
(continued)
d Model was defined when data networks connected dumb
terminals to large mainframes
d Session layer
– Handled details of login and control of send/ receive
– Provided opportunity for billing and accounting
d Presentation layer
– Defined data representation
– Primary intention was to map character sets
d Both layers now superfluous
Computer Networks and Internets -- Module 1 54 Spring, 2014
Copyright  2014. All rights reserved.
Unfortunately
d Marketing organizations decided seven is better than five
d Many textbooks and vendors claim to use “all seven layers”
Computer Networks and Internets -- Module 1 55 Spring, 2014
Copyright  2014. All rights reserved.
Summary
d Network systems can be open or closed
– Closed systems are created and owned by a single
company
– Open systems require that technology be specified in
standards documents that allow multiple companies to
build products
d A protocol standard can specify data and message
representation, rules for message exchange, error handling,
or low-level details such as voltage
Computer Networks and Internets -- Module 1 56 Spring, 2014
Copyright  2014. All rights reserved.
Summary
(continued)
d A layering model provides a conceptual framework that
helps protocol designers create a suite of protocols
d Implementation of layered protocols known as a stack
d Internet uses a 5-layer reference model
d Remainder of the course explores each layer
Computer Networks and Internets -- Module 1 57 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
An Alternative To Layering
Computer Networks and Internets -- Module 1 59 Spring, 2014
Copyright  2014. All rights reserved.
An Alternative To Layering
Hire really, really smart people and have them design a single,
large protocol that handles all aspects of communication
without dividing the problem into smaller subproblems
Computer Networks and Internets -- Module 1 59 Spring, 2014
Copyright  2014. All rights reserved.
A List Of All Practical
Alternatives To Layering
(this page intentionally left blank)
Computer Networks and Internets -- Module 1 60 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
MODULE II
Network Programming And Applications
Computer Networks and Internets -- Module 2 1 Spring, 2014
Copyright  2014. All rights reserved.
Topics
d Internet services and communication paradigms
d Client-server model and alternatives
d Network programming with a simplified API
d The socket API
d Application layer protocols
d Examples of standard application protocols
Computer Networks and Internets -- Module 2 2 Spring, 2014
Copyright  2014. All rights reserved.
Internet Services And
Communication Paradigms
General Principle: Intelligence At The Edge
The Internet does not provide services. Instead, the
Internet only provides communication, and application
programs provide all services.
Computer Networks and Internets -- Module 2 4 Spring, 2014
Copyright  2014. All rights reserved.
General Principle: Intelligence At The Edge
The Internet does not provide services. Instead, the
Internet only provides communication, and application
programs provide all services.
d Consequence
– Every Internet communication, including voice and
video teleconferencing, involves communication among
application programs
Computer Networks and Internets -- Module 2 4 Spring, 2014
Copyright  2014. All rights reserved.
Communication Paradigms
d The Internet offers two communication paradigms
2
222222222222222222222222222222222222222222222222222222222222222222
Stream Paradigm Message Paradigm
2
222222222222222222222222222222222222222222222222222222222222222222
Connection-oriented Connectionless
2
222222222222222222222222222222222222222222222222222222222222222222
1-to-1 communication Many-to-many communication
2
222222222222222222222222222222222222222222222222222222222222222222
Sequence of individual bytes Sequence of individual messages
2
222222222222222222222222222222222222222222222222222222222222222222
Arbitrary length transfer Each message limited to 64 Kbytes
2
222222222222222222222222222222222222222222222222222222222222222222
Used by most applications Used for multimedia applications
2
222222222222222222222222222222222222222222222222222222222222222222
Built on TCP protocol Built on UDP protocol
2
222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d Each paradigm has surprising characteristics
Computer Networks and Internets -- Module 2 5 Spring, 2014
Copyright  2014. All rights reserved.
Stream Paradigm (TCP)
d Transfers a sequence of bytes
d Connection-oriented: data sent between two applications
d Bidirectional (one stream in each direction)
d No meaning attached to data and no boundaries inserted in
data
d Surprising characteristic:
Although it delivers all bytes in sequence, the stream
paradigm does not guarantee that the chunks of bytes
passed to a receiving application correspond to the
chunks of bytes transferred by the sending application.
Computer Networks and Internets -- Module 2 6 Spring, 2014
Copyright  2014. All rights reserved.
Message Paradigm (UDP)
d Connectionless: network accepts and delivers individual
messages
d If the sender places N bytes in a message, a receiver will
find exactly N bytes in the incoming message
d Paradigm allows unicast, multicast, or broadcast delivery
(one destination, multiple destinations, or all destinations)
d Surprising characteristic:
Although it preserves boundaries, the message paradigm
allows messages to be lost, duplicated, or delivered out-
of-order; neither the sender nor receiver is informed
when such errors occur.
Computer Networks and Internets -- Module 2 7 Spring, 2014
Copyright  2014. All rights reserved.
Stream Transport And Data Chunks
d The protocol system may
– Divide the data from the sender into multiple segments
and deliver a few bytes at a time to the receiver
– Combine data from multiple transmissions into a single
large chunk and deliver it to the receiver all at once
d Consequence: receiving application cannot know exactly
which pieces were sent
Computer Networks and Internets -- Module 2 8 Spring, 2014
Copyright  2014. All rights reserved.
Example #1
d Assume a stream connection between two applications
d Sender
– Places 1000-byte message in buffer buf
– Makes a single request to send all 1000 bytes
d Receiver
– Allocates a buffer b with 1000 bytes
– Reads 1000 bytes from the stream into buffer b
d The OS may return between 1 and 1000 bytes
d Application must make repeated calls until all 1000 bytes
have been acquired
Computer Networks and Internets -- Module 2 9 Spring, 2014
Copyright  2014. All rights reserved.
Example #2
d Assume a stream connection between two applications
d Sender transmits a sequence of four messages that are each
100 bytes long
d Receiver allocates a large buffer b of 1000 bytes and
requests that up to 1000 bytes from stream be read into
buffer b
d The OS may choose to return all four messages (400 bytes)
with a single read request
d Receiving application must be able to separate received data
into four separate messages
Computer Networks and Internets -- Module 2 10 Spring, 2014
Copyright  2014. All rights reserved.
Programming Hints
Computer Networks and Internets -- Module 2 11 Spring, 2014
Copyright  2014. All rights reserved.
Programming Hints
d When using the stream paradigm
Computer Networks and Internets -- Module 2 11 Spring, 2014
Copyright  2014. All rights reserved.
Programming Hints
d When using the stream paradigm
– Devise a way that a receiver knows where a message
ends
– Read from a socket until the entire message has been
acquired
Computer Networks and Internets -- Module 2 11 Spring, 2014
Copyright  2014. All rights reserved.
Programming Hints
d When using the stream paradigm
– Devise a way that a receiver knows where a message
ends
– Read from a socket until the entire message has been
acquired
d When considering using the message paradigm
Computer Networks and Internets -- Module 2 11 Spring, 2014
Copyright  2014. All rights reserved.
Programming Hints
d When using the stream paradigm
– Devise a way that a receiver knows where a message
ends
– Read from a socket until the entire message has been
acquired
d When considering using the message paradigm
– Don’t (at least not yet)
Computer Networks and Internets -- Module 2 11 Spring, 2014
Copyright  2014. All rights reserved.
Identifying Individual Messages In A Stream
d Possibilities
– Send exactly one message followed by end of file (EOF)
– Send multiple messages with an integer length before
each message
– Send multiple messages with a termination character (or
sequence) following each message
d Notes
– Any technique can be used as long as both sides agree
– If sending a multi-byte length value or multi-byte
termination sequence, remember that the application may
need multiple calls receive all bytes
Computer Networks and Internets -- Module 2 12 Spring, 2014
Copyright  2014. All rights reserved.
Questions
Computer Networks and Internets -- Module 2 13 Spring, 2014
Copyright  2014. All rights reserved.
Questions
d In a realistic setting
– Is division of a message likely to occur?
– Is aggregation of multiple messages likely to occur?
Computer Networks and Internets -- Module 2 13 Spring, 2014
Copyright  2014. All rights reserved.
Questions
d In a realistic setting
– Is division of a message likely to occur?
– Is aggregation of multiple messages likely to occur?
d Answers
Computer Networks and Internets -- Module 2 13 Spring, 2014
Copyright  2014. All rights reserved.
Questions
d In a realistic setting
– Is division of a message likely to occur?
– Is aggregation of multiple messages likely to occur?
d Answers yes! (depending on the size of the messages)
– Messages larger than 1400 characters are usually divided
into multiple packets for transmission, and may be
delivered together or separately
– The stream service is designed to aggregate small
messages before making them available to a receiving
application
Computer Networks and Internets -- Module 2 13 Spring, 2014
Copyright  2014. All rights reserved.
Buffering In The Stream Paradigm
d Aggregation, which makes bulk transfer more efficient, can
occur on the sending or receiving side
d The stream paradigm includes a push operation that an
application can use to force transmission and delivery
d Unix convention: automatically push for each individual
write call
d Programming hints
– To ensure a small message is transmitted and delivered
without delay, use a separate write
– Even with push, network delays mean applications must
be written to tolerate aggregation
d More details later in the course
Computer Networks and Internets -- Module 2 14 Spring, 2014
Copyright  2014. All rights reserved.
Client-Server Model
And Alternatives
Client-Server Model Of Interaction
d Used by applications to establish communication
d One application acts as a server
– Starts execution first
– Awaits contact
d The other application becomes a client
– Starts after server is running
– Initiates contact
Computer Networks and Internets -- Module 2 16 Spring, 2014
Copyright  2014. All rights reserved.
Client-Server Model Of Interaction
d Used by applications to establish communication
d One application acts as a server
– Starts execution first
– Awaits contact
d The other application becomes a client
– Starts after server is running
– Initiates contact
d Important concept: once communication has been
established, data (e.g., requests and responses) can flow in
either direction between a client and server
Computer Networks and Internets -- Module 2 16 Spring, 2014
Copyright  2014. All rights reserved.
Characteristics Of A Client
d Arbitrary application program that becomes a client
temporarily
d Usually invoked directly by a user, and usually executes
only for one session
d Actively initiates contact with a server, exchanges messages,
and then terminates contact
d Can access multiple services as needed, but usually contacts
one remote server at a time
d Runs locally on a user’s personal computer or smart phone
d Does not require especially powerful computer hardware
Computer Networks and Internets -- Module 2 17 Spring, 2014
Copyright  2014. All rights reserved.
Characteristics Of A Server
d Special-purpose, privileged program dedicated to providing
a service
d Usually designed to handle multiple remote clients at the
same time
d Invoked automatically when a system boots, and continues
to execute through many client sessions
d Waits passively for contact from arbitrary remote clients and
then exchanges messages
d Requires powerful hardware and a sophisticated operating
system
d Runs on a large, powerful computer
Computer Networks and Internets -- Module 2 18 Spring, 2014
Copyright  2014. All rights reserved.
Characteristics Of A Server
d Special-purpose, privileged program dedicated to providing
a service
d Usually designed to handle multiple remote clients at the
same time — complicates the design
d Invoked automatically when a system boots, and continues
to execute through many client sessions
d Waits passively for contact from arbitrary remote clients and
then exchanges messages
d Requires powerful hardware and a sophisticated operating
system
d Runs on a large, powerful computer
Computer Networks and Internets -- Module 2 18 Spring, 2014
Copyright  2014. All rights reserved.
Server Programs And Server-Class Computers
d Confusion exists between scientific and marketing
terminology
d Scientific: a client and a server are each programs
d Marketing: a server is a powerful computer
Internet
connection
client runs
in a standard
computer
server runs in
a server-class
computer
Computer Networks and Internets -- Module 2 19 Spring, 2014
Copyright  2014. All rights reserved.
Summary Of Client-Server Interaction
2
222222222222222222222222222222222222222222222222222222222222222222222
Server Application Client Application
2
222222222222222222222222222222222222222222222222222222222222222222222
Starts first Starts second
2
222222222222222222222222222222222222222222222222222222222222222222222
Does not need to know which client Must know which server to
will contact it contact
2
222222222222222222222222222222222222222222222222222222222222222222222
Waits passively and arbitrarily long Initiates a contact whenever
for contact from a client communication is needed
2
222222222222222222222222222222222222222222222222222222222222222222222
Communicates with a client by Communicates with a server by
sending and receiving data sending and receiving data
2
222222222222222222222222222222222222222222222222222222222222222222222
Stays running after servicing one May terminate after interacting
client, and waits for another with a server
2
222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 2 20 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Steps Taken By Client And Server
Internet
Client Side
d Agree a priori on a
port number, N
d Start after server is
already running
d Obtain server name
from user
d Use DNS to translate
name to IP address
d Contact server using IP
address and port N
d Interact with server and
then exit
Server Side
d Agree a priori on a
port number, N
d Start before any of
the clients
d Register port N with
the local system
d Wait for contact
from a client
d Interact with client
until client finishes
d Wait for contact from
the next client...
Computer Networks and Internets -- Module 2 21 Spring, 2014
Copyright  2014. All rights reserved.
Alternatives To Client-Server
Computer Networks and Internets -- Module 2 22 Spring, 2014
Copyright  2014. All rights reserved.
Alternatives To Client-Server
d Broadcast
– Sender broadcasts message and all stations receive it
– Does not scale well (becomes inefficient)
– Difficult to restrict data access
Computer Networks and Internets -- Module 2 22 Spring, 2014
Copyright  2014. All rights reserved.
Alternatives To Client-Server
d Broadcast
– Sender broadcasts message and all stations receive it
– Does not scale well (becomes inefficient)
– Difficult to restrict data access
d Rendezvous point
– Intermediary connects communicating applications
– In essence, there are two clients and a server
– Rendezvous point becomes a bottleneck
Computer Networks and Internets -- Module 2 22 Spring, 2014
Copyright  2014. All rights reserved.
Alternatives To Client-Server
(continued)
d Peer-To-Peer Interaction
– Designed to avoid central server bottleneck
– Data divided among N computers
– Each computer acts as a server for its data and as a
client for other data
– Given computer receives 1 / N of the traffic
Internet
1/ N of all traffic
Computer Networks and Internets -- Module 2 23 Spring, 2014
Copyright  2014. All rights reserved.
Network Programming With
A Simplified API
Network Programming
d General term that refers to the creation of client and server
applications that communicate over a network
d Programmer uses an Application Program Interface (API)
– Set of functions
– Include control as well as data transfer functions (e.g.,
establish and terminate communication)
d Defined by the operating system; not part of the Internet
standards
d Socket API has become a de facto standard
Computer Networks and Internets -- Module 2 25 Spring, 2014
Copyright  2014. All rights reserved.
A Simplified API
d Will help you get started
d General idea
– Server is identified by pair (computer, application)
– Server starts first and waits for contact
– Client specifies server’s location
– Once a connection is established, client and server can
exchange data
d Only seven functions in the simplified API
Computer Networks and Internets -- Module 2 26 Spring, 2014
Copyright  2014. All rights reserved.
Our Simplified API
2222222222222222222222222222222222222222222222222222222222222222222222
Operation Meaning
2222222222222222222222222222222222222222222222222222222222222222222222
await_contact Used by a server to wait for contact from a
client
2222222222222222222222222222222222222222222222222222222222222222222222
make_contact Used by a client to contact a server
2222222222222222222222222222222222222222222222222222222222222222222222
appname_to_appnum
Used to translate a program name to an
equivalent internal binary value
2222222222222222222222222222222222222222222222222222222222222222222222
cname_to_comp
Used to translate a computer name to an
equivalent internal binary value
2222222222222222222222222222222222222222222222222222222222222222222222
send Used by either client or server to send data
2222222222222222222222222222222222222222222222222222222222222222222222
recv Used by either client or server to receive data
2222222222222222222222222222222222222222222222222222222222222222222222
send_eof
Used by both client and server after they have
finished sending data
2222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 2 27 Spring, 2014
Copyright  2014. All rights reserved.
Client And Server Using The API
d Sequence of calls for a trivial exchange in which a client
sends a single request and the server responds
Server
await_contact
recv
send
send_eof
Client
make_contact
send
recv
send_eof
d Both sides must call send_eof because communication is
bidirectional
Computer Networks and Internets -- Module 2 28 Spring, 2014
Copyright  2014. All rights reserved.
Data Types For Our Simplified API
22222222222222222222222222222222222222222222222222222222222
Type Name Meaning
22222222222222222222222222222222222222222222222222222222222
appnum A binary value used to identify an application
22222222222222222222222222222222222222222222222222222222222
computer A binary value used to identify a computer
22222222222222222222222222222222222222222222222222222222222
connection A value used to identify the connection
between a client and server
22222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 2 29 Spring, 2014
Copyright  2014. All rights reserved.
An Extra Function For Convenience
d Simplified API includes an extra function, recvln
d Not required, but convenient
d Similar to recv
– Receives data from a connection
– Places data in a buffer
d Difference
– Reads exactly the amount requested
– Technique: repeatedly call recv until specified length has
been acquired
Computer Networks and Internets -- Module 2 30 Spring, 2014
Copyright  2014. All rights reserved.
Argument Types For Our API
2
222222222222222222222222222222222222222222222222222222222222222222222222
Function Type Type of Type of Type of
Name Returned arg 1 arg 2 args 3–4
2
222222222222222222222222222222222222222222222222222222222222222222222222
await_contact connection appnum – –
2
222222222222222222222222222222222222222222222222222222222222222222222222
make_contact connection computer appnum –
2
222222222222222222222222222222222222222222222222222222222222222222222222
appname_to_appnum appnum char * – –
2
222222222222222222222222222222222222222222222222222222222222222222222222
cname_to_comp computer char * – –
2
222222222222222222222222222222222222222222222222222222222222222222222222
send int connection char * int
2
222222222222222222222222222222222222222222222222222222222222222222222222
recv int connection char * int
2
222222222222222222222222222222222222222222222222222222222222222222222222
recvln int connection char * int
2
222222222222222222222222222222222222222222222222222222222222222222222222
send_eof int connection – –
2
222222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d You will learn more in the PSOs
Computer Networks and Internets -- Module 2 31 Spring, 2014
Copyright  2014. All rights reserved.
The Socket API
Sockets
d Originally part of BSD Unix
d Now standard in the industry
d AT&T defined an alternative named TLI (Transport Layer
Interface), but TLI is now extinct
d Almost every OS includes an implementation
d MS Windows chose to make minor changes (annoying)
Computer Networks and Internets -- Module 2 33 Spring, 2014
Copyright  2014. All rights reserved.
Socket Characteristics
d Socket can be used for
– Connectionless communication (UDP message)
– Connection-oriented communication (TCP stream)
d Many functions in the API
d Approach
– Create a socket
– Make many function calls to specify type of
communication, remote computer’s address, port number
to be used, etc.
– Use socket to send / receive data
– Close the socket (terminate use)
Computer Networks and Internets -- Module 2 34 Spring, 2014
Copyright  2014. All rights reserved.
Example Socket Calls For Stream Communication
CLIENT SIDE SERVER SIDE
socket
connect
send
recv
close
socket
bind
listen
accept
recv
send
close
Computer Networks and Internets -- Module 2 35 Spring, 2014
Copyright  2014. All rights reserved.
Application Layer Protocols
Terminology
d Availability of an application protocol
– Closed — vendor defines a protocol for their products
– Open — standardized and available for all vendors
d Basic protocol types
– Data representation — message and data formats
– Data transfer — procedures for exchanging messages
and handling unexpected / error conditions
d Notes
– Application may define separate protocol for each type
– Term Transfer in a protocol title indicates the latter
Computer Networks and Internets -- Module 2 37 Spring, 2014
Copyright  2014. All rights reserved.
Defining An Application Layer Protocol
d Programmer specifies representation
– Format of each message and each data item
– Meaning of each item in a message
d Programmer specifies transfer
– Which side sends first
– Which side closes the connection first
– What to do if one side crashes unexpectedly
Computer Networks and Internets -- Module 2 38 Spring, 2014
Copyright  2014. All rights reserved.
State In An Application Protocol
d Big decision: should state information be kept?
d Stateful protocol assumes previous requests have been
honored
d Stateless protocol assumes each request is independent
d Example of stateful interaction
– Request 1 specifies “read from file X”
– Request 2 specifies “read next 128 bytes”
d Example of stateless interaction
– Request 1 specifies “read bytes 0-127 from file X”
– Request 2 specifies “read bytes 128-255 from file X”
Computer Networks and Internets -- Module 2 39 Spring, 2014
Copyright  2014. All rights reserved.
Examples Of Standard
Application Protocols
Application Protocol Examples
d Web browsing
d Email
d File transfer
d Remote login and remote desktop
d Domain Name System (name lookup)
Computer Networks and Internets -- Module 2 41 Spring, 2014
Copyright  2014. All rights reserved.
Application Protocol Examples
d Web browsing
d Email
d File transfer
d Remote login and remote desktop
d Domain Name System (name lookup)
Computer Networks and Internets -- Module 2 41 Spring, 2014
Copyright  2014. All rights reserved.
Application-Layer Protocols For The Web
2
222222222222222222222222222222222222222222222222222222222222222222222
Standard Purpose
2
222222222222222222222222222222222222222222222222222222222222222222222
HyperText Markup A representation standard used to specify the
Language (HTML) contents and layout of a web page
2
222222222222222222222222222222222222222222222222222222222222222222222
Uniform Resource A representation standard that specifies the
Locator (URL) format and meaning of a web page identifier
2
222222222222222222222222222222222222222222222222222222222222222222222
HyperText Transfer A transfer protocol that specifies how a browser
Protocol (HTTP) interacts with a web server to transfer data
2
222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d Reminder: keyword Transfer in the name of a protocol
means the protocol specifies message exchange
Computer Networks and Internets -- Module 2 42 Spring, 2014
Copyright  2014. All rights reserved.
HyperText Markup Language (HTML)
d Representation standard for multimedia documents
d Specifies document is entirely in printable text
d Uses declarative rather than procedural approach
d Document includes metadata that can link to arbitrary item
d Document contains markup guidelines rather than precise,
detailed formatting or typesetting instructions
– Page can be displayed on arbitrary device
– Appearance depends on device
d Embedded tags control display
– Form is <tag_name> and </tag_name>
Computer Networks and Internets -- Module 2 43 Spring, 2014
Copyright  2014. All rights reserved.
Uniform Resource Locator (URL)
d Representation standard
d A text string with punctuation characters separating the
string into (optional) subfields
d General form is:
protocol:// computer_name : port / document_name ? parameters
d Example where protocol, port, and parameters are omitted:
www . cs . purdue . edu / people / comer
Computer Networks and Internets -- Module 2 44 Spring, 2014
Copyright  2014. All rights reserved.
HyperText Transfer Protocol (HTTP)
d Transfer protocol used with the Web
d Specifies format and meaning of messages
d Each message represented as text
d Transfers arbitrary binary data
d Can download or upload data
d Incorporates caching for efficiency
d Browser sends request to server
Computer Networks and Internets -- Module 2 45 Spring, 2014
Copyright  2014. All rights reserved.
Four Major HTTP Request Types
2
222222222222222222222222222222222222222222222222222222222222222222222222
Request Description
2
222222222222222222222222222222222222222222222222222222222222222222222222
GET
Requests a document; server responds by sending status
information followed by a copy of the document
2
222222222222222222222222222222222222222222222222222222222222222222222222
HEAD
Requests status information; server responds by sending
status information, but does not send a copy of the document
2
222222222222222222222222222222222222222222222222222222222222222222222222
POST
Sends data to a server; the server appends the data to a
specified item (e.g., a message is appended to a list)
2
222222222222222222222222222222222222222222222222222222222222222222222222
PUT
Sends data to a server; the server uses the data to completely
replace the specified item (i.e., overwrites the previous data)
2
222222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d GET request has the form:
GET /item version CRLF
d Version is HTTP/1.0 or HTTP/1.1
Computer Networks and Internets -- Module 2 46 Spring, 2014
Copyright  2014. All rights reserved.
HTTP Response
d Response begins with a header in text, optionally followed
by an item (which can be binary)
d Header uses keyword: information form like email header
d Header ends with a blank line
Computer Networks and Internets -- Module 2 47 Spring, 2014
Copyright  2014. All rights reserved.
HTTP Header Format
d General form
HTTP/1.0 status_code status_string CRLF
Server: server_identification CRLF
Last-Modified: date_document_was_changed CRLF
Content-Length: datasize CRLF
Content-Type: document_type CRLF
CRLF
... item begins here and contains datasize bytes ...
Computer Networks and Internets -- Module 2 48 Spring, 2014
Copyright  2014. All rights reserved.
Telnet Example (Apache Web Server)
$ telnet www.cs.purdue.edu 80
Trying 128.10.19.20...
Connected to lucan.cs.purdue.edu.
Escape character is ’^]’.
GET /homes/comer/ HTTP/1.0
HTTP/1.1 200 OK
Date: Sun, 10 Nov 2013 11:38:27 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8r
Last-Modified: Mon, 17 Oct 2011 22:21:41 GMT
ETag: "bafb0-a50-4af8607f7c740"
Accept-Ranges: bytes
Content-Length: 2640
Connection: close
Content-Type: text/html
...data from the web page follows here
Computer Networks and Internets -- Module 2 49 Spring, 2014
Copyright  2014. All rights reserved.
Application Protocol Examples
d Web browsing
d Email
d File transfer
d Remote login and remote desktop
d Domain Name System (name lookup)
Computer Networks and Internets -- Module 2 50 Spring, 2014
Copyright  2014. All rights reserved.
Original End-To-End Email Paradigm
Internet
direct transfer
d Each computer runs
– Email server to accept incoming email
– Email client to send outgoing email
d Incoming mail deposited in user’s mailbox
d Outgoing mail placed in queue
d User interface to read or compose messages separate from
transfer applications
Computer Networks and Internets -- Module 2 51 Spring, 2014
Copyright  2014. All rights reserved.
Current Email Paradigm
server
at ISP
server
at ISP
Internet
email transfer
protocol used
email access
protocol used
email access
protocol used
d User’s mailbox located on separate computer (usually at an
ISP)
d Mail transfer application deposits message in mailbox
d User interface application accesses remote mailbox
– A web browser may be used as an access mechanism
– Special-purpose applications also exist
Computer Networks and Internets -- Module 2 52 Spring, 2014
Copyright  2014. All rights reserved.
Simple Mail Transfer Protocol (SMTP)
d Standard for email transfer
d Follows a stream paradigm
d Uses textual control messages
d Only transfers text messages
d Terminates message with <CR> <LF> . <CR> <LF>
d Allows a sender to specify recipients’ names and checks
each name
d Sends only one copy of a message to a computer, even if
destined to multiple recipients on the computer
Computer Networks and Internets -- Module 2 53 Spring, 2014
Copyright  2014. All rights reserved.
Example SMTP Session
S: 220 somewhere.com Simple Mail Transfer Service Ready
C: HELO example.edu
S: 250 OK
C: MAIL FROM:<John_Q_Smith@example.edu>
S: 250 OK
C: RCPT TO:<Mathew_Doe@somewhere.com>
S: 550 No such user here
C: RCPT TO:<Paul_Jones@somewhere.com>
S: 250 OK
C: DATA
S: 354 Start mail input; end with <CR><LF>.<CR><LF>
C: ...sends body of mail message, which can contain
C: ...arbitrarily many lines of text
C: <CR><LF>.<CR><LF>
S: 250 OK
C: QUIT
S: 221 somewhere.com closing transmission channel
Computer Networks and Internets -- Module 2 54 Spring, 2014
Copyright  2014. All rights reserved.
Mail Access Protocols
d Two standard protocols
– Post Office Protocol version 3 (POP3)
– Internet Mail Access Protocol (IMAP)
d Functionality
– Provide access to a user’s mailbox
– Permit user to view headers, download, delete, or send
individual messages
– Client runs on user’s personal computer
– Server runs on a computer that stores user’s mailbox
Computer Networks and Internets -- Module 2 55 Spring, 2014
Copyright  2014. All rights reserved.
RFC2822 Mail Message Format
d Email representation standard
d Name derived from the Internet standard in which it is
defined
d Specifies
– Email message consists of text file
– Blank line separates header from body
– Header lines have the form:
Keyword: information
Computer Networks and Internets -- Module 2 56 Spring, 2014
Copyright  2014. All rights reserved.
RFC2822 Mail Message Format
(continued)
d Some keywords have defined meanings:
– From:
– To:
– Subject:
– Cc:
d Keywords starting with uppercase X have no effect
Computer Networks and Internets -- Module 2 57 Spring, 2014
Copyright  2014. All rights reserved.
RFC2822 Mail Message Format
(continued)
d Some keywords have defined meanings:
– From:
– To:
– Subject:
– Cc:
d Keywords starting with uppercase X have no effect
d Examples:
X-Best-networking-Course: CS422 at Purdue
X-Spam-Check-Results: bulk spam 90% likely
X-Worst-TV-Shows: any reality show
Computer Networks and Internets -- Module 2 57 Spring, 2014
Copyright  2014. All rights reserved.
Multimedia Email
Computer Networks and Internets -- Module 2 58 Spring, 2014
Copyright  2014. All rights reserved.
Multimedia Email
d Observe
– Email was standardized when computers only had
character-oriented (textual) interfaces
– SMTP is limited to transferring plain text messages
– Users want to email photos, spreadsheets, messages with
special fonts and color
Computer Networks and Internets -- Module 2 58 Spring, 2014
Copyright  2014. All rights reserved.
Multimedia Email
d Observe
– Email was standardized when computers only had
character-oriented (textual) interfaces
– SMTP is limited to transferring plain text messages
– Users want to email photos, spreadsheets, messages with
special fonts and color
d Question: can SMTP be used to transfer such email?
Computer Networks and Internets -- Module 2 58 Spring, 2014
Copyright  2014. All rights reserved.
Multimedia Email
d Observe
– Email was standardized when computers only had
character-oriented (textual) interfaces
– SMTP is limited to transferring plain text messages
– Users want to email photos, spreadsheets, messages with
special fonts and color
d Question: can SMTP be used to transfer such email?
d Answer: it is possible because one can encode arbitrary
binary items in plain text (think of a hex dump)
Computer Networks and Internets -- Module 2 58 Spring, 2014
Copyright  2014. All rights reserved.
Sending Non-Text Email
d Standard is MIME (Multimedia Internet Mail Extensions)
d Backward compatible with RFC2822 mail and SMTP
d Sender
– Encodes arbitrary binary item in plain text
– Adds lines to email header to specify MIME
– Places additional headers before each item in the
message (including plain text items)
d Sender can specify content type and encoding
d Standard includes Base64 encoding
Computer Networks and Internets -- Module 2 59 Spring, 2014
Copyright  2014. All rights reserved.
Examples Of Mime Headers
d MIME header lines added to other RFC2822 headers
MIME-Version: 1.0
Content-Type: Multipart/Mixed; Boundary=xyz123
d Each part of the message has a MIME header that starts
with the separator and specifies content type and encoding
d Example
--xyz123
Content-Type: image/jpeg
←blank line ends header
Computer Networks and Internets -- Module 2 60 Spring, 2014
Copyright  2014. All rights reserved.
Application Protocol Examples
d Web browsing
d Email
d File transfer
d Remote login and remote desktop
d Domain Name System (name lookup)
Computer Networks and Internets -- Module 2 61 Spring, 2014
Copyright  2014. All rights reserved.
File Transfer
d Standard is the File Transfer Protocol (FTP)
d Once accounted for the most packets on the Internet
d Interesting communication paradigm
– Client forms a control connection to send requests
– Server forms data connection for each file transferred
– Server closes data connection after transfer complete
d Notes
– Using a separate connection allows arbitrary data
transfer
– For data connections, the server becomes a client and the
client becomes a server (important for NAT)
Computer Networks and Internets -- Module 2 62 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of FTP Communication
server
client
client forms a control connection
client sends directory request over the control connection
server forms a data connection
server sends directory listing over the data connection
server closes the data connection
client sends download request over the control connection
server forms a data connection
server sends a copy of the file over the data connection
server closes the data connection
client sends a QUIT command over control connection
client closes the control connection
Computer Networks and Internets -- Module 2 63 Spring, 2014
Copyright  2014. All rights reserved.
Application Protocol Examples
d Web browsing
d Email
d File transfer
d Remote login and remote desktop
d Domain Name System (name lookup)
Computer Networks and Internets -- Module 2 64 Spring, 2014
Copyright  2014. All rights reserved.
Remote Login And Remote Desktop
d Remote login
– Intended for systems with command-line interface
– Internet standard is TELNET
– Secure shell (ssh) encrypts transfers
– To appreciate the complexity of application protocols
look at the TELNET standard
Computer Networks and Internets -- Module 2 65 Spring, 2014
Copyright  2014. All rights reserved.
Remote Login And Remote Desktop
d Remote login
– Intended for systems with command-line interface
– Internet standard is TELNET
– Secure shell (ssh) encrypts transfers
– To appreciate the complexity of application protocols
look at the TELNET standard
d Remote desktop
– Intended for systems that have a Graphical User
Interface (GUI)
– No Internet standards
– Move to thin client has revived interest
Computer Networks and Internets -- Module 2 65 Spring, 2014
Copyright  2014. All rights reserved.
Application Protocol Examples
d Web browsing
d Email
d File transfer
d Remote login and remote desktop
d Domain Name System (name lookup)
Computer Networks and Internets -- Module 2 66 Spring, 2014
Copyright  2014. All rights reserved.
Domain Name System (DNS)
d Important piece of Internet infrastructure
d Runs at the application layer
d Translates human-readable names into the binary addresses
used by the Internet Protocol
d Example
– Computer www.cs.purdue.edu
– Has the IP address 128.10.19.20
Computer Networks and Internets -- Module 2 67 Spring, 2014
Copyright  2014. All rights reserved.
DNS Terminology
d Names are hierarchical
d Each name divided into segments by period character, which
is read “dot”
d Most significant segment is on the right
d Rightmost segment known as a top-level domain (TLD)
d Client program known as a resolver
– Used by web browser, email, etc
Computer Networks and Internets -- Module 2 68 Spring, 2014
Copyright  2014. All rights reserved.
Top-Level Domains
2222222222222222222222222222222222222222222222222222
Domain Name Assigned To
2222222222222222222222222222222222222222222222222222
aero Air transport industry
2222222222222222222222222222222222222222222222222222
arpa Infrastructure domain
2222222222222222222222222222222222222222222222222222
asia For or about Asia
2222222222222222222222222222222222222222222222222222
biz Businesses
2222222222222222222222222222222222222222222222222222
com Commercial organizations
2222222222222222222222222222222222222222222222222222
coop Cooperative associations
2222222222222222222222222222222222222222222222222222
edu Educational institutions
2222222222222222222222222222222222222222222222222222
gov United States government
2222222222222222222222222222222222222222222222222222
info Information
2222222222222222222222222222222222222222222222222222
int International treaty organizations
2222222222222222222222222222222222222222222222222222
jobs Human resource managers
2222222222222222222222222222222222222222222222222222
mil United States military
2222222222222222222222222222222222222222222222222222
mobi Mobile content providers
2222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 2 69 Spring, 2014
Copyright  2014. All rights reserved.
Top-Level Domains
(continued)
2
2222222222222222222222222222222222222222222222222
Domain Name Assigned To
2
2222222222222222222222222222222222222222222222222
museum Museums
2
2222222222222222222222222222222222222222222222222
name Individuals
2
2222222222222222222222222222222222222222222222222
net Major network support centers
2
2222222222222222222222222222222222222222222222222
org Non-commercial organizations
2
2222222222222222222222222222222222222222222222222
pro Credentialed professionals
2
2222222222222222222222222222222222222222222222222
travel Travel and tourism
2
2222222222222222222222222222222222222222222222222
xxx Adult entertainment (porn)
2
2222222222222222222222222222222222222222222222222
country code A sovereign nation
2
2222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d In 2014, ICANN decided to allow many new TLDs
Computer Networks and Internets -- Module 2 70 Spring, 2014
Copyright  2014. All rights reserved.
Domain Registration
d Organization
– Applies under a specific top-level domain
– Can choose an internal hierarchy
– Assigns each computer a name
d Geographic registration is possible
cnri.reston.va.us
d Some countries impose conventions
– Universities in Great Britain register under
ac.uk
Computer Networks and Internets -- Module 2 71 Spring, 2014
Copyright  2014. All rights reserved.
Domains With Most Hosts (July 2013)
2
22222222222222222222222222222222222222222222
Domain Hosts Explanation
2
22222222222222222222222222222222222222222222
net 366592151 Networks
com 163634309 Commercial
jp 74461142 Japan
de 34904481 Germany
br 33691951 Brazil
it 26136473 Italy
cn 19976554 China
mx 17658991 Mexico
fr 17437386 France
au 16900586 Australia
ru 15122103 Russian Federation
nl 14011944 Netherlands
pl 14011944 Poland
ar 13335042 Argentina
edu 12251571 Educational
ca 9004861 Canada
uk 8116718 United Kingdom
in 7429638 India
tr 7146979 Turkey
tw 6429021 Taiwan
2
22222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d See domain survey at www . isc . org for details
Computer Networks and Internets -- Module 2 72 Spring, 2014
Copyright  2014. All rights reserved.
Host Names and Services Offered
d Many organizations choose a host name to match the service
a computer offers
mail.foobar.com
ftp.foobar.com
www.foobar.com
d Although convenient for humans, a host name does not
specify which servers are running (e,g., a computer named
mail could run a web server)
Computer Networks and Internets -- Module 2 73 Spring, 2014
Copyright  2014. All rights reserved.
DNS Servers
d Names divided into a hierarchy of servers
d Multiple groupings possible
d Hypothetical example
com
foobar
candy soap
peanut almond walnut
(a)
root server
server for
foobar.com
server for
candy.foobar.com
com
foobar
candy soap
peanut almond walnut
(b)
root server
server for
walnut.candy.foobar.com
server for
foobar.com
Computer Networks and Internets -- Module 2 74 Spring, 2014
Copyright  2014. All rights reserved.
Name Resolution And Caching
d Resolver
– Acts as a client
– Is configured with address of local DNS server
– Contacts local server first
– Socket library resolver is gethostbyname
d Caching
– Follows locality of reference principle
– Each DNS server caches results
– Cached item never kept when stale
Computer Networks and Internets -- Module 2 75 Spring, 2014
Copyright  2014. All rights reserved.
DNS Server Algorithm Part 1
Given:
A request message from a DNS name resolver
Provide:
A response message that contains the address
Method:
Extract the name, N, from the request
if ( server is an authority for N ) {
Form and send an authoritative response
to the requester;
else if ( answer for N is in the cache ) {
Form and send a nonauthoritative response
to the requester;
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 2 76 Spring, 2014
Copyright  2014. All rights reserved.
DNS Server Algorithm Part 2
else { /* Need to look up an answer */
if ( authority server for N is known ) {
Send request to authority server;
} else {
Send request to root server;
}
Receive response and place in cache;
Form and send a response to the requester;
}
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1 11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2222222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 2 77 Spring, 2014
Copyright  2014. All rights reserved.
Summary
d Applications provide all Internet services
d Internet offers connection-oriented stream communication or
connectionless message communication
d Most applications follow client-server approach
– Server starts first and awaits client
– Client contacts server
d Socket API is a de facto standard
d Application-layer protocol can define
– Data and message formats (representation)
– Rules for message exchange (transfer)
Computer Networks and Internets -- Module 2 78 Spring, 2014
Copyright  2014. All rights reserved.
Summary
(continued)
d Applications reviewed include
– Web (URL, HTML, HTTP)
– Email (SMTP, RFC2822, MIME)
– File transfer (FTP)
– Remote login and remote desktop (TELNET)
– Domain Name System (DNS)
Computer Networks and Internets -- Module 2 79 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
MODULE III
Foundations Of Data Communications
And The Physical Layer
Computer Networks and Internets -- Module 3 1 Spring, 2014
Copyright  2014. All rights reserved.
Topics
d Motivation and model
d Information sources and signals
d Transmission media
d Reliability and channel coding
d Transmission modes
d Modulation and demodulation
d Multiplexing and demultiplexing (channelization)
Computer Networks and Internets -- Module 3 2 Spring, 2014
Copyright  2014. All rights reserved.
Motivation And Model
What Is Data Communications?
d Broad field of study
d Usually associated with the Physical Layer
d Touches on
– Physics
– Mathematics
– Engineering
d Includes
– Transmission of signals
– Encoding data
– Modulation and multiplexing
Computer Networks and Internets -- Module 3 4 Spring, 2014
Copyright  2014. All rights reserved.
Motivation
d Find ways to transmit analog and digital information
– Using natural phenomena (e.g., electromagnetic
radiation)
– Allow multiple senders to share a transmission medium
d Data communications provides
– A conceptual framework
– Mathematical basis
Computer Networks and Internets -- Module 3 5 Spring, 2014
Copyright  2014. All rights reserved.
Key Concept
Although we tend to think of analog and digital communication
separately, ultimately, all communication uses the same
physical phenomena, usually electromagnetic energy.
d Differences lie in the way the physical phenomena are used
– Analog: use all values in a continuous range
– Digital: restrict use to a fixed set of values, usually two
d Data communications covers both analog and digital
Computer Networks and Internets -- Module 3 6 Spring, 2014
Copyright  2014. All rights reserved.
Conceptual Framework For Data Communications
Physical Channel
(noise & interference)
Modulator
Multiplexor
Channel Encoder
Encryptor (Scrambler)
Source Encoder
Information Source 1
Channel Encoder
Encryptor (Scrambler)
Source Encoder
Information Source N
Demodulator
Demultiplexor
Channel Decoder
Decryptor (Unscrambler)
Source Decoder
Destination 1
Channel Decoder
Decryptor (Unscrambler)
Source Decoder
Destination N
. . .
. . .
Computer Networks and Internets -- Module 3 7 Spring, 2014
Copyright  2014. All rights reserved.
Information Sources
And Signals
Sources Of Information
d An input signal can arise from
– Transducer such as a microphone
– Receiver such as an Ethernet interface
d We use the term signal processing to describe the
recognition and transformation of signals
Computer Networks and Internets -- Module 3 9 Spring, 2014
Copyright  2014. All rights reserved.
Sine Waves
Computer Networks and Internets -- Module 3 10 Spring, 2014
Copyright  2014. All rights reserved.
Sine Waves
d Fundamental because sine waves characterize many natural
phenomena
d Examples
– Audible tones
– Radio waves
– Light energy
Computer Networks and Internets -- Module 3 10 Spring, 2014
Copyright  2014. All rights reserved.
Fourier Analysis
d Multiple sine waves can be added together
– Result is known as a composite wave
– Corresponds to combining multiple signals (e.g., playing
two musical tones at the same time)
d Mathematician named Fourier discovered how to decompose
an arbitrary composite wave into individual sine waves
d Fourier analysis provides the mathematical basis for signal
processing
d Bad news: according to Fourier, a digital wave decomposes
into an infinite set of sine waves
Computer Networks and Internets -- Module 3 11 Spring, 2014
Copyright  2014. All rights reserved.
Sine Wave Characteristics
d Three important characteristics are used in networks:
frequency, amplitude, and phase
0
1 sec
2 sec
1
-1
t
(a) Original sine wave: sin(2πt)
Computer Networks and Internets -- Module 3 12 Spring, 2014
Copyright  2014. All rights reserved.
Sine Wave Characteristics
d Three important characteristics are used in networks:
frequency, amplitude, and phase
0 0
1 sec
0.5 sec
2 sec
1
-1
t
2 sec
1
-1
t
(a) Original sine wave: sin(2πt) (b) Higher frequency: sin(2π2t)
Computer Networks and Internets -- Module 3 12 Spring, 2014
Copyright  2014. All rights reserved.
Sine Wave Characteristics
d Three important characteristics are used in networks:
frequency, amplitude, and phase
0 0
0
1 sec
1 sec
0.5 sec
2 sec
1
-1
t
2 sec
1
-1
t
2 sec
1
-1
t
(a) Original sine wave: sin(2πt) (b) Higher frequency: sin(2π2t)
(c) Lower amplitude: 0.4 sin(2πt)
Computer Networks and Internets -- Module 3 12 Spring, 2014
Copyright  2014. All rights reserved.
Sine Wave Characteristics
d Three important characteristics are used in networks:
frequency, amplitude, and phase
0 0
0 0
1 sec
1 sec 1 sec
0.5 sec
2 sec
1
-1
t
2 sec
1
-1
t
2 sec
1
-1
t
2 sec
1
-1
t
(a) Original sine wave: sin(2πt) (b) Higher frequency: sin(2π2t)
(c) Lower amplitude: 0.4 sin(2πt) (d) New phase: sin(2πt+1.5π)
Computer Networks and Internets -- Module 3 12 Spring, 2014
Copyright  2014. All rights reserved.
Definition Of Analog Bandwidth
d Decompose a signal into a set of sine waves and take the
difference between the highest and lowest frequency
d Easy to compute from a frequency domain plot
d Example signal with bandwidth of 4 Kilohertz (KHz):
1
0
1 2 3 4 5 6
frequency (in KHz)
amplitude
bandwidth
Computer Networks and Internets -- Module 3 13 Spring, 2014
Copyright  2014. All rights reserved.
Digital Signals And Signal Levels
d A digital signal level can represent multiple bits
d Example
0
+5
time
amplitude
1
0
1 1
0 0 0
1
two levels with a
single bit per level
8 bits sent
Computer Networks and Internets -- Module 3 14 Spring, 2014
Copyright  2014. All rights reserved.
Digital Signals And Signal Levels
d A digital signal level can represent multiple bits
d Example
0
+5
time
amplitude
-5
-2
+2
+5
time
amplitude
1
0
1 1
0 0 0
1 11
10
00 00
01
11
01
10
two levels with a
single bit per level
four levels with
two bits per level
8 bits sent 16 bits sent
Computer Networks and Internets -- Module 3 14 Spring, 2014
Copyright  2014. All rights reserved.
Digital Signals And Signal Levels
d A digital signal level can represent multiple bits
d Example
0
+5
time
amplitude
-5
-2
+2
+5
time
amplitude
1
0
1 1
0 0 0
1 11
10
00 00
01
11
01
10
two levels with a
single bit per level
four levels with
two bits per level
8 bits sent 16 bits sent
d Baud rate is number of times signal changes per second;
data rate in bits per second = baud ×
J
Q
log2( levels )
J
P
Computer Networks and Internets -- Module 3 14 Spring, 2014
Copyright  2014. All rights reserved.
Converting Digital To Analog
d Approximate digital signal with a composite of sine waves:
t
.................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.................
.
.
.
.
.
.
.
.
.
.
.
.................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.................
.
.
.
.
.
.
.
.
.
.
.
.................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.................
.
.
.
.
.
.
.
.
.
.
.
(a) digital signal (b) sin(2πt/2)
(c) sin(2πt/2)+α sin(2π3t/2) (d) sin(2πt/2)+α sin(2π3t/2)+β sin(2π5t/2)
d Mathematically, the bandwidth of a digital signal is infinite
Computer Networks and Internets -- Module 3 15 Spring, 2014
Copyright  2014. All rights reserved.
Converting Analog To Digital
d Three steps taken during conversion
quantization
sampling encoding
PCM encoder
analog
signal
digital
data
d Example sampling using eight levels
time
Computer Networks and Internets -- Module 3 16 Spring, 2014
Copyright  2014. All rights reserved.
Converting Analog To Digital
d Three steps taken during conversion
quantization
sampling encoding
PCM encoder
analog
signal
digital
data
d Example sampling using eight levels
time
Computer Networks and Internets -- Module 3 16 Spring, 2014
Copyright  2014. All rights reserved.
Converting Analog To Digital
d Three steps taken during conversion
quantization
sampling encoding
PCM encoder
analog
signal
digital
data
d Example sampling using eight levels
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
0
1
2
3
4
5
6
7
time
quanta
Computer Networks and Internets -- Module 3 16 Spring, 2014
Copyright  2014. All rights reserved.
Sampling Rate And Nyquist Theorem
d How many samples should be taken per second?
Computer Networks and Internets -- Module 3 17 Spring, 2014
Copyright  2014. All rights reserved.
Sampling Rate And Nyquist Theorem
d How many samples should be taken per second?
d Mathematician named Nyquist discovered the answer:
sampling rate = 2 × fmax
where fmax is highest frequency in the composite signal
Computer Networks and Internets -- Module 3 17 Spring, 2014
Copyright  2014. All rights reserved.
Sampling Rate And Nyquist Theorem
d How many samples should be taken per second?
d Mathematician named Nyquist discovered the answer:
sampling rate = 2 × fmax
where fmax is highest frequency in the composite signal
d Example: to capture audio frequencies up to 4000 Hertz, a
digital telephone system samples at 8000 samples per
second
d Amount of data generated by a single digitized voice call:
data rate = 8000
second
samples
3
3333333 × 8
sample
bits
3
333333 = 64,000
second
bits
3
333333
Computer Networks and Internets -- Module 3 17 Spring, 2014
Copyright  2014. All rights reserved.
Nonlinear Encoding
d Linear sampling does not work well for voice
d Researchers created nonlinear sampling that modify
dynamic range to reproduce sounds to which the human ear
is sensitive
d Mu-law (µ-law)
– Used in North America and Japan
– More dynamic range, but more sensitive to noise
d A-law
– Used in Europe
– Less sensitive to noise, but less dynamic range
Computer Networks and Internets -- Module 3 18 Spring, 2014
Copyright  2014. All rights reserved.
Synchronization Errors And Line Coding
d Synchronization error occurs when receiver and sender
disagree about bit boundaries (clocks differ)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0 0 1 1 0 1 0
1 0 0 0 1 1 0 1 1 0
sent
received
d Line coding techniques prevent synchronization errors
Computer Networks and Internets -- Module 3 19 Spring, 2014
Copyright  2014. All rights reserved.
Example Line Coding: Manchester Encoding
d Used with Ethernet
d Synchronizes receiver with sender (transition represents bit)
d Example of (a) Manchester Encoding, and (b) differential
Manchester Encoding:
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 1 0 0 1 1 1 0
0 1 0 0 1 1 1 0
(a)
(b)
Computer Networks and Internets -- Module 3 20 Spring, 2014
Copyright  2014. All rights reserved.
Transmission Media
A Taxonomy Of Transmission Media
Twisted Pair
Coaxial Cable
Optical Fiber
InfraRed
Laser
Terrestrial
Radio
Satellite
Electrical
Electromagnetic
(Radio)
Light
Energy Types
d Is anything omitted?
Computer Networks and Internets -- Module 3 22 Spring, 2014
Copyright  2014. All rights reserved.
Some Really Bad News
d In the real world, entropy rules
d Transmission is plagued with problems
Computer Networks and Internets -- Module 3 23 Spring, 2014
Copyright  2014. All rights reserved.
Loss, Interference, And Electrical Noise
d Problems in the electrical and electromagnetic worlds
– Resistance (leads to loss)
– Capacitance (leads to distortion)
– Inductance (leads to interference)
d Random electromagnetic radiation is called noise
– Can be generated by specific sources such as electric
motor
– Background radiation is an inescapable feature of the
universe
Computer Networks and Internets -- Module 3 24 Spring, 2014
Copyright  2014. All rights reserved.
Examples
d When electrical signals propagate down a wire,
electromagnetic energy is radiated (i.e., the wire acts like an
antenna)
d When electromagnetic radiation encounters metal, a small
electrical current is induced that can interfere with signals
being carried on the wire
d When an electrical pulse is sent down an unterminated wire,
reflection comes back
d When a signal passes across the connection between two
wires, reflection and loss occur
d Note: a network diagnostic tool uses reflection to find the
distance to the point where a cable has been cut
Computer Networks and Internets -- Module 3 25 Spring, 2014
Copyright  2014. All rights reserved.
How Can We Reduce The Effect Of Noise
On Copper Wiring
d Several techniques have been invented
– Unshielded Twisted Pair (UTP)
– Coaxial cable
– Shielded Twisted Pair (STP)
d All are used in computer networks
Computer Networks and Internets -- Module 3 26 Spring, 2014
Copyright  2014. All rights reserved.
How Twisted Pair Helps
Computer Networks and Internets -- Module 3 27 Spring, 2014
Copyright  2014. All rights reserved.
How Twisted Pair Helps
+5 +5 +5 +5
+3 +3 +3 +3
difference +8
source of radiation
d In an untwisted pair of wires, more current is generated in
first wire the interference hits
Computer Networks and Internets -- Module 3 27 Spring, 2014
Copyright  2014. All rights reserved.
How Twisted Pair Helps
+5 +5 +5 +5
+3 +3 +3 +3
difference +8
source of radiation
d In an untwisted pair of wires, more current is generated in
first wire the interference hits
+5 +5 +5 +5
+3 +3 +3 +3
difference 0
source of radiation
d Twisting exposes each wire equally
Computer Networks and Internets -- Module 3 27 Spring, 2014
Copyright  2014. All rights reserved.
Coaxial Cable And Shielding
d Better protection: wrap a metal shield around the wire
outer plastic covering
braided metal shield
plastic insulation
inner wire for signal
d Shielding can be added to twisted pair
– Around entire cable containing many pairs
– Around each pair as well as around cable
d Shielding determines maximum data rate
Computer Networks and Internets -- Module 3 28 Spring, 2014
Copyright  2014. All rights reserved.
Wiring Standards And Data Rates
2
2222222222222222222222222222222222222222222222222222222222222222222222
Category Description Data Rate
(in Mbps)
2
2222222222222222222222222222222222222222222222222222222222222222222222
CAT 1 Unshielded twisted pair used for telephones < 0.1
2
2222222222222222222222222222222222222222222222222222222222222222222222
CAT 2 Unshielded twisted pair used for T1 data 2
2
2222222222222222222222222222222222222222222222222222222222222222222222
CAT 3 Improved CAT2 used for computer networks 10
2
2222222222222222222222222222222222222222222222222222222222222222222222
CAT 4 Improved CAT3 used for Token Ring networks 20
2
2222222222222222222222222222222222222222222222222222222222222222222222
CAT 5 Unshielded twisted pair used for networks 100
2
2222222222222222222222222222222222222222222222222222222222222222222222
CAT 5E Extended CAT5 for more noise immunity 125
2
2222222222222222222222222222222222222222222222222222222222222222222222
CAT 6 Unshielded twisted pair tested for 200 Mbps 200
2
2222222222222222222222222222222222222222222222222222222222222222222222
CAT 7 Shielded twisted pair with a foil shield 600
around the entire cable plus a shield around
each twisted pair
2
2222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d What common data rate is missing from the list?
Computer Networks and Internets -- Module 3 29 Spring, 2014
Copyright  2014. All rights reserved.
Media Using Light Energy
d InfraRED transmission (short range and low data rate)
d Point-to-point lasers (useful between buildings)
d Optical fiber (high data rate and long distance)
Computer Networks and Internets -- Module 3 30 Spring, 2014
Copyright  2014. All rights reserved.
Media Using Light Energy
d InfraRED transmission (short range and low data rate)
d Point-to-point lasers (useful between buildings)
d Optical fiber (high data rate and long distance)
d Why light stays in a fiber:
α α
(a) (b) (c)
Refraction Absorption Reflection
critical
angle
low
density
high
density
θ
Computer Networks and Internets -- Module 3 30 Spring, 2014
Copyright  2014. All rights reserved.
Electromagnetic Spectrum And Properties
100 102 104 106 108 1010 1012 1014 1016 1018 1020 1022 1024
Radio & TV
Low
frequencies
Micro-
wave InfraRed UV X ray Gamma
ray
1 KHz 1 MHz 1 GHz 1 THz visible light
2
222222222222222222222222222222222222222222222222222222222222222222222
Classification Range Type Of Propagation
2
222222222222222222222222222222222222222222222222222222222222222222222
Low
< 2 MHz
Wave follows earth’s curvature, but
Frequency can be blocked by unlevel terrain
2
222222222222222222222222222222222222222222222222222222222222222222222
Medium
2 to 30 MHz
Wave can reflect from layers of the
Frequency atmosphere, especially the ionosphere
2
222222222222222222222222222222222222222222222222222222222222222222222
High
> 30 MHz
Wave travels in a direct line, and will
Frequency be blocked by obstructions
2
222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 3 31 Spring, 2014
Copyright  2014. All rights reserved.
Satellite Communication
d Three types of communication satellites
2222222222222222222222222222222222222222222222222222222222222222222222
Orbit Type Description
2222222222222222222222222222222222222222222222222222222222222222222222
Low Has the advantage of low delay, but the disadvantage
Earth Orbit that from an observer’s point of view on the earth,
( LEO ) the satellite appears to move across the sky
2222222222222222222222222222222222222222222222222222222222222222222222
Medium An elliptical (rather than circular) orbit primarily
Earth Orbit used to provide communication at the North and
( MEO ) South Poles
2222222222222222222222222222222222222222222222222222222222222222222222
Geostationary Has the advantage that the satellite remains at a fixed
Earth Orbit position with respect to a location on the earth’s
( GEO ) surface, but the disadvantage of being farther away
2222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 3 32 Spring, 2014
Copyright  2014. All rights reserved.
GEO Satellites
d Figure below shows the earth’s atmosphere drawn to scale
d Where would a GEO satellite be in the figure?
Earth
atmosphere
Computer Networks and Internets -- Module 3 33 Spring, 2014
Copyright  2014. All rights reserved.
GEO Satellites
(continued)
d Distance to GEO satellite is 35,785 km or 22,236 miles
d Approximately 3 times earth’s diameter or one-tenth of the
distance to the moon
Computer Networks and Internets -- Module 3 34 Spring, 2014
Copyright  2014. All rights reserved.
GEO Satellites
(continued)
d Distance to GEO satellite is 35,785 km or 22,236 miles
d Approximately 3 times earth’s diameter or one-tenth of the
distance to the moon
d In other words: the satellite is far off the page
Computer Networks and Internets -- Module 3 34 Spring, 2014
Copyright  2014. All rights reserved.
GEO Satellites
(continued)
d Distance to GEO satellite is 35,785 km or 22,236 miles
d Approximately 3 times earth’s diameter or one-tenth of the
distance to the moon
d In other words: the satellite is far off the page
d A consequence for networking: a long round-trip time, even
at the speed of light:
Round trip time =
3 × 108 meters/sec
2 × 35.8 × 106meters
3
3333333333333333333 = 0.238 sec
Computer Networks and Internets -- Module 3 34 Spring, 2014
Copyright  2014. All rights reserved.
Measures Of Transmission Media
d Propagation delay - time required for a signal to traverse a
medium
d Channel capacity - maximum data rate
Computer Networks and Internets -- Module 3 35 Spring, 2014
Copyright  2014. All rights reserved.
Channel Capacity
d Nyquist’s Theorem gives theoretical bound on maximum
data rate for hardware bandwidth B and K signal levels
D = 2 B log2K
d Mathematical result known as Shannon’s Theorem gives the
maximum channel capacity, C, in the presence of noise
C = B log2( 1 + S/N)
d Quantity S / N is known as the signal-to-noise ratio
Computer Networks and Internets -- Module 3 36 Spring, 2014
Copyright  2014. All rights reserved.
Assessment
d Nyquist’s Theorem gives us hope: using more signal levels
can increase the data rate
d Shannon’s Theorem is sobering: electrical noise in the
universe limits the effective channel capacity of any
practical communication system
Computer Networks and Internets -- Module 3 37 Spring, 2014
Copyright  2014. All rights reserved.
Reliability And Channel Coding
Sources Of Errors And Types
d Error sources: interference, distortion, and attenuation
d Resulting error types:
2
22222222222222222222222222222222222222222222222222222222222222222222222
Type Of Error Description
2
22222222222222222222222222222222222222222222222222222222222222222222222
Single Bit Error A single bit in a block of bits is changed and
all other bits in the block are unchanged (often
results from very short-duration interference)
2
22222222222222222222222222222222222222222222222222222222222222222222222
Burst Error Multiple bits in a block of bits are changed
(often results from longer-duration interference)
2
22222222222222222222222222222222222222222222222222222222222222222222222
Erasure (Ambiguity) The signal that arrives at a receiver is ambiguous
(does not clearly correspond to either a logical 1
or a logical 0; can result from distortion
or interference)
2
22222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d Channel coding used to detect and correct errors
Computer Networks and Internets -- Module 3 39 Spring, 2014
Copyright  2014. All rights reserved.
Concept Of Forward Error Correction (FEC)
encoder
add extra bits
for protection
output codeword
transmission over channel
decoder
check and
optionally correct
receive codeword
ORIGINAL MESSAGE ORIGINAL MESSAGE
Discard
d Examples:
– Single parity bit
– Row And Column (RAC)
– Cyclic Redundancy Check (CRC)
Computer Networks and Internets -- Module 3 40 Spring, 2014
Copyright  2014. All rights reserved.
Example: Row And Column Code
d To send 12 bits, arrange the bits in a matrix, compute a
parity for each row and column, and send 20 bits
1 0 1 1 1
0 0 1 0 1
1 0 1 0 0
0 0 1 1 0
parity for
each column
parity for
each row
bits from
dataword
Computer Networks and Internets -- Module 3 41 Spring, 2014
Copyright  2014. All rights reserved.
Example: Row And Column Code
d To send 12 bits, arrange the bits in a matrix, compute a
parity for each row and column, and send 20 bits
1 0 1 1 1
0 0 1 0 1
1 0 1 0 0
0 0 1 1 0
parity for
each column
parity for
each row
bits from
dataword
d Receiver computes same parity for the 12 bits and compares
to the parity bits received
1 0 1 1 1
0 1 1 0 1
1 0 1 0 0
0 0 1 1 0
single bit
changed during
transmission
locations where
calculated parity
bits disagree,
indicating the
row and column
of the error
Computer Networks and Internets -- Module 3 41 Spring, 2014
Copyright  2014. All rights reserved.
Hamming Distance
d Used to assess code’s resistance to errors
d Defined to be number of bit changes to transform bit string
S1 into bit string S2
d Can be computed as number of 1 bits in the exclusive or of
S1 and S2
d To assess code’s strength, compute Hamming distance
among all possible pairs of codewords, and take the
minimum
d If minimum Hamming distance is n, an error that changes
fewer than n bits will be detected
Computer Networks and Internets -- Module 3 42 Spring, 2014
Copyright  2014. All rights reserved.
Internet Checksum Computation
Given:
A message, M, of arbitrary length
Compute:
A 16-bit 1s complement checksum, C
Method:
Pad M to an exact multiple of 16 bits;
Set a 32-bit checksum integer, C, to zero;
for ( each 16-bit group in M ) {
Treat the 16 bits as an integer and add to C;
}
Extract high-order 16 bits of C and add to C;
Checksum is inverse of the low-order 16 bits;
If the checksum is zero, substitute all 1s;
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 3 43 Spring, 2014
Copyright  2014. All rights reserved.
Cyclic Redundancy Code (CRC)
d Used with Ethernet and other high-speed networks
d Properties:
Arbitrary Length
Message
Excellent Error
Detection
Fast Hardware
Implementation
As with a checksum, the size of a dataword is not fixed,
which means a CRC can be applied to an arbitrary length
message
Because the value computed depends on the sequence
of bits in a message, a CRC provides excellent error
detection capability
Despite its sophisticated mathematical basis, a CRC
computation can be carried out extremely fast by
hardware
Computer Networks and Internets -- Module 3 44 Spring, 2014
Copyright  2014. All rights reserved.
Explanation Of CRC
d Mathematicians explain CRC computation as the remainder
from polynomial division
d Theoretical computer scientists explain CRC as the
remainder from a division of binary numbers
d Cryptographers explain CRC as an operation in a Galois
field of order 2
d Computer programmers explain CRC as an algorithm that
iterates through a message and uses table lookup
d Hardware architects explain CRC computation as a small
hardware pipeline unit that uses exclusive or
Computer Networks and Internets -- Module 3 45 Spring, 2014
Copyright  2014. All rights reserved.
Question
d Can you explain the following?
– Fact 1: it is possible to write a function that computes
the 32-bit CRC used with Ethernet
– Fact 2: commercial Ethernet products use hardware
instead of software to compute a CRC
Computer Networks and Internets -- Module 3 46 Spring, 2014
Copyright  2014. All rights reserved.
Transmission Modes
Terminology
d Serial - one bit at a time
d Parallel - multiple bits at a time
Computer Networks and Internets -- Module 3 48 Spring, 2014
Copyright  2014. All rights reserved.
Terminology
d Serial - one bit at a time
d Parallel - multiple bits at a time
d Taxonomy of transmission methods:
Isochronous
Synchronous
Asynchronous
Serial
Parallel
Transmission Mode
Computer Networks and Internets -- Module 3 48 Spring, 2014
Copyright  2014. All rights reserved.
Serial Ordering Of Bits And Bytes
d Both sides must agree on order in which bits are transmitted
d Two approaches known as big-endian and little-endian
d Example: Ethernet uses byte big-endian and bit little-endian
order
byte 1 byte 2 byte 3 byte 4
x x x x
x x x x
x x x x
x x x x
x x x x
x x x x
x x x x
x x x x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Computer Networks and Internets -- Module 3 49 Spring, 2014
Copyright  2014. All rights reserved.
Asynchronous And Synchronous Transmission
d Asynchronous: line idle when not in use; data starts at
arbitrary time
0
+15
-15
voltage
time
arbitrary
idle start 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0 1 0 stop
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
idle
arbitrary
d Synchronous: each bit slot used
0
+15
-15
voltage
time
1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 1 0 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0
receiver must know how
to group bits into bytes
Computer Networks and Internets -- Module 3 50 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Simplex And Duplex Modes
send receive
receive
send
send
receive
receive
send
send
receive
(a) simplex
(b) full-duplex
(c) half-duplex
Computer Networks and Internets -- Module 3 51 Spring, 2014
Copyright  2014. All rights reserved.
Modulation And Demodulation
Illustration Of Amplitude Modulation
Computer Networks and Internets -- Module 3 53 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Amplitude Modulation
carrier
Computer Networks and Internets -- Module 3 53 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Amplitude Modulation
carrier
signal
Computer Networks and Internets -- Module 3 53 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Amplitude Modulation
carrier
signal
modulated carrier
Computer Networks and Internets -- Module 3 53 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Frequency Modulation
signal
modulated carrier
Computer Networks and Internets -- Module 3 54 Spring, 2014
Copyright  2014. All rights reserved.
Shift Keying
d Like modulation except signal is digital
0 1 0 0 1 1 0
carrier
digital signal
carrier with amplitude shift keying
Computer Networks and Internets -- Module 3 55 Spring, 2014
Copyright  2014. All rights reserved.
A Challenge
Write a computer program that takes as input a series of points
defining a signal and produces plots of sine waves that show
amplitude and frequency modulation as in the previous
diagrams
Computer Networks and Internets -- Module 3 56 Spring, 2014
Copyright  2014. All rights reserved.
Other Modulation Topics
d Phase shift modulation
d Increasing bits per second by combining amplitude and
phase shift (QAM techniques)
d Constellation diagrams to represent combinations
d Modems (modulator / demodulator)
Computer Networks and Internets -- Module 3 57 Spring, 2014
Copyright  2014. All rights reserved.
Multiplexing And Demultiplexing
(Channelization)
Concept Of Multiplexing And Types
sender 1
sender 2
sender N
receiver 1
receiver 2
receiver N
.
.
.
.
.
.
multiplexor demultiplexor
shared medium
Computer Networks and Internets -- Module 3 59 Spring, 2014
Copyright  2014. All rights reserved.
Concept Of Multiplexing And Types
sender 1
sender 2
sender N
receiver 1
receiver 2
receiver N
.
.
.
.
.
.
multiplexor demultiplexor
shared medium
d Types:
– Frequency division multiplexing
– Wavelength division multiplexing
– Time division multiplexing
– Code division multiplexing
Computer Networks and Internets -- Module 3 59 Spring, 2014
Copyright  2014. All rights reserved.
Frequency Division Multiplexing (FDM)
d Used in broadcast radio and cable TV
sender 1
sender 2
sender N
receiver 1
receiver 2
receiver N
channel 1
channel 2
channel N
.
.
.
.
.
.
.
.
.
multiplexor demultiplexor
d Demultiplexing implemented with sets of filters
filter 1
filter 2
filter N
.
.
.
demultiplexor
frequencies
for all
channels
each output has
frequencies for
one channel
Computer Networks and Internets -- Module 3 60 Spring, 2014
Copyright  2014. All rights reserved.
FDM In Practice
d Each channel assigned a range of frequencies
2
22222222222222222222222222222222
Channel Frequencies Used
2
22222222222222222222222222222222
1 100 KHz - 300 KHz
2 320 KHz - 520 KHz
3 540 KHz - 740 KHz
4 760 KHz - 960 KHz
5 980 KHz - 1180 KHz
6 1200 KHz - 1400 KHz
2
22222222222222222222222222222222
11
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
d A guard band separates adjacent channels
0 200 400 600 800 1000 1200 1400
1 2 3 4 5 6 KHz
guard band
Computer Networks and Internets -- Module 3 61 Spring, 2014
Copyright  2014. All rights reserved.
Wavelength Division Multiplexing (WDM)
d Form of FDM used with light (i.e., on an optical fiber)
d Separate frequencies called colors or lambdas
d Prisms used to separate frequencies
λ1
λ2
λk
λ1
λ2
λk
optical fiber
carrying a beam of light
prism
d Current technology is Dense WDM (DWDM); an individual
channel can provide 10 Gbps
Computer Networks and Internets -- Module 3 62 Spring, 2014
Copyright  2014. All rights reserved.
Time Division Multiplexing
d Senders take turns transmitting
sender 1
sender 2
sender N
receiver 1
receiver 2
receiver N
.
.
.
.
.
.
1
2
3
. . .
N
1
2
3
. . .
multiplexor demultiplexor
data flow
d Synchronous TDM
– Each sender assigned a slot (typically round-robin)
– Used by the telephone company
d Statistical TDM
– Sender only transmits when ready (e.g., Ethernet)
Computer Networks and Internets -- Module 3 63 Spring, 2014
Copyright  2014. All rights reserved.
Code Division Multiplexing
d Mathematical form of multiplexing used with cell phones
d Algorithm
– Each sender/receiver pair is assigned a unique number
called a chip sequence
– Senders multiply the data value by their chip sequence
(orthogonal vector spaces)
– Transmitted value is a sum of all senders
– Each receiver multiplies incoming value by its chip
sequence to extract data
d Advantage over statistical TDM: lower delay when network
loaded
Computer Networks and Internets -- Module 3 64 Spring, 2014
Copyright  2014. All rights reserved.
Hierarchical Multiplexing
d Hierarchies used with FDM and TDM to combine multiple
lower-capacity channels
d Example of TDM hierarchy used by the phone system
24 DS-0 digital phone
channels (64 Kbps each)
4 DS-1 digital phone
channels (1.544 Mbps each)
7 DS-2 digital phone
channels (6.312 Mbps each)
6 DS-3 digital phone
channels (44.736 Mbps each)
1 DS-4 digital phone
channel (274.176 Mbps total)
Computer Networks and Internets -- Module 3 65 Spring, 2014
Copyright  2014. All rights reserved.
Inverse Multiplexing
d Divides data from a single channel into several lower-speed
channels
d Used when high-speed channel is unavailable or too
expensive
d Some ISPs use inverse multiplexing to combine several 10
Gbps channels into a higher-speed channel
multiple low-speed connections
single high-speed
input
single high-speed
output
Computer Networks and Internets -- Module 3 66 Spring, 2014
Copyright  2014. All rights reserved.
Summary
d Data communications deals with the Physical Layer and
data transmission
d Concepts include
– Signals and conversion between digital and analog
– Transmission media
– Reliability and channel coding
– Modulation and demodulation
– Multiplexing and demultiplexing
Computer Networks and Internets -- Module 3 67 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
MODULE IV
Computer Network Technologies:
Access, Wired And Wireless LANs,
Extensions, Bridging, And
Layer 2 Switching
Computer Networks and Internets -- Module 4 1 Spring, 2014
Copyright  2014. All rights reserved.
Topics
d Access technologies
d Interconnection technologies
d Local area network packets, frames, and topologies
d Media access mechanisms and the IEEE MAC sub-layer
d Wired LAN technologies (Ethernet and 802.3)
d Wireless Networking Technologies
d LAN Extensions
d Switches and switched networks
Computer Networks and Internets -- Module 4 2 Spring, 2014
Copyright  2014. All rights reserved.
Access Technologies
Definition Of Access
d Used in the “last mile” between a provider and a subscriber
d Informally classified as either narrowband or broadband
d May not be the bottleneck
d Many are asymmetric with higher data rate downstream
provider’s
facility
subscriber’s
location
downstream
upstream
d Note: party that is downstream pays a fee for service
Computer Networks and Internets -- Module 4 4 Spring, 2014
Copyright  2014. All rights reserved.
Access Technology Types
d Narrowband (less than 128 Kbps)
– Dialup
– Integrated Services Digital Network (ISDN)
– Is disappearing
d Broadband (more than 128 Kbps)
– Digital Subscriber Line (DSL)
– Cable modems
– Wireless (e.g., Wi-Fi and 4G)
Computer Networks and Internets -- Module 4 5 Spring, 2014
Copyright  2014. All rights reserved.
Digital Subscriber Line (DSL) Technologies
d Use frequency-division multiplexing to share local loop
between data and POTS
d Head-end equipment is DSL Access Multiplexor (DSLAM)
d Asymmetric Digital Subscriber Line (ADSL)
– 255 downstream carrier frequencies, 31 upstream
– Maximum downstream data rate is 8.45 Mbps
– Adaptive selection of carrier frequencies
0 4 26 138 1100
KHz
POTS upstream downstream
Computer Networks and Internets -- Module 4 6 Spring, 2014
Copyright  2014. All rights reserved.
Cable Modem Technology
d Sends data over CATV coaxial cable system
d Standard is DOCSIS (Data-Over-Cable Service Interface
Specification)
d Head-end equipment known as Cable Modem Termination
System (CMTS)
d Version 1.x uses frequency-division multiplexing
d Maximum downstream data rate is 52 Mbps
d Bandwidth shared among multiple subscribers
Computer Networks and Internets -- Module 4 7 Spring, 2014
Copyright  2014. All rights reserved.
Cable Modem Technology
d Sends data over CATV coaxial cable system
d Standard is DOCSIS (Data-Over-Cable Service Interface
Specification)
d Head-end equipment known as Cable Modem Termination
System (CMTS)
d Version 1.x uses frequency-division multiplexing
d Maximum downstream data rate is 52 Mbps
d Bandwidth shared among multiple subscribers
– Each subscriber receives
N
1
33 of the bandwidth
Computer Networks and Internets -- Module 4 7 Spring, 2014
Copyright  2014. All rights reserved.
Cable Modem Technology
d Sends data over CATV coaxial cable system
d Standard is DOCSIS (Data-Over-Cable Service Interface
Specification)
d Head-end equipment known as Cable Modem Termination
System (CMTS)
d Version 1.x uses frequency-division multiplexing
d Maximum downstream data rate is 52 Mbps
d Bandwidth shared among multiple subscribers
– Each subscriber receives
N
1
33 of the bandwidth
– Cable company chooses N
Computer Networks and Internets -- Module 4 7 Spring, 2014
Copyright  2014. All rights reserved.
Other Access Technologies
d Hybrid systems include optical fiber plus copper
– Fiber To The Curb (FTTC)
– Fiber To The Building (FTTB)
– Fiber To The Premises (FTTP)
– Fiber To The Home (FTTH)
d Key question: how much capacity is needed at each point
downstream?
d Answer: it depends on whether endpoints have traffic in
common
– Broadcasts are shared
– Individual communications are not
Computer Networks and Internets -- Module 4 8 Spring, 2014
Copyright  2014. All rights reserved.
Other Access Technologies
(continued)
d Wireless
– Wi-Fi
– WIMAX
– Satellite
– 3G and 4G cellular services
d Leased point-to-point circuits (e.g., T1 or fractional T1)
Computer Networks and Internets -- Module 4 9 Spring, 2014
Copyright  2014. All rights reserved.
Interconnection Technologies
Interconnections At The Core Of The Internet
d Typically needed by large ISPs
d Circuits leased from common carriers (phone companies)
d Terminated with a Data Service Unit / Channel Service Unit
(DSU/ CSU)
d Upstream interface aggregates many lower-speed access
connections
d Key idea: data rates based on voice
– Basic data rate: single digital voice channel (64 Kbps)
– Higher data rate circuits created from multiples of voice
channels
d SONET encoding and framing used
Computer Networks and Internets -- Module 4 11 Spring, 2014
Copyright  2014. All rights reserved.
Example Data Rates Of Leased Circuits
222222222222222222222222222222222222222222222222222222222222
Name Bit Rate Voice Circuits Location
222222222222222222222222222222222222222222222222222222222222
basic rate 0.064 Mbps 1
222222222222222222222222222222222222222222222222222222222222
T1 1.544 Mbps 24 North America
222222222222222222222222222222222222222222222222222222222222
T2 6.312 Mbps 96 North America
222222222222222222222222222222222222222222222222222222222222
T3 44.736 Mbps 672 North America
222222222222222222222222222222222222222222222222222222222222
E1 2.048 Mbps 30 Europe
222222222222222222222222222222222222222222222222222222222222
E2 8.448 Mbps 120 Europe
222222222222222222222222222222222222222222222222222222222222
E3 34.368 Mbps 480 Europe
222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d T-standards used in North America
d E-standards used in Europe
d Note: T prefix specifies encoding as well as data rate; data
rate alone is given by Digital Signal Level (DS) standards
Computer Networks and Internets -- Module 4 12 Spring, 2014
Copyright  2014. All rights reserved.
High Capacity Data Circuits
2
22222222222222222222222222222222222222222222222222222222222222222
Copper Name Optical Name Bit Rate Voice Circuits
2
22222222222222222222222222222222222222222222222222222222222222222
STS-1 OC-1 51.840 Mbps 810
2
22222222222222222222222222222222222222222222222222222222222222222
STS-3 OC-3 155.520 Mbps 2430
2
22222222222222222222222222222222222222222222222222222222222222222
STS-12 OC-12 622.080 Mbps 9720
2
22222222222222222222222222222222222222222222222222222222222222222
STS-24 OC-24 1,244.160 Mbps 19440
2
22222222222222222222222222222222222222222222222222222222222222222
STS-48 OC-48 2,488.320 Mbps 38880
2
22222222222222222222222222222222222222222222222222222222222222222
STS-192 OC-192 9,953.280 Mbps 155520
2
22222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
d STS standards specify copper interface
d OC standards specify optical fiber interface
d Suffix C on OC-standards means single channel
Computer Networks and Internets -- Module 4 13 Spring, 2014
Copyright  2014. All rights reserved.
Local Area Networks:
(Packets, Frames, Topologies)
Networks
d Distinct from physical communication systems
d Attach multiple endpoints
d Two broad categories
– Circuit switched
– Packet switched
Computer Networks and Internets -- Module 4 15 Spring, 2014
Copyright  2014. All rights reserved.
Circuit Switched Networks
d Provide point-to-point communication between pairs of
endpoints
d Establish path between sender and receiver
d Separate steps for circuit creation, use, and termination
d Performance equivalent to an isolated physical path
d Circuit can be
– Permanent/ provisioned (left in place for long periods)
– Switched (created on demand)
d Concept: user leases piece of underlying infrastructure for a
time period
Computer Networks and Internets -- Module 4 16 Spring, 2014
Copyright  2014. All rights reserved.
Packet Switched Networks
d Form the basis for the Internet
d Multiplex communication over shared media
d All data divided into packets (maximum size fixed)
d After sending one packet, sender allows others a chance to
transmit before sending a second packet
d Arbitrary, asynchronous communication
d No set-up required before communication begins
d Performance varies due to statistical multiplexing
d Concept: underlying infrastructure is shared among users
Computer Networks and Internets -- Module 4 17 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Circuit And Packet Switching
d Circuit switching
circuit-switched network
Computer Networks and Internets -- Module 4 18 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Circuit And Packet Switching
d Circuit switching provides 1-to-1 dedicated connections
circuit-switched network
Computer Networks and Internets -- Module 4 18 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Circuit And Packet Switching
d Circuit switching provides 1-to-1 dedicated connections
circuit-switched network
d Packet switching
1
2
1
2
3
. . .
packet-switched network
Computer Networks and Internets -- Module 4 18 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Circuit And Packet Switching
d Circuit switching provides 1-to-1 dedicated connections
circuit-switched network
d Packet switching provides statistical TDM sharing
1
2
1
2
3
. . .
packet-switched network
Computer Networks and Internets -- Module 4 18 Spring, 2014
Copyright  2014. All rights reserved.
Categories Of Packet Switched Networks
2222222222222222222222222222222222222222222222222222222222222222222222
Name Expansion Description
2222222222222222222222222222222222222222222222222222222222222222222222
LAN Local Area Network Least expensive; spans a single
room or a single building
2222222222222222222222222222222222222222222222222222222222222222222222
MAN Metropolitan Area Network Medium expense; spans a major
city or a metroplex
2222222222222222222222222222222222222222222222222222222222222222222222
WAN Wide Area Network Most expensive; spans sites in
multiple cities
2222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 19 Spring, 2014
Copyright  2014. All rights reserved.
Categories Of Packet Switched Networks
2222222222222222222222222222222222222222222222222222222222222222222222
Name Expansion Description
2222222222222222222222222222222222222222222222222222222222222222222222
LAN Local Area Network Least expensive; spans a single
room or a single building
2222222222222222222222222222222222222222222222222222222222222222222222
MAN Metropolitan Area Network Medium expense; spans a major
city or a metroplex
2222222222222222222222222222222222222222222222222222222222222222222222
WAN Wide Area Network Most expensive; spans sites in
multiple cities
2222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d Everyone loves names that end in “AN”
2222222222222222222222222222222222222222222222222222222222222222222222222
Name Expansion Description
2222222222222222222222222222222222222222222222222222222222222222222222222
PAN Personal Area Network Spans the area around an individual
used for earphones
2222222222222222222222222222222222222222222222222222222222222222222222222
SAN Storage Area Network Spans the distance between a disk
farm and processors in a data center
2222222222222222222222222222222222222222222222222222222222222222222222222
CAN Chip Area Network Spans a single chip and connects
processor, memories, etc.
2222222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 19 Spring, 2014
Copyright  2014. All rights reserved.
Standards Bodies And Their Bias
d Standards bodies and academic departments each emphasize
certain layers of a protocol stack, leading to the following
views
Application
Transport
Internet
Data Link
Physical
APPLICATION
TRANSPORT
INTERNET
DATA LINK
PHYSICAL
textbooks W3C IETF IEEE
Computer Networks and Internets -- Module 4 20 Spring, 2014
Copyright  2014. All rights reserved.
IEEE 802 Model And Standards
d IEEE (Institute of Electrical and Electronics Engineers)
– Professional society of engineers
– Standardizes vendor-independent technologies
d Project 802
– LAN/ MAN standards committee
– Organized in 1980
– Focuses on layer 1 and layer 2 standards
– Divides layer 2 into two sublayers
* Logical Link Control (LLC)
* Media Access Control (MAC)
Computer Networks and Internets -- Module 4 21 Spring, 2014
Copyright  2014. All rights reserved.
Example IEEE Standards
2
2222222222222222222222222222222222222222222222222222222222
ID Topic
2
2222222222222222222222222222222222222222222222222222222222
802.1 Higher layer LAN protocols
2
2222222222222222222222222222222222222222222222222222222222
802.2 Logical link control
2
2222222222222222222222222222222222222222222222222222222222
802.3 Ethernet
2
2222222222222222222222222222222222222222222222222222222222
802.4 Token bus (disbanded)
2
2222222222222222222222222222222222222222222222222222222222
802.5 Token Ring
2
2222222222222222222222222222222222222222222222222222222222
802.6 Metropolitan Area Networks (disbanded)
2
2222222222222222222222222222222222222222222222222222222222
802.7 Broadband LAN using Coaxial Cable (disbanded)
2
2222222222222222222222222222222222222222222222222222222222
802.9 Integrated Services LAN (disbanded)
2
2222222222222222222222222222222222222222222222222222222222
802.10 Interoperable LAN Security (disbanded)
2
2222222222222222222222222222222222222222222222222222222222
802.11 Wireless LAN (Wi-Fi)
2
2222222222222222222222222222222222222222222222222222222222
802.12 Demand priority
2
2222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 22 Spring, 2014
Copyright  2014. All rights reserved.
More Example IEEE Standards
222222222222222222222222222222222222222222222222
ID Topic
222222222222222222222222222222222222222222222222
802.13 Category 6 - 10Gb LAN
222222222222222222222222222222222222222222222222
802.14 Cable modems (disbanded)
222222222222222222222222222222222222222222222222
802.15 Wireless PAN
802.15.1 (Bluetooth)
802.15.4 (ZigBee)
222222222222222222222222222222222222222222222222
802.16 Broadband Wireless Access
802.16e (Mobile) Broadband Wireless
222222222222222222222222222222222222222222222222
802.17 Resilient packet ring
222222222222222222222222222222222222222222222222
802.18 Radio Regulatory TAG
222222222222222222222222222222222222222222222222
802.19 Coexistence TAG
222222222222222222222222222222222222222222222222
802.20 Mobile Broadband Wireless Access
222222222222222222222222222222222222222222222222
802.21 Media Independent Handoff
222222222222222222222222222222222222222222222222
802.22 Wireless Regional Area Network
222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 23 Spring, 2014
Copyright  2014. All rights reserved.
Standards Define
d Network topology (shape)
d Endpoint addressing scheme
d Frame (packet) format
d Media access mechanism
d Physical layer aspects and wiring
Computer Networks and Internets -- Module 4 24 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of The Four LAN Topologies
Bus Ring
Mesh
Star
d Each topology has advantages and disadvantages
Computer Networks and Internets -- Module 4 25 Spring, 2014
Copyright  2014. All rights reserved.
Endpoint Addressing Scheme
d Each station on a LAN is assigned a unique address
d Each packet specifies a destination address
d LAN hardware uses the address in a packet to determine
which station(s) receive a copy
Computer Networks and Internets -- Module 4 26 Spring, 2014
Copyright  2014. All rights reserved.
IEEE Standard For Addressing
d Formal name: IEEE Media Access Control address (MAC
address)
d Informally called an Ethernet address
d Each address is 48 bits long
d Assigned to Network Interface Card (NIC) when device
manufactured
d Divided into subfields
– 3-byte Organizationally Unique ID (OUI)
– 3-byte Network Interface Controller (NIC)
Computer Networks and Internets -- Module 4 27 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Fields In An IEEE 48-Bit Address
Network Interface Controller
(NIC) specific
Organizationally Unique
Identifier (OUI)
8
7
6
5
4
3
2
1
3 bytes 3 bytes
bits of most significant byte
0 → unicast, 1→ multicast
0 → global, 1→ local
d Address types
2
22222222222222222222222222222222222222222222222222222222222222222222
Address Type Meaning And Packet Delivery
2
22222222222222222222222222222222222222222222222222222222222222222222
unicast Destination is a single computer; only that computer
should receive a copy of the packet
2
22222222222222222222222222222222222222222222222222222222222222222222
broadcast Destination is all computers on a network; they
should each receive a copy of the packet
2
22222222222222222222222222222222222222222222222222222222222222222222
multicast A subset of the computers on a network should
receive a copy of the packet
2
22222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 28 Spring, 2014
Copyright  2014. All rights reserved.
Algorithm For Processing An Incoming Packet
Purpose:
Handle a packet that has arrived over a LAN
Method:
Extract destination address, D, from the packet;
if ( D matches “my address” ) {
accept and process the packet;
} else if ( D matches the broadcast address ) {
accept and process the packet;
} else if ( D matches one of the multicast addresses for a
multicast group of which I am a member ) {
accept and process the packet;
} else {
ignore the packet;
}
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
222222222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 4 29 Spring, 2014
Copyright  2014. All rights reserved.
Frame Format
d Layer 2 packet is called a frame
d General layout of a frame
HEADER PAYLOAD
optional prelude optional postlude
d Header usually has fixed fields
d Each technology imposes a maximum payload size
d Note: we will see specific frame formats later
Computer Networks and Internets -- Module 4 30 Spring, 2014
Copyright  2014. All rights reserved.
Framing And Serial Communications Systems
Computer Networks and Internets -- Module 4 31 Spring, 2014
Copyright  2014. All rights reserved.
Framing And Serial Communications Systems
d Consider sending packets over a leased circuit
Computer Networks and Internets -- Module 4 31 Spring, 2014
Copyright  2014. All rights reserved.
Framing And Serial Communications Systems
d Consider sending packets over a leased circuit
d Circuit hardware either provides a stream of bits or a stream
of bytes (characters)
d We will consider hardware that provides a byte stream
– No frame boundaries
– Any 8-bit value can appear in the data
Computer Networks and Internets -- Module 4 31 Spring, 2014
Copyright  2014. All rights reserved.
Framing And Serial Communications Systems
d Consider sending packets over a leased circuit
d Circuit hardware either provides a stream of bits or a stream
of bytes (characters)
d We will consider hardware that provides a byte stream
– No frame boundaries
– Any 8-bit value can appear in the data
d How can we send packets over such a system?
d Answer: sender and receiver must agree on framing
Computer Networks and Internets -- Module 4 31 Spring, 2014
Copyright  2014. All rights reserved.
Example Framing Used With A Leased Circuit
d Use SOH and EOT characters to mark the start and end of a
frame
SOH EOT
HEADER PAYLOAD
6 bytes arbitrary bytes
Computer Networks and Internets -- Module 4 32 Spring, 2014
Copyright  2014. All rights reserved.
Example Framing Used With A Leased Circuit
d Use SOH and EOT characters to mark the start and end of a
frame
SOH EOT
HEADER PAYLOAD
6 bytes arbitrary bytes
d Use byte stuffing within the payload
2
2222222222222222222222222222222222
Byte In Payload Sequence Sent
2
2222222222222222222222222222222222
SOH ESC A
2
2222222222222222222222222222222222
EOT ESC B
2
2222222222222222222222222222222222
ESC ESC C
2
2222222222222222222222222222222222
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 32 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Byte Stuffing
ESC SOH EOT ESC
ESC C ESC A ESC B ESC C
original data
stuffed data
d Internet uses SLIP or PPP (standards) for transmission over
serial circuits
d Bit stuffing techniques are also available for systems that
transfer a stream of bits
Computer Networks and Internets -- Module 4 33 Spring, 2014
Copyright  2014. All rights reserved.
Media Access Mechanisms
(IEEE MAC Sublayer)
MAC Protocols
d Control access to shared medium
d Two types of channel allocation
– Static
– Dynamic
d General principle:
Static channel allocation suffices when the set of
communicating entities is known in advance and does not
change; most networks require a form of dynamic channel
allocation.
Computer Networks and Internets -- Module 4 35 Spring, 2014
Copyright  2014. All rights reserved.
Taxonomy Of Media Access Mechanisms
Reservation
Polling
Token passing
ALOHA
CSMA / CD
CSMA / CA
FDMA
TDMA
CDMA
Controlled Access
Protocols
Random Access
Protocols
Channelization
Protocols
Multi-Access
Protocols
Computer Networks and Internets -- Module 4 36 Spring, 2014
Copyright  2014. All rights reserved.
Channelization Protocols
d Employ and extend basic multiplexing techniques
d May be static or dynamic
d Three basic types
222222222222222222222222222222222222222222222
Protocol Expansion
222222222222222222222222222222222222222222222
FDMA Frequency Division Multi-Access
222222222222222222222222222222222222222222222
TDMA Time Division Multi-Access
222222222222222222222222222222222222222222222
CDMA Code Division Multi-Access
222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 37 Spring, 2014
Copyright  2014. All rights reserved.
Controlled Access Protocols
d Three principal forms
2
2222222222222222222222222222222222222222222222222222222222222222
Type Description
2
2222222222222222222222222222222222222222222222222222222222222222
Polling Centralized controller repeatedly polls stations
and allows each to transmit one packet
2
2222222222222222222222222222222222222222222222222222222222222222
Reservation Stations submit a request for the next round of
data transmission
2
2222222222222222222222222222222222222222222222222222222222222222
Token Passing Stations circulate a token; each time it receives
the token, a station transmits one packet
2
2222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d All three have been used in practice
Computer Networks and Internets -- Module 4 38 Spring, 2014
Copyright  2014. All rights reserved.
Algorithm For Polled Access
Purpose:
Control transmission of packets through polling
Method:
Controller repeats forever {
Select a station, S, and send a polling message to S;
Wait for S to respond by sending a packet or passing;
}
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 4 39 Spring, 2014
Copyright  2014. All rights reserved.
Algorithm For Reservation-Based Access
d Often used with satellite systems
d Stations inform a controller if they have data to send
Purpose:
Control transmission of packets through reservation
Method:
Controller repeats forever {
Form a list of stations that have a packet to send;
Allow each station on the list to transmit;
}
11
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 4 40 Spring, 2014
Copyright  2014. All rights reserved.
Algorithm For Token Passing Access
d Special packet known as a token passed among senders
d Station sends one packet each time token arrives
Purpose:
Control transmission of packets through token passing
Method:
Each computer on the network repeats {
Wait for the token to arrive;
Transmit a packet if one is waiting to be sent;
Send the token to the next station;
}
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 4 41 Spring, 2014
Copyright  2014. All rights reserved.
Example Random Access Protocols
22222222222222222222222222222222222222222222222222222222222222222222
Type Description
22222222222222222222222222222222222222222222222222222222222222222222
ALOHA Historic protocol used in an early radio network in
Hawaii; popular in textbooks and easy to analyze,
but not used in real networks
22222222222222222222222222222222222222222222222222222222222222222222
CSMA / CD Carrier Sense Multi-Access with Collision Detection
The basis for the original Ethernet, and the most widely
used random access protocol
22222222222222222222222222222222222222222222222222222222222222222222
CSMA / CA Carrier Sense Multi-Access with Collision Avoidance
The basis for Wi-Fi wireless networks
22222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 42 Spring, 2014
Copyright  2014. All rights reserved.
Aloha
d Used in early network in Hawaii (ALOHAnet)
d Two carrier frequencies, inbound and outbound
d Central transmitter rebroadcast each incoming packet
central
transmitter
outbound frequency
inbound frequency
outlying station
d If inbound packets collide, each sender waits a random time
and retransmits
d Channel utilization under 20%
Computer Networks and Internets -- Module 4 43 Spring, 2014
Copyright  2014. All rights reserved.
CSMA / CD
d Used in original Ethernet (1973)
d Provides access to shared medium
d Principle features
– Carrier Sense (CS)
– Multiple Access (MA)
– Collision Detection (CD)
d Uses binary exponential backoff
Computer Networks and Internets -- Module 4 44 Spring, 2014
Copyright  2014. All rights reserved.
CSMA / CD Algorithm
Method:
When a packet is ready, perform CS (wait for access);
Delay for the interpacket gap;
Set variable x to the standard backoff range, d ;
Attempt to transmit the packet and perform CD;
While (collision occurred during transmission) {
Choose q to be a random delay between 0 and x ;
Delay for q microseconds;
Double x in case needed for the next round;
Attempt to retransmit the packet and perform CD;
}
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 4 45 Spring, 2014
Copyright  2014. All rights reserved.
CSMA / CA
d Alternative to CSMA / CD
d Used in wireless networks (Wi-Fi)
d Needed because signals have limited distance, δ
d Example: computer 1 cannot receive transmission when
computers 2 and 3 communicate
computer 1 computer 2 computer 3
δ δ
d All computers in range of computers 2 and 3 must be
informed that a transmission will occur
Computer Networks and Internets -- Module 4 46 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of CSMA / CA
1: ready to send (RTS)
2: clear to send (CTS)
2: clear to send (CTS)
3: packet transmission
computer 1 computer 2 computer 3
d Communicating pair exchange RTS and CTS before packet
transmission
d Any computer less than δ away from either computer 2 or 3
hears at least one of the RTS / CTS messages
Computer Networks and Internets -- Module 4 47 Spring, 2014
Copyright  2014. All rights reserved.
Wired LAN technologies
(Ethernet and 802.3)
Wired LAN Technologies
Computer Networks and Internets -- Module 4 49 Spring, 2014
Copyright  2014. All rights reserved.
Wired LAN Technologies
d Explosion of technologies and products during 1980s
Computer Networks and Internets -- Module 4 49 Spring, 2014
Copyright  2014. All rights reserved.
Wired LAN Technologies
d Explosion of technologies and products during 1980s
d Consolidation during the 1990s
Computer Networks and Internets -- Module 4 49 Spring, 2014
Copyright  2014. All rights reserved.
Wired LAN Technologies
d Explosion of technologies and products during 1980s
d Consolidation during the 1990s
d Currently: one de facto wired LAN standard
Ethernet
Computer Networks and Internets -- Module 4 49 Spring, 2014
Copyright  2014. All rights reserved.
Ethernet Technology
d Invented at Xerox PARC in 1973
d Standardized by Digital, Intel, and Xerox (DIX) in 1978
d Frame has a 14-byte header followed by payload of 46 to
1500 bytes
d Frame format and addressing have survived virtually
unchanged
header 46 - 1500 bytes of payload
6-byte
destination address
6-byte
source address
2-byte
type header details
4-byte CRC
Computer Networks and Internets -- Module 4 50 Spring, 2014
Copyright  2014. All rights reserved.
Ethernet Address Filtering
d Recall: station accepts a copy of the frame if destination
address matches
– The station’s unicast address
– The broadcast address (all 1s)
– A multicast address to which station is listening
d Other frames are ignored
d Promiscuous mode allows a station to receive all frames
regardless of address
– Basis of protocol analyzer software such as Wireshark
Computer Networks and Internets -- Module 4 51 Spring, 2014
Copyright  2014. All rights reserved.
Question
If one is looking at the bits of an Ethernet frame as the frame is
transmitted across a wire, which bit specifies whether the frame
has been sent to a unicast destination address? Hint: look at the
48-bit MAC address format, the Ethernet header format and the
byte and bit ordering (Module 2).
Computer Networks and Internets -- Module 4 52 Spring, 2014
Copyright  2014. All rights reserved.
Frame Type Field
d 2-octet field in frame header
d Set by sender to identify contents of frame
d Used by receiver to determine how to process the frame
d Values are standardized
d Examples:
– Type 0x0800 used for IPv4 datagram
– Type 0x86DD used for IPv6 datagram
– Type 0x0806 used for ARP
Computer Networks and Internets -- Module 4 52 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Frame Demultiplexing
IPv4
module
IPv6
module
0800 86DD
frame
arrives
demultiplexing
d Performed when frame arrives
d Usually handled by protocol software
d Frame type field examined and frame passed to appropriate
protocol module; unrecognized types are discarded
Computer Networks and Internets -- Module 4 53 Spring, 2014
Copyright  2014. All rights reserved.
IEEE’s Version Of Ethernet
d Standardized in 1983 as IEEE standard 802.3
d Not widely adopted
d Header type field reinterpreted as a frame length
d Eight bytes of payload occupied by LLC / SNAP header
header new
hdr. 46 - 1492 bytes of payload
48-bit destination
address
48-bit source
address
16-bit
length
IEEE LLC / SNAP Header
24-bit
LLC
24-bit
OUI
16-bit
type
4-byte CRC
Computer Networks and Internets -- Module 4 54 Spring, 2014
Copyright  2014. All rights reserved.
Ethernet Wiring
d Evolved through three generations
– Thicknet
– Thinnet
– Twisted pair
d Illustrate a range of possible network wiring schemes
Computer Networks and Internets -- Module 4 55 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Thicknet Wiring
thick Ethernet cable
computer with NIC
AUI cable
transceiver
terminator
d Heavy coaxial cable typically in the ceiling
d Each computer attached to the cable
Computer Networks and Internets -- Module 4 56 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Thinnet Wiring
computer with NIC
terminator
Thinnet cable
d Flexible coaxial cable
d Connections run point-to-point among computers
d Disadvantage: user can disconnect the network
Computer Networks and Internets -- Module 4 57 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Twisted Pair Ethernet Wiring
computer with NIC
hub
twisted pair wiring
d Unshielded or shielded twisted pairs using RJ45 connectors
d Multiple pairs allows full-duplex operation
d Each computer connects to central hub
d Topology is physical star, but logical bus
d Hub is known as “bus in a box”
Computer Networks and Internets -- Module 4 58 Spring, 2014
Copyright  2014. All rights reserved.
Evolution Of Twisted Pair Ethernet Technologies
d Several variants of twisted pair Ethernet have been created
d Variants differ in data rate and wiring required
2
2222222222222222222222222222222222222222222222222222222
Designation Name Data Rate Cable Used
2
2222222222222222222222222222222222222222222222222222222
Twisted Pair
10BaseT
Ethernet
10 Mbps Category 5
2
2222222222222222222222222222222222222222222222222222222
Fast
100BaseT
Ethernet
100 Mbps Category 5E
2
2222222222222222222222222222222222222222222222222222222
Gigabit
1000BaseT
Ethernet
1 Gbps Category 6
2
2222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 59 Spring, 2014
Copyright  2014. All rights reserved.
Wireless Networking
Technologies
Wireless Networks
d Many types exist
d Technologies differ in
– Distance spanned
– Data rates
– Physical characteristics of electromagnetic energy
* Ability to permeate obstructions like walls
* Susceptibility to interference
– Isolated channel vs. shared channel
Computer Networks and Internets -- Module 4 61 Spring, 2014
Copyright  2014. All rights reserved.
A Taxonomy Of Wireless Networks
d We use a basic taxonomy to help classify wireless
technologies
Local Area
Networks (LANs)
Metropolitan Area
Networks (MANs)
Wide Area
Networks (WANs)
Personal Area
Networks (PANs)
Wireless Networks
d Note: the terminology is qualitative because some
technologies span multiple categories
Computer Networks and Internets -- Module 4 62 Spring, 2014
Copyright  2014. All rights reserved.
Personal Area Network (PAN)
d Terminology used primarily with wireless networks
d Spans short distance
d Dedicated to a single user (not shared)
Computer Networks and Internets -- Module 4 63 Spring, 2014
Copyright  2014. All rights reserved.
Personal Area Network (PAN)
d Terminology used primarily with wireless networks
d Spans short distance
d Dedicated to a single user (not shared)
d Example PAN technologies
2
22222222222222222222222222222222222222222222222222222222222222222222
Type Purpose
2
22222222222222222222222222222222222222222222222222222222222222222222
Communication over a short distance between a
Bluetooth small peripheral device such as a headset or mouse
and a system such as a cell phone or a computer
2
22222222222222222222222222222222222222222222222222222222222222222222
Line-of-sight communication between a small device,
InfraRed often a hand-held controller, and a nearby system such
as a computer or entertainment center
2
22222222222222222222222222222222222222222222222222222222222222222222
Communication over distances about as large as a
ZigBee residence, which allows electrical appliances to connect
to the Smart Grid
2
22222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 63 Spring, 2014
Copyright  2014. All rights reserved.
ISM Wireless Bands
d ISM stands for Industrial, Scientific, and Medical
d Region of the electromagnetic spectrum available for use
without license
d Used for wireless LANs and PANs (e.g., cordless phones)
d Three separate bands
902
MHz
928
MHz
2.4
GHz
2.484
GHz
5.725
GHz
5.850
GHz
26 MHz
bandwidth
83.6 MHz
bandwidth 125 MHz
bandwidth
Unlicensed does not mean unregulated.
Computer Networks and Internets -- Module 4 64 Spring, 2014
Copyright  2014. All rights reserved.
Wireless LANs And Wi-Fi
d Variety of wireless LANs have been created
d Vendors moved to open standards in 1990s, with IEEE
providing most of the standards under 802.11
d In 1999, vendors formed Wi-Fi Alliance
Computer Networks and Internets -- Module 4 65 Spring, 2014
Copyright  2014. All rights reserved.
Wireless LANs And Wi-Fi
d Variety of wireless LANs have been created
d Vendors moved to open standards in 1990s, with IEEE
providing most of the standards under 802.11
d In 1999, vendors formed Wi-Fi Alliance
d Example IEEE wireless standards
22222222222222222222222222222222222222222222222222222222222222222222222
IEEE Frequency Data Modulation Multiplexing
Standard Band Rate Technique Technique
22222222222222222222222222222222222222222222222222222222222222222222222
original
2.4 GHz 1 or 2 Mbps FSK DSSS
222222222222222222222222222222222222222222222222222222222222
802.11 2.4 GHz 1 or 2 Mbps FSK FHSS
222222222222222222222222222222222222222222222222222222222222
InfraRed 1 or 2 Mbps PPM – none –
22222222222222222222222222222222222222222222222222222222222222222222222
802.11b 2.4 GHz 5.5 and 11 Mbps PSK DSSS
22222222222222222222222222222222222222222222222222222222222222222222222
802.11g 2.4 GHz 22 and 54 Mbps various OFDM
22222222222222222222222222222222222222222222222222222222222222222222222
802.11n 2.4 GHz 54 to 600 Mbps various OFDM
22222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 65 Spring, 2014
Copyright  2014. All rights reserved.
Spread Spectrum Transmission
d Uses multiple frequencies for a single channel
d Can increase performance or provide immunity to noise
Computer Networks and Internets -- Module 4 66 Spring, 2014
Copyright  2014. All rights reserved.
Spread Spectrum Transmission
d Uses multiple frequencies for a single channel
d Can increase performance or provide immunity to noise
d Major spread spectrum techniques
2
2222222222222222222222222222222222222222222222222222222222222222222
Name Expansion Description
2
2222222222222222222222222222222222222222222222222222222222222222222
Direct Similar to CDMA where a sender multiplies
DSSS Sequence the outgoing data by a sequence to form
Spread multiple frequencies and the receiver
Spectrum multiplies by the same sequence to decode
2
2222222222222222222222222222222222222222222222222222222222222222222
Frequency A sender uses a sequence of frequencies
FHSS Hopping to transmit data, and a receiver uses the
Spread same sequence of frequencies to extract
Spectrum data
2
2222222222222222222222222222222222222222222222222222222222222222222
Orthogonal A frequency division multiplexing scheme
OFDM Frequency where the transmission band is divided
Division into many carriers in such a way that
Multiplexing the carriers do not interfere
2
2222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 66 Spring, 2014
Copyright  2014. All rights reserved.
More IEEE Wireless LAN Standards
2
222222222222222222222222222222222222222222222222222222222222222222
Standard Purpose
2
222222222222222222222222222222222222222222222222222222222222222222
802.11e
Improved quality of service, such as a guarantee of
low jitter
2
222222222222222222222222222222222222222222222222222222222222222222
802.11h
Like 802.11a, but adds control of spectrum and power
(primarily intended for use in Europe)
2
222222222222222222222222222222222222222222222222222222222222222222
802.11i
Enhanced security, including Advanced Encryption
Standard; the full version is known as WPA2
2
222222222222222222222222222222222222222222222222222222222222222222
802.11k
Will provide radio resource management, including
transmission power
2
222222222222222222222222222222222222222222222222222222222222222222
802.11n
Data rate over 100 Mbps to handle multimedia (video)
applications (may be 500 Mbps)
2
222222222222222222222222222222222222222222222222222222222222222222
802.11p
Dedicated Short-Range Communication (DSRC) among
vehicles on a highway and vehicle-to-roadside
2
222222222222222222222222222222222222222222222222222222222222222222
802.11r
Improved ability to roam among access points without
losing connectivity
2
222222222222222222222222222222222222222222222222222222222222222222
802.11s
Proposed for a mesh network in which a set of nodes
automatically form a network and pass packets
2
222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 67 Spring, 2014
Copyright  2014. All rights reserved.
Wireless LAN Architecture
d IEEE defines two possible modes for wireless LAN
communication
Computer Networks and Internets -- Module 4 68 Spring, 2014
Copyright  2014. All rights reserved.
Wireless LAN Architecture
d IEEE defines two possible modes for wireless LAN
communication
d Infrastructure mode
– Wireless devices communicate through an access point
(AP)
– APs connect to each other and (usually) the Internet
– Typical uses: corporate wireless LAN, Internet cafe
Computer Networks and Internets -- Module 4 68 Spring, 2014
Copyright  2014. All rights reserved.
Wireless LAN Architecture
d IEEE defines two possible modes for wireless LAN
communication
d Infrastructure mode
– Wireless devices communicate through an access point
(AP)
– APs connect to each other and (usually) the Internet
– Typical uses: corporate wireless LAN, Internet cafe
d Ad hoc mode
– Direct communication among wireless devices
– Forwarding possible
– Seldom used
Computer Networks and Internets -- Module 4 68 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Infrastructure Mode Wireless LAN
d Basic Service Set (BSS) for an AP is defined as set of devices
that can hear the AP
d APs interconnect through wired network
BSS #1 BSS #2 BSS #3
AP AP AP
access point
interconnect such as a switch
wireless
computer
range of
access point
Computer Networks and Internets -- Module 4 69 Spring, 2014
Copyright  2014. All rights reserved.
Practical Considerations And Association
d In practice BSSs can overlap (given wireless device can hear
more than one AP)
BSS #1 BSS #2 BSS #3
switch
AP AP AP
router
to Internet
computer
in range
of two APs
d To solve the problem each device associates with one AP at
any time
Computer Networks and Internets -- Module 4 70 Spring, 2014
Copyright  2014. All rights reserved.
Practical Considerations: Wi-Fi Channels
Computer Networks and Internets -- Module 4 71 Spring, 2014
Copyright  2014. All rights reserved.
Practical Considerations: Wi-Fi Channels
d 11 channels defined for North America in 2.4 GHz range
Computer Networks and Internets -- Module 4 71 Spring, 2014
Copyright  2014. All rights reserved.
Practical Considerations: Wi-Fi Channels
d 11 channels defined for North America in 2.4 GHz range
d Bad news: 22 MHz bandwidth means channels overlap
1: 2.412
2: 2.417
3: 2.422
4: 2.427
5: 2.432
6: 2.437
7: 2.442
8: 2.447
9: 2.452
10: 2.457
11: 2.462
22 MHz
Computer Networks and Internets -- Module 4 71 Spring, 2014
Copyright  2014. All rights reserved.
Practical Considerations: Wi-Fi Channels
d 11 channels defined for North America in 2.4 GHz range
d Bad news: 22 MHz bandwidth means channels overlap
1: 2.412
2: 2.417
3: 2.422
4: 2.427
5: 2.432
6: 2.437
7: 2.442
8: 2.447
9: 2.452
10: 2.457
11: 2.462
22 MHz
d Good news: channels 1, 6, and 11 can operate simultaneously
with no interference
Computer Networks and Internets -- Module 4 71 Spring, 2014
Copyright  2014. All rights reserved.
Addresses In 802.11 Frame Format
d 802.11 frame is not the same as an Ethernet frame
d Each 802.11 frame includes four MAC addresses
– Source (e.g., wireless device)
– Destination AP (associated AP)
– Router along the path to the Internet
– Extra address for ad hoc mode
CTL DUR Address 1
(destination)
Address 2
(source)
Address 3
(dest. 2) SEQ Address 4 Payload
(0 to 2312 bytes) CRC
AP or wireless
computer’s MAC
sender’s
MAC address
router’s
MAC address
used in
ad hoc mode
Computer Networks and Internets -- Module 4 72 Spring, 2014
Copyright  2014. All rights reserved.
Coordination Among Access Points
d Coordinated approach
– Initial design
– Similar to cellular telephone
– APs communicate to achieve smooth handoff
d Uncoordinated approach
– Later alternative
– APs do not communicate
– Wireless device changes association when communication
with an AP lost
– Lower overall cost
Computer Networks and Internets -- Module 4 73 Spring, 2014
Copyright  2014. All rights reserved.
CSMA/ CA Protocol (Review)
d Alternative to CSMA/CD used in wireless LANs
d Allows stations within range of communicating pair to know
when communication starts
d Requires exchange of Ready-To-Send (RTS) and Clear-To-
Send (CTS) messages
d Delay associated with each message to ensure protocol is
efficient and correct
Computer Networks and Internets -- Module 4 74 Spring, 2014
Copyright  2014. All rights reserved.
CSMA/ CA Protocol Details
d SIFS — Short Inter-Frame Space of 10 µsec
d DIFS — Distributed Inter-Frame Space of 50 µsec
d Slot Time of 20 µsec
time time
DIFS
RTS
SIFS
CTS
SIFS
data
SIFS
ACK
Computer Networks and Internets -- Module 4 75 Spring, 2014
Copyright  2014. All rights reserved.
Wireless MAN Technology (WiMax)
d WiMax standard, IEEE 802.16, provides two types
– Fixed (802.16-2004) — endpoint does not move
– Mobile (802.16e-2005) — endpoint moves
d Uses 2
2222222222222222222222222222222222222222222222222222
Access
– Last-mile alternative to DSL or cable modems
– High-speed interconnection for nomadic users
– Unified data and telecommunications access
– As a backup for a site’s Internet connection
2
2222222222222222222222222222222222222222222222222222
Interconnect
– Backhaul from Wi-Fi access points to a provider
– Private connections among sites of a company
– Connection between small and large ISPs
2
2222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 76 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of WiMax Uses
d Fixed type of WiMax used for high-capacity backhaul
requires Line-Of-Sight (LOS)
service
provider
LOS
backhaul
NLOS access
Wi-Fi region
wired connection
Computer Networks and Internets -- Module 4 77 Spring, 2014
Copyright  2014. All rights reserved.
Standards For Wireless PANs
d Used in industrial as well as consumer products
d Remote control protocols optimized for short commands
(do not need high data rate)
2
222222222222222222222222222222222222222222222222222222222222222222222
Standard Purpose
2
222222222222222222222222222222222222222222222222222222222222222222222
802.15.1a Bluetooth technology (1 Mbps; 2.4 GHz)
2
222222222222222222222222222222222222222222222222222222222222222222222
802.15.2 Coexistence among PANs (noninterference)
2
222222222222222222222222222222222222222222222222222222222222222222222
802.15.3 High rate PAN (55 Mbps; 2.4 GHz)
2
222222222222222222222222222222222222222222222222222222222222222222222
802.15.3a Ultra Wideband (UWB) high rate PAN (110 Mbps; 2.4 GHz)
2
222222222222222222222222222222222222222222222222222222222222222222222
802.15.4 ZigBee technology – low data rate PAN for remote control
2
222222222222222222222222222222222222222222222222222222222222222222222
802.15.4a Alternative low data rate PAN that uses low power
2
222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 78 Spring, 2014
Copyright  2014. All rights reserved.
Other Short-Distance Wireless Technologies
Computer Networks and Internets -- Module 4 79 Spring, 2014
Copyright  2014. All rights reserved.
Other Short-Distance Wireless Technologies
d Infrared Data Association (IrDA)
– Family of standards (data rate of 2.4 Kbps to 16 Mbps)
– Range of several meters
– Directional transmission with cone covering 30 degrees
– Generally low power consumption
Computer Networks and Internets -- Module 4 79 Spring, 2014
Copyright  2014. All rights reserved.
Other Short-Distance Wireless Technologies
d Infrared Data Association (IrDA)
– Family of standards (data rate of 2.4 Kbps to 16 Mbps)
– Range of several meters
– Directional transmission with cone covering 30 degrees
– Generally low power consumption
d Radio Frequency IDentification (RFID) tags
– Over 140 RFID standards exist
– Passive RFID tags draw power from reader’s signal
– Active RFID tags contain a multi-year battery
– Frequencies from less than 100 MHz to 868-954 MHz
Computer Networks and Internets -- Module 4 79 Spring, 2014
Copyright  2014. All rights reserved.
Wireless WAN Technologies
d Cellular communication systems
d Satellite communication systems
Computer Networks and Internets -- Module 4 80 Spring, 2014
Copyright  2014. All rights reserved.
Cellular Telephones And Data Networking
d There are more cell phones in the world than computers
d The smart phone is now the network interface of choice in
emerging countries
d Cell phone providers have switched to the Internet protocols
Computer Networks and Internets -- Module 4 81 Spring, 2014
Copyright  2014. All rights reserved.
Cellular Telephones And Data Networking
d There are more cell phones in the world than computers
d The smart phone is now the network interface of choice in
emerging countries
d Cell phone providers have switched to the Internet protocols
all
Computer Networks and Internets -- Module 4 81 Spring, 2014
Copyright  2014. All rights reserved.
Current Cellular System Architecture
d Cell has a tower that connects to mobile switching system
d Each mobile switching system connects to PSTN or Internet
. . . . . .
Public Switched Telephone Network plus a connection to the Internet
wired connection
Mobile
Switching
Centers cell
d Handoff decision made by infrastructure
Computer Networks and Internets -- Module 4 81 Spring, 2014
Copyright  2014. All rights reserved.
Theoretical And Actual Cells
theoretical
Computer Networks and Internets -- Module 4 82 Spring, 2014
Copyright  2014. All rights reserved.
Theoretical And Actual Cells
actual
theoretical
d Problems include: overlap and gaps
Computer Networks and Internets -- Module 4 82 Spring, 2014
Copyright  2014. All rights reserved.
Cell Size And Expected Cell Phone Density
d Textbook diagrams show equal-size cells
d In practice, cell size related to expected number of cell
phones
d Smaller cells used in high-population areas
d Larger cells used in rural areas
Computer Networks and Internets -- Module 4 83 Spring, 2014
Copyright  2014. All rights reserved.
Frequency Assignment
Computer Networks and Internets -- Module 4 84 Spring, 2014
Copyright  2014. All rights reserved.
Frequency Assignment
d Goal: minimize interference
Computer Networks and Internets -- Module 4 84 Spring, 2014
Copyright  2014. All rights reserved.
Frequency Assignment
d Goal: minimize interference
d Principle
Interference can be minimized if an adjacent pair of cells do not
use the same frequency.
Computer Networks and Internets -- Module 4 84 Spring, 2014
Copyright  2014. All rights reserved.
Frequency Assignment
d Goal: minimize interference
d Principle
Interference can be minimized if an adjacent pair of cells do not
use the same frequency.
d Method: devise an assignment of frequencies such that two
adjacent cells are not assigned the same frequency
Computer Networks and Internets -- Module 4 84 Spring, 2014
Copyright  2014. All rights reserved.
Frequency Assignment
d Goal: minimize interference
d Principle
Interference can be minimized if an adjacent pair of cells do not
use the same frequency.
d Method: devise an assignment of frequencies such that two
adjacent cells are not assigned the same frequency
d Technique: create a pattern that can be repeated
Computer Networks and Internets -- Module 4 84 Spring, 2014
Copyright  2014. All rights reserved.
Frequency Assignment
d Goal: minimize interference
d Principle
Interference can be minimized if an adjacent pair of cells do not
use the same frequency.
d Method: devise an assignment of frequencies such that two
adjacent cells are not assigned the same frequency
d Technique: create a pattern that can be repeated
d Known as a cluster approach
Computer Networks and Internets -- Module 4 84 Spring, 2014
Copyright  2014. All rights reserved.
Example Clusters That Are Used
3-cell 4-cell 7-cell 12-cell
d Each cell in cluster assigned a unique frequency
d When replicated, clusters cover 2-dimensional surface
d Mathematically, the concept is tiling the plane
Computer Networks and Internets -- Module 4 85 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Cluster Replication
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
d No pair of adjacent cells assigned the same frequency
Computer Networks and Internets -- Module 4 86 Spring, 2014
Copyright  2014. All rights reserved.
Four Generations Of Cellular Networks
d 1G used analog (1970s - 1980s)
d 2G and 2.5G use digital signals for voice (1990s-)
d 3G and 3.5G also include data transfer at rates of 400 Kbps
through 2 Mbps (2000s-)
d 4G offers higher data rates and support for real-time
multimedia such as television (2008-)
Computer Networks and Internets -- Module 4 87 Spring, 2014
Copyright  2014. All rights reserved.
Cellular Technologies
d Many competing standards
d European Conference Of Postal and Telecommunications
Administrators chose a TDMA technology known as Global
System for Mobile Communications (GSM) for Europe
d In US, each carrier created its own standards
– Motorola created iDEN using TDMA
– Others adopted IS-95A, which uses CDMA
d Japan chose PDC, which uses TDMA
Computer Networks and Internets -- Module 4 88 Spring, 2014
Copyright  2014. All rights reserved.
Summary Of 2G Wireless Standards
2
2222222222222222222222222222222222222222222
Approach Standard Generation
2
2222222222222222222222222222222222222222222
GSM 2G
2
2222222222222222222222222222222
GPRS 2.5G
2
2222222222222222222222222222222
GSM EDGE (EGPRS) 2.5G
2
2222222222222222222222222222222
EDGE Evolution 2.5G
2
2222222222222222222222222222222
HSCSD 2.5G
2
2222222222222222222222222222222222222222222
CDMA
IS-95A 2G
2
2222222222222222222222222222222
IS-95B 2.5G
2
2222222222222222222222222222222222222222222
TDMA
iDEN 2G
2
2222222222222222222222222222222
IS-136 2G
2
2222222222222222222222222222222
PDC 2G
2
2222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d Note: 2.5G standards extend 2G standards by adding some
features of 3G
Computer Networks and Internets -- Module 4 89 Spring, 2014
Copyright  2014. All rights reserved.
Third Generation Standards
d 2G standards were consolidated and extended:
222222222222222222222222222222222222222222222222222222
Approach Standard Successor To
222222222222222222222222222222222222222222222222222222
WCDMA
UMTS IS-136, IS-95A, EDGE, PDC
222222222222
HSDPA UMTS
222222222222222222222222222222222222222222222222222222
1xRTT IS-95B
2222222222222222222222222222222222222222
CDMA 2000 EVDO 1xRTT
2222222222222222222222222222222222222222
EVDV 1xRTT
222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d EVDO and EVDV data transfer standards evolved at
approximately the same time to deliver data at 2.4 Mbps or
3.1 Mbps
d HSDPA can achieve 14 Mbps
Computer Networks and Internets -- Module 4 90 Spring, 2014
Copyright  2014. All rights reserved.
Fourth Generation Standards
d Initially, the ITU insisted on high performance before using
the term 4G
d Eventually, the ITU allowed intermediate technologies “to be
advertised” as 4G
2222222222222222222222222222222222222222222222222222222222222222
Classification Standard
2222222222222222222222222222222222222222222222222222222222222222
Can be advertised as 4G HSPA+, HTC Evo 4G, LTE, WiMAX
2222222222222222222222222222222222222222222222222222222222222222
Adheres to IMT-Advanced LTE Advanced, WiMAX Advanced
2222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
11
1
1
1
1
1
11
1
1
1
1
1
Computer Networks and Internets -- Module 4 91 Spring, 2014
Copyright  2014. All rights reserved.
Review Of Satellite Types
d Low Earth Orbit (LEO)
– Appears to move across the sky
– Requires a cluster of 66 satellites to cover the earth
surface
d Medium Earth Orbit (MEO)
– Covers the poles
– Seldom used for general communication
d Geostationary Earth Orbit (GEO)
– Appears to remain stationary in the sky
– Requires only three satellites to cover the earth’s surface
Computer Networks and Internets -- Module 4 92 Spring, 2014
Copyright  2014. All rights reserved.
GEO Coverage Of The Earth’s surface
d In the best case, only three satellites needed
EARTH
satellites
satellite
coverage
(footprint)
d Surface area covered known as footprint
d Ratio of distance to earth’s diameter approximately to scale
Computer Networks and Internets -- Module 4 93 Spring, 2014
Copyright  2014. All rights reserved.
VSAT Satellite Technology
d Stands for Very Small Aperture Terminal
d Parabolic antenna focuses incoming signal
cross section
of dish antenna
receiver
incoming energy
d Example use: connect a company’s retail stores
Computer Networks and Internets -- Module 4 94 Spring, 2014
Copyright  2014. All rights reserved.
Frequency Bands Used With VSAT Technology
d Multiple bands available
d Each band has disadvantages
222222222222222222222222222222222222222222222222222222222222222222222
Band Frequency Footprint Signal Strength Effect Of Rain
222222222222222222222222222222222222222222222222222222222222222222222
C Band 3 - 7 GHz Large Low Medium
222222222222222222222222222222222222222222222222222222222222222222222
Ku 10 - 18 GHz Medium Medium Moderate
222222222222222222222222222222222222222222222222222222222222222222222
Ka 18 - 31 GHz Small High Severe
222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 4 95 Spring, 2014
Copyright  2014. All rights reserved.
Global Positioning System (GPS)
Computer Networks and Internets -- Module 4 96 Spring, 2014
Copyright  2014. All rights reserved.
Global Positioning System (GPS)
d 24 satellites
Computer Networks and Internets -- Module 4 96 Spring, 2014
Copyright  2014. All rights reserved.
Global Positioning System (GPS)
d 24 satellites
d Arranged in 6 orbital planes
Computer Networks and Internets -- Module 4 96 Spring, 2014
Copyright  2014. All rights reserved.
Global Positioning System (GPS)
d 24 satellites
d Arranged in 6 orbital planes
d Civilian version has accuracy between 20 and 2 meters
Computer Networks and Internets -- Module 4 96 Spring, 2014
Copyright  2014. All rights reserved.
Global Positioning System (GPS)
d 24 satellites
d Arranged in 6 orbital planes
d Civilian version has accuracy between 20 and 2 meters
d Relevance to data networking
Computer Networks and Internets -- Module 4 96 Spring, 2014
Copyright  2014. All rights reserved.
Global Positioning System (GPS)
d 24 satellites
d Arranged in 6 orbital planes
d Civilian version has accuracy between 20 and 2 meters
d Relevance to data networking
– Provides accurate time
– Can be used to synchronize remote points in a data
network (needed by some protocols)
Computer Networks and Internets -- Module 4 96 Spring, 2014
Copyright  2014. All rights reserved.
Software Defined Radio
d Also known as a software programmable radio
d New approach emerging from research
d Exciting possibilities
d Replaces fixed radio components with mechanism that can be
controlled by a programmable processor
d Can make better use of spectrum
d Potential downside: user might choose parameters that
interfere with police or emergency vehicles
Computer Networks and Internets -- Module 4 97 Spring, 2014
Copyright  2014. All rights reserved.
Features Controlled In A Software Radio
2
2222222222222222222222222222222222222222222222222222222222222222222222
Feature Description
2
2222222222222222222222222222222222222222222222222222222222222222222222
Frequency The exact set of frequencies used at a given time
2
2222222222222222222222222222222222222222222222222222222222222222222222
Power The amount of power the transmitter emits
2
2222222222222222222222222222222222222222222222222222222222222222222222
Modulation The signal and channel coding and modulation
2
2222222222222222222222222222222222222222222222222222222222222222222222
Multiplexing Any combination of CDMA, TDMA, FDMA and others
2
2222222222222222222222222222222222222222222222222222222222222222222222
Signal Direction Antennas can be tuned for a specific direction
2
2222222222222222222222222222222222222222222222222222222222222222222222
MAC Protocol All aspects of framing and MAC addressing
2
2222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d Enabling technologies
– Tunable analog filters to select frequencies and control
power
– Multiple antenna management to select direction
Computer Networks and Internets -- Module 4 98 Spring, 2014
Copyright  2014. All rights reserved.
Multiple Antenna Management
d Needed because
– No single antenna handles all frequencies
– Directional signals important in focusing communication
d Multiple-Input Multiple-Output (MIMO) technology can aim
transmission or reception
Computer Networks and Internets -- Module 4 99 Spring, 2014
Copyright  2014. All rights reserved.
LAN Extensions
Network Design Tradeoffs
Computer Networks and Internets -- Module 4 101 Spring, 2014
Copyright  2014. All rights reserved.
Network Design Tradeoffs
d Network technology engineered for
– Distance spanned
– Maximum data rate
– Cost
Computer Networks and Internets -- Module 4 101 Spring, 2014
Copyright  2014. All rights reserved.
Network Design Tradeoffs
d Network technology engineered for
– Distance spanned
– Maximum data rate
– Cost
d LAN technologies maximize data rate and minimize cost
Computer Networks and Internets -- Module 4 101 Spring, 2014
Copyright  2014. All rights reserved.
Network Design Tradeoffs
d Network technology engineered for
– Distance spanned
– Maximum data rate
– Cost
d LAN technologies maximize data rate and minimize cost
d General principle
A maximum length specification is a fundamental part of LAN
technology; LAN hardware will not work correctly over wires
that exceed the bound.
Computer Networks and Internets -- Module 4 101 Spring, 2014
Copyright  2014. All rights reserved.
Technologies That Extend LANs
d Variety of techniques have been invented to extend LANs
d Three key extension technologies
– Fiber modems
– Repeaters
– Bridges
Computer Networks and Internets -- Module 4 102 Spring, 2014
Copyright  2014. All rights reserved.
Fiber Modems
d Communicate over an optical fiber
d Can span long distance
d Provide standard network interface (e.g., Ethernet)
d Can be used to extend connection between computer and
network
d Illustration of an extended network connection
Ethernet hub
or switch
connection
from computer
fiber modem fiber modem
optical fiber
Computer Networks and Internets -- Module 4 103 Spring, 2014
Copyright  2014. All rights reserved.
Repeaters
d Operate at layer 1 (do not understand packets)
d Repeat and amplify signals
d Low cost
d Example use: extended infrared sensor on a cable box
repeater
remote
sensor
Cable box
connection to
cable box extended connection
d Disadvantage: amplifies and repeats noise
Computer Networks and Internets -- Module 4 104 Spring, 2014
Copyright  2014. All rights reserved.
Switches and
Switched Networks
Bridge
d Originally sold as stand-alone device to extend two LAN
segments
d Operates at layer 2
d Can connect two or more segments
d Listens in promiscuous mode on each segment and sends
copy of each frame to other segments
d Does not copy noise, collisions, or frames that are incorrectly
formed
d Makes connected segments appear to be a single, large LAN
d Uses source MAC address in frames to learn computer
locations automatically, and uses destination MAC address to
filter frames
Computer Networks and Internets -- Module 4 106 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Bridge boots – – –
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Bridge boots – – –
A sends to B A – Both Segments
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Bridge boots – – –
A sends to B A – Both Segments
B sends to A A, B – Segment 1 only
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Bridge boots – – –
A sends to B A – Both Segments
B sends to A A, B – Segment 1 only
X broadcasts A, B X Both Segments
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Bridge boots – – –
A sends to B A – Both Segments
B sends to A A, B – Segment 1 only
X broadcasts A, B X Both Segments
Y sends to A A, B X, Y Both Segments
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Bridge boots – – –
A sends to B A – Both Segments
B sends to A A, B – Segment 1 only
X broadcasts A, B X Both Segments
Y sends to A A, B X, Y Both Segments
Y sends to X A, B X, Y Segment 2 only
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Bridge boots – – –
A sends to B A – Both Segments
B sends to A A, B – Segment 1 only
X broadcasts A, B X Both Segments
Y sends to A A, B X, Y Both Segments
Y sends to X A, B X, Y Segment 2 only
C sends to Z A, B, C X, Y Both Segments
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Bridge Learning
A B C X Y Z
hub 1 hub 2
bridge
LAN segment
Event Segment 1 Segment 2 Frame Sent
Bridge boots – – –
A sends to B A – Both Segments
B sends to A A, B – Segment 1 only
X broadcasts A, B X Both Segments
Y sends to A A, B X, Y Both Segments
Y sends to X A, B X, Y Segment 2 only
C sends to Z A, B, C X, Y Both Segments
Z sends to X A, B, C X, Y, Z Segment 2 only
Computer Networks and Internets -- Module 4 107 Spring, 2014
Copyright  2014. All rights reserved.
General Principle
Because a bridge permits simultaneous activity on attached
segments, a pair of computers on one segment can communicate
at the same time as a pair of computers on another segment.
d Each segment forms a separate collision domain
Computer Networks and Internets -- Module 4 108 Spring, 2014
Copyright  2014. All rights reserved.
A Problem With Bridges
Computer Networks and Internets -- Module 4 109 Spring, 2014
Copyright  2014. All rights reserved.
A Problem With Bridges
d A bridge always forwards broadcast and multicast frames
Computer Networks and Internets -- Module 4 109 Spring, 2014
Copyright  2014. All rights reserved.
A Problem With Bridges
d A bridge always forwards broadcast and multicast frames
d Consider four bridges used to connect four LAN segments in
a loop
hub 1 hub 2 hub 3 hub 4
Bridge 1 Bridge 2 Bridge 3
Bridge 4
Computer Networks and Internets -- Module 4 109 Spring, 2014
Copyright  2014. All rights reserved.
A Problem With Bridges
d A bridge always forwards broadcast and multicast frames
d Consider four bridges used to connect four LAN segments in
a loop
hub 1 hub 2 hub 3 hub 4
Bridge 1 Bridge 2 Bridge 3
Bridge 4
d What happens if a computer attached to one of the segments
sends a broadcast frame?
Computer Networks and Internets -- Module 4 109 Spring, 2014
Copyright  2014. All rights reserved.
A Problem With Bridges
d A bridge always forwards broadcast and multicast frames
d Consider four bridges used to connect four LAN segments in
a loop
hub 1 hub 2 hub 3 hub 4
Bridge 1 Bridge 2 Bridge 3
Bridge 4
d What happens if a computer attached to one of the segments
sends a broadcast frame?
Copies of the frame cycle around the bridges forever!
Computer Networks and Internets -- Module 4 109 Spring, 2014
Copyright  2014. All rights reserved.
Distributed Spanning Tree
d Prevents a packet from circulating around a cycle of bridges
d Initial protocol developed by Perlman at Digital Equipment
Corporation
d Executed by each bridge when the bridge boots
d Allows bridges to break a forwarding cycle
d Name Spanning Tree Protocol (STP) applies to basic
protocol
d Many variants have been created with extended names
Computer Networks and Internets -- Module 4 110 Spring, 2014
Copyright  2014. All rights reserved.
How STP Works
d Executed at startup
d Distributed algorithm
– Each bridge runs it independently
– No central coordination
d Algorithm guaranteed to converge quickly
d No data packets forwarded until STP finishes
Computer Networks and Internets -- Module 4 111 Spring, 2014
Copyright  2014. All rights reserved.
Steps Taken By STP
d Bridges exchange a series of STP messages (frames) that are
used to
– Elect a root bridge
– Select a shortest path to the root
d Each bridge disables forwarding broadcast or multicast
except along the selected path
d Result is a tree
Computer Networks and Internets -- Module 4 112 Spring, 2014
Copyright  2014. All rights reserved.
Bridging Is Alive And Well
d Stand-alone bridge devices are seldom used
d Bridge technology is now incorporated into other devices
– DSL modems
– Cable modems
– Wi-Fi “repeaters”
– Satellite systems
Computer Networks and Internets -- Module 4 113 Spring, 2014
Copyright  2014. All rights reserved.
Switching
Layer 2 Switch
d Physically similar to a layer 2 hub
– Network device
– Connects multiple computers
– Computers appear to be attached to a LAN segment
d Logically similar to a set of bridged networks
– Switch understands packets, not just signals
– No contention, and no need for CSMA / CD
– Ports operate in parallel
– Switch can include services that examine packets
Computer Networks and Internets -- Module 4 115 Spring, 2014
Copyright  2014. All rights reserved.
Logical Function Of A Switch
switch
computers
simulated
bridge
simulated Ethernet segment
port on
the switch
d Switch offers same advantage as bridged networks: multiple
transfers can occur simultaneously
Computer Networks and Internets -- Module 4 116 Spring, 2014
Copyright  2014. All rights reserved.
Actual Switch Architecture
switch
computers
fabric
(interconnect)
interfaces
d Switching fabric used for high throughput
Computer Networks and Internets -- Module 4 117 Spring, 2014
Copyright  2014. All rights reserved.
Thought Problem
Suppose a computer is unplugged from a port on a Layer 2
switch and plugged into another port. Suppose the computer
does not send any packets. Will the computer continue to
receive unicast frames that are sent to it? Why or why not?
Computer Networks and Internets -- Module 4 118 Spring, 2014
Copyright  2014. All rights reserved.
Virtual Local Area Network (VLAN) Switch
d Physically
– Similar to a conventional Layer 2 switch
– Has ports to which computer can connect
d Logically
– Manager can configure one or more broadcast domains
– Each port assigned to one broadcast domain
d Frame sent to broadcast or multicast address only propagated
to ports in the same broadcast domain
Computer Networks and Internets -- Module 4 119 Spring, 2014
Copyright  2014. All rights reserved.
Networking Technologies:
Past And Present
A Wide Variety of Networking Technologies
Computer Networks and Internets -- Module 4 121 Spring, 2014
Copyright  2014. All rights reserved.
A Wide Variety of Networking Technologies
d LAN technologies
– Token ring (esp., IBM Token Ring)
– FDDI/ CDDI
Computer Networks and Internets -- Module 4 121 Spring, 2014
Copyright  2014. All rights reserved.
A Wide Variety of Networking Technologies
d LAN technologies
– Token ring (esp., IBM Token Ring)
– FDDI/ CDDI
d WAN technologies
– X.25
– Frame Relay
– ATM
– ISDN
– MPLS
d See Chapter 19 for a longer list
Computer Networks and Internets -- Module 4 121 Spring, 2014
Copyright  2014. All rights reserved.
Asynchronous Transfer Mode (ATM)
d Created by phone companies in 1990s
d Intended as replacement for the Internet
d Paradigm was connection-oriented
d Used small cells (53 octets)
d Network guaranteed per-connection Quality of Service (QoS)
– Throughput
– Bound on delay
– Bound on jitter
Computer Networks and Internets -- Module 4 122 Spring, 2014
Copyright  2014. All rights reserved.
Asynchronous Transfer Mode (ATM)
(continued)
d QoS in ATM
– Specified for each transfer (i.e., each TCP connection)
– Required setup time
– Meant each switch maintained state
– Was difficult/impossible to enforce at high speed
d Despite the failure of ATM, proponents still argue that
Internet needs QoS
Computer Networks and Internets -- Module 4 123 Spring, 2014
Copyright  2014. All rights reserved.
Summary
d Packet switching divides data into small packets
d Each packet (frame) specifies destination
d Access technologies are used in the last mile
d Media access can be controlled, random, or channelized
d IEEE specifies Local Area Network standards
d Topologies used with LANs: bus, star, ring, and mesh
d Ethernet is the de facto standard for wired LANs
d Current Ethernets use twisted pair wiring
Computer Networks and Internets -- Module 4 124 Spring, 2014
Copyright  2014. All rights reserved.
Summary
d Wireless networks include PANs, LANs, and WANs,
d Cellular telephones are using packet technology
d Satellite can deliver data through a dish antenna
d Software-defined radio adds flexibility to wireless devices
d LAN extensions include repeaters and bridges
d Once stand-alone devices, bridges are now incorporated into
other devices
d Layer 2 switch acts like bridged networks
Computer Networks and Internets -- Module 4 125 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
MODULE V
Internetworking:
Concepts, Addressing, Architecture,
Protocols, Datagram Processing,
Transport-Layer Protocols, And
End-To-End Services
Computer Networks and Internets -- Module 5 1 Spring, 2014
Copyright  2014. All rights reserved.
Topics
d Internet concept and architecture
d Internet addressing
d Internet Protocol packets (datagrams)
d Datagram forwarding
d Address resolution
d Error reporting mechanism
d Configuration
d Network address translation
Computer Networks and Internets -- Module 5 2 Spring, 2014
Copyright  2014. All rights reserved.
Topics
(continued)
d Transport layer protocol characteristics and techniques
d Message transport with the User Datagram Protocol (UDP)
d Stream transport with the Transmission Control Protocol
(TCP)
d Routing algorithms and protocols
d Internet multicast and multicast routing
Computer Networks and Internets -- Module 5 3 Spring, 2014
Copyright  2014. All rights reserved.
Internet Concept
And Internet Architecture
What Is The Internet?
Computer Networks and Internets -- Module 5 5 Spring, 2014
Copyright  2014. All rights reserved.
What Is The Internet?
d Users see it as services and applications
– Web and e-commerce
– Email, texting, instant messenger
– Social networking and blogs
– Music and video download (and upload)
– Voice and video teleconferencing
Computer Networks and Internets -- Module 5 5 Spring, 2014
Copyright  2014. All rights reserved.
What Is The Internet?
d Users see it as services and applications
– Web and e-commerce
– Email, texting, instant messenger
– Social networking and blogs
– Music and video download (and upload)
– Voice and video teleconferencing
d Networking professionals see it as infrastructure
– Platform on which above services run
– Grows rapidly
Computer Networks and Internets -- Module 5 5 Spring, 2014
Copyright  2014. All rights reserved.
Growth Of The Internet
1981 1985 1990 1995 2000 2005 2010
0M
100M
200M
300M
400M
500M
600M
700M
800M
900M
1000M
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
......
......
......
......
........
..........
.........
......
............
..........
............
..........
.........
.........
d Plot shows number of computers on the Internet each year
Computer Networks and Internets -- Module 5 6 Spring, 2014
Copyright  2014. All rights reserved.
Growth Of The Internet (log scale)
1981 1985 1990 1995 2000 2005 2010
102
103
104
105
106
107
108
109
1010
. . . . .
.......
......
......
. . . . .
.......
..........
........
........
......
......
......
......
.......
......
......
......
......
......
......
......
. . . . .
......
......
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
d Plot shows number of computers on the Internet each year
Computer Networks and Internets -- Module 5 7 Spring, 2014
Copyright  2014. All rights reserved.
Actual Size Of The Internet
d Previous plots are somewhat misleading
– Derived by walking the Domain Name System
– Only report hosts with IP addresses
d Since around 2000, many Internet devices
– Do not have a fixed IP address
– Connect behind a NAT box (e.g., wireless router)
d Actual size is difficult to measure
Computer Networks and Internets -- Module 5 8 Spring, 2014
Copyright  2014. All rights reserved.
Internet Architecture And Design
Computer Networks and Internets -- Module 5 9 Spring, 2014
Copyright  2014. All rights reserved.
Internet Architecture And Design
d If one were to design a global communication system from
scratch
– How should it be organized?
– Which technology or technologies should be used?
Computer Networks and Internets -- Module 5 9 Spring, 2014
Copyright  2014. All rights reserved.
Internet Architecture And Design
d If one were to design a global communication system from
scratch
– How should it be organized?
– Which technology or technologies should be used?
d The challenges
– Which applications should it support?
– Which network technologies should it use
* PANs / LANs / MANs / WANs
* Wired / wireless
* Terrestrial / satellite
Computer Networks and Internets -- Module 5 9 Spring, 2014
Copyright  2014. All rights reserved.
Internet Architecture And Design
(continued)
d Key principles
– Internet is designed to accommodate extant services plus
new services that will be invented
– Internet is designed to accommodate any network
technology, allowing each technology to be used where
appropriate
Computer Networks and Internets -- Module 5 10 Spring, 2014
Copyright  2014. All rights reserved.
Internet Philosophy
d Infrastructure
– Provides a packet communication service
– Treats all attached endpoints as equal (any endpoint can
send a packet to any other endpoint)
– Does not restrict or dictate packet contents
– Does not restrict or dictate underlying network
technologies
d Attached endpoints
– Run applications that use the network to communicate
with applications on other endpoints
– Control all content and provide all services
Computer Networks and Internets -- Module 5 11 Spring, 2014
Copyright  2014. All rights reserved.
Advantages Of The Internet Philosophy
d Accommodates heterogeneous underlying networks
d Accommodates arbitrary applications and services
d Separates communication from services
Computer Networks and Internets -- Module 5 12 Spring, 2014
Copyright  2014. All rights reserved.
Internet
d Follows a network of networks approach
d Allows arbitrary networks to be included
d Uses IP routers to interconnect individual networks
d Permits each router to connect two or more networks
routers
networks
Computer Networks and Internets -- Module 5 13 Spring, 2014
Copyright  2014. All rights reserved.
Internet Architecture: Logical View
host
computers
d Computers attached to Internet known as host computers
d To a host, Internet appears to be one giant network
Computer Networks and Internets -- Module 5 14 Spring, 2014
Copyright  2014. All rights reserved.
Internet Architecture: Physical View
net 2
net 4
net 5
net 3
net 1
router
physical net
host
computers
d Network of heterogeneous networks connected by routers
d Each host attaches to a network
Computer Networks and Internets -- Module 5 15 Spring, 2014
Copyright  2014. All rights reserved.
Before We Discuss
Internet Addressing
The Situation
d Internet addressing is defined by the Internet Protocol (IP)
d IP is changing
– Current version is 4 (IPv4)
– New version is 6 (IPv6)
Computer Networks and Internets -- Module 5 17 Spring, 2014
Copyright  2014. All rights reserved.
History Of The Internet Protocol
d IP separated from TCP in 1978
d Version 1-3 discarded quickly; version 4 was the first
version used by researchers
d By early 1990s, a movement started that clamored for a new
version of IP because the 32-bit address space would run out
“soon”
d In 1993, the IETF received proposals, and formed a working
group to find a compromise
d By 1995, a new version had been proposed and documents
written
Computer Networks and Internets -- Module 5 18 Spring, 2014
Copyright  2014. All rights reserved.
Background Of The New Version Of IP
d Various groups offered opinions about the features
Computer Networks and Internets -- Module 5 19 Spring, 2014
Copyright  2014. All rights reserved.
Background Of The New Version Of IP
d Various groups offered opinions about the features
– Cable companies wanted support for broadcast delivery
Computer Networks and Internets -- Module 5 19 Spring, 2014
Copyright  2014. All rights reserved.
Background Of The New Version Of IP
d Various groups offered opinions about the features
– Cable companies wanted support for broadcast delivery
– Telephone companies argued that everyone would soon
be using a connection-oriented network technology
(ATM)
Computer Networks and Internets -- Module 5 19 Spring, 2014
Copyright  2014. All rights reserved.
Background Of The New Version Of IP
d Various groups offered opinions about the features
– Cable companies wanted support for broadcast delivery
– Telephone companies argued that everyone would soon
be using a connection-oriented network technology
(ATM)
– Several groups wanted mobility
Computer Networks and Internets -- Module 5 19 Spring, 2014
Copyright  2014. All rights reserved.
Background Of The New Version Of IP
d Various groups offered opinions about the features
– Cable companies wanted support for broadcast delivery
– Telephone companies argued that everyone would soon
be using a connection-oriented network technology
(ATM)
– Several groups wanted mobility
– The military pushed for better security
Computer Networks and Internets -- Module 5 19 Spring, 2014
Copyright  2014. All rights reserved.
Background Of The New Version Of IP
d Various groups offered opinions about the features
– Cable companies wanted support for broadcast delivery
– Telephone companies argued that everyone would soon
be using a connection-oriented network technology
(ATM)
– Several groups wanted mobility
– The military pushed for better security
d A compromise was reached: IP version 6 includes all the
above
Computer Networks and Internets -- Module 5 19 Spring, 2014
Copyright  2014. All rights reserved.
The Uphill Battle To Change IPv4
d IP is difficult to change because
– IP lies at the heart of the Internet protocols
– Version 4 of IP has a proven track record
The success of the current version of IP is incredible — the
protocol has accommodated changes in hardware technologies,
heterogeneous networks, and extremely large scale.
Computer Networks and Internets -- Module 5 20 Spring, 2014
Copyright  2014. All rights reserved.
The Hourglass Model
Appl1 Appl2 Appln
Net1 Net2 Netm
IP
. . .
. . .
d IP lies in the middle — changing it means changing all
hosts and routers in the Internet
Computer Networks and Internets -- Module 5 21 Spring, 2014
Copyright  2014. All rights reserved.
Our Approach
d In the current Internet, both IPv4 and IPv6 are relevant and
important
d Throughout the course, we will
– Discuss general concepts
– See how IPv4 and IPv6 implement the concepts
Computer Networks and Internets -- Module 5 22 Spring, 2014
Copyright  2014. All rights reserved.
Internet Addressing
Addressing In The Internet
Computer Networks and Internets -- Module 5 24 Spring, 2014
Copyright  2014. All rights reserved.
Addressing In The Internet
d Can we use MAC addresses across an internet?
Computer Networks and Internets -- Module 5 24 Spring, 2014
Copyright  2014. All rights reserved.
Addressing In The Internet
d Can we use MAC addresses across an internet?
d No: heterogeneity means
– Multiple types of MAC addresses
– MAC address meaningful on one network not
meaningful on another
Computer Networks and Internets -- Module 5 24 Spring, 2014
Copyright  2014. All rights reserved.
Addressing In The Internet
d Can we use MAC addresses across an internet?
d No: heterogeneity means
– Multiple types of MAC addresses
– MAC address meaningful on one network not
meaningful on another
d Solution
– Create new addressing scheme that is independent of
MAC addresses
Computer Networks and Internets -- Module 5 24 Spring, 2014
Copyright  2014. All rights reserved.
The Two Forms Of Addresses
d Identity
– Unique number assigned to each endpoint
– Analogous to Ethernet address
d Locator
– Endpoint address encodes location information, such as
* Geographic location
* Location relative to a service provider
* Computer on a given physical network
Computer Networks and Internets -- Module 5 25 Spring, 2014
Copyright  2014. All rights reserved.
Two Principles To Keep In Mind
Both identify and locator forms have advantages in
some situations; no form is best in all cases
Addressing is inherently linked to routing; the
choice of an addressing scheme affects the cost of
computing and maintaining routes
Computer Networks and Internets -- Module 5 26 Spring, 2014
Copyright  2014. All rights reserved.
The IPv4 Addressing Scheme
d Unique number is assigned to each Internet host
d 32-bit binary value known as IPv4 address
d Virtual address, not derived from MAC address
d Divided into two parts
– Prefix identifies physical network (locator)
– Suffix identifies a host on the network (identity)
Computer Networks and Internets -- Module 5 27 Spring, 2014
Copyright  2014. All rights reserved.
Dotted Decimal Notation (IPv4)
d Convenient for humans
d Divides IPv4 address into octets of eight bits each
d Represents each octet in decimal separated by dots
Computer Networks and Internets -- Module 5 28 Spring, 2014
Copyright  2014. All rights reserved.
Dotted Decimal Notation (IPv4)
d Convenient for humans
d Divides IPv4 address into octets of eight bits each
d Represents each octet in decimal separated by dots
d Examples
22222222222222222222222222222222222222222222222222222222222222222222222222
32-bi t Binary Number Equivalent Dot ted Decimal
22222222222222222222222222222222222222222222222222222222222222222222222222
10000001 00110100 00000110 00000000 129 . 52 . 6 . 0
22222222222222222222222222222222222222222222222222222222222222222222222222
11000000 00000101 00110000 00000011 192 . 5 . 48 . 3
22222222222222222222222222222222222222222222222222222222222222222222222222
00001010 00000010 00000000 00100101 10 . 2 . 0 . 37
22222222222222222222222222222222222222222222222222222222222222222222222222
10000000 00001010 00000010 00000011 128 . 10 . 2 . 3
22222222222222222222222222222222222222222222222222222222222222222222222222
10000000 10000000 11111111 00000000 128 . 128 . 255 . 0
2222222222222222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 5 28 Spring, 2014
Copyright  2014. All rights reserved.
Division Between Prefix And Suffix
d Original scheme (classful addressing)
– Each address divided on octet (8-bit) boundary
– Division could be computed from the address
d Current scheme (classless addressing)
– Formal name Classless Inter-Domain Routing (CIDR)
– Division permitted at arbitrary bit position
– Boundary must be specified external to the address
Computer Networks and Internets -- Module 5 29 Spring, 2014
Copyright  2014. All rights reserved.
Classful Addressing
d Now historic
d Explains IPv4 multicast range
0 prefix suffix
1 0 prefix suffix
1 1 0 prefix suffix
1 1 1 0 multicast address
1 1 1 1 reserved (not assigned)
Class A
Class B
Class C
Class D
Class E
0 1 2 3 4 8 16 24 31
Bits
Computer Networks and Internets -- Module 5 30 Spring, 2014
Copyright  2014. All rights reserved.
Address Mask
d Required with classless addressing
d Associated with a network
d Specifies division of addresses into network prefix and host
suffix for that network
d 32-bit binary value
– 1-bits correspond to prefix
– 0-bits correspond to suffix
d Example mask that specifies six bits of prefix
11111100 00000000 00000000 00000000
Computer Networks and Internets -- Module 5 31 Spring, 2014
Copyright  2014. All rights reserved.
CIDR Notation
d Used by humans to enter address mask
d Avoids dotted decimal errors
d Follows address with slash and integer X, where X is the
number of prefix bits
d Example
– In dotted decimal, a 26-bit mask is
255 . 255 . 255 . 192
– CIDR merely writes
/26
Computer Networks and Internets -- Module 5 32 Spring, 2014
Copyright  2014. All rights reserved.
Table Of CIDR And Dotted Decimal Equivalences
Length (CIDR) Address Mask Notes
/ 0 0 0 0 0
. . .
/ 1 128 0 0 0
. . .
/ 2 192 0 0 0
. . .
/ 3 224 0 0 0
. . .
/ 4 240 0 0 0
. . .
/ 5 248 0 0 0
. . .
/ 6 252 0 0 0
. . .
/ 7 254 0 0 0
. . .
/ 8 255 0 0 0
. . .
/ 9 255 128 0 0
. . .
/ 10 255 192 0 0
. . .
/ 11 255 224 0 0
. . .
/ 12 255 240 0 0
. . .
/ 13 255 248 0 0
. . .
/ 14 255 252 0 0
. . .
/ 15 255 254 0 0
. . .
/ 16 255 255 0 0
. . .
All 0s (equivalent to no mask)
1-octet boundary
2-octet boundary
Computer Networks and Internets -- Module 5 33 Spring, 2014
Copyright  2014. All rights reserved.
Table Of CIDR And Dotted Decimal Equivalences
Length (CIDR) Address Mask Notes
/ 17 255 255 128 0
. . .
/ 18 255 255 192 0
. . .
/ 19 255 255 224 0
. . .
/ 20 255 255 240 0
. . .
/ 21 255 255 248 0
. . .
/ 22 255 255 252 0
. . .
/ 23 255 255 254 0
. . .
/ 24 255 255 255 0
. . .
/ 25 255 255 255 128
. . .
/ 26 255 255 255 192
. . .
/ 27 255 255 255 224
. . .
/ 28 255 255 255 240
. . .
/ 29 255 255 255 248
. . .
/ 30 255 255 255 252
. . .
/ 31 255 255 255 254
. . .
/ 32 255 255 255 255
. . .
3-octet boundary
All 1s (host specific mask)
Computer Networks and Internets -- Module 5 34 Spring, 2014
Copyright  2014. All rights reserved.
Why CIDR Is Useful
d ISPs assign IP addresses
d Corporate customer with N computers needs N addresses
d CIDR permits ISP to round to nearest power of two
d Example
– Assume ISP owns address block 128.211.0.0/ 16
– Customer has 12 computers
– ISP assigns 4 bits of suffix to customer
– Mask used is /28
– Example: customer is assigned 128.211.0.16/ 28
– Each computer at customer site has unique final 4 bits
Computer Networks and Internets -- Module 5 35 Spring, 2014
Copyright  2014. All rights reserved.
Example Of A /28 Address Block
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 28 31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
0 28 31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1
0 28 31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0
0 28 31
Network Prefix 128.211.0.16 / 28
Address Mask 255.255.255.240
Lowest Host Address 128.211.0.17
Highest Host Address 128.211.0.30
Computer Networks and Internets -- Module 5 36 Spring, 2014
Copyright  2014. All rights reserved.
Special IPv4 Addresses
d Some address forms are reserved
22222222222222222222222222222222222222222222222222222222222222222222
Prefix Suffix Type Of Address Purpose
22222222222222222222222222222222222222222222222222222222222222222222
all-0s all-0s this computer used during bootstrap
22222222222222222222222222222222222222222222222222222222222222222222
network all-0s network identifies a network
22222222222222222222222222222222222222222222222222222222222222222222
network all-1s directed broadcast broadcast on specified net
22222222222222222222222222222222222222222222222222222222222222222222
all-1s all-1s limited broadcast broadcast on local net
22222222222222222222222222222222222222222222222222222222222222222222
127 / 8 any loopback testing
22222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
d Loopback address ( 127.0.0.1 ) used for testing
– Packets never leave the local host
d Addresses 240.0.0.0/ 8 and above are multicast
Computer Networks and Internets -- Module 5 37 Spring, 2014
Copyright  2014. All rights reserved.
Host Address Count
d For a given network prefix, the all-0s and all-1s suffixes
have special meaning
d Consequence: if a suffix has N bits, 2
N
− 2 hosts can be
present
Computer Networks and Internets -- Module 5 38 Spring, 2014
Copyright  2014. All rights reserved.
IP Addressing Principle
An IP address does not identify a specific computer. Instead,
each IP address identifies a connection between a computer and
a network.
Computer Networks and Internets -- Module 5 39 Spring, 2014
Copyright  2014. All rights reserved.
IP Addressing Principle
An IP address does not identify a specific computer. Instead,
each IP address identifies a connection between a computer and
a network.
d Consequence
A router or a host with multiple network connections must be
assigned one IP address for each connection.
d Note: host with multiple network connections is called a
multi-homed host
Computer Networks and Internets -- Module 5 39 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of IPv4 Address Assignment
Wired Ethernet 131.108.0.0 / 16
Wi-Fi Net
223.240.129.0 / 24
WAN 78.0.0.0 / 8
223.240.129.2
131.108.99.5
78.0.0.17
223.240.129.17
router 1
router 2
d Each network assigned a unique prefix
d Each host on a network assigned a unique suffix
Computer Networks and Internets -- Module 5 40 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Host Addresses
d Like IPv4
– Binary value
– Divided into locator prefix and unique ID suffix
– Identifies a connection to a network
d Unlike IPv4
– 128 bits long
– Suffix can be derived from MAC address
– 3-level address hierarchy
Computer Networks and Internets -- Module 5 41 Spring, 2014
Copyright  2014. All rights reserved.
The IPv6 3-Level Hierarchy
GLOBAL PREFIX SUBNET INTERFACE (COMPUTER)
K bits 64–K bits 64 bits
d Prefix size chosen by ISP
d Subnet area allows organization to have multiple networks
Computer Networks and Internets -- Module 5 42 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Address Types
22222222222222222222222222222222222222222222222222222222222222222
Type Purpose
22222222222222222222222222222222222222222222222222222222222222222
unicast The address corresponds to a single computer. A
datagram sent to the address is routed along a
shortest path to the computer.
22222222222222222222222222222222222222222222222222222222222222222
multicast The address corresponds to a set of computers, and
membership in the set can change at any time. IPv6
delivers one copy of the datagram to each member of
the set.
22222222222222222222222222222222222222222222222222222222222222222
anycast The address corresponds to a set of computers that
share a common prefix. A datagram sent to the
address is delivered to exactly one of the computers
(e.g., the computer closest to the sender).
22222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 5 43 Spring, 2014
Copyright  2014. All rights reserved.
Colon Hex Notation
d Syntactic form used by humans to enter addresses
d Replacement for IPv4’s dotted decimal
d Expresses groups of 16 bits in hexadecimal separated by
colons
d Example:
105.220.136.100.255.255.255.255.0.0.18.
128.140.10.255.255
becomes
69DC:8864:FFFF:FFFF:0:1280:8C0A:FFFF
Computer Networks and Internets -- Module 5 44 Spring, 2014
Copyright  2014. All rights reserved.
Colon Compression
d Many IPv6 addresses contain long strings of zeroes
d Successive zeros can be replaced by two colons
d Example
FF0C:0:0:0:0:0:0:B1
can be written:
FF0C::B1
Computer Networks and Internets -- Module 5 45 Spring, 2014
Copyright  2014. All rights reserved.
Two Major Reasons To Adopt IPv6
Computer Networks and Internets -- Module 5 46 Spring, 2014
Copyright  2014. All rights reserved.
Two Major Reasons To Adopt IPv6
d More addresses
Computer Networks and Internets -- Module 5 46 Spring, 2014
Copyright  2014. All rights reserved.
Two Major Reasons To Adopt IPv6
d More addresses
– Eventually, IPv4 addresses will be depleted
Computer Networks and Internets -- Module 5 46 Spring, 2014
Copyright  2014. All rights reserved.
Two Major Reasons To Adopt IPv6
d More addresses
– Eventually, IPv4 addresses will be depleted
– IPv6 provides more addresses than we will ever need
340,282,366,920,938,463,463,374,607,431,768,211,456
Computer Networks and Internets -- Module 5 46 Spring, 2014
Copyright  2014. All rights reserved.
Two Major Reasons To Adopt IPv6
d More addresses
– Eventually, IPv4 addresses will be depleted
– IPv6 provides more addresses than we will ever need
340,282,366,920,938,463,463,374,607,431,768,211,456
– 1024 addresses per square meter of the Earth’s surface!
Computer Networks and Internets -- Module 5 46 Spring, 2014
Copyright  2014. All rights reserved.
Two Major Reasons To Adopt IPv6
d More addresses
– Eventually, IPv4 addresses will be depleted
– IPv6 provides more addresses than we will ever need
340,282,366,920,938,463,463,374,607,431,768,211,456
– 1024 addresses per square meter of the Earth’s surface!
d Hype and excitement
Computer Networks and Internets -- Module 5 46 Spring, 2014
Copyright  2014. All rights reserved.
Two Major Reasons To Adopt IPv6
d More addresses
– Eventually, IPv4 addresses will be depleted
– IPv6 provides more addresses than we will ever need
340,282,366,920,938,463,463,374,607,431,768,211,456
– 1024 addresses per square meter of the Earth’s surface!
d Hype and excitement
– Researchers view IPv6 as an opportunity to be part of
the action
Computer Networks and Internets -- Module 5 46 Spring, 2014
Copyright  2014. All rights reserved.
Two Major Reasons To Adopt IPv6
d More addresses
– Eventually, IPv4 addresses will be depleted
– IPv6 provides more addresses than we will ever need
340,282,366,920,938,463,463,374,607,431,768,211,456
– 1024 addresses per square meter of the Earth’s surface!
d Hype and excitement
– Researchers view IPv6 as an opportunity to be part of
the action
– Industries view IPv6 as an opportunity for revenue
enhancement
Computer Networks and Internets -- Module 5 46 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 And Children
Computer Networks and Internets -- Module 5 47 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 And Children
Child Of Famous Parent Internet Protocol version 6
3333333333333333333333333333333333333333333333333333333333333333333333
d Greatness is anticipated and
expectations run high
d Child’s success is often
compared to the parent’s
d To achieve acclaim, the child
must outperform the parent
d We say that the child grows up
“in the shadow” of the parent
Computer Networks and Internets -- Module 5 47 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 And Children
Child Of Famous Parent Internet Protocol version 6
3333333333333333333333333333333333333333333333333333333333333333333333
d Greatness is anticipated and
expectations run high
d Child’s success is often
compared to the parent’s
d To achieve acclaim, the child
must outperform the parent
d We say that the child grows up
“in the shadow” of the parent
d Bad news: guiding genetic
principle is known as the
“tendency toward the mean”
Computer Networks and Internets -- Module 5 47 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 And Children
Child Of Famous Parent Internet Protocol version 6
3333333333333333333333333333333333333333333333333333333333333333333333
d Greatness is anticipated and
expectations run high
d Child’s success is often
compared to the parent’s
d To achieve acclaim, the child
must outperform the parent
d We say that the child grows up
“in the shadow” of the parent
d Bad news: guiding genetic
principle is known as the
“tendency toward the mean”
Child Of Famous Parent Internet Protocol version 6
3333333333333333333333333333333333333333333333333333333333333333333333
d Greatness is anticipated and
expectations run high
d IPv6’s success is often
compared to IPv4’s
d To achieve acclaim, IPv6
must outperform IPv4
d IPv6 has been growing up
“in the shadow” of IPv4
Computer Networks and Internets -- Module 5 47 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 And Children
Child Of Famous Parent Internet Protocol version 6
3333333333333333333333333333333333333333333333333333333333333333333333
d Greatness is anticipated and
expectations run high
d Child’s success is often
compared to the parent’s
d To achieve acclaim, the child
must outperform the parent
d We say that the child grows up
“in the shadow” of the parent
d Bad news: guiding genetic
principle is known as the
“tendency toward the mean”
Child Of Famous Parent Internet Protocol version 6
3333333333333333333333333333333333333333333333333333333333333333333333
d Greatness is anticipated and
expectations run high
d IPv6’s success is often
compared to IPv4’s
d To achieve acclaim, IPv6
must outperform IPv4
d IPv6 has been growing up
“in the shadow” of IPv4
d Bad news: guiding engineering
principle is known as the
“second-system syndrome”
Computer Networks and Internets -- Module 5 47 Spring, 2014
Copyright  2014. All rights reserved.
Internet Protocol Packets
(IP datagrams)
Internet Packets
Because it includes incompatible networks, the Internet cannot
adopt a particular hardware packet format. To accommodate
heterogeneity, the Internet Protocol defines a hardware-
independent packet format.
Computer Networks and Internets -- Module 5 49 Spring, 2014
Copyright  2014. All rights reserved.
IP Datagram
d Virtual packet format used in the Internet
d Same general layout as a network frame
Header Data Area (known as a payload area)
d Format of header determined by protocol version (IPv4 or
IPv6)
d Size of payload determined by application
– Maximum payload is almost 64K octets
– Typical datagram size is 1500 octets
Computer Networks and Internets -- Module 5 50 Spring, 2014
Copyright  2014. All rights reserved.
IPv4 Datagram Header
d Most header fields have fixed size and position
d Header specifies source, destination, and content type
0 4 8 16 19 24 31
VERS H. LEN SERVICE TYPE TOTAL LENGTH
IDENTIFICATION FLAGS FRAGMENT OFFSET
TIME TO LIVE TYPE HEADER CHECKSUM
SOURCE IP ADDRESS
DESTINATION IP ADDRESS
IP OPTIONS (MAY BE OMITTED) PADDING
BEGINNING OF PAYLOAD (DATA BEING SENT)
.
.
.
Computer Networks and Internets -- Module 5 51 Spring, 2014
Copyright  2014. All rights reserved.
A Few Details
d SOURCE IP ADDRESS field gives the IPv4 address of the
original source
d DESTINATION IP ADDRESS field gives the IPv4 address of
the ultimate destination
d Intermediate router addresses do not appear in header
d Header size
– Almost no Internet datagrams contain options
– Therefore header length is usually 20 octets
Computer Networks and Internets -- Module 5 52 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Header Arrangement
d Multiple headers used: base plus zero or more extension(s)
Base
Header
Extension
Header 1
. . . Extension
Header N
Payload (Data)
optional
d The figure is not to scale: extension headers and/or the
payload can be much larger than the base header
Computer Networks and Internets -- Module 5 53 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Base Header Format
0 4 12 16 24 31
VERS TRAFFIC CLASS FLOW LABEL
PAYLOAD LENGTH NEXT HEADER HOP LIMIT
SOURCE ADDRESS
DESTINATION ADDRESS
d Flow Label field allows datagram to be associated with a
flow
Computer Networks and Internets -- Module 5 54 Spring, 2014
Copyright  2014. All rights reserved.
Identifying Headers
d Each header contains a NEXT HEADER field
d Value specifies the type of the next item
d Each layer 4 protocol (UDP, TCP, etc) is also assigned a
type
Computer Networks and Internets -- Module 5 55 Spring, 2014
Copyright  2014. All rights reserved.
Example Use Of Next Header Field
d Illustration of headers when a datagram contains a base
header and transport protocol
Base Header
NEXT=TCP
TCP Data
d Illustration of headers when a datagram also contains an
optional route header
Base Header
NEXT=ROUTE
Route Header
NEXT=TCP
TCP Data
Computer Networks and Internets -- Module 5 56 Spring, 2014
Copyright  2014. All rights reserved.
The Size Of An Extension Header
d Fixed length headers
– Size is specified in the standards document
– Protocol software contains size constant
d Variable length headers
– Size is determined by sender
– Header contains an explicit length field
0 8 16 31
NEXT HEADER HEADER LEN
ONE OR MORE OPTIONS
Computer Networks and Internets -- Module 5 57 Spring, 2014
Copyright  2014. All rights reserved.
Consequences For Packet Processing
d Consider a host or router that receives an IPv6 datagram
d The datagram contains a set of extension headers
d Each extension header can contain an explicit length field
d To parse the datagram, IP software must iterate through
headers
d Conclusion: processing IPv6 can entail extra overhead
Computer Networks and Internets -- Module 5 58 Spring, 2014
Copyright  2014. All rights reserved.
Datagram Forwarding
Internet Communication Paradigm
d Each datagram handled independently
d Datagram formed on source computer
d Source sends datagram to nearest router
d Router forwards datagram to next router along path to
destination
d Final router delivers datagram to destination
d Datagram passes across a single physical network at each
step
Computer Networks and Internets -- Module 5 60 Spring, 2014
Copyright  2014. All rights reserved.
Datagram Forwarding
d Performed by initial host and each router along path
d Selects next hop for the datagram as either
– Next router along the path
– Ultimate destination
d Uses a forwarding table with one entry per network
d Important point: size of forwarding table proportional to
number of networks in the Internet
Computer Networks and Internets -- Module 5 61 Spring, 2014
Copyright  2014. All rights reserved.
Forwarding Table Entry
d Uses IP addresses only (no MAC addresses)
d Contains
– Destination network IP prefix
– Address mask for the destination network
– IP address of next hop
Computer Networks and Internets -- Module 5 62 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of An IPv4 Forwarding Table
30.0.0.7
40.0.0.7
40.0.0.8
128.1.0.8
128.1.0.9
192.4.10.9
30.0.0.0 / 8 40.0.0.0 / 8 128.1.0.0/16 192.4.10.0/24
Destination Mask Next Hop
30.0.0.0 255.0.0.0 40.0.0.7
40.0.0.0 255.0.0.0 deliver direct
128.1.0.0 255.255.0.0 deliver direct
192.4.10.0 255.255.255.0 128.1.0.9
(a)
(b)
router R1 router R2 router R3
d In practice, table usually contains a default entry
Computer Networks and Internets -- Module 5 63 Spring, 2014
Copyright  2014. All rights reserved.
Prefix Extraction
d Forwarding paradigm
– Use network prefix when forwarding
– Use host when delivering
d Conceptual forwarding step
– Compare destination in each forwarding table entry with
datagram’s destination address, D
– During comparison, only examine network prefix
d Note: mask in forwarding table makes comparison efficient
if ( (Mask[i] & D) == Destination[i] ) forward to NextHop[i];
Computer Networks and Internets -- Module 5 64 Spring, 2014
Copyright  2014. All rights reserved.
Longest Prefix Match
d Classless addressing means forwarding table entries can be
ambiguous
d Example: consider destination 128.10.2.3 and a table that
includes the following two entries:
128.10.0.0 / 16 next hop A
128.10.2.0 / 24 next hop B
d The destination matches both of them!
d Solution: select the match that has the longest prefix (in the
example, take next hop B)
d Known as longest prefix match
Computer Networks and Internets -- Module 5 65 Spring, 2014
Copyright  2014. All rights reserved.
Datagram Encapsulation
d Needed because underlying network hardware does not
understand datagrams
d Entire datagram travels in payload area of frame
Frame Header Frame Payload
IP Header IP Payload
d Frame header contains MAC address of next hop
d Frame only used for trip across one network: when frame
arrives at next hop, datagram is extracted and frame is
discarded
d Datagram remains intact end-to-end
Computer Networks and Internets -- Module 5 66 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Encapsulation
Router 1
Router 2
Source host
Destination host
Net 1
Net 2
Net 3
datagram
datagram
datagram
datagram
datagram
datagram
datagram
Frame Hdr 1
Frame Hrd 2
Frame Hdr 3
Computer Networks and Internets -- Module 5 67 Spring, 2014
Copyright  2014. All rights reserved.
Semantics Of Internet Communication
d IP uses best effort delivery semantics
Computer Networks and Internets -- Module 5 68 Spring, 2014
Copyright  2014. All rights reserved.
Semantics Of Internet Communication
d IP uses best effort delivery semantics
d IP attempts to deliver each datagram, but specifies that a
datagram can be
– Lost
– Duplicated
– Delayed
– Delivered out-of-order
– Delivered with bits scrambled
Computer Networks and Internets -- Module 5 68 Spring, 2014
Copyright  2014. All rights reserved.
Semantics Of Internet Communication
d IP uses best effort delivery semantics
d IP attempts to deliver each datagram, but specifies that a
datagram can be
– Lost
– Duplicated
– Delayed
– Delivered out-of-order
– Delivered with bits scrambled
d Motivation: accommodate any underlying network
Computer Networks and Internets -- Module 5 68 Spring, 2014
Copyright  2014. All rights reserved.
Semantics Of Internet Communication
d IP uses best effort delivery semantics
d IP attempts to deliver each datagram, but specifies that a
datagram can be
– Lost
– Duplicated
– Delayed
– Delivered out-of-order
– Delivered with bits scrambled
d Motivation: accommodate any underlying network
d Note: in practice, IP works and it works well
Computer Networks and Internets -- Module 5 68 Spring, 2014
Copyright  2014. All rights reserved.
MTU And Network Heterogeneity
d Each network technology specifies a Maximum Transfer
Unit (MTU) that is the largest amount of data that can be
sent in a packet
d Example: Ethernet MTU is 1500 octets
d Datagram can be as large as the network MTU
d Consider a 1500-octet datagram set from H1 to H2 in the
following network
R
H1 H2
Net 1 (MTU=1500) Net 2 (MTU=1000)
d Datagram can reach router R, but cannot traverse Net 2
Computer Networks and Internets -- Module 5 69 Spring, 2014
Copyright  2014. All rights reserved.
Datagram Fragmentation
d Technique for accommodating heterogeneous MTUs
d Needed if datagram exceeds MTU
d Original datagram divided into smaller datagrams called
fragments
d Header of fragment derived from original datagram header
d Each fragment is forwarded independently
d IPv4 allows routers to perform fragmentation
d IPv6 requires sending host to perform fragmentation
d Important principle for both IPv4 and IPv6:
The ultimate destination reassembles fragments.
Computer Networks and Internets -- Module 5 70 Spring, 2014
Copyright  2014. All rights reserved.
The General Idea Of Fragmentation
d Divide the payload into a series of datagrams
IP Header original datagram payload
IP Hdr 1 IP Hdr 2 IP Hdr 3
payload 1 pay. 3
payload 2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
d Note: the tail fragment may be smaller than the others
Computer Networks and Internets -- Module 5 71 Spring, 2014
Copyright  2014. All rights reserved.
IPv4 Fragmentation Details
d Datagram header contains fixed fields that control
fragmentation
d A bit in FLAGS field specifies whether given datagram is a
fragment or complete datagram
d An additional FLAGS bit specifies whether the fragment
carries the tail of the original datagram
d OFFSET field specifies where the payload belongs in the
original datagram
Computer Networks and Internets -- Module 5 72 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Fragmentation Details
d Always performed by the original source, never by routers
d Rule: no header changes are allowed as an IPv6 datagram
traverses the Internet
d Consequences
– Source must discover path MTU
– Separate extension header contains fragmentation
information (same items as IPv4)
d Fragmentable part of datagram may include some extension
headers
Computer Networks and Internets -- Module 5 73 Spring, 2014
Copyright  2014. All rights reserved.
Illustration of IPv6 Fragmentation
Unfragmentable
Part
Fragmentable Part
(can include headers as well as data)
Unfragmentable
Part
Frag. 1
Header
P1
Unfragmentable
Part
Frag. 2
Header
P2
Unfragmentable
Part
Frag. 3
Header
P3
(a)
(b)
(c)
(d)
P1
P2
P3
d A datagram (a) divided into fragments (b through d)
Computer Networks and Internets -- Module 5 74 Spring, 2014
Copyright  2014. All rights reserved.
Collecting Fragments
d Destination collects incoming fragments
d IDENTIFICATION field used to group related fragments
d OFFSET field allows receiver to recreate the original
payload
d LAST FRAGMENT bit allows receiver to know when all
fragments have arrived
d If a fragment fails to arrive within a timeout period, entire
datagram is discarded
d Note: if an IPv4 fragment is divided into subfragments,
reassembly does not require reassembling subfragments
Computer Networks and Internets -- Module 5 75 Spring, 2014
Copyright  2014. All rights reserved.
Thought Problem
d Suppose
– A vendor sells a network security appliance that fits
between a computer and an Ethernet switch
– The appliance encrypts each IP datagram that the
computer sends
– Encryption adds only three bytes of extra data to the
payload
d Measurements show that throughput decreases dramatically
whenever the appliance is enabled
d Explain the lower throughput
Computer Networks and Internets -- Module 5 76 Spring, 2014
Copyright  2014. All rights reserved.
Address Resolution
Review Of Datagram Transmission
Computer Networks and Internets -- Module 5 78 Spring, 2014
Copyright  2014. All rights reserved.
Review Of Datagram Transmission
d Host or router has datagram to send
Computer Networks and Internets -- Module 5 78 Spring, 2014
Copyright  2014. All rights reserved.
Review Of Datagram Transmission
d Host or router has datagram to send
d IP uses longest-prefix match to look up datagram’s
destination address in forwarding table and obtains
– IP address of next hop
– Network over which to send (in case there is more than
one network connection)
Computer Networks and Internets -- Module 5 78 Spring, 2014
Copyright  2014. All rights reserved.
Review Of Datagram Transmission
d Host or router has datagram to send
d IP uses longest-prefix match to look up datagram’s
destination address in forwarding table and obtains
– IP address of next hop
– Network over which to send (in case there is more than
one network connection)
d IP encapsulates datagram in frame (entire datagram placed
in payload area of frame)
Computer Networks and Internets -- Module 5 78 Spring, 2014
Copyright  2014. All rights reserved.
Review Of Datagram Transmission
d Host or router has datagram to send
d IP uses longest-prefix match to look up datagram’s
destination address in forwarding table and obtains
– IP address of next hop
– Network over which to send (in case there is more than
one network connection)
d IP encapsulates datagram in frame (entire datagram placed
in payload area of frame)
d Is the resulting frame ready to send to the next hop?
Computer Networks and Internets -- Module 5 78 Spring, 2014
Copyright  2014. All rights reserved.
Review Of Datagram Transmission
d Host or router has datagram to send
d IP uses longest-prefix match to look up datagram’s
destination address in forwarding table and obtains
– IP address of next hop
– Network over which to send (in case there is more than
one network connection)
d IP encapsulates datagram in frame (entire datagram placed
in payload area of frame)
d Is the resulting frame ready to send to the next hop?
No!
Computer Networks and Internets -- Module 5 78 Spring, 2014
Copyright  2014. All rights reserved.
Hardware And Protocol Addressing
Computer Networks and Internets -- Module 5 79 Spring, 2014
Copyright  2014. All rights reserved.
Hardware And Protocol Addressing
d Underlying network hardware
– Only understands MAC addresses
– Requires each outgoing frame to contain the MAC
address of the next hop
Computer Networks and Internets -- Module 5 79 Spring, 2014
Copyright  2014. All rights reserved.
Hardware And Protocol Addressing
d Underlying network hardware
– Only understands MAC addresses
– Requires each outgoing frame to contain the MAC
address of the next hop
d IP forwarding
– Deals only with (abstract) IP addresses
– Computes the IP address of the next hop
Computer Networks and Internets -- Module 5 79 Spring, 2014
Copyright  2014. All rights reserved.
Hardware And Protocol Addressing
d Underlying network hardware
– Only understands MAC addresses
– Requires each outgoing frame to contain the MAC
address of the next hop
d IP forwarding
– Deals only with (abstract) IP addresses
– Computes the IP address of the next hop
d Conclusion
The IP address of the next hop must be translated to a MAC
address before a frame can be sent.
Computer Networks and Internets -- Module 5 79 Spring, 2014
Copyright  2014. All rights reserved.
Address Resolution
d Translates IP address to equivalent MAC address that the
hardware understands
d IP address is said to be resolved
d Restricted to a single physical network at a time
d Example: consider computer X sending to computer Y
X
A
B
C
Y
D
R1 R2
d A MAC address is needed at each hop
Computer Networks and Internets -- Module 5 80 Spring, 2014
Copyright  2014. All rights reserved.
An Example With MAC Addresses
X Y
R1 R2
128.10.0.0 /16 10.0.0.0 /8 192.168.0.0 /16
MAC: 3A-12-C9
IP: 128.10.0.1
MAC: 04-CF-47
IP: 192.168.0.1
MAC: 59-61-33
IP: 128.10.0.100
MAC: 97-27-D3
IP: 10.0.0.100
MAC: 8E-1A-7F
IP: 10.0.0.200
MAC: 54-DB-31
IP: 192.168.0.200
Sender NEXT-HOP SRC MAC DST MAC SRC IP DST IP
2
222222222222222222222222222222222222222222222222222222222222222222222222
X 128.10.0.100 3A-12-C9 59-61-33 128.10.0.1 192.168.0.1
R1 10.0.0.200 97-27-D3 8E-1A-7F 128.10.0.1 192.168.0.1
R2 192.168.0.1 54-DB-31 04-CF-47 128.10.0.1 192.168.0.1
d How can a host or router find the MAC address of the next
hop?
Computer Networks and Internets -- Module 5 81 Spring, 2014
Copyright  2014. All rights reserved.
Address Resolution Protocol (ARP)
d Designed for IPv4 over Ethernet
d Used by two computers on the same physical network
d Allows a computer to find the MAC address of another
computer
d Operates at layer 2
d Uses network to exchange messages
d Computer seeking an address sends request to which another
replies
Computer Networks and Internets -- Module 5 82 Spring, 2014
Copyright  2014. All rights reserved.
Example Of ARP Exchange
d Assume
– Four computers attached to an Ethernet
– Computer B has a datagram to send
d Computer B
– Uses forwarding table to find next-hop address IC
– Broadcasts an ARP request: “I’m looking for a computer
with IP address IC”
d Computer C
– Receives the request and replies; “I’m the computer with
IP address IC”
Computer Networks and Internets -- Module 5 83 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of The ARP message Exchange
Ethernet switch Ethernet switch
W X Y Z W X Y Z
(a) (a)
d Request is broadcast to all computers
d Only the intended recipient replies
d Reply is sent unicast
Computer Networks and Internets -- Module 5 84 Spring, 2014
Copyright  2014. All rights reserved.
ARP Message Format
Computer Networks and Internets -- Module 5 85 Spring, 2014
Copyright  2014. All rights reserved.
ARP Message Format
d Sufficiently general to permit
– Arbitrary high-level protocol address
– Arbitrary hardware address
Computer Networks and Internets -- Module 5 85 Spring, 2014
Copyright  2014. All rights reserved.
ARP Message Format
d Sufficiently general to permit
– Arbitrary high-level protocol address
– Arbitrary hardware address
d In practice, only used with IP and 48-bit Ethernet addresses
Computer Networks and Internets -- Module 5 85 Spring, 2014
Copyright  2014. All rights reserved.
ARP Message Format
d Sufficiently general to permit
– Arbitrary high-level protocol address
– Arbitrary hardware address
d In practice, only used with IP and 48-bit Ethernet addresses
0 8 16 24 31
HARDWARE ADDRESS TYPE PROTOCOL ADDRESS TYPE
HADDR LEN PADDR LEN OPERATION
SENDER HADDR (first 4 octets)
SENDER HADDR (last 2 octets) SENDER PADDR (first 2 octets)
SENDER PADDR (last 2 octets) TARGET HADDR (first 2 octets)
TARGET HADDR (last 4 octets)
TARGET PADDR (all 4 octets)
Computer Networks and Internets -- Module 5 85 Spring, 2014
Copyright  2014. All rights reserved.
ARP Encapsulation
d ARP message is placed in payload area of hardware frame
d When used with Ethernet, type is 0x0806
d Source and destination MAC addresses must be added to
frame header before sending
FRAME
HEADER FRAME PAYLOAD CRC
ARP MESSAGE
Computer Networks and Internets -- Module 5 86 Spring, 2014
Copyright  2014. All rights reserved.
ARP Algorithm And Caching
Given:
An incoming ARP request or response
Purpose:
Process the message and update the ARP cache
Method:
Extract sender’s IP address, I, and MAC address, M
If ( address I is already in the ARP cache ) {
Replace corresponding MAC address with M;
}
if ( message is a request and target is “me” ) {
Add sender’s entry to the ARP cache providing
no entry exists;
Generate and send a response;
}
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2222222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 5 87 Spring, 2014
Copyright  2014. All rights reserved.
Boundary Between Protocol And MAC Addressing
d ARP isolates hardware addresses, allowing layers above to
use only IP
Network Interface
Physical
address resolution
Application
Transport
Internet
conceptual
boundary
IP addresses
used
MAC addresses
used
Computer Networks and Internets -- Module 5 88 Spring, 2014
Copyright  2014. All rights reserved.
Thought Problem
d ARP is sometimes cited as a security weakness
d If someone gains access to a given network, how can they
exploit ARP to intercept packets?
Computer Networks and Internets -- Module 5 89 Spring, 2014
Copyright  2014. All rights reserved.
Address Binding With IPv6
d IPv6 does not use ARP
d Instead, IPv6 defines a new address binding mechanism
known as IPv6 Neighbor Discovery (IPv6-ND)
d IPv6-ND
– Maintains a neighbor cache
– Keeps the cache up-to-date at all times
d IPv6-ND operation
– Sends a multicast request to find neighbors and populate
the cache
– Polls neighbors periodically, even if no datagrams are
being sent to the neighbor
Computer Networks and Internets -- Module 5 90 Spring, 2014
Copyright  2014. All rights reserved.
Error Reporting Mechanism
IP Error Detection And Reporting
d Recall that IP allows datagrams to be
– Lost
– Duplicated
– Delayed
– Delivered out-of-order
Computer Networks and Internets -- Module 5 92 Spring, 2014
Copyright  2014. All rights reserved.
IP Error Detection And Reporting
d Recall that IP allows datagrams to be
– Lost
– Duplicated
– Delayed
– Delivered out-of-order
d Why is error reporting needed?
Computer Networks and Internets -- Module 5 92 Spring, 2014
Copyright  2014. All rights reserved.
IP Error Detection And Reporting
d Recall that IP allows datagrams to be
– Lost
– Duplicated
– Delayed
– Delivered out-of-order
d Why is error reporting needed?
d Answer: best-effort does not mean “careless” — the design
is intended to tolerate errors in the underlying networks, not
to introduce them
d IP reports problems when they are detected
Computer Networks and Internets -- Module 5 92 Spring, 2014
Copyright  2014. All rights reserved.
General Error Detection
d A variety of basic error detection mechanisms exist
d Examples
– Parity bits and other forward error codes can detect
transmission errors
– A CRC can detect an incorrect frame
– The IP header checksum can detect an incorrect
datagram header
– IP’s TTL (hop limit) can detect a routing loop
– A reassembly timer can detect lost fragments
d Only some types of errors can be reported
Computer Networks and Internets -- Module 5 93 Spring, 2014
Copyright  2014. All rights reserved.
Internet Control Message Protocol (ICMP)
d Required and integral part of IP
d Reports errors back to the original source
d Uses IP to carry messages
d Defines many types of messages, each with a specific format
and contents
d Includes information messages as well as error reports
d ICMPv4 and ICMPv6 share many messages
Computer Networks and Internets -- Module 5 94 Spring, 2014
Copyright  2014. All rights reserved.
Example ICMP Messages
22222222222222222222222222222222222222222222222222222222222222222222
Number Type Purpose
22222222222222222222222222222222222222222222222222222222222222222222
0 Echo Reply Used by the ping program
22222222222222222222222222222222222222222222222222222222222222222222
3 Dest. Unreachable Datagram could not be delivered
22222222222222222222222222222222222222222222222222222222222222222222
5 Redirect Host must change a route
22222222222222222222222222222222222222222222222222222222222222222222
8 Echo Request Used by the ping program
22222222222222222222222222222222222222222222222222222222222222222222
11 Time Exceeded TTL expired or fragments timed out
22222222222222222222222222222222222222222222222222222222222222222222
12 Parameter Problem IP header is incorrect
22222222222222222222222222222222222222222222222222222222222222222222
30 Traceroute Used by the traceroute program
22222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d Most heavily-used ICMP messages are 8 and 0, which are
sent and received by the ping program
Computer Networks and Internets -- Module 5 95 Spring, 2014
Copyright  2014. All rights reserved.
ICMP Encapsulation
d Two levels of encapsulation
– ICMP message encapsulated in an IP datagram
– IP datagram encapsulated in a network frame
Frame Header Frame Payload
IP Header IP Payload
ICMP Payload
ICMP Hdr
Computer Networks and Internets -- Module 5 96 Spring, 2014
Copyright  2014. All rights reserved.
Example Of An ICMP Error Report
d Host S creates a datagram for destination D
d S sets the TTL to 255 and sends the datagram
d Datagram reaches a loop in the middle of the Internet
d Datagram circulates around the loop until the TTL reaches
zero
d Router that decrements the TTL to zero
– Sends a type 11 ICMP message to S
– Discards the datagram that caused the problem
Computer Networks and Internets -- Module 5 97 Spring, 2014
Copyright  2014. All rights reserved.
Configuration
Protocol Configuration
d Many items must be set before protocols can be used
– IP address of each network interface
– Address mask for each network
– Initial values in the forwarding table
d Process is known as protocol configuration
d Usually occurs when operating system boots
d Two basic approaches
– Manual
– Automatic
Computer Networks and Internets -- Module 5 99 Spring, 2014
Copyright  2014. All rights reserved.
Manual Configuration
d Used for IP routers or host that has a permanent IP address
d Manager
– Enters configuration once
– Specifies that the configuration be saved in non-volatile
storage
– Interfaces include Command Line Interface (CLI) and
web
d OS
– Fetches values from non-volatile storage whenever the
device boots
Computer Networks and Internets -- Module 5 100 Spring, 2014
Copyright  2014. All rights reserved.
Automatic Configuration
d Used primarily for hosts
d Initially created for diskless workstations
d Basic idea
– Use network to obtain configuration information
– Configure protocol software, and then start to run
applications
d A seeming paradox
Automatic configuration requires a computer to
be able to use a network before the computer’s
protocol parameters have been configured.
Computer Networks and Internets -- Module 5 101 Spring, 2014
Copyright  2014. All rights reserved.
Ways To Solve The Paradox
d Use layer 2 protocols to obtain layer 3 parameters, then use
layer 3 to obtain higher layers
– Historic approach
– Relied on Ethernet broadcast
– One computer on a network responded to requests
d Use layer 3 to obtain all parameters
– Current approach
– Relies on IP broadcast (IPv4) or multicast (IPv6)
– Means routers can forward requests to a remote server
Computer Networks and Internets -- Module 5 102 Spring, 2014
Copyright  2014. All rights reserved.
Dynamic Host Configuration Protocol (DHCP)
d The standard protocol for automatic configuration
d Popular in private enterprises as well as with service
providers
d Host broadcasts/multicasts a request and receives a reply
d Single message exchange allows a host to obtain
– An IP address and address mask to use
– The IP address of a default router
– The address of a DNS server
– A DNS name
– The location of an image to boot (optional)
Computer Networks and Internets -- Module 5 103 Spring, 2014
Copyright  2014. All rights reserved.
DHCP Message Format
d Same message format used for requests and responses
0 8 16 24 31
OP HTYPE HLEN HOPS
TRANSACTION IDENTIFIER
SECONDS ELAPSED FLAGS
CLIENT IP ADDRESS
YOUR IP ADDRESS
SERVER IP ADDRESS
ROUTER IP ADDRESS
CLIENT HARDWARE ADDRESS (16 OCTETS)
.
.
.
SERVER HOST NAME (64 OCTETS)
.
.
.
BOOT FILE NAME (128 OCTETS)
.
.
.
OPTIONS (VARIABLE)
.
.
.
Computer Networks and Internets -- Module 5 104 Spring, 2014
Copyright  2014. All rights reserved.
DHCP Protocol
d Significant features of the protocol
– Recovers from loss or duplication
– Avoids synchronized flooding of requests after a power-
failure and restart
– Host discovers DHCP server once and caches server
address for future interaction
d Derived from BOOTstrap Protocol (BOOTP), but adds
dynamic address assignment
Computer Networks and Internets -- Module 5 105 Spring, 2014
Copyright  2014. All rights reserved.
Address Lease Paradigm
d DHCP server
– Owns a set of IP addresses
– Chooses an address from the set when a request arrives
– Issues a lease for the address for specified time, T
d Client
– Obtains an address and starts a timer for T time units
– Uses the address to communicate
– When the timer expires, requests the server renew the
lease
– Either receives a renewal and restarts timer or stops
using the address
Computer Networks and Internets -- Module 5 106 Spring, 2014
Copyright  2014. All rights reserved.
Thought Problem
d Consider how addresses are assigned
d An ISP using DHCP can choose which IP address to assign
to a customer at a given time
d There are two approaches
– The ISP can remember which address was previously
assigned to each customer and use the same address
– The ISP can assign addresses at random, meaning the
customer will not retain the same address
d Many ISPs try to change the address frequently
d Why?
Computer Networks and Internets -- Module 5 107 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Configuration
d DHCPv6 has been defined, but...
d IPv6 prefers a new procedure known as
IPv6 autoconfiguration
d General idea: host can generate an address without using a
server
d Motivation: allow two hosts to communicate without further
infrastructure
Computer Networks and Internets -- Module 5 108 Spring, 2014
Copyright  2014. All rights reserved.
Steps In IPv6 Autoconfiguration
d Obtain a network prefix
– Convention is to use a /64 prefix
– Globally-valid prefix can be obtained from a router
– Local-scope prefix created if no router available
d Generate a unique suffix
d Verify that no one else on the network is using the resulting
address
Computer Networks and Internets -- Module 5 109 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Autoconfiguration in Practice
d Need a unique host suffix
d For /64 network, a 64-bit host suffix is needed
d Recommended approach
– Start with MAC address (globally unique, but only 48
bits)
– Create a 64-bit value
d IEEE standard EUI-64 specifies how 48 bits of an IEEE
MAC address are placed in a 64-bit host suffix
Computer Networks and Internets -- Module 5 110 Spring, 2014
Copyright  2014. All rights reserved.
Network Address Translation
(NAT)
NAT Motivation
d IPv4 was running out of addresses
d ISPs only want to limit a customer to one IP address at any
time, but customers want multiple devices to be online
d Engineers invented Network Address Translation (NAT) as a
way to solve both problems
Computer Networks and Internets -- Module 5 112 Spring, 2014
Copyright  2014. All rights reserved.
NAT Operation
d Conceptually, NAT device is located between computers at
a site and the rest of the Internet
d Site
– Only needs one globally-valid IP address
– Can have multiple local hosts using the Internet
d Local host has full Internet access
d Service is transparent
– No change in protocols on local hosts
– No change in protocols on Internet servers
Computer Networks and Internets -- Module 5 113 Spring, 2014
Copyright  2014. All rights reserved.
Conceptual Organization Of NAT
Internet
Internet site with
multiple computers
NAT Device
from the Internet,
site appears to
be a single host
d NAT is said to be in-line
d From the Internet, site appears to be a single computer
d From within the site, each computer appears to have an
independent connection to the Internet
Computer Networks and Internets -- Module 5 114 Spring, 2014
Copyright  2014. All rights reserved.
Addresses Used by NAT
d NAT device runs a DHCP server to hand out IP addresses to
computers at the site
d Addresses assigned are IPv6 link-local or IPv4 private
2
2222222222222222222222222222222222222222222222222
Block Description
2
2222222222222222222222222222222222222222222222222
10.0.0.0/8 Class A private address block
2
2222222222222222222222222222222222222222222222222
169.254.0.0/16 Class B private address block
2
2222222222222222222222222222222222222222222222222
172.16.0.0/12 16 contiguous Class B blocks
2
2222222222222222222222222222222222222222222222222
192.168.0.0/16 256 contiguous Class C blocks
2
2222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
– NAT translates source and/or destination addresses in
datagrams that pass between the site and the Internet
Computer Networks and Internets -- Module 5 115 Spring, 2014
Copyright  2014. All rights reserved.
NAT Variants
d Basic NAT
– Only translates IP addresses
– Seldom used in practice
d NAPT
– Translates IP address and transport-layer port numbers
– Most widely-used type of NAT
d Twice NAT
– Works with DNS server
– Provides NAPT plus ability to accept incoming
communication
Computer Networks and Internets -- Module 5 116 Spring, 2014
Copyright  2014. All rights reserved.
Example Of Basic NAT
d Suppose
– NAT box has globally-valid IP address of 128.210.24.6
– Computer at a site has private address 192.168.0.1
– Computer contacts Internet site 198.133.219.25
d Resulting translation is:
NAT
to the
Internet
SRC = 192.168.0.1
DST = 198.133.219.25
SRC = 128.210.24.6
DST = 198.133.219.25
SRC = 198.133.219.25
DST = 128.210.24.6
SRC = 198.133.219.25
DST = 192.168.0.1
valid address
128.210.24.6
host at site with
private address
192.168.0.1
Computer Networks and Internets -- Module 5 117 Spring, 2014
Copyright  2014. All rights reserved.
Implementation Of NAT
d NAT device keeps an internal translation table
d Table stores translations for both outgoing and incoming
datagrams
d Values filled in automatically when computer at site first
sends datagram to the Internet
d Translation table for previous example
2
22222222222222222222222222222222222222222222222222222222222222
Direction Field Old Value New Value
2
22222222222222222222222222222222222222222222222222222222222222
out
IP Source 192.168.0.1 128.210.24.6
222222222222222222222222222222222222222222222222222
IP Destination 198.133.219.25 -- no change --
2
22222222222222222222222222222222222222222222222222222222222222
in
IP Source 198.133.219.25 -- no change --
222222222222222222222222222222222222222222222222222
IP Destination 128.210.24.6 192.168.0.1
2
22222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 5 118 Spring, 2014
Copyright  2014. All rights reserved.
Transport-Layer NAT (NAPT)
d Handles TCP, UDP, and ICMP
d Translates TCP/ UDP protocol port numbers as well as IP
addresses
d Permits multiple computers at a site to contact the same
Internet service simultaneously without interference
d Examples:
– Two computers at a site download songs from iTunes
– Three computers at a site contact Google simultaneously
Computer Networks and Internets -- Module 5 119 Spring, 2014
Copyright  2014. All rights reserved.
Example Of NAPT Translation
d Suppose
– Computers at site have private addresses assigned from
private address block 192.168 / 16
– Two computers at the site each contact TCP port 30000
on computer 128 210.19.20
d NAPT chooses a new port number for each and translates
22222222222222222222222222222222222222222222222222222222222222222222
Dir. Fields Old Value New Value
22222222222222222222222222222222222222222222222222222222222222222222
out IP SRC:TCP SRC 192.168.0.1:30000 128.10.24.6:40001
22222222222222222222222222222222222222222222222222222222222222222222
out IP SRC:TCP SRC 192.168.0.2 :30000 128.10.24.6 :40002
22222222222222222222222222222222222222222222222222222222222222222222
in IP DEST:TCP DEST 128.10.24.6 :40001 192.168.0.1 :30000
22222222222222222222222222222222222222222222222222222222222222222222
in IP DEST:TCP DEST 128.10.24.6 :40002 192.168.0.2 :30000
22222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 5 120 Spring, 2014
Copyright  2014. All rights reserved.
NAT In Practice
d Many consumer products have NAT built in
d Examples:
– Cable and DSL modems
– Wireless routers
d Note that most wireless routers provide both wired and
wireless network connections; they provide NAT on all
connections
Internet connection
DSL or cable modem
wireless router
Computer Networks and Internets -- Module 5 121 Spring, 2014
Copyright  2014. All rights reserved.
Transport Layer Protocols:
Characteristics And Techniques
What Should A Network Provide?
Computer Networks and Internets -- Module 5 123 Spring, 2014
Copyright  2014. All rights reserved.
What Should A Network Provide?
d One possibility: network centric
– Network offers all services, such as email, web, etc
– Host accesses services
– Network authenticates user, handles reliability
– Know as customer-provider communication
Computer Networks and Internets -- Module 5 123 Spring, 2014
Copyright  2014. All rights reserved.
What Should A Network Provide?
d One possibility: network centric
– Network offers all services, such as email, web, etc
– Host accesses services
– Network authenticates user, handles reliability
– Know as customer-provider communication
d Another possibility: network provides communication
– Network only transfers packets
– Applications handle everything else, including
reliability, flow control, and authentication
– Known as end-to-end communication
Computer Networks and Internets -- Module 5 123 Spring, 2014
Copyright  2014. All rights reserved.
End-To-End Principle
d Fundamental concept in the Internet
d Network provides best-effort packet transport
d Endpoints
– Control communication
– Provide all reliability
d Consequence
Some of the most complex protocols in the Internet protocol
suite run in hosts rather than in routers.
Computer Networks and Internets -- Module 5 124 Spring, 2014
Copyright  2014. All rights reserved.
Transport Layer
d Layer between applications and IP
Application
Transport
Internet
Network Interface
Physical
LAYER 1
LAYER 2
LAYER 3
LAYER 4
LAYER 5
d Allows multiple applications on a given host to
communicate with applications on other hosts
d Uses IP to carry messages
Computer Networks and Internets -- Module 5 125 Spring, 2014
Copyright  2014. All rights reserved.
Problems A Transport Protocol Can Handle
d Accommodate speed mismatch between sender and receiver
d Detect and recover from datagram loss
d Eliminate duplicate packets
d Guarantee that messages arrive in order
d Respond to congestion in the Internet
d Prevent delayed packets from being misinterpreted
d Verify that data was not corrupted during transit
d Ensure that each party has agreed to communicate
d Note: a given transport protocol may not handle all
problems
Computer Networks and Internets -- Module 5 126 Spring, 2014
Copyright  2014. All rights reserved.
Techniques Transport Protocols Use
d Application demultiplexing
– Sender places a value in each outgoing packet that
identifies an application on the receiving host
– Receiver uses the value to determine which application
should receive the packet
Computer Networks and Internets -- Module 5 127 Spring, 2014
Copyright  2014. All rights reserved.
Techniques Transport Protocols Use
d Application demultiplexing
– Sender places a value in each outgoing packet that
identifies an application on the receiving host
– Receiver uses the value to determine which application
should receive the packet
d Flow-control mechanisms
– Receiver informs sender of acceptable data rate
– Sender limits rate to prevent overrunning the receiver
Computer Networks and Internets -- Module 5 127 Spring, 2014
Copyright  2014. All rights reserved.
Techniques Transport Protocols Use
(continued)
d Congestion control mechanisms
– Receiver or network informs sender about congestion in
the network
– Sender reduces data rate (packet rate) until congestion
subsides
Computer Networks and Internets -- Module 5 128 Spring, 2014
Copyright  2014. All rights reserved.
Techniques Transport Protocols Use
(continued)
d Congestion control mechanisms
– Receiver or network informs sender about congestion in
the network
– Sender reduces data rate (packet rate) until congestion
subsides
d Sequence numbers
– Sender places a sequence number in each packet
– Receiver uses the sequence numbers to ensure no
packets are missing and that packets are delivered in the
correct order
Computer Networks and Internets -- Module 5 128 Spring, 2014
Copyright  2014. All rights reserved.
Techniques Transport Protocols Use
(continued)
d Positive acknowledgement with retransmission
– Receiver sends acknowledgement to inform sender when
a packet arrives
– Sender retransmits packet if acknowledgement fails to
arrive within a specified time
Computer Networks and Internets -- Module 5 129 Spring, 2014
Copyright  2014. All rights reserved.
Techniques Transport Protocols Use
(continued)
d Positive acknowledgement with retransmission
– Receiver sends acknowledgement to inform sender when
a packet arrives
– Sender retransmits packet if acknowledgement fails to
arrive within a specified time
d Sliding window
– Instead of transmitting a packet and waiting for an
acknowledgement, a sender transmits K packets and
each time an acknowledgement arrives, transmits another
Computer Networks and Internets -- Module 5 129 Spring, 2014
Copyright  2014. All rights reserved.
Transport Protocols Used In The Internet
d Two primary transport protocols used in the Internet
– User Datagram Protocol (UDP)
– Transmission Control Protocol (TCP)
d Choice determined by application protocol
– Many applications specify the use of a single transport
(e.g., email transfer uses TCP)
– Some applications allow the use of either (e.g., DNS
queries can be sent via UDP or TCP)
d Recall: each transport protocol has some surprising
characteristics
Computer Networks and Internets -- Module 5 130 Spring, 2014
Copyright  2014. All rights reserved.
Message Transport With
The User Datagram Protocol
User Datagram Protocol (UDP)
d Used
– During startup
– For VoIP and some video applications
d Accounts for less than 10% of Internet traffic
d Blocked by some ISPs
Computer Networks and Internets -- Module 5 132 Spring, 2014
Copyright  2014. All rights reserved.
UDP Characteristics
d End-to-end
d Connectionless communication
d Message-oriented interface
d Best-effort semantics
d Arbitrary interaction
d Operating system independence
d No congestion or flow control
Computer Networks and Internets -- Module 5 133 Spring, 2014
Copyright  2014. All rights reserved.
End-To-End Communication
d UDP provides communication among applications
d Sending UDP
– Accepts outgoing message from application
– Places message in a User Datagram
– Encapsulates User Datagram in an IP datagram and
sends
d Receiving UDP
– Accepts incoming User Datagram from IP
– Extracts message and delivers to receiving application
d Note: message is unchanged by the network
Computer Networks and Internets -- Module 5 134 Spring, 2014
Copyright  2014. All rights reserved.
Connectionless Communication
d An application using UDP can
– Send a message to any receiver (universal)
– Send at any time (asynchronous)
– Stop sending at any time (unterminated)
d That is, a sender does not
– Inform the network before sending (i.e., does not
establish a communication channel)
– Inform the other endpoint before sending
– Inform the network or other endpoint that no more
messages will be sent
Computer Networks and Internets -- Module 5 135 Spring, 2014
Copyright  2014. All rights reserved.
Message-Oriented Interface
d UDP
– Accepts and delivers messages (blocks of data)
– Does not require all messages to be the same size, but
does define a maximum message size
– Places each outgoing User Datagram in a single IP
datagram for transmission
– Always delivers a complete message to receiving
application
d Sending application must divide outgoing data into
messages; UDP sends what it is given (or reports an error if
the message is too large)
Computer Networks and Internets -- Module 5 136 Spring, 2014
Copyright  2014. All rights reserved.
UDP Message Size
d UDP allows up to 64K octet messages
d As a practical limit, the size of a User Datagram is limited
by payload area in IP datagram
d Maximum IP payload is 64K octets minus size of IP header
d Therefore, the maximum UDP payload is 64K octets minus
size of IP and UDP headers (usually 64K octets minus 28)
d Application can choose any message size up to the
maximum UDP payload
Computer Networks and Internets -- Module 5 137 Spring, 2014
Copyright  2014. All rights reserved.
Large And Small Messages
d What happens if an application sends a 10K octet message?
Computer Networks and Internets -- Module 5 138 Spring, 2014
Copyright  2014. All rights reserved.
Large And Small Messages
d What happens if an application sends a 10K octet message?
d The message fits into an IP datagram, but...
Computer Networks and Internets -- Module 5 138 Spring, 2014
Copyright  2014. All rights reserved.
Large And Small Messages
d What happens if an application sends a 10K octet message?
d The message fits into an IP datagram, but... network frames
have a smaller MTU (typically 1500 octets)
Computer Networks and Internets -- Module 5 138 Spring, 2014
Copyright  2014. All rights reserved.
Large And Small Messages
d What happens if an application sends a 10K octet message?
d The message fits into an IP datagram, but... network frames
have a smaller MTU (typically 1500 octets)
d So, the result of sending a large message is
Computer Networks and Internets -- Module 5 138 Spring, 2014
Copyright  2014. All rights reserved.
Large And Small Messages
d What happens if an application sends a 10K octet message?
d The message fits into an IP datagram, but... network frames
have a smaller MTU (typically 1500 octets)
d So, the result of sending a large message is
IP Fragmentation!
Computer Networks and Internets -- Module 5 138 Spring, 2014
Copyright  2014. All rights reserved.
Large And Small Messages
d What happens if an application sends a 10K octet message?
d The message fits into an IP datagram, but... network frames
have a smaller MTU (typically 1500 octets)
d So, the result of sending a large message is
IP Fragmentation!
d What happens if an application chooses a small message
size, such as 20 octets?
Computer Networks and Internets -- Module 5 138 Spring, 2014
Copyright  2014. All rights reserved.
Large And Small Messages
d What happens if an application sends a 10K octet message?
d The message fits into an IP datagram, but... network frames
have a smaller MTU (typically 1500 octets)
d So, the result of sending a large message is
IP Fragmentation!
d What happens if an application chooses a small message
size, such as 20 octets?
Inefficiency!
Computer Networks and Internets -- Module 5 138 Spring, 2014
Copyright  2014. All rights reserved.
Choosing An Optimal Message Size
Computer Networks and Internets -- Module 5 139 Spring, 2014
Copyright  2014. All rights reserved.
Choosing An Optimal Message Size
d What size messages should an application send?
Computer Networks and Internets -- Module 5 139 Spring, 2014
Copyright  2014. All rights reserved.
Choosing An Optimal Message Size
d What size messages should an application send?
d Optimal UDP message size is S = M – H
– M is the path MTU (i.e., minimum MTU on the path)
– H is the size of IP and UDP headers
Computer Networks and Internets -- Module 5 139 Spring, 2014
Copyright  2014. All rights reserved.
Choosing An Optimal Message Size
d What size messages should an application send?
d Optimal UDP message size is S = M – H
– M is the path MTU (i.e., minimum MTU on the path)
– H is the size of IP and UDP headers
d Finding M requires an application to
– Violate layering and obtain forwarding information from
IP
– Note: for IPv4, only the local MTU is known
d Bottom line: it may be difficult/ impossible for an
application to compute S
Computer Networks and Internets -- Module 5 139 Spring, 2014
Copyright  2014. All rights reserved.
UDP Semantics
d UDP uses IP for delivery
Computer Networks and Internets -- Module 5 140 Spring, 2014
Copyright  2014. All rights reserved.
UDP Semantics
d UDP uses IP for delivery and offers the same semantics!
Computer Networks and Internets -- Module 5 140 Spring, 2014
Copyright  2014. All rights reserved.
UDP Semantics
d UDP uses IP for delivery and offers the same semantics!
d UDP packet can be
– Lost
– Duplicated
– Delayed
– Delivered out of order
– Delivered with data bits altered
Computer Networks and Internets -- Module 5 140 Spring, 2014
Copyright  2014. All rights reserved.
UDP Semantics
d UDP uses IP for delivery and offers the same semantics!
d UDP packet can be
– Lost
– Duplicated
– Delayed
– Delivered out of order
– Delivered with data bits altered
d Note 1: UDP does not introduce such errors; the errors arise
from the underlying networks
Computer Networks and Internets -- Module 5 140 Spring, 2014
Copyright  2014. All rights reserved.
UDP Semantics
d UDP uses IP for delivery and offers the same semantics!
d UDP packet can be
– Lost
– Duplicated
– Delayed
– Delivered out of order
– Delivered with data bits altered
d Note 1: UDP does not introduce such errors; the errors arise
from the underlying networks
d Note 2: UDP does include an optional checksum to protect
the data (but the checksum may be disabled)
Computer Networks and Internets -- Module 5 140 Spring, 2014
Copyright  2014. All rights reserved.
Using Best-Effort Semantics
d Questions
– Do best-effort semantics make any sense for
applications?
– Why would a programmer choose UDP?
Computer Networks and Internets -- Module 5 141 Spring, 2014
Copyright  2014. All rights reserved.
Using Best-Effort Semantics
d Questions
– Do best-effort semantics make any sense for
applications?
– Why would a programmer choose UDP?
d Answers
– Retransmitting a lost message does not make sense for
real-time audio and video applications because a
retransmitted packet arrives too late to be used
– Additional real-time protocols can be added to UDP to
handle out-of-order delivery (we will cover later in the
course)
Computer Networks and Internets -- Module 5 141 Spring, 2014
Copyright  2014. All rights reserved.
Arbitrary Interaction
d UDP permits arbitrary interaction among applications
1-to-1
1-to-many
Many-to-1
Many-to-many
d Application programmer chooses interaction type
d Ability to send a single message to multiple recipients can
be valuable
Computer Networks and Internets -- Module 5 142 Spring, 2014
Copyright  2014. All rights reserved.
Efficient Implementation Of Interaction
d Key point: UDP can use IP broadcast or multicast to deliver
messages
d Provides efficient delivery to a set of hosts
d Example: UDP packet sent to IPv4 destination address
255.255.255.255 is delivered to all hosts on the local
network (IPv6 has an all nodes multicast address)
d No need for sender to transmit individual copies
d Allows application to find a server without knowing the
computer on which the server runs
d Broadcast is a significant advantage of UDP over TCP for
some applications
Computer Networks and Internets -- Module 5 143 Spring, 2014
Copyright  2014. All rights reserved.
Operating System Independence
d Goal is to allow applications on heterogeneous computers to
interact
d Must avoid OS-specific identifiers, such as
– Process IDs
– Task names
d Instead, create application identifiers that are not derived
from any OS
Computer Networks and Internets -- Module 5 144 Spring, 2014
Copyright  2014. All rights reserved.
UDP Application Identifiers
d 16-bit integer known as UDP protocol port number
d Each application using UDP must obtain a port number
d Sending UDP
– Places a port number in UDP header to identify
destination application on receiving host
– Also includes port number of sending application
d Receiving UDP
– Uses value in header to select appropriate application
UDP protocol port numbers are universal across all computers,
and do not depend on the operating system.
Computer Networks and Internets -- Module 5 145 Spring, 2014
Copyright  2014. All rights reserved.
Identifying An Application
d Both sending and receiving applications need a port number
d Assignment of port numbers depends on the type of
application
d Application that offers a standardized service (server)
– Uses a well-known port number for the service
– Value is less than 1024
– Example: TFTP service uses UDP port 69
d Other applications (client)
– Request a port number from the local operating system
– Value is greater than 49151
Computer Networks and Internets -- Module 5 146 Spring, 2014
Copyright  2014. All rights reserved.
Steps Taken To Contact A Service
d Request an unused local port number from the local
operating system
d Obtain the IP address of the local computer from the
operating system
d Look up the port number of the service to be contacted
d Obtain the domain name of a computer that runs the service
and map to an IP address
d Form a UDP datagram with a source port field set to the
local port number and the destination port field set to the
port number of the service
d Request that the UDP datagram be encapsulated in an IP
datagram and sent using the source and destination IP
addresses obtained above
Computer Networks and Internets -- Module 5 147 Spring, 2014
Copyright  2014. All rights reserved.
Examples Of Well-Known UDP Ports
222222222222222222222222222222222222222222222222222222
Port Number Description
222222222222222222222222222222222222222222222222222222
0 Reserved (never assigned)
7 Echo
9 Discard
11 Active Users
13 Daytime
15 Network Status Program
17 Quote of the Day
19 Character Generator
37 Time
42 Host Name Server
43 Who Is
53 Domain Name Server
67 BOOTP or DHCP Server
68 BOOTP or DHCP Client
69 Trivial File Transfer
88 Kerberos Security Service
111 Sun Remote Procedure Call
123 Network Time Protocol
161 Simple Network Management Protocol
162 SNMP Traps
514 System Log
222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 5 148 Spring, 2014
Copyright  2014. All rights reserved.
UDP Datagram Format
d Extremely thin layer
d User Datagram is divided into header and payload
d Header contains only 8 octets:
0 16 31
UDP SOURCE PORT UDP DESTINATION PORT
UDP MESSAGE LENGTH UDP CHECKSUM
PAYLOAD (MESSAGE DATA)
. . .
d Question: why is length needed?
Computer Networks and Internets -- Module 5 149 Spring, 2014
Copyright  2014. All rights reserved.
UDP Checksum
Computer Networks and Internets -- Module 5 150 Spring, 2014
Copyright  2014. All rights reserved.
UDP Checksum
d 16-bit 1s-complement checksum
Computer Networks and Internets -- Module 5 150 Spring, 2014
Copyright  2014. All rights reserved.
UDP Checksum
d 16-bit 1s-complement checksum
d Covers entire UDP packet, including data (recall: IP does
not checksum the payload)
Computer Networks and Internets -- Module 5 150 Spring, 2014
Copyright  2014. All rights reserved.
UDP Checksum
d 16-bit 1s-complement checksum
d Covers entire UDP packet, including data (recall: IP does
not checksum the payload)
d Is optional: value of zero means sender did not compute a
checksum
Computer Networks and Internets -- Module 5 150 Spring, 2014
Copyright  2014. All rights reserved.
UDP Checksum
d 16-bit 1s-complement checksum
d Covers entire UDP packet, including data (recall: IP does
not checksum the payload)
d Is optional: value of zero means sender did not compute a
checksum
d Includes extra pseudo header that contains IP addresses
d Example of IPv4 pseudo header:
0 16 31
IP SOURCE ADDRESS
IP DESTINATION ADDRESS
ZERO PROTO UDP LENGTH
Computer Networks and Internets -- Module 5 150 Spring, 2014
Copyright  2014. All rights reserved.
Purpose Of A Pseudo Header
d Receiver can verify that message arrived at correct computer
as well as correct application on that computer
d Consequence for NAT: if it changes the IP source or
destination address, NAT must recompute UDP checksum
d Note: pseudo headers provide another example of layering
violations
Computer Networks and Internets -- Module 5 151 Spring, 2014
Copyright  2014. All rights reserved.
UDP Encapsulation
d User Datagram travels in IP datagram
d Two levels of encapsulation occur
Frame Header Frame Payload
IP Header IP Payload
UDP Payload
UDP Hdr
d Note: the message the application places in the UDP
Payload field may also have header and payload fields
Computer Networks and Internets -- Module 5 152 Spring, 2014
Copyright  2014. All rights reserved.
Transmission Control Protocol
(Stream Transport)
Transmission Control Protocol (TCP)
d The primary transport-layer protocol used in the Internet
d Accounts for about 90% of all Internet traffic (some
estimates are higher)
d Provides reliability
d Appeals to programmers
Computer Networks and Internets -- Module 5 154 Spring, 2014
Copyright  2014. All rights reserved.
TCP Characteristics
d End-to-end communication
d Connection-oriented paradigm
d Point-to-point connections
d Complete reliability
d Full-duplex communication
d Stream interface
d Reliable connection startup
d Graceful connection shutdown
Computer Networks and Internets -- Module 5 155 Spring, 2014
Copyright  2014. All rights reserved.
End-To-End Communication
d TCP provides communication among pairs of applications
d Allows an application on one host to communicate with an
application on another host
d Permits multiple applications on a given computer to
communicate simultaneously without interference
d Uses protocol port numbers to distinguish among
applications
d Note: TCP ports are completely independent of UDP ports
Computer Networks and Internets -- Module 5 156 Spring, 2014
Copyright  2014. All rights reserved.
End-To-End Principle And Transport Protocols
Computer Networks and Internets -- Module 5 157 Spring, 2014
Copyright  2014. All rights reserved.
End-To-End Principle And Transport Protocols
d Transport protocols operate in end systems, and view the
underlying Internet as a virtual network
Computer Networks and Internets -- Module 5 157 Spring, 2014
Copyright  2014. All rights reserved.
End-To-End Principle And Transport Protocols
d Transport protocols operate in end systems, and view the
underlying Internet as a virtual network
TCP TCP
IP IP
IP
net iface. net iface.
net iface.
appl. appl.
net 1 net 2
Host A Host B
router
The Internet
communication system
as viewed by TCP
Computer Networks and Internets -- Module 5 157 Spring, 2014
Copyright  2014. All rights reserved.
End-To-End Principle And Transport Protocols
d Transport protocols operate in end systems, and view the
underlying Internet as a virtual network
TCP TCP
IP IP
IP
net iface. net iface.
net iface.
appl. appl.
net 1 net 2
Host A Host B
router
communication system
as viewed by TCP
d IP does not read or interpret TCP packets
Computer Networks and Internets -- Module 5 157 Spring, 2014
Copyright  2014. All rights reserved.
End-To-End Principle And Transport Protocols
d Transport protocols operate in end systems, and view the
underlying Internet as a virtual network
TCP TCP
IP IP
IP
net iface. net iface.
net iface.
appl. appl.
net 1 net 2
Host A Host B
router
communication system
as viewed by TCP
d IP does not read or interpret TCP packets
d When forwarding datagrams, router only processes layers 1
through 3
Computer Networks and Internets -- Module 5 157 Spring, 2014
Copyright  2014. All rights reserved.
TCP Protocol Port Numbers
d 16-bit integers used to identify applications
d Each application needs a port number
d TCP well-known port assignments are independent of UDP
assignments
d However, to help humans, the same value chosen if service
available via either transport
d Examples
– Both UDP and TCP assign port 53 to the Domain Name
System (DNS)
– Both UDP and TCP assign port 7 to the echo service
Computer Networks and Internets -- Module 5 158 Spring, 2014
Copyright  2014. All rights reserved.
Protocol Ports, The Four-Tuple, And Flows
d Key concept: because a TCP connection corresponds to a
pair of endpoints, the connection is identified by four items
– IP source address
– TCP source port
– IP destination address
– TCP destination port
d Commonly called the four-tuple
d Explains how an application such as a web server can
communicate with multiple clients at the same time
d Interestingly, more than four values must be extracted from
a frame to identify a TCP flow
Computer Networks and Internets -- Module 5 159 Spring, 2014
Copyright  2014. All rights reserved.
TCP’s Connection-Oriented Paradigm
d Analogous to a telephone call
d Pair of applications must
– Establish a TCP connection before communicating
– Terminate the connection when finished
d Important insights
– A TCP connection is virtual because only the two
endpoints know a connection is in place
– TCP does not have keep-alive messages: no packets are
exchanged unless applications are sending data
Computer Networks and Internets -- Module 5 160 Spring, 2014
Copyright  2014. All rights reserved.
Limited Interaction
d A TCP connection only provides communication between a
pair of applications
d Known as a point-to-point communication
d TCP connection does not support
– Reception from an arbitrary set senders
– Multi-point connections with more than two endpoints
– Broadcast or multicast delivery
Computer Networks and Internets -- Module 5 161 Spring, 2014
Copyright  2014. All rights reserved.
The TCP Reliability Guarantee
d TCP provides full reliability
d Compensates for
– Loss
– Duplication
– Delivery out of order
d Does so without overloading the underlying networks and
routers
d TCP makes the following guarantee
Data will be delivered or sender will (eventually) be notified.
Computer Networks and Internets -- Module 5 162 Spring, 2014
Copyright  2014. All rights reserved.
TCP Reliability
d Uses timeout-and-retransmission
d Receiver returns an acknowledgement (ACK) to sender
when data arrives
d Sender waits for acknowledgement and retransmits data if
no acknowledgement arrives
Computer Networks and Internets -- Module 5 163 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of TCP Retransmission
Events at Host 1 Events at Host 2
send message 1
receive message 1
send ack 1
receive ack 1
send message 2
receive message 2
send ack 2
receive ack 2
send message 3
retransmission timer expires
retransmit message 3
receive message 3
send ack 3
packet lost
Computer Networks and Internets -- Module 5 164 Spring, 2014
Copyright  2014. All rights reserved.
Why TCP Retransmission Is Hard
d TCP designed for Internet
– Round-trip delays differ among connections
– Round-trip delays vary over time
d Waiting too long introduces unnecessary delay
d Not waiting long enough sends unnecessary copies
d Key to TCP’s success: adaptive retransmission
Computer Networks and Internets -- Module 5 165 Spring, 2014
Copyright  2014. All rights reserved.
How Bad Is The Internet?
d In the old days: delays in seconds, high variability
Computer Networks and Internets -- Module 5 166 Spring, 2014
Copyright  2014. All rights reserved.
How Bad Is The Internet?
d In the old days: delays in seconds, high variability
d Now:
Computer Networks and Internets -- Module 5 166 Spring, 2014
Copyright  2014. All rights reserved.
How Bad Is The Internet?
d In the old days: delays in seconds, high variability
d Now: delays in seconds, high variability
Computer Networks and Internets -- Module 5 166 Spring, 2014
Copyright  2014. All rights reserved.
How Bad Is The Internet?
d In the old days: delays in seconds, high variability
d Now: delays in seconds, high variability
Example round-trip measurements from Ireland to California, 2009
Computer Networks and Internets -- Module 5 166 Spring, 2014
Copyright  2014. All rights reserved.
Adaptive Retransmission
d Continually estimate round-trip time of each connection
d Set retransmission timer from round-trip estimate
d Illustration of timeout on two connections:
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
est 1
est 2
timeout
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
est 1
est 2
timeout
.
.
.
packet lost
packet lost
Computer Networks and Internets -- Module 5 167 Spring, 2014
Copyright  2014. All rights reserved.
Review Of Sliding Window
d Transport protocols use sliding window mechanism
d Idea is to send multiple packets before waiting for an
acknowledgment
d Window size is relatively small (tens of packets, not
millions)
d Motivation is to increase throughput
Computer Networks and Internets -- Module 5 168 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of TCP’s Sliding Window
1
2
3
4
5
6
7
8
9
10
11
12
1
2
3
4
5
6
7
8
9
10
11
12
1
2
3
4
5
6
7
8
9
10
11
12
window
window
window
initial position
intermediate position
final position
already acknowledged
still unsent
window moves as
acknowledgements arrive
Computer Networks and Internets -- Module 5 169 Spring, 2014
Copyright  2014. All rights reserved.
How Sliding Window Improves Data Rate
host 1 host 2
stop-and-go
send
packet
send
packet
send
packet
send
packet
send
ack
send
ack
send
ack
send
ack
done
Computer Networks and Internets -- Module 5 170 Spring, 2014
Copyright  2014. All rights reserved.
How Sliding Window Improves Data Rate
host 1 host 2 host 1 host 2
stop-and-go sliding window
send
packet
send
packet
send
packet
send
packet
send
ack
send
ack
send
ack
send
ack
done
send
four
packets
send
four
acks
done
d Window size of K improves data rate by a factor of K
Computer Networks and Internets -- Module 5 170 Spring, 2014
Copyright  2014. All rights reserved.
TCP Flow Control And TCP Window
d Flow control mechanism coordinates data being sent with
receiver’s speed
d Buffer size used instead of data rate
d Receiver tells sender size of initial buffer
d Each acknowledgement specifies space remaining in buffer
d Known as window advertisement
Computer Networks and Internets -- Module 5 171 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of TCP Flow Control
Sender Events Receiver Events
advertise window=2500
send data octets 1-1000
send data octets 1001-2000
send data octets 2001-2500 ack up to 1000, window=1500
ack up to 2000, window=500
ack up to 2500, window=0
receive ack for 1000
receive ack for 2000
receive ack for 2500
application reads 2000 octets
ack up to 2500, window=2000
send data octets 2501-3500
send data octets 3501-4500
ack up to 3500, window=1000
ack up to 4500, window=0
receive ack for 3500
receive ack for 4500
ack up to 4500, window=1000
application reads 1000 octets
receive ack for 4500
.
.
.
Computer Networks and Internets -- Module 5 172 Spring, 2014
Copyright  2014. All rights reserved.
TCP Congestion Control And Slow Start
d TCP uses loss or changes in delay to infer congestion in the
network
d When congestion is detected, sending TCP temporarily
reduces the size of the window
d When a packet is lost, TCP temporarily reduces the effective
window to one half its current value
d Later, TCP slowly increases the window again
d Congestion avoidance also used when a connection starts
– Temporarily use a window size of one segment
– Double the window size when ACK arrives
– Known as slow start
Computer Networks and Internets -- Module 5 173 Spring, 2014
Copyright  2014. All rights reserved.
Full-Duplex Communication
d TCP connection between A and B provides two independent
data streams, one from A to B and the other from B to A
d Each side
– Has a receive buffer
– Advertises a window size for incoming data
– Uses sequence numbers to number outgoing data bytes
– Implements timeout-and-retransmission for data it sends
d Application can choose to shut down communication in one
direction
Computer Networks and Internets -- Module 5 174 Spring, 2014
Copyright  2014. All rights reserved.
Full-Duplex Communication
(continued)
d Each TCP packet contains fields for both forward and
reverse data streams
– Sequence number for data being sent in the forward
direction
– Acknowledgement number for data that has been
received
Computer Networks and Internets -- Module 5 175 Spring, 2014
Copyright  2014. All rights reserved.
Stream Interface
d After connection is established, TCP accepts a
stream of data bytes from the sending application and
transfers them
d Sending application can choose amount of data to pass on
each request
d Surprise: TCP decides how to group bytes into packets
d Known as stream interface
d Consequence
Data may be passed to a receiving application in chunks that
differ from the chunks that the sending application generated.
Computer Networks and Internets -- Module 5 176 Spring, 2014
Copyright  2014. All rights reserved.
Connection Startup And Shutdown
d Difficult problem
d Packets can be
– Lost
– Duplicated
– Delayed
– Delivered out-of-order
d Either end can crash and reboot
d Need to know that both sides have agreed to start/ terminate
the connection
Computer Networks and Internets -- Module 5 177 Spring, 2014
Copyright  2014. All rights reserved.
Reliable Connection Startup
d TCP guarantees reliable connection startup that avoids
replay problems
d Performed with 3-way handshake
Events at Host 1 Events at Host 2
send SYN
receive SYN
send SYN + ACK
receive SYN + ACK
send ACK
receive ACK
d Each side chooses starting sequence number at random
Computer Networks and Internets -- Module 5 178 Spring, 2014
Copyright  2014. All rights reserved.
Graceful Connection Shutdown
d Analogous to 3-way handshake for startup
d Guarantees no ambiguity about connection termination
Events at Host 1 Events at Host 2
send FIN + ACK
receive FIN + ACK
send FIN + ACK
receive FIN + ACK
send ACK
receive ACK
.
.
.
Computer Networks and Internets -- Module 5 179 Spring, 2014
Copyright  2014. All rights reserved.
TCP Segment Format
d TCP packet is called a segment
d Segment is encapsulated in IP for transmission
d Single format used for SYNs, FINs, ACKs, and data
0 4 10 16 24 31
SOURCE PORT DESTINATION PORT
SEQUENCE NUMBER
ACKNOWLEDGEMENT NUMBER
HLEN NOT USED CODE BITS WINDOW
CHECKSUM URGENT POINTER
OPTIONS (if any)
BEGINNING OF DATA
.
.
.
Computer Networks and Internets -- Module 5 180 Spring, 2014
Copyright  2014. All rights reserved.
Routing Algorithms
And Routing Protocols
Historical Perspective
d Computing in the 1960s
– Mainframes
– Batch processing with punched cards
– Usually one computer per organization
d Computing in the 1970s
– Minicomputers
– A few computers per organization
– Dumb terminals
Computer Networks and Internets -- Module 5 182 Spring, 2014
Copyright  2014. All rights reserved.
Traditional Wide Area Networks
d Developed during 1960s mainframe era
d Predate
– LANs
– PCs
d Basic motivation
– Interconnect mainframe at one site to mainframes at
other sites
– Allow resource sharing
d First to employ dynamic routing
Computer Networks and Internets -- Module 5 183 Spring, 2014
Copyright  2014. All rights reserved.
Traditional WAN Architecture
d Dedicated device known as packet switch placed at each site
d Packet switch provides
– Local connections for host computer(s) at the site
– Long-distance connections to other sites
d Connection among sites
– Leased digital circuits
– Leased raw copper or fiber with customer supplying
modems
Computer Networks and Internets -- Module 5 184 Spring, 2014
Copyright  2014. All rights reserved.
Packet Switch Used In Traditional WAN
d Special-purpose, stand-alone device
d Dedicated to packet forwarding
d Small computer with
– Processor
– Memory
– Program on stable storage
– I/ O interfaces
Computer Networks and Internets -- Module 5 185 Spring, 2014
Copyright  2014. All rights reserved.
Conceptual View Of Traditional Packet Switch
packet switch
local
computers
processor
memory
I/O interfaces
for local computers
I/O interfaces
for remote sites
internal
interconnects
leased circuits
to remote
sites
d Memory needed to store packets
Computer Networks and Internets -- Module 5 186 Spring, 2014
Copyright  2014. All rights reserved.
Store And Forward Paradigm
d Key paradigm used in packet switching
d Operation
– Interface hardware places each arriving packet in a
queue in memory
– Processor continually removes next packet from the
queue and forwards toward its destination
d Motivation: memory is a buffer that accommodates a short
burst of packets that arrive back-to-back
Important point: packet traffic tends to be bursty.
Computer Networks and Internets -- Module 5 187 Spring, 2014
Copyright  2014. All rights reserved.
Example Of Traditional WAN Architecture
d Packet switch at each site connects to other sites
d Circuits accommodate traffic and desired robustness
packet
switch
at
site 1
packet
switch
at
site 2
packet
switch
at site 3
packet
switch
at site 4
each computer
connects to a
packet switch
digital circuits
between switches
Computer Networks and Internets -- Module 5 188 Spring, 2014
Copyright  2014. All rights reserved.
Traditional WAN Addressing
Computer Networks and Internets -- Module 5 189 Spring, 2014
Copyright  2014. All rights reserved.
Traditional WAN Addressing
d Hierarchical model analogous to Internet addressing
Computer Networks and Internets -- Module 5 189 Spring, 2014
Copyright  2014. All rights reserved.
Traditional WAN Addressing
d Hierarchical model analogous to Internet addressing
d Conceptual two-level hierarchy
( site, computer at the site )
Computer Networks and Internets -- Module 5 189 Spring, 2014
Copyright  2014. All rights reserved.
Traditional WAN Addressing
d Hierarchical model analogous to Internet addressing
d Conceptual two-level hierarchy
( site, computer at the site )
d In practice, one packet switch per site and K connections for
local computers means the address hierarchy is:
( packet switch, local connection on the switch )
Computer Networks and Internets -- Module 5 189 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Traditional WAN Addressing
1
2
3
4
5
6
1
2
3
4
5
6
packet
switch
1
packet
switch
2
address is [1,2]
address is [1,5]
address is [2,1]
address is [2,6]
d The two parts of an address are combined to form a single
binary number
Computer Networks and Internets -- Module 5 190 Spring, 2014
Copyright  2014. All rights reserved.
Next-Hop Forwarding
d Analogous to IP datagram forwarding
d Each packet contains a destination address
d Forwarding uses only the packet switch portion of an
address; delivery uses the rest of the address
d If packet has reached the destination packet switch, deliver
to locally-connected computer
d Otherwise, forward to another packet switch that is closer to
the destination site
Computer Networks and Internets -- Module 5 191 Spring, 2014
Copyright  2014. All rights reserved.
Algorithm For Packet Forwarding
Given:
An incoming packet arriving at a packet switch
Perform:
The next-hop forwarding step
Method:
Extract the destination address from the packet and
divide into packet switch, P, and computer, C;
if ( P is the same as “my” packet switch number ) {
Deliver the packet to local computer C;
} else {
Use P to select a next hop, and forward the packet
over the selected link to the next hop;
}
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2222222222222222222222222222222222222222222222222222222
Computer Networks and Internets -- Module 5 192 Spring, 2014
Copyright  2014. All rights reserved.
WAN Forwarding Table
d Analogous to IP forwarding table
d Each entry in table refers to a switch, not an individual
computer
to reach send to
switch 1
switch 2
switch 3
interface 1
local delivery
interface 4
Example WAN with three packet switches Forwarding table for switch 2
[1,2]
[1,5]
[3,2]
[3,5]
[2,1] [2,6]
packet
switch
1
packet
switch
3
packet
switch 2
interface 1
interface 4
Computer Networks and Internets -- Module 5 193 Spring, 2014
Copyright  2014. All rights reserved.
Modern WAN Architecture
d Uses IP technology
d Router at site has
– Local connections to networks at the site
– Long-distance connections to routers at other sites
d Typical use: connect all sites of an organization
Computer Networks and Internets -- Module 5 194 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Modern WAN Connections
LAN (e.g., Ethernet) Router
local computers
connections
to other sites
d Uses conventional IP router
d Typical remote connection is a leased data circuit
d Router can also provide connection to the Internet
Computer Networks and Internets -- Module 5 195 Spring, 2014
Copyright  2014. All rights reserved.
Routing Algorithms
And Internet Routing
Constructing A Forwarding Table
d Two basic approaches
d Static routing
– Used in Internet hosts
– Entries inserted when system boots and do not change
d Dynamic routing
– Used in packet switches and IP routers
– Initial entries inserted when system boots
– Routing software continually monitors network,
computes shortest paths, and updates forwarding table
Computer Networks and Internets -- Module 5 197 Spring, 2014
Copyright  2014. All rights reserved.
Static Routing
d Used in most hosts
d Only K+1 entries in forwarding table if host has K network
connections
d K entries, one per network connection
– IP prefix for the network
– Address mask for the network
– Interface for the network
d Final entry: default route
– default IP router address
– Interface for the default router
Computer Networks and Internets -- Module 5 198 Spring, 2014
Copyright  2014. All rights reserved.
Dynamic Routing
d Routing Software
– Runs on each packet switch or router
– Computes shortest paths and installs entries in local
forwarding table
d Models the network as a graph
1 2
3 4
1 2
3 4
Example WAN Equivalent graph
edges or links
nodes
Computer Networks and Internets -- Module 5 199 Spring, 2014
Copyright  2014. All rights reserved.
Example Graph And Next-Hop Forwarding Tables
1 2
3 4
2
222222222222222 2
2222222222222222 2
2222222222222222 2
2222222222222222
to send to send to send to send
reach over reach over reach over reach over
2
222222222222222 2
2222222222222222 2
2222222222222222 2
2222222222222222
1 – 1 (2,3) 1 (3,1) 1 (4,3)
2
222222222222222 2
2222222222222222 2
2222222222222222 2
2222222222222222
2 (1,3) 2 – 2 (3,2) 2 (4,2)
2
222222222222222 2
2222222222222222 2
2222222222222222 2
2222222222222222
3 (1,3) 3 (2,3) 3 – 3 (4,3)
2
222222222222222 2
2222222222222222 2
2222222222222222 2
2222222222222222
4 (1,3) 4 (2,4) 4 (3,4) 4 –
11
1
1
1
1
1
1
1
1
1
1
2
22222222222222211
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
2
222222222222222211
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
2
222222222222222211
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
2
222222222222222211
1
1
1
1
1
1
1
1
1
1
node 1 node 2 node 3 node 4
Computer Networks and Internets -- Module 5 200 Spring, 2014
Copyright  2014. All rights reserved.
Dynamic Routing
d Goals
– Consistent, optimal routes
– Automatic route change to accommodate failures
d Each node (packet switch or router) participates
d Routing software on a node exchanges information with
routing software on other nodes
d Distributed computation
d Two basic algorithms employed
– Distance-Vector (DV)
– Link-State Routing (LSR)
Computer Networks and Internets -- Module 5 201 Spring, 2014
Copyright  2014. All rights reserved.
Distance-Vector (DV) Routing
d Approach used in many early routing protocols
d Also known as Bellman Ford
d Node
– Receives information from neighbors
– Combines information from all neighbors with local
information
– Sends copy of processed information to all neighbors
Computer Networks and Internets -- Module 5 202 Spring, 2014
Copyright  2014. All rights reserved.
How DV Works
d A participant periodically sends route advertisement to each
neighbor
d Advertisement specifies reachable sites and distance to each
I can reach site X, and its distance from me is Y.
I can reach site Z, and its distance from me is W.
.
.
.
d Neighbor receives advertisement and updates its forwarding
table
d In next round, neighbors each send advertisements to their
neighbors
Computer Networks and Internets -- Module 5 203 Spring, 2014
Copyright  2014. All rights reserved.
Distance-Vector Algorithm
d Used when advertisement arrives
d Examine each item in advertisement
– If neighbor can reach site X and I cannot, add an entry
to my forwarding table for X with the neighbor as the
next hop
– If I already have a route to X with the neighbor as the
next hop, replace the distance in the route with the
advertised distance
– If I have a route to X that is more expensive than going
through the neighbor, change the next hop to the
neighbor
Computer Networks and Internets -- Module 5 204 Spring, 2014
Copyright  2014. All rights reserved.
Measuring The Distance Of A Route
d Possible measures
– Hops
– Delay
– Throughput
– Economic or administrative cost
d Many protocols use hops, but routing software often permits
a manager to assign administrative hop counts
Computer Networks and Internets -- Module 5 205 Spring, 2014
Copyright  2014. All rights reserved.
Link-State Routing (LSR)
d Chief alternative to distance-vector
d Each node
– Sends link status information
– Computes shortest paths independently
– Does not rely on computation performed by others
d Name
– Formal name is Link-State or Link-Status Routing
– Also called Shortest Path First (SPF), a somewhat
misleading term derived from underlying algorithm
Computer Networks and Internets -- Module 5 206 Spring, 2014
Copyright  2014. All rights reserved.
How LSR Works
d Each pair of directly-connected nodes periodically
– Tests connection between them
– Broadcasts one of the following messages:
The link between X and Y is up.
or
The link between X and Y is down.
d Each node
– Collects incoming broadcast messages and creates a
graph
– Uses Dijkstra’s SPF algorithm to compute a forwarding
table (see text for details and example)
Computer Networks and Internets -- Module 5 207 Spring, 2014
Copyright  2014. All rights reserved.
Review Of Internet Forwarding
d Hosts
– Use static routing
– Entries placed in forwarding table when system boots
and remain unchanged
d Routers
– Use dynamic routing
– Initial entries placed in forwarding table when system
boots and routing software updates entries continually
Computer Networks and Internets -- Module 5 208 Spring, 2014
Copyright  2014. All rights reserved.
Example Of Host Routing
Ethernet 128.10.0.0 / 16
Router R1
128.10.0.0
default
255.255.0.0
0.0.0.0
direct
128.10.0.100
Net Mask Next hop
hosts on a network
forwarding table in each host
router address
128.10.0.100 to rest of
Internet
d Next hop in default route is known as a default router
Computer Networks and Internets -- Module 5 209 Spring, 2014
Copyright  2014. All rights reserved.
Why Dynamic Internet Routing Is Needed
d Router
– Only has direct connections to a few networks
– Must know how to forward datagram to arbitrary
destination
d Example
R1 R2
network 1 network 2
network 3
d Router R1 must learn about network 2 and R2 must learn
about network 1
Computer Networks and Internets -- Module 5 210 Spring, 2014
Copyright  2014. All rights reserved.
Important Principle
No single routing protocol can be used across the entire
Internet because the overhead is too high.
Computer Networks and Internets -- Module 5 211 Spring, 2014
Copyright  2014. All rights reserved.
Autonomous System Concept
d Internet divided into a set of routing domains
d Each routing domain is
– Known as an autonomous system (AS)
– Assigned a unique number
d Generally, an AS is a contiguous set of routers and networks
under one administrative authority
d No exact definition; think of a large ISP or a large
corporation
d AS gathers and summarizes routing information before
passing it to another AS
Computer Networks and Internets -- Module 5 212 Spring, 2014
Copyright  2014. All rights reserved.
Two Types Of Internet Routing Protocols
Computer Networks and Internets -- Module 5 213 Spring, 2014
Copyright  2014. All rights reserved.
Two Types Of Internet Routing Protocols
d Interior Gateway Protocols (IGPs)
– Used within an autonomous system
– Choice of IGP is made by each AS
– Relatively easy to install and manage
Computer Networks and Internets -- Module 5 213 Spring, 2014
Copyright  2014. All rights reserved.
Two Types Of Internet Routing Protocols
d Interior Gateway Protocols (IGPs)
– Used within an autonomous system
– Choice of IGP is made by each AS
– Relatively easy to install and manage
d Exterior Gateway Protocols (EGPs)
– Used between autonomous systems
– More complex to install and configure
– Include policy constraints that control which information
is revealed
Computer Networks and Internets -- Module 5 213 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of IGPs and EGPs
R1
R2
R3
R4
R5
R6
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...................................
...................................
Autonomous
System 1
Autonomous
System 2
EGP used
IGP1 used IGP2 used
d Because metrics used in each AS may differ, direct
comparison is impossible
Computer Networks and Internets -- Module 5 214 Spring, 2014
Copyright  2014. All rights reserved.
Principle Of Route And Data Flow
d Data flows in opposite direction of routes
d Example: ISP1 advertises route to customer Q and receives
traffic for customer Q
R1 R2
ISP1 ISP2
Routes for customers
of ISP1
Data to customers
of ISP1
Computer Networks and Internets -- Module 5 215 Spring, 2014
Copyright  2014. All rights reserved.
Internet Routing Protocols
Border Gateway Protocol (BGP)
d Primary Exterior Gateway Protocol used in the Internet
d Used by Tier 1 ISPs at the center of the Internet
d Current version is 4 (BGP-4)
d Characteristics
– Provides routing among autonomous systems
– Includes provisions for policies
– Distinguishes transit routes from terminal routes
– Uses reliable transport (TCP)
– Sends path information
Computer Networks and Internets -- Module 5 217 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of BGP Paths
d Modified Distance-Vector protocol
d Advertisement contains a path in place of a distance
d Path lists the autonomous systems to destination
d Example
To reach network X, I send along path Z, Y, W,...
d Path information means receiver can apply policies (e.g.,
receiver can choose to ignore all routes that pass through AS
number N)
Computer Networks and Internets -- Module 5 218 Spring, 2014
Copyright  2014. All rights reserved.
Routing Information Protocol (RIP)
d Among the earliest Interior Gateway Protocols
d Characteristics
– Distance-Vector that uses hop-count metric
– Sent over UDP (unreliable transport)
– Advertises CIDR prefixes
– Includes facility for default route propagation
– Broadcast or multicast delivery
d Current version is 2 (RIP2)
Computer Networks and Internets -- Module 5 219 Spring, 2014
Copyright  2014. All rights reserved.
RIP2 Packet Format
0 8 16 24 31
COMMAND (1-5) VERSION (2) MUST BE ZERO
FAMILY OF NET 1 ROUTE TAG FOR NET 1
IP ADDRESS OF NET 1
ADDRESS MASK FOR NET 1
NEXT HOP FOR NET 1
DISTANCE TO NET 1
FAMILY OF NET 2 ROUTE TAG FOR NET 2
IP ADDRESS OF NET 2
ADDRESS MASK FOR NET 2
NEXT HOP FOR NET 2
DISTANCE TO NET 2
. . .
d Note: routing protocols run at application layer (layer 5)
Computer Networks and Internets -- Module 5 220 Spring, 2014
Copyright  2014. All rights reserved.
Open Shortest Path First Protocol (OSPF)
d Created by the IETF to be an open standard (reaction to
proprietary protocols)
d Characteristics
– Interior Gateway Protocol
– Advertises CIDR prefixes
– Authenticated message exchange
– Can import routes from BGP
– Link-state algorithm
– Provides for multi-access networks
– Divides large network into areas
Computer Networks and Internets -- Module 5 221 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of An OSPF Graph
R1 R2
R3
R4
R5 R6
R1 R2
R3
R4
R5 R6
a network the OSPF graph
d Graph shows a link between each pair of routers even
though some connections cross a shared network
Computer Networks and Internets -- Module 5 222 Spring, 2014
Copyright  2014. All rights reserved.
Intermediate System - Intermediate System (IS-IS)
d Originally part of DECNET V protocols
d Uses LSR approach
d Initially
– Considered somewhat over featured
– Not widely accepted in the Internet
– Overshadowed by OSPF
d Eventually
– OSPF became complex as features were added
– IS-IS started to gain acceptance
Computer Networks and Internets -- Module 5 223 Spring, 2014
Copyright  2014. All rights reserved.
Routing Problems
Where Intuition Fails
d Routing is not like water flowing through pipes or traffic on
highways
– Multi-path routing is difficult
– Capacity can go unused if not along shortest path
d Fewest hops may not always be best
– Compare two Ethernet hops and one satellite hop
d Routing around congestion is not straightforward, and does
not always yield a big improvement
– Can cause out-of-order packets (TCP reacts)
– Can result in route flapping
Computer Networks and Internets -- Module 5 225 Spring, 2014
Copyright  2014. All rights reserved.
Loops And Convergence
d Routing loop
– Circular routes
– Can be caused if “good news” flows backward
d Slow convergence (count to infinity) problem arises
– Routes fail to converge after a change
– Can cause a routing loop to persist
Computer Networks and Internets -- Module 5 226 Spring, 2014
Copyright  2014. All rights reserved.
How Good News Can Backwash
d A story with three routers and a network
A B C
network N
Computer Networks and Internets -- Module 5 227 Spring, 2014
Copyright  2014. All rights reserved.
How Good News Can Backwash
d A story with three routers and a network
A B C
network N
Computer Networks and Internets -- Module 5 227 Spring, 2014
Copyright  2014. All rights reserved.
How Good News Can Backwash
d A story with three routers and a network
A B C
network N
Computer Networks and Internets -- Module 5 227 Spring, 2014
Copyright  2014. All rights reserved.
How Good News Can Backwash
d A story with three routers and a network
A B C
network N
Computer Networks and Internets -- Module 5 227 Spring, 2014
Copyright  2014. All rights reserved.
How Good News Can Backwash
d A story with three routers and a network
A B C
network N
Computer Networks and Internets -- Module 5 227 Spring, 2014
Copyright  2014. All rights reserved.
How Good News Can Backwash
d A story with three routers and a network
A B C
network N
Computer Networks and Internets -- Module 5 227 Spring, 2014
Copyright  2014. All rights reserved.
How Good News Can Backwash
d A story with three routers and a network
A B C
network N
Computer Networks and Internets -- Module 5 227 Spring, 2014
Copyright  2014. All rights reserved.
How Good News Can Backwash
d A story with three routers and a network
A B C
network N
d In practice, modern DV protocols employ heuristics that
– Eliminate backflow
– Lock down changes after a failure
Computer Networks and Internets -- Module 5 227 Spring, 2014
Copyright  2014. All rights reserved.
Other Routing Problems
d Black hole
– Routing system sends packets for a set of destinations to
a location where they are silently discarded
– Can be caused if routing update packets are lost
d Route flapping (lack of convergence)
– Routes continue to oscillate
– Can be caused by equal-length paths
Computer Networks and Internets -- Module 5 228 Spring, 2014
Copyright  2014. All rights reserved.
Routing Overhead
d Traffic from routing protocols is “overhead”
d Specific cases
– DV advertisements tend to be large
– LSR uses broadcast
d Fundamental tradeoff
– Decreasing frequency of routing exchanges lowers
overhead
– Increasing frequency of routing exchanges reduces the
time between a failure and rerouting around the failure
Computer Networks and Internets -- Module 5 229 Spring, 2014
Copyright  2014. All rights reserved.
Internet Multicast
And Multicast Routing
IPv4 Multicast
d Defined early; informally called “Deering multicast”
d Provides Internet-wide multicast dissemination
d Uses IPv4 addresses 224.0.0.0 through 239.255.255.255 (the
original Class D address space)
d In theory, any host in the Internet can
– Join or leave any group at any time
– Send a datagram to any group at any time
Computer Networks and Internets -- Module 5 231 Spring, 2014
Copyright  2014. All rights reserved.
IPv4 Multicast
d Defined early; informally called “Deering multicast”
d Provides Internet-wide multicast dissemination
d Uses IPv4 addresses 224.0.0.0 through 239.255.255.255 (the
original Class D address space)
d In theory, any host in the Internet can
– Join or leave any group at any time
– Send a datagram to any group at any time
Internet-wide multicast is not widely deployed
Computer Networks and Internets -- Module 5 231 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Multicast
d Fundamental part of IPv6
d IPv6 prohibits broadcast, but defines multicast groups that
are equivalent
– All routers
– All nodes
Computer Networks and Internets -- Module 5 232 Spring, 2014
Copyright  2014. All rights reserved.
Internet Group Multicast Protocol (IGMP)
d Allows a host to join or leave a multicast group
d Restricted to a single network (host talks to local router)
d When first host on a network joins a new group or last host
on a network leaves a group, router(s) on the network
change multicast routes accordingly
Computer Networks and Internets -- Module 5 233 Spring, 2014
Copyright  2014. All rights reserved.
IP Multicast And Ethernet Delivery
d When sending IP multicast across Ethernet
– Can use Ethernet multicast capability
– IP multicast address is mapped to an Ethernet multicast
address
d Problem
– Most interface hardware limits the number of Ethernet
multicast addresses that can be used simultaneously
– Trick: use a few multicast addresses and allow software
to decide how a given packet should be processed
Computer Networks and Internets -- Module 5 234 Spring, 2014
Copyright  2014. All rights reserved.
Multicast Routing Protocols
d Needed to propagate multicast routes throughout the Internet
d Goals
– Ensure all participants in a group receive packets sent to
the group
– Avoid flooding multicast across a network unless a host
is listening
d General approach
– Form a graph-theoretic tree for each multicast group
– Forward multicast along links of the tree
d Trick: send a request for group X toward the “center” of the
Internet until it reaches a router that knows about group X
Computer Networks and Internets -- Module 5 235 Spring, 2014
Copyright  2014. All rights reserved.
Example Multicast Routing Protocols
d Many multicast routing protocols have been proposed
d A few examples
2222222222222222222222222222222222222222222222
Protocol Type
2222222222222222222222222222222222222222222222
DVMRP Configuration-and-Tunneling
2222222222222222222222222222222222222222222222
CBT Core-Based-Discovery
2222222222222222222222222222222222222222222222
PIM-SM Core-Based-Discovery
2222222222222222222222222222222222222222222222
PIM-DM Flood-And-Prune
2222222222222222222222222222222222222222222222
MOSPF Link-State (within an organization)
2222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 5 236 Spring, 2014
Copyright  2014. All rights reserved.
Summary
d Internet
– Consists of a network of heterogeneous networks
– Separates communication from content and services
– Accommodates arbitrary network technologies and
applications
d IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses
d Internet packet is known as an IP datagram
d Datagram is encapsulated for transmission
d Fragmentation and reassembly accommodate heterogeneous
MTUs
Computer Networks and Internets -- Module 5 237 Spring, 2014
Copyright  2014. All rights reserved.
Summary
(continued)
d IPv4 uses ARP for address resolution and IPv6 uses ND
d ICMP (Internet Control Message Protocol) reports errors
back to the original source
d Ping uses ICMP echo request and echo response
d DHCP allows automatic configuration
d NAT hides multiple computers behind a single address
d Internet follows the end-to-end principle
Computer Networks and Internets -- Module 5 238 Spring, 2014
Copyright  2014. All rights reserved.
Summary
(continued)
d Transport protocols that provide end-to-end service run in
hosts
d Internet has two main transport protocols
– UDP provides unreliable, connectionless message
delivery
– TCP provides reliable, stream-oriented delivery
d Dynamic routing was created for WANs and is used in the
Internet
d Two basic approaches
– Distance Vector
– Link State (also called SPF)
Computer Networks and Internets -- Module 5 239 Spring, 2014
Copyright  2014. All rights reserved.
Summary
(continued)
d Internet is divided into Autonomous Systems
d EGPs used between Autonomous Systems
d IGPs used within an Autonomous System
d Internet routing protocols include
– Border Gateway Protocol (BGP)
– Routing Information Protocol (RIP)
– Open Shortest Path First (OSPF)
– Intermediate System-Intermediate System (IS-IS)
d Multicast routing protocols defined, but are not in wide use
Computer Networks and Internets -- Module 5 240 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
MODULE VI
Other Topics
Computer Networks and Internets -- Module 6 1 Spring, 2014
Copyright  2014. All rights reserved.
Topics
d Measuring network performance
d Quality of Service (QoS) and provisioning
d Multimedia and IP telephony
d Network security
d Traffic engineering and MPLS
d Network management (SNMP)
Computer Networks and Internets -- Module 6 2 Spring, 2014
Copyright  2014. All rights reserved.
Measuring
Network Performance
Why Measure Network Performance?
d Optimization
d Planning (anticipating future needs)
d Assessing and understanding traffic
– Trends in applications and network use
– Detecting anomalous traffic patterns
d Contract (SLA) enforcement
d Bragging rights
– IT staff in an organization
– Marketing department in an equipment vendor
Computer Networks and Internets -- Module 6 4 Spring, 2014
Copyright  2014. All rights reserved.
Qualitative Terminology And Marketing
Computer Networks and Internets -- Module 6 5 Spring, 2014
Copyright  2014. All rights reserved.
Qualitative Terminology And Marketing
d Marketing seems to love qualitative terms
– High-speed
– Fast
– Powerful
– High bandwidth
Computer Networks and Internets -- Module 6 5 Spring, 2014
Copyright  2014. All rights reserved.
Qualitative Terminology And Marketing
d Marketing seems to love qualitative terms
– High-speed
– Fast
– Powerful
– High bandwidth
d Unfortunately
– Qualitative terminology is vague
– Networking technologies change rapidly
Computer Networks and Internets -- Module 6 5 Spring, 2014
Copyright  2014. All rights reserved.
Qualitative Terminology That Faded
d A high-speed leased line
– Was once defined to run at 9.6 Kbps
d The Internet’s Very high-speed Backbone Network System
(VBNS)
– Used OC-12 links, that are no longer considered very
high speed
d Fast Ethernet
– Runs at 100 Mbps and is only one-tenth as fast as
Gigabit Ethernet technology
d Broadband
– Was once defined by the FCC to start at 128 Kbps
Computer Networks and Internets -- Module 6 6 Spring, 2014
Copyright  2014. All rights reserved.
Quantitative Measures
d Quantifiable measurement is surprisingly difficult
d Routes and data rates can be asymmetric, making
measurements in one direction differ from measurements in
the other
d Inserting measurement probes can affect the performance of
the system being measured
d Conditions can change rapidly
Computer Networks and Internets -- Module 6 7 Spring, 2014
Copyright  2014. All rights reserved.
Aggregate Traffic Analysis
Computer Networks and Internets -- Module 6 8 Spring, 2014
Copyright  2014. All rights reserved.
Aggregate Traffic Analysis
d Short-term variation
– Packets tend to arrive in clumps called bursts
d Long-term variation
– Diurnal and annual patterns exist
Computer Networks and Internets -- Module 6 8 Spring, 2014
Copyright  2014. All rights reserved.
Aggregate Traffic Analysis
d Short-term variation
– Packets tend to arrive in clumps called bursts
d Long-term variation
– Diurnal and annual patterns exist
d Interestingly, data traffic is unlike voice traffic
– Aggregate of voice telephone calls is smooth average
– Aggregate of data traffic is bursty
Computer Networks and Internets -- Module 6 8 Spring, 2014
Copyright  2014. All rights reserved.
Self-Similarity
Unlike voice telephone traffic, data traffic is bursty. Data
traffic is said to be self-similar because aggregates of data
traffic exhibit a pattern of burstiness that is statistically similar
to the burstiness on a single link.
The point: data traffic is not easy to analyze
Computer Networks and Internets -- Module 6 9 Spring, 2014
Copyright  2014. All rights reserved.
Practical Measures Of Network Performance
d Three primary quantitative measures
2222222222222222222222222222222222222222222222222222222222222222222
Measure Description
2222222222222222222222222222222222222222222222222222222222222222222
Latency (delay) The time required to transfer a bit across
a network from one end to another
2222222222222222222222222222222222222222222222222222222222222222222
Throughput (capacity) The amount of data that can be transferred
over a network per unit time
2222222222222222222222222222222222222222222222222222222222222222222
Jitter (variability) The changes in delay that occur and the
duration of the changes
2222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d We will see that the three are not completely independent
Computer Networks and Internets -- Module 6 10 Spring, 2014
Copyright  2014. All rights reserved.
Latency Or Delay
d Time required for data to travel “across” a network
d Think of latency as the time required for a single bit to
traverse a network
d Depends on
– Physical properties of the universe (the speed of light)
– Traffic on the network
Computer Networks and Internets -- Module 6 11 Spring, 2014
Copyright  2014. All rights reserved.
Latency And Perceived Response Time
d Users are interested in response time
d Several components of delay contribute to overall response
time a user perceives
2
222222222222222222222222222222222222222222222222222222222222222222
Type Explanation
2
222222222222222222222222222222222222222222222222222222222222222222
Access Delay The time needed to obtain access to a
transmission medium (e.g., a cable)
2
222222222222222222222222222222222222222222222222222222222222222222
Propagation Delay The time required for a signal to travel across
a transmission medium
2
222222222222222222222222222222222222222222222222222222222222222222
Switching Delay The time required to forward a packet
2
222222222222222222222222222222222222222222222222222222222222222222
Queuing Delay The time a packet spends in the memory of a
switch or router waiting to be selected for
transmission
2
222222222222222222222222222222222222222222222222222222222222222222
Server Delay The time required for a server to respond to a
request and send a response
2
222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 12 Spring, 2014
Copyright  2014. All rights reserved.
Bottlenecks
d Any part of a communication system can be a bottleneck
that causes the most delay
d Examples
– Access delay: acquiring a wireless channel
– Propagation delay: a satellite transmission
– Switching delay: deep packet inspection
– Server delay: a news agency web site overloaded during
a crisis
– Queuing delay: packets arriving faster than they depart
Computer Networks and Internets -- Module 6 13 Spring, 2014
Copyright  2014. All rights reserved.
Assessing Delay
d Make multiple measurements over an interval
d Report minimum, maximum, mean, and standard deviation
d Divide delay into constituent components if possible
d Choose small intervals to look for repeated patterns
Computer Networks and Internets -- Module 6 14 Spring, 2014
Copyright  2014. All rights reserved.
Throughput
d Maximum amount of data a network can transport per unit
time
d Expressed as data rate in bits per second (e.g., 100 megabits
per second)
d Mistakenly cited as network “speed”, but really a measure
of network capacity
d Gives an upper-bound on performance, not a guarantee
Computer Networks and Internets -- Module 6 15 Spring, 2014
Copyright  2014. All rights reserved.
Assessing Throughput
d Several possible measures
– Capacity of a single communication channel
– Capacity along a path through the network
– Aggregate capacity of all channels
– Capacity among pairs of ingress and egress points when
used simultaneously
Computer Networks and Internets -- Module 6 16 Spring, 2014
Copyright  2014. All rights reserved.
The Concept Of Goodput
d Invented to provide meaningful assessment of network
performance
d Defined as the effective rate at which an application receives
data
d Can differ from throughput for any of the following reasons
– Application protocol overhead
– Channel coding overhead
– Packet header overhead
– Receiver buffer limitations
– Congestion avoidance mechanisms
– Packet retransmission
Computer Networks and Internets -- Module 6 17 Spring, 2014
Copyright  2014. All rights reserved.
Assessing Goodput
d Measure data that arrives successfully, and compute the
amount of data per unit time
d Goodput measurements also include the overhead introduced
by
– Operating system
– Transport protocol
– Lower layer encodings and protocols
– Application protocol and implementation
d Note: although they use the term throughput, most
measurement tools report goodput
Computer Networks and Internets -- Module 6 18 Spring, 2014
Copyright  2014. All rights reserved.
Jitter
d Another prominent measure of network performance
d Especially important in transmission of streaming audio and
video
d Measures variation in delay
d Example
– Suppose network has average delay D
– If each packet takes exactly D time units to traverse the
network, jitter is zero
– If packets alternate between delays of D+ε and D – ε,
average delay remains D, but jitter increases
Computer Networks and Internets -- Module 6 19 Spring, 2014
Copyright  2014. All rights reserved.
Key Observation
In the Internet, congestion is the single most significant
cause of packet loss, high jitter, and long delays.
Computer Networks and Internets -- Module 6 20 Spring, 2014
Copyright  2014. All rights reserved.
Handling Jitter
d Replace the Internet with an isochronous network
– Approach used in the original telephone network
– All parallel paths have exactly the same delay
d Change the Internet to reserve capacity
– Discussed later in the module
d Keep the current Internet design and add protocols that
compensate for jitter
– Basic technique is a jitter buffer
– Discussed later in the module
Computer Networks and Internets -- Module 6 21 Spring, 2014
Copyright  2014. All rights reserved.
Understanding Throughput And Delay
d An analogy
– Think of a network as a road between two locations
– Propagation delay determines how long it takes a single
car to traverse the road
– Throughput determines how many cars can enter the
road per unit time
d Observe
– Adding a lane doubles the throughput (i.e., capacity), but
leaves the delay unchanged
– It is possible to have arbitrarily high throughput, even if
the delay is long (imagine a long road with hundreds of
lanes)
Computer Networks and Internets -- Module 6 22 Spring, 2014
Copyright  2014. All rights reserved.
Understanding Throughput And Delay
(continued)
d The analogy helps us understand network measures
Computer Networks and Internets -- Module 6 23 Spring, 2014
Copyright  2014. All rights reserved.
Understanding Throughput And Delay
(continued)
d The analogy helps us understand network measures
Propagation delay specifies the time a single bit remains in
transit in a network. Throughput, which specifies how many
bits can enter the network per unit time, measures network
capacity.
Computer Networks and Internets -- Module 6 23 Spring, 2014
Copyright  2014. All rights reserved.
Understanding Throughput And Delay
(continued)
d The analogy helps us understand network measures
Propagation delay specifies the time a single bit remains in
transit in a network. Throughput, which specifies how many
bits can enter the network per unit time, measures network
capacity.
d The key consequence is incorporated in an aphorism
You can always buy more throughput, but you cannot buy
lower delay.
Computer Networks and Internets -- Module 6 23 Spring, 2014
Copyright  2014. All rights reserved.
Delay-Throughput Product
d Specifies the maximum amount of data “in flight”
Bits present in a network = D × T
where
– D is delay measured in seconds
– T is throughput measured in bits per second
d Specifies how many bits can be transmitted before the first
bit arrives at the receiver
d Often incorrectly labeled the delay-bandwidth product
Computer Networks and Internets -- Module 6 24 Spring, 2014
Copyright  2014. All rights reserved.
Delay-Throughput Terminology And Examples
d Ethernet
– Although it has high throughput, the short delay limits
the delay-throughput product
d Satellite link
– Usually has a high delay-throughput product because
delay is long and throughput is high
d Informally, we use an analogy
– A network with a long delay is called a long pipe
– A network with high throughput is called a fat pipe
– A satellite is known as a long, fat pipe
Computer Networks and Internets -- Module 6 25 Spring, 2014
Copyright  2014. All rights reserved.
Delay, Throughput,
and Utilization
Relationship Between Delay And Throughput
d In theory, delay and throughput are independent
d In practice, they are related
d Reason
– Throughput determines rate at which traffic can pass
across a communication link
– A switch or router queues packets until they can be sent
– If data arrives at a switch or router faster than it leaves,
queue length grows, which means increased delay
(congestion)
Computer Networks and Internets -- Module 6 27 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of How Congestion Occurs
d Consider a router with three 1 Gbps connections, and
assume that traffic is arriving over two connections destined
for the third
router
input 1 (1 Gpbs)
input 2 (1 Gbps)
output (1 Gbps)
d If the capacity of the red link is doubled, all links can
experience more congestion, which increases delay
Computer Networks and Internets -- Module 6 28 Spring, 2014
Copyright  2014. All rights reserved.
Utilization
d Measure of the current load on a network link
d Given as a percentage of capacity being used, and expressed
as a real value between 0.0 and 1.0
d Example: if a link capable of 1 Gbps has traffic of 500
Mbps, link utilization is 0.5
d Because utilization changes over time, it is reported over an
interval by giving
– Peak (i.e., maximum)
– Average (i.e., mean)
Computer Networks and Internets -- Module 6 29 Spring, 2014
Copyright  2014. All rights reserved.
Utilization As Estimate Of Delay
d Packet traffic is bursty
d Key discovery: the effective queuing delay can be estimated
from the utilization as follows:
D =
(1 − U)
D0
3333333
d Where
– D0 is delay when the network is idle
– U is current utilization between 0 and 1
Computer Networks and Internets -- Module 6 30 Spring, 2014
Copyright  2014. All rights reserved.
Delay As A Function Of Utilization
utilization
relative
delay
25% 50% 75% 100%
1
2
3
4
5
6
idle delay
Computer Networks and Internets -- Module 6 31 Spring, 2014
Copyright  2014. All rights reserved.
Practical Interpretation Of Utilization
d Delay increases rapidly as utilization climbs
d When utilization reaches 50%, delay is double
d When utilization reaches 80%, delay is five times higher
than average
Computer Networks and Internets -- Module 6 32 Spring, 2014
Copyright  2014. All rights reserved.
The 50-80 Rule
d Heuristic managers follow
– When utilization reaches 50%, plan an upgrade
– When utilization reaches 80%, an upgrade is overdue
d Note: alternative consists of partitioning a network (e.g.,
separating VLANs)
Computer Networks and Internets -- Module 6 33 Spring, 2014
Copyright  2014. All rights reserved.
Line Speed And Packets Per Second
d Networking equipment is said to operate at line speed if the
equipment can handle a sequence of back-to-back packets
d Observe
– Per-packet overhead is often the bottleneck in equipment
– For a given data rate, equipment processes
* Fewer packets per second if packets are large
* More packets per second if packets are small
d Conclusion: line speed is meaningless without a
specification of packet size
Computer Networks and Internets -- Module 6 34 Spring, 2014
Copyright  2014. All rights reserved.
Quality of Service (QoS)
and Provisioning
Quality of Service (QoS)
d Set of technologies that can be used to provide service
guarantees
– Bound on latency
– Guarantee on throughput
– Bound on jitter
d Marketing
– Tries to equate QoS and “quality”
– Implies that lack of QoS means lack of quality
Computer Networks and Internets -- Module 6 36 Spring, 2014
Copyright  2014. All rights reserved.
QoS In The Internet
d Motivation
– Make it possible to run applications such as streaming
video with no interruptions
– Allow service providers to charge (much) more for
better service
d Three approaches have been proposed and studied
– Priority
– Fine-grain QoS
– Coarse-grain QoS
Computer Networks and Internets -- Module 6 37 Spring, 2014
Copyright  2014. All rights reserved.
Priority Approach
d Each packet assigned a priority, and multiplexing selects
packets in priority order
d Popular among ISPs, and used by some corporations to give
voice and video traffic priority
d Advantages
– Easy to implement
– Can assign priority to a “customer” rather than to a
specific type of data
d Disadvantages
– No quantitative guarantees
– Can lead to starvation
Computer Networks and Internets -- Module 6 38 Spring, 2014
Copyright  2014. All rights reserved.
Fine-grain QoS Approach
d Pursued by the IETF under the name Integrated Services
(IntServ) and adopted in ATM networks
d QoS parameters negotiated for each flow (e.g., each TCP
connection)
– Maximum delay
– Minimum throughput
– Maximum jitter
d Difficult/ impossible to implement
After many years of research and standards work, the fine-
grain approach to QoS has been relegated to a few special
cases.
Computer Networks and Internets -- Module 6 39 Spring, 2014
Copyright  2014. All rights reserved.
QoS Terminology That Has Survived
d Derived from ATM
2
2222222222222222222222222222222222222222222222222222222222222222222222222
Abbreviation Expansion Meaning
2
2222222222222222222222222222222222222222222222222222222222222222222222222
Data enters the flow at a fixed rate,
CBR Constant Bit Rate such as data from a digitized voice
call entering at exactly 64 Kbps
2
2222222222222222222222222222222222222222222222222222222222222222222222222
Data enters the flow at a variable
VBR Variable Bit Rate rate within specified statistical
bounds
2
2222222222222222222222222222222222222222222222222222222222222222222222222
The flow agrees to use whatever
ABR Available Bit Rate data rate is available at a given
time
2
2222222222222222222222222222222222222222222222222222222222222222222222222
No bit rate is specified for the flow;
UBR Unspecified Bit Rate the application is satisfied with
best-effort service
2
2222222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
d Bounds specified statistically (e.g., average and peak
throughput and burst size)
Computer Networks and Internets -- Module 6 40 Spring, 2014
Copyright  2014. All rights reserved.
Coarse-grain QoS Approach
d Current approach approved by the IETF under the name
Differentiated Services (DiffServ)
d Divides traffic into classes
d Service guaranteed for each class rather than per flow
d Easier to implement than fine-grain approach
d Usually implemented as a proportional guarantee rather than
absolute quantities
d Example policy
At least 10% of the underlying network
capacity is reserved for voice traffic
Computer Networks and Internets -- Module 6 41 Spring, 2014
Copyright  2014. All rights reserved.
Steps A Router Takes To Implement QoS
router implementing QoS
Classification
and Policing
Forwarding
Computation
Output
Queuing
Traffic
Scheduling
packets
arrive
packets
leave
d Policing enforces rules on incoming traffic
d Forwarding can select among multiple paths (router may
have many output queues)
d Queuing may use Random Early Discard (RED)
Computer Networks and Internets -- Module 6 42 Spring, 2014
Copyright  2014. All rights reserved.
Traffic Scheduling
d Algorithm used to select packets from queues
d Principal types
2
22222222222222222222222222222222222222222222222222222222222222222222222
Algorithm Description
2
22222222222222222222222222222222222222222222222222222222222222222222222
Leaky Bucket Allows a queue to send packets at a fixed rate by
incrementing a packet counter periodically and using
the counter to control transmission
2
22222222222222222222222222222222222222222222222222222222222222222222222
Token Bucket Allows a queue to send data at a fixed rate by
incrementing a byte counter periodically and using the
counter to control transmission
2
22222222222222222222222222222222222222222222222222222222222222222222222
Weighted Selects packets from a set of queues according to a
Round Robin set of weights that divide the capacity into fixed
percentages, assuming a uniform packet size
2
22222222222222222222222222222222222222222222222222222222222222222222222
Deficit A variant of the round-robin approach that accounts for
Round Robin bytes sent rather than packets transferred, and allows
a temporary deficit caused by a large packet
2
22222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 43 Spring, 2014
Copyright  2014. All rights reserved.
Traffic Engineering
(MPLS)
Traffic Engineering
d An approach to networking that allows a manager to
establish and control routes through a network and assign
specific types of data to each
d Implies
– Non-standard forwarding mechanism
– All traffic of a given type sent along a specified path
d Most popular technology: MPLS
Computer Networks and Internets -- Module 6 45 Spring, 2014
Copyright  2014. All rights reserved.
Multi-Protocol Label Switching (MPLS)
d Widely deployed among tier-1 ISPs
d Requires participating routers to have MPLS module
d MPLS tunnel created by configuring routers along a path
d Router may allow manager to assign a portion of link
capacity to each tunnel
– Term multi-protocol arises because an MPLS packet can
contain arbitrary content
Computer Networks and Internets -- Module 6 46 Spring, 2014
Copyright  2014. All rights reserved.
Label Rewriting
d Concept came from ATM and is used in MPLS
d Each link in path has different integer label
d Router rewrites label in MPLS datagram before forwarding
to next hop
d Known as label switching
d Motivation: avoid global coordination and allow local
assignment of labels
d Disadvantages:
– No general protocol available to configure an MPLS
path
– Can be difficult to debug
Computer Networks and Internets -- Module 6 47 Spring, 2014
Copyright  2014. All rights reserved.
How MPLS Works
d Datagram encapsulated in MPLS header by router at the
start of a tunnel
d MPLS datagram tagged with label of path over which it
must pass
d Each router along the path
– Uses label to make forwarding decision
– Replaces label with value used on next hop
d MPLS encapsulation removed when datagram reaches end
of tunnel
Computer Networks and Internets -- Module 6 48 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Label Rewriting
R1 R2 R3
R4
H1
H2
A
A B A
B
C A
B
A
B
C
A
Computer Networks and Internets -- Module 6 49 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of Label Rewriting
R1 R2 R3
R4
H1
H2
A
A B A
B
C A
B
A
B
C
A
send to label 4
4 32 B 32 12 B
12 3 C
receive from
label 3
d Labels along the path are: 4, 32, 12, 3
Computer Networks and Internets -- Module 6 49 Spring, 2014
Copyright  2014. All rights reserved.
Multimedia
A Few Definitions
d Multimedia combines two or more forms of information,
such as
– Photos and music
– Audio and video
d Real-time refers to information that must be presented in a
predetermined timed sequence, such as
– Audio
– Video
d An individual source provides one particular sequence of
real-time information
Computer Networks and Internets -- Module 6 51 Spring, 2014
Copyright  2014. All rights reserved.
A Few Definitions
(continued)
d Playback refers to the output of real-time information for a
user (e.g., video display or audio output)
d Sample rate refers to the rate at which real-time information
has been converted to digital form (e.g., audio sampled 8000
times per second)
d Synchronization refers to the coordination of playback
information from multiple sources (e.g., a movie requires
synchronization between audio and video)
Computer Networks and Internets -- Module 6 52 Spring, 2014
Copyright  2014. All rights reserved.
Real-Time Sample Rates
d Each source of real-time data can choose a sample rate and
encoding
d Examples
– A video stream might contain 30 frames per second,
with an encoding that uses compression
– An audio stream might contain 8000 audio samples per
second using a PCM encoding
d Important concept
Because each source of real-time information can choose a
sample rate, playback and synchronization must know the
sample rate and encoding that was selected.
Computer Networks and Internets -- Module 6 53 Spring, 2014
Copyright  2014. All rights reserved.
Transfer Of Streamed Real-Time Data
d Source
– Samples information at regular intervals
– Generates data continuously
– Prepares data for transmission
d Ideal transmission channel
– Accepts input at rate source produces
– Delivers output at same rate as input
Computer Networks and Internets -- Module 6 54 Spring, 2014
Copyright  2014. All rights reserved.
Quantitative Network Performance
Needed For Real-Time Streaming
d QoS type: Constant Bit Rate (CBR)
d Throughput sufficient to accommodate sender’s data rate
(known in advance)
d Latency within a specified bound, usually 200 msec
d Jitter of zero or near-zero
Computer Networks and Internets -- Module 6 55 Spring, 2014
Copyright  2014. All rights reserved.
Buffering
d Especially important in a packet transmission system
d Combines multiple samples into a single transmission
d Advantage
– Increases transmission efficiency
d Disadvantage
– Introduces delay
Computer Networks and Internets -- Module 6 56 Spring, 2014
Copyright  2014. All rights reserved.
Buffering Example
d Consider PCM audio
d One eight-bit audio sample taken every 125 µseconds
d Ethernet has 1500 octet payload
d Waiting to fill an entire frame takes
125 × 10−6 seconds/byte × 1500 bytes = 0.188 seconds
d Filling a packet incurs delay at the source
Computer Networks and Internets -- Module 6 57 Spring, 2014
Copyright  2014. All rights reserved.
Buffering Compromise
d Choose buffer size according to application
d Example: send 128 audio samples in each packet
d Tradeoffs
– Packet size is larger than one sample per packet, but
generates more packets than absolutely necessary
– Header overhead is a smaller percentage of total bits
than with one sample per packet, but a greater
percentage than for larger packets
– Latency is better than with many samples per packet, but
not as good as with one sample per packet
Computer Networks and Internets -- Module 6 58 Spring, 2014
Copyright  2014. All rights reserved.
Jitter Buffers
Streaming Of Real-Time Data
Across The Internet
d Must handle
– Lost packets
– Duplicated packets
– Packets delivered out of order
– Variance in delay (jitter)
d Key facts
– Conventional retransmission is useless
– Jitter is unavoidable
Computer Networks and Internets -- Module 6 60 Spring, 2014
Copyright  2014. All rights reserved.
Two Useful Techniques
d Timestamps
– Provided by sender
– Assigned to each piece of data
– Allow receiver to know when data should be played
– Use relative values to avoid need for clock
synchronization
d Jitter buffer
– Used by receiver
– Accommodates small variance in delay
Computer Networks and Internets -- Module 6 61 Spring, 2014
Copyright  2014. All rights reserved.
Jitter Buffer
d Used by receiver to assemble incoming real-time data
d Timestamp on an item determines where item is placed in
the playback sequence
d General principle: ensure information will be available in
time to play without delay
d Trick: to compensate for maximum jitter of d, delay
playback for d time units
d Result: jitter buffer holds just enough data so playback can
proceed uninterrupted
Computer Networks and Internets -- Module 6 62 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of A Jitter Buffer
display
jitter buffer
playback
process
connection
to Internet
packets arrive
in bursts
packets extracted
at a uniform rate
d
d During normal operation, playback can continue for d time
units while waiting for delayed packets
Computer Networks and Internets -- Module 6 63 Spring, 2014
Copyright  2014. All rights reserved.
Real-Time Transport Protocol (RTP)
d Widely used for voice and video
d Despite the name, not really a transport protocol
d Does not contain a jitter buffer and does not control
playback
d Provides three basic mechanisms
– Sequence number on each packet that allows a receiver
to handle loss and out-of-order delivery
– Timestamp used for playback of the data
– Series of source identifiers that tell a receiver the
source(s) of the data
Computer Networks and Internets -- Module 6 64 Spring, 2014
Copyright  2014. All rights reserved.
RTP Details
d Allows sender and receiver to choose sample rate and
encoding
d Specifies a header for each message transferred
d Uses UDP for transport
d Separates timestamp from packet sequence number
d Includes a marker bit that allows some frames to be marked
d Companion protocol allows receivers to inform sender about
transfer
Computer Networks and Internets -- Module 6 65 Spring, 2014
Copyright  2014. All rights reserved.
Motivation For RTP Design
d Marking
– Permits differential encoding with a full frame followed
by incremental changes
– Example use: video I-frame followed by B-frames
d Separation of timestamp and packet sequence
– Means timestamps do not need to be linearly related to
packets
– Allows compression schemes that vary the rate at which
data is sent
Computer Networks and Internets -- Module 6 66 Spring, 2014
Copyright  2014. All rights reserved.
RTP Header Format
0 1 3 8 16 31
VER P X CC M PAYTYPE SEQUENCE NUMBER
TIMESTAMP
SYNCHRONIZATION SOURCE IDENTIFIER
CONTRIBUTING SOURCE IDENTIFIER
. . .
d TIMESTAMP is interpreted by sender and receiver
d PAYTYPE specifies the payload type
d Initial SEQUENCE NUMBER chosen at random
d CONTRIBUTING SOURCE IDENTIFIERS allow sender to
mix streams from multiple sources
Computer Networks and Internets -- Module 6 67 Spring, 2014
Copyright  2014. All rights reserved.
RTP Encapsulation
d Three levels of encapsulation
Frame Header Frame Payload
IP Header IP Payload
UDP Payload
UDP Hdr
RTP Payload
RTP Hdr
d Use of UDP permits sending one multicast instead of
multiple unicast copies
Computer Networks and Internets -- Module 6 68 Spring, 2014
Copyright  2014. All rights reserved.
IP Telephony (VoIP)
IP Telephony
d Known as Voice over IP (VoIP)
d Two groups have created standards
– International Telecommunications Union (ITU)
– Internet Engineering Task Force (IETF)
d Standards agree on two basics
– Audio encoded using Pulse Code Modulation (PCM)
– RTP used to transfer digitized audio
d Standards disagree on
– Signaling
– Public Switched Telephone Network (PSTN) interaction
Computer Networks and Internets -- Module 6 70 Spring, 2014
Copyright  2014. All rights reserved.
Signaling
d Telco term for the process of establishing and terminating a
call
d Includes
– Mapping a phone number to a location
– Finding a route to the called party
– Recording information used for accounting and billing
– Handling functions such as call forwarding
d Standard call management facility for the traditional
telephone system is known as Signaling System 7 (SS7)
Computer Networks and Internets -- Module 6 71 Spring, 2014
Copyright  2014. All rights reserved.
IETF Approach
d Known as Session Initiation Protocol (SIP)
d Domain Name System used to map a telephone number to
an IP address
d SIP signaling system
– User agent makes or terminates calls (e.g., an IP phone)
– Location server consults a database of users, services to
which they subscribe, and preferences
– Proxy server forwards requests and optimizes routing
– Redirect server handles tasks such as call forwarding
and 800-number connections
– Registrar server allows users to register for service
Computer Networks and Internets -- Module 6 72 Spring, 2014
Copyright  2014. All rights reserved.
ITU Approach
d Standard is H.323
d Differs substantially from terminology used by SIP
d Terminal provides IP telephone functions and may also
include facilities for video and data transmission
d Gatekeeper provides location and signaling functions, and
establishes connections to the PSTN
d Gateway interconnects the IP phone system and PSTN, and
handles both signaling and media translation
d Multipoint Control Unit (MCU) provides services such as
multipoint conferencing
Computer Networks and Internets -- Module 6 73 Spring, 2014
Copyright  2014. All rights reserved.
International Softswitch Consortium (ISC)
d Formed by vendors to consolidate terminology from
multiple standards and create a single conceptual model
d Defined a list of 10 functions that are sufficient to explain
all others
d Invented new terms for each function
Computer Networks and Internets -- Module 6 74 Spring, 2014
Copyright  2014. All rights reserved.
Summary Of VoIP Protocols And Layering
Layer Call User User Support Routing Signal
Process. multimedia Data Transport
5
H.323 RTP T.120 RTCP ENUM SIGTRAN
Megaco RTSP TRIP
MGCP NTP
SIP SDP
4 TCP UDP TCP TCP SCTP
UDP UDP
3 IP, RSVP, and IGMP
d Each protocol can be complex
d H.323 is an umbrella
Computer Networks and Internets -- Module 6 75 Spring, 2014
Copyright  2014. All rights reserved.
H.323
d Large set of protocols collected together
d Provides voice, video, and data transfer
d Summary of major protocols
Layer Signaling Registration Audio Video Data Security
5 H.225.0-Q.931 H.225.9-RAS G.711 H.261 T.120 H.235
H.250-Annex G H.263 H.323
H.245 G.722
H.250 G.723
G.728
RTP, RTCP
4 TCP, UDP UDP TCP TCP, UDP
3 IP, RSVP, and IGMP
Computer Networks and Internets -- Module 6 76 Spring, 2014
Copyright  2014. All rights reserved.
Telephone Number Mapping And Routing
d Two standards proposed by IETF
– TRIP relies on location servers to exchange information
– ENUM (E.164 NUMbers) uses arpa top-level domain in
the Domain Name System
d ENUM example
– Phone number is 1-800-555-1234
– Domain name is constructed as the string
4.3.2.1.5.5.5.0.0.8.1.e164.arpa
Computer Networks and Internets -- Module 6 77 Spring, 2014
Copyright  2014. All rights reserved.
Network Security
Network Security
d Large subject with many aspects
d Major problems include
2
222222222222222222222222222222222222222222222222222222222222222222222222
Problem Description
2
222222222222222222222222222222222222222222222222222222222222222222222222
Phishing Masquerading as a well-known site such as a bank
to obtain a user’s personal information, typically an
account number and access code
2
222222222222222222222222222222222222222222222222222222222222222222222222
Misrepresentation Making false or exaggerated claims about goods or
services, or delivering fake or inferior products
2
222222222222222222222222222222222222222222222222222222222222222222222222
Scams Various forms of trickery intended to deceive naive
users into investing money or abetting a crime
2
222222222222222222222222222222222222222222222222222222222222222222222222
Denial of Service Intentionally blocking a particular Internet site to
prevent or hinder business activities and commerce
2
222222222222222222222222222222222222222222222222222222222222222222222222
Loss of Control An intruder gains control of a computer system
and uses the system to perpetrate a crime
2
222222222222222222222222222222222222222222222222222222222222222222222222
Loss of Data Loss of intellectual property or other valuable
proprietary business information
2
222222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 79 Spring, 2014
Copyright  2014. All rights reserved.
Examples Of Techniques Attackers Use
2
222222222222222222222222222222222222222222222222222222222222222222222222
Technique Description
2
222222222222222222222222222222222222222222222222222222222222222222222222
Wiretapping Making a copy of packets
2
222222222222222222222222222222222222222222222222222222222222222222222222
Replay Sending packets captured from a previous session
2
222222222222222222222222222222222222222222222222222222222222222222222222
Buffer Overflow Overflowing a memory buffer to overwrite values
2
222222222222222222222222222222222222222222222222222222222222222222222222
Address Spoofing Faking the IP source address in a packet
2
222222222222222222222222222222222222222222222222222222222222222222222222
Name Spoofing Using a misspelling of a well-known name
2
222222222222222222222222222222222222222222222222222222222222222222222222
DoS and DDoS Flooding a site with packets to prevent access
2
222222222222222222222222222222222222222222222222222222222222222222222222
SYN Flood Sending a stream of random TCP SYN segments
2
222222222222222222222222222222222222222222222222222222222222222222222222
Key Breaking Guessing a decryption key or password
2
222222222222222222222222222222222222222222222222222222222222222222222222
Port Scanning Probing ports to find a vulnerable application
2
222222222222222222222222222222222222222222222222222222222222222222222222
Packet Interception Removing a packet from the Internet
2
222222222222222222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 80 Spring, 2014
Copyright  2014. All rights reserved.
Indirect Attacks
d Attacker commandeers computers of unwitting users
d Bots running on commandeered computers launch attack
d Example: Distributed Denial of Service (DDoS)
Internet
attacker commandeers
multiple computers
and streams packets
to target
aggregate traffic
overwhelms server
Computer Networks and Internets -- Module 6 81 Spring, 2014
Copyright  2014. All rights reserved.
Packet Interception
d Extreme vulnerability
d Can be exploited for many attacks
d Permits man-in-the-middle attacks
d Example attacks
source
server man-in-the-middle
can wiretap, replay, spoof,
break keys, scan ports, and
impersonate a server
can impersonate a host or
pass altered packets on to
any Internet destination
Computer Networks and Internets -- Module 6 82 Spring, 2014
Copyright  2014. All rights reserved.
Security Policy
d No absolutely secure network exists
d Before security mechanisms are meaningful, organization
must define a security policy
– Data integrity (no unauthorized change)
– Data availability (no disruption of service)
– Data confidentiality (no unauthorized access)
– Privacy (no disclosure of sender’s identity)
– Accountability (record keeping and audit trail)
– Authorization (who is permitted to access information)
Computer Networks and Internets -- Module 6 83 Spring, 2014
Copyright  2014. All rights reserved.
Authorization And Authentication
d Authorization is intertwined with authentication
– Authorization meaningless without authentication
– Must know identity of a requester
d There is no point in defining a security policy that cannot be
enforced
Computer Networks and Internets -- Module 6 84 Spring, 2014
Copyright  2014. All rights reserved.
Enforcement Mechanisms
2
2222222222222222222222222222222222222222222222222222222222222222222222
Technique Purpose
2
2222222222222222222222222222222222222222222222222222222222222222222222
Hashing Data integrity
2
2222222222222222222222222222222222222222222222222222222222222222222222
Encryption Confidentiality
2
2222222222222222222222222222222222222222222222222222222222222222222222
Digital Signatures Message authentication
2
2222222222222222222222222222222222222222222222222222222222222222222222
Digital Certificates Sender authentication
2
2222222222222222222222222222222222222222222222222222222222222222222222
Firewalls Site integrity
2
2222222222222222222222222222222222222222222222222222222222222222222222
Intrusion Detection Systems Site integrity
2
2222222222222222222222222222222222222222222222222222222222222222222222
Deep Packet Inspection & Content Scanning Site integrity
2
2222222222222222222222222222222222222222222222222222222222222222222222
Virtual Private Networks (VPNs) Data confidentiality and
trusted access
2
2222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 85 Spring, 2014
Copyright  2014. All rights reserved.
Hash
d Used to guarantee message arrives with no
– Changes
– Additions
d Sender and receiver share a key
d Sender uses key to compute a small value, H, called a
– Message Authentication Code (MAC)
– Hash of the message
d Sender transmits H with the message
d Receiver uses same key to compute hash of received
message and compares to H
Computer Networks and Internets -- Module 6 86 Spring, 2014
Copyright  2014. All rights reserved.
Encryption
d Fundamental security technique
d Predates computers and computer networks
d Extensive mathematical analysis
d Definitions
– Plaintext: original, unencrypted message
– Cyphertext: message after encryption
– Encryption key: short bit string used for encryption
– Decryption key: short bit string used for decryption
d Note: in some schemes, the encryption and decryption keys
differ; in others, they are identical
Computer Networks and Internets -- Module 6 87 Spring, 2014
Copyright  2014. All rights reserved.
Mathematics Of Encryption
d Encryption and decryption viewed as functions
d Encrypt takes key, K1, and plaintext message, M, as
arguments and produces cyphertext, C, as a result
C = encrypt ( K1 , M )
d Decrypt takes a key, K2, and cyphertext, C, as arguments,
and produces a plaintext message, M, as a result
M = decrypt ( K2 , C )
d Mathematically, decrypt is the inverse of encrypt
M = decrypt ( K2 , encrypt ( K1 , M ) )
Computer Networks and Internets -- Module 6 88 Spring, 2014
Copyright  2014. All rights reserved.
Two Main Types Of Encryption
d Private or secret key encryption (symmetric)
– Encryption and decryption use same key
– Key is a shared secret
M = decrypt ( K , encrypt ( K , M ) )
d Public key encryption (asymmetric)
– Encryption and decryption use different keys
– Public key is widely disseminated
– Private key is known only to one party
– Knowing a user’s public key does not help one guess the
corresponding private key
Computer Networks and Internets -- Module 6 89 Spring, 2014
Copyright  2014. All rights reserved.
Authentication With Digital Signatures
d Uses encryption (works well with public key methods)
d Allows receiver to verify the identity of the sender
d Example
– Bob sends message to Alice
* Uses his private key to encode message
* Includes specific information such as Alice’s name
and a date to avoid a replay attack
– Alice
* Uses Bob’s public key to decrypt message
* Knows that only Bob could have sent the message
Computer Networks and Internets -- Module 6 90 Spring, 2014
Copyright  2014. All rights reserved.
Authentication With Digital Signatures
(continued)
d Can use additional level of encryption to guarantee
confidentiality
d Bob signs message and encrypts using Alice’s public key
X = encrypt ( alice_pub , encrypt ( bob_priv, M ) )
d Alice decrypts message with her private key, and then
authenticates the sender by decrypting with Bob’s public
key
M = decrypt ( bob_pub , decrypt ( alice_priv , X ) )
Computer Networks and Internets -- Module 6 91 Spring, 2014
Copyright  2014. All rights reserved.
Key Distribution
d Everyone needs to obtain a copy of each user’s public key
d If an attacker distributes an incorrect key, the entire
encryption scheme is compromised
d Question: how can public keys be distributed in a way that
guarantees each copy is correct?
d Several solutions have been proposed; most rely on key
authority organizations that hand out public keys
d Message containing keys signed by well-known authority is
a digital certificate
d Note: knowing the public key of an authority makes it
possible to obtain other public keys securely
Computer Networks and Internets -- Module 6 92 Spring, 2014
Copyright  2014. All rights reserved.
Firewall Technology
d Inserted between site and Internet
d Filters packets according to policy
d Controls both incoming and outgoing traffic
d General approach: prevent all communication unless
explicitly allowed by policy
Computer Networks and Internets -- Module 6 93 Spring, 2014
Copyright  2014. All rights reserved.
Firewall Example
d Consider a site with three servers
web sever
( 192.5.48.1 )
email sever
( 192.5.48.2 )
DNS sever
( 192.5.48.3 )
Internet
firewall in switch
d Firewall only allows packets to/ from each server
Computer Networks and Internets -- Module 6 94 Spring, 2014
Copyright  2014. All rights reserved.
Firewall Example
(continued)
d Example of firewall rules for the site:
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
Dir Frame Type IP Src IP Dest IP Type Src Port Dst Port
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
in 0800 * 192.5.48.1 TCP * 80
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
in 0800 * 192.5.48.2 TCP * 25
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
in 0800 * 192.5.48.3 TCP * 53
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
in 0800 * 192.5.48.3 UDP * 53
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
out 0800 192.5.48.1 * TCP 80 *
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
out 0800 192.5.48.2 * TCP 25 *
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
out 0800 192.5.48.3 * TCP 53 *
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
out 0800 192.5.48.3 * UDP 53 *
2
2222222222222222222222222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 95 Spring, 2014
Copyright  2014. All rights reserved.
Other Network Security Systems
d Intrusion Detection System (IDS)
– Watches incoming packet stream
– Attempts to identify unusual activity
d Deep Packet Inspection (DPI)
– Looks beyond header into packet contents
– Requires significant processing
d File inspection systems
– Examine whole data file (e.g., email)
– Can detect more problems than systems that examine
individual packets
Computer Networks and Internets -- Module 6 96 Spring, 2014
Copyright  2014. All rights reserved.
Virtual Private Network (VPN)
d Emulates a dedicated network connection
d Sends traffic across commodity Internet
d Uses encryption to guarantee confidentiality
d Technique known as tunneling
d Can be used
– Among sites of an organization
– Between individual and organization
Computer Networks and Internets -- Module 6 97 Spring, 2014
Copyright  2014. All rights reserved.
Encryption And Tunneling Used In VPNs
d Three basic approaches used
– Payload encryption
– IP-in-IP tunneling
– IP-in-TCP tunneling
d Original data is encrypted in all three
d For additional security, pad datagram length
Computer Networks and Internets -- Module 6 98 Spring, 2014
Copyright  2014. All rights reserved.
Illustration Of IP-in-IP Tunneling
Used For A Secure VPN
src = R1
dst = R2
Encrypted Datagram Encapsulated For Transmission
Encrypted Version Of Original Datagram
src = X
dst = Y
Original (Unencrypted) Payload
encrypt
Computer Networks and Internets -- Module 6 99 Spring, 2014
Copyright  2014. All rights reserved.
Examples Of Security Technologies
d PGP (Pretty Good Privacy)
d SSH (Secure Shell)
d SSL (Secure Socket Layer)
d TLS (Transport Layer Security)
d HTTPS (HTTP Security)
d IPsec (IP security)
d RADIUS (Remote Authentication Dial-In User Service)
d WEP (Wired Equivalent Privacy)
d WPA (Wi-Fi Protected Access)
Computer Networks and Internets -- Module 6 100 Spring, 2014
Copyright  2014. All rights reserved.
Network Management
Terminology
d Network manager or network administrator is a person
responsible for network
– Planning
– Installation
– Operation
– Monitoring
d Network refers to intranet
– Owned and operated by a single organization
– Contains many managed items such as routers, switches,
servers, and hosts
– May span multiple sites
Computer Networks and Internets -- Module 6 102 Spring, 2014
Copyright  2014. All rights reserved.
An Interesting Problem
d Many protocol mechanisms have been created to overcome
problems automatically
– Forward error correction
– Retransmission
– Routing protocols
d Consequence: protocols may hide problems from a manager!
Computer Networks and Internets -- Module 6 103 Spring, 2014
Copyright  2014. All rights reserved.
The Industry Standard Model
d Derived from ITU recommendation M.3400
d Known by abbreviation, FCAPS
d Acronym refers to five aspects of management
2
2222222222222222222222222222222222222222222222222222222222
Abbreviation Meaning
2
2222222222222222222222222222222222222222222222222222222222
F Fault detection and correction
2
2222222222222222222222222222222222222222222222222222222222
C Configuration and operation
2
2222222222222222222222222222222222222222222222222222222222
A Accounting and billing
2
2222222222222222222222222222222222222222222222222222222222
P Performance assessment and optimization
2
2222222222222222222222222222222222222222222222222222222222
S Security assurance and protection
2
2222222222222222222222222222222222222222222222222222222222
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 104 Spring, 2014
Copyright  2014. All rights reserved.
Fault Isolation And Root-Cause Analysis
d Users report high-level symptoms
– Example: I lost access to a shared file system
d Manager must relate symptoms to underlying cause
– Cable cut
– Power supply has failed or disk has crashed
– Software configuration changed (e.g., file system renamed
or moved)
– Security changed (e.g., password expired)
Computer Networks and Internets -- Module 6 105 Spring, 2014
Copyright  2014. All rights reserved.
Network Element
d Generic term for a managed entity
– Physical device
– Service (e.g., DNS)
d Examples
222222222222222222222222222222222222222222222222222
Manageable Network Elements
222222222222222222222222222222222222222222222222222
Layer 2 Switch IP router
222222222222222222222222222222222222222222222222222
VLAN Switch Firewall
222222222222222222222222222222222222222222222222222
Wireless Access Point Digital Circuit (CSU/DSU)
222222222222222222222222222222222222222222222222222
Head-End DSL Modem DSLAM
222222222222222222222222222222222222222222222222222
DHCP Server DNS Server
222222222222222222222222222222222222222222222222222
Web Server Load Balancer
222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 106 Spring, 2014
Copyright  2014. All rights reserved.
Element Management System
d Management tool that can manage one element at a time
d Typically, supplied by vendor of the network element
d Limitation of element management systems
– When configuring MPLS tunnel across multiple routers,
element management system only allows manager to
configure one router at a time
– If routers sold by multiple vendors, each vendor may have
its own element management system
d Unfortunately, many networks only have element management
Computer Networks and Internets -- Module 6 107 Spring, 2014
Copyright  2014. All rights reserved.
Types Of Network Management Tools
Physical Layer Testing Performance Monitoring
Reachability And Connectivity Flow Analysis
Packet Analysis Routing And Traffic Engineering
Network Discovery Configuration
Device Interrogation Security Enforcement
Event Monitoring Network Planning
Computer Networks and Internets -- Module 6 108 Spring, 2014
Copyright  2014. All rights reserved.
How Should Management Systems Operate?
d Some possibilities
– Use a parallel physical network
– Use a parallel logical network
– Use a special link-layer protocol
– Use the same links, equipment, and protocols as data
d Surprise: modern network management follows the last
approach
Computer Networks and Internets -- Module 6 109 Spring, 2014
Copyright  2014. All rights reserved.
Simple Network Management Protocol (SNMP)
d Internet standard
d Allows software in a manager’s computer (manager) to interact
with software that runs in an element (agent)
d Specifies format and meaning of messages exchanged
d Runs as an application protocol over TCP or UDP
d Uses fetch-store paradigm
Computer Networks and Internets -- Module 6 110 Spring, 2014
Copyright  2014. All rights reserved.
SNMP Fetch-Store Paradigm
d Set of conceptual variables defined
d Each variable given a name
d Set of variables known as Management Information Base
(MIB)
d SNMP offers two basic operations
– GET to read the value of a variable
– PUT to store a value into a variable
d All management functions are defined as side-effects of GET or
PUT to a MIB variable
d Example: reboot defined as side-effect of PUT
Computer Networks and Internets -- Module 6 111 Spring, 2014
Copyright  2014. All rights reserved.
SNMP Encoding
d SNMP uses a standard known as Abstract Syntax Notation.1
(ASN.1)
d Variable-length encoding
d Example: integer encoded as length and value
2
222222222222222222222222222222222222222222222222222222
Decimal Hexadecimal Length Bytes Of Value
Integer Equivalent Byte (in hex)
2
222222222222222222222222222222222222222222222222222222
27 1B 01 1B
2
222222222222222222222222222222222222222222222222222222
792 318 02 03 18
2
222222222222222222222222222222222222222222222222222222
24,567 5FF7 02 5F F7
2
222222222222222222222222222222222222222222222222222222
190,345 2E789 03 02 E7 89
2
222222222222222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 6 112 Spring, 2014
Copyright  2014. All rights reserved.
MIB Variable Names
d Are hierarchical
d Begin with standard prefix
d Identify a specific protocol and variable
d Example: counter for IP packets received has name
iso.org.dod.internet.mgmt.mib.ip.ipInReceives
d Name is encoded as integers:
1.3.6.1.2.1.4.3
Computer Networks and Internets -- Module 6 113 Spring, 2014
Copyright  2014. All rights reserved.
Arrays In A MIB
d ASN.1 does not define an array type
d Many MIB variables correspond to conceptual array
– Routing table
– ARP cache
– Set of network interfaces
d Trick
– The “index” is appended onto variable name
– Manager software uses GET-NEXT operation to move
through array
Computer Networks and Internets -- Module 6 114 Spring, 2014
Copyright  2014. All rights reserved.
Example Of Indexing
d IP routing table assigned variable name
standard-prefix.ip.ipRoutingTable
d Each field has a name
d Issuing GET_NEXT operation gets first routing table entry
d For example, name of destination address field variable is
standard-prefix.ip.ipRoutingTable.ipRouteEntry.field.IPdestaddr
Computer Networks and Internets -- Module 6 115 Spring, 2014
Copyright  2014. All rights reserved.
A Plethora Of MIBs
d Initially
– One MIB
– Defined variables for IP, TCP, UDP, ICMP
d Now
– Many MIBs
– Variables for routers, switches, modems, printers, hosts,
and other network elements
Computer Networks and Internets -- Module 6 116 Spring, 2014
Copyright  2014. All rights reserved.
Summary
d Streamed transfer of real-time data incompatible with Internet’s
best-effort delivery
d Two approaches
– Isochronous network
– Timestamps and jitter buffer
d Real-Time Transport Protocol (RTP) uses timestamps and
sequence numbers
Computer Networks and Internets -- Module 6 117 Spring, 2014
Copyright  2014. All rights reserved.
Summary
(continued)
d Many IP telephony standards proposed
d Connection to PSTN causes debate
d H.323 and SIP standards are most widely used
d ENUM system uses DNS to convert phone number to IP
address
Computer Networks and Internets -- Module 6 118 Spring, 2014
Copyright  2014. All rights reserved.
Summary
(continued)
d Quantitative measures of networks include delay, throughput,
goodput, and jitter
d Delay increases as utilization increases
d One can purchase more throughput, but not less delay
d Quality of Service (QoS) technologies provide guarantees on
performance
d The industry has moved away from fine-grain QoS (per-flow as
in ATM and IntServ) to coarse-grain QoS (DiffServ)
d Multi-Protocol Label Switching (MPLS) is used by tier-1 ISPs
to provide circuit-oriented networking
Computer Networks and Internets -- Module 6 119 Spring, 2014
Copyright  2014. All rights reserved.
Summary
(continued)
d Network security is complex and difficult
d No network is completely secure
d Life goes on anyway
d Network management is complex and difficult
d Current tools are fairly primitive
d Life goes on anyway
Computer Networks and Internets -- Module 6 120 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
MODULE VII
Emerging Technologies
Computer Networks and Internets -- Module 7 1 Spring, 2014
Copyright  2014. All rights reserved.
Topics
d Software Defined Networking
d The Internet Of Things
d Other trends in networking
Computer Networks and Internets -- Module 7 2 Spring, 2014
Copyright  2014. All rights reserved.
Software Defined Networking
(SDN)
What Is Software Defined Networking?
d One of the hottest topics in networking
d According to marketing SDN is
– A way to eliminate all human error
– A technology that improves overall routing
– An approach that eliminates 66% to 80% of operational
costs
d In reality SDN is
– A technology that gives programmers more control over
network equipment
– An approach with the potential to make some
improvements in network configuration and management
Computer Networks and Internets -- Module 7 4 Spring, 2014
Copyright  2014. All rights reserved.
Motivation For SDN
d Switch from element management to network management
d Move from proprietary to open standards
d Automate and unify network-wide configuration
d Change from per-layer to cross-layer control
d Accommodate virtualization used in data centers
Computer Networks and Internets -- Module 7 5 Spring, 2014
Copyright  2014. All rights reserved.
Background And Definitions
d Terminology adopted from network equipment engineers
d Data plane
– Refers to packet processing mechanisms
– Typical functions include packet classification and
packet forwarding
– Operates at wire speed
d Control plane
– Refers to management
– Typical functions include interacting with network
manager and modifying forwarding tables
– Operates slowly and only when changes are needed
Computer Networks and Internets -- Module 7 6 Spring, 2014
Copyright  2014. All rights reserved.
Conceptual Organization Of Network Devices
control plane
(software)
data plane
(hardware)
control plane loads
new configuration
into the hardware
data plane passes
management packets
up to control plane
packets
arrive
packets
leave
d Data plane may use ASIC hardware for speed
d Control plane includes a TCP/IP stack
Computer Networks and Internets -- Module 7 7 Spring, 2014
Copyright  2014. All rights reserved.
Control Plane Interface Modules
CLI WEB SNMP
data plane
(hardware)
common interface (internal)
...
packets
arrive
packets
leave
d Managers can choose among command line interface, web
interface, and SNMP
Computer Networks and Internets -- Module 7 8 Spring, 2014
Copyright  2014. All rights reserved.
The SDN Approach: An External Controller
CLI WEB SNMP sdn
data plane
(hardware)
common interface (internal)
packets
arrive
packets
leave
External
Controller
PC running Linux
Computer Networks and Internets -- Module 7 9 Spring, 2014
Copyright  2014. All rights reserved.
In Practice
Controller 1 Controller 2 Controller 3 Controller 4 Controller 5
Domain 1 Domain 2 Domain 3 Domain 4 Domain 5
controller
to controller
controller
to element
d Each controller can operate multiple devices
d Controllers coordinate to provide consistent configuration
Computer Networks and Internets -- Module 7 10 Spring, 2014
Copyright  2014. All rights reserved.
SDN Communication
d Two conceptually separate types
– Controller to network element
– Controller to controller
d Protocols used can differ
Computer Networks and Internets -- Module 7 11 Spring, 2014
Copyright  2014. All rights reserved.
OpenFlow
d Specification for controller-to-element communication
d Devised at Stanford
d Now a de facto industry standard for SDN
d Defines
– Secure communication (over SSL)
– Message format
– Items to be managed
d Completely unlike SNMP
Computer Networks and Internets -- Module 7 12 Spring, 2014
Copyright  2014. All rights reserved.
OpenFlow Model
d Uses flow table abstraction
– Data plane is assumed to have a sequence of flow tables
– Each flow table specifies how to parse packets and
handle them
d OpenFlow allows manager to set values in each flow table
d Important note: flow table model closely matches
classification hardware found in Ethernet switches
Computer Networks and Internets -- Module 7 13 Spring, 2014
Copyright  2014. All rights reserved.
Classification
d Alternative to packet demultiplexing
d Examines headers from multiple layers at the same time
d Uses an array of pairs
(pattern, action)
d Where
– Pattern is a pattern that is matched against packets
– Action specifies steps to be taken if the match succeeds
Computer Networks and Internets -- Module 7 14 Spring, 2014
Copyright  2014. All rights reserved.
Classification Hardware
classification engine
packet to be matched
pattern 1
pattern 2
pattern 3
pattern N (default that matches any packet)
action 1
action 2
action 3
action N
.
.
.
.
.
.
d Hardware checks all patterns in parallel
d Result is extremely high speed classification
Computer Networks and Internets -- Module 7 15 Spring, 2014
Copyright  2014. All rights reserved.
TCAM
d Acronym for Ternary Content Addressable Memory
d Hardware technology used for high-speed classification
d Pattern is ternary because value for each bit can be 0, 1, or
“don’t care”
d TCAM matches all patterns at once, and performs the action
on the first matching table entry
Computer Networks and Internets -- Module 7 16 Spring, 2014
Copyright  2014. All rights reserved.
Example Of IPv4 Classification
d The challenge
– A frame arrives
– What is the minimum number of steps needed to
determine whether the frame carries an IPv4 datagram
destined for a web server?
d The answer
– Check whether the frame type field specifies IPv4
(0x0800)
– Check whether the IP protocol field specifies TCP (6)
– Check whether the TCP destination port specifies a web
server (80)
Computer Networks and Internets -- Module 7 17 Spring, 2014
Copyright  2014. All rights reserved.
IPv6 Classification
d Simplest case (only a base header)
– Frame type field specifies IPv6 (0x86DD)
– Next Header field specifies TCP (6)
– TCP destination port specifies a web server (80)
d Additional patterns needed for extension headers
d Example: base header plus a route header
– Frame type field specifies IPv6 (0x86DD)
– Next Header field specifies Route Header (43)
– Next Header field specifies TCP (6)
– TCP destination port specifies a web server (80)
Computer Networks and Internets -- Module 7 18 Spring, 2014
Copyright  2014. All rights reserved.
Example Items In An OpenFlow Pattern
Field Meaning
2
22222222222222222222222222222222222222222222222222222222222222222
Layer 2 fields
Ingress Port Switch port over which the packet arrived
Metadata 64-bit field of metadata used in the pipeline
Ether src 48-bit Ethernet source address
Ether dst 48-bit Ethernet destination address
Ether Type 16-bit Ethernet type field
VLAN id 12-bit VLAN tag in the packet
VLAN priority 3-bit VLAN priority number
ARP opcode 8-bit ARP opcode
Layer 3 fields
MPLS label 20-bit MPLS label
MPLS class 3-bit MPLS traffic class
IPv4 src 32-bit IPv4 source address
IPv4 dst 32-bit IPv4 destination address
IPv6 src 128-bit IPv6 source address
IPv6 dst 128-bit IPv6 destination address
IPv4 Proto 8-bit IPv4 protocol field
IPv6 Next Header 8-bit IPv6 next header field
TOS 8-bit IPv4 or IPv6 Type of Service bits
Computer Networks and Internets -- Module 7 19 Spring, 2014
Copyright  2014. All rights reserved.
Example Items In An OpenFlow Pattern
(continued)
Field Meaning
2
22222222222222222222222222222222222222222222222222222222222222
Layer 4 fields
TCP/UDP/SCTP src 16-bit TCP/UDP/SCTP source port
TCP/UDP/SCTP dst 16-bit TCP/UDP/SCTP destination port
ICMP type 8-bit ICMP type field
ICMP code 8-bit ICMP code field
Computer Networks and Internets -- Module 7 20 Spring, 2014
Copyright  2014. All rights reserved.
Examples Of SDN Functionality
d End-to-end layer 2 paths
d Forwarding based on source as well as destination
d All traffic from a specific MAC address sent along a specific
path
d Segregation of traffic based on application type
d Multipath forwarding based on hash of 4-tuple
d Transport of nonstandard layer 3 protocols
Computer Networks and Internets -- Module 7 21 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
The Internet Of Things
Internet Of Things
d Awkward term used for embedded systems on the Internet
– Generally not operated by humans
– Can access one another or cloud services
d Examples
– Scientific sensor systems
– Home automation systems
– Smart grid
– Retail systems
Computer Networks and Internets -- Module 7 24 Spring, 2014
Copyright  2014. All rights reserved.
Technology Characteristics
d Low power
– Energy harvesting (e.g., door latch)
– Multi-year battery life
d Wireless communication
– Necessary in many situations
– Enables mobility
Computer Networks and Internets -- Module 7 25 Spring, 2014
Copyright  2014. All rights reserved.
Wireless Mesh Network
d Useful when individual nodes have very low power (limited
range)
d Allows a set of nodes to communicate even if some nodes
cannot communicate directly
d Each node agrees to forward packets on behalf of neighbors
Computer Networks and Internets -- Module 7 26 Spring, 2014
Copyright  2014. All rights reserved.
Example Wireless Mesh Technology
d ZigBee IP
– Created by ZigBee Alliance
– Uses IEEE 802.15.4 wireless radios
– Intended for smart grid
d ZigBee protocol stack
– Goal is to run IPv6, TCP, and HTTP
– Includes many other protocols
Computer Networks and Internets -- Module 7 27 Spring, 2014
Copyright  2014. All rights reserved.
802.15.4 Wireless Characteristics
d Goal is low power, and result is
– Extremely low data rate
– Extremely small MTU
– Limited distance
222222222222222222222222222222222222222222
Property Value
222222222222222222222222222222222222222222
Networking paradigm Packet switching
222222222222222222222222222222222222222222
Maximum data rate 250 Kbps
222222222222222222222222222222222222222222
Payload size (MTU) 102 octets
222222222222222222222222222222222222222222
Maximum distance 10 meters
222222222222222222222222222222222222222222
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Computer Networks and Internets -- Module 7 28 Spring, 2014
Copyright  2014. All rights reserved.
ZigBee IP Mesh Routing
d One or more border routers
– Connect to global Internet
– Are more powerful than other nodes
d Set of ZigBee IP routers (ZIP routers)
– Attach to appliances
– Form a mesh
– Forward traffic to border router
Computer Networks and Internets -- Module 7 29 Spring, 2014
Copyright  2014. All rights reserved.
Choosing A Path
d ZIP router must choose a path to a border router
d Cannot simply choose node with the strongest transmission
signal
B1 B2
N
Internet
d Additional protocol used to find which node receives
strongest signal (MLE)
Computer Networks and Internets -- Module 7 30 Spring, 2014
Copyright  2014. All rights reserved.
Running IPv6 Over A ZigBee Network
d IPv6 can only run over networks that offer an MTU of 1280
or higher, but 802.15.4 has an MTU of 102
d Solution
– Additional protocol named 6LoWPAN
– Shim layer between IP and device driver
Computer Networks and Internets -- Module 7 31 Spring, 2014
Copyright  2014. All rights reserved.
6LoWPAN Operation
d Sending side
– Divides datagram into series of blocks
– Transmits each block in a packet
d Receiving side
– Joins blocks into a datagram
– Delivers entire datagram to IPv6
d Notes
– Division into block does not use IP fragmentation
– Unlike fragmentation, division and regrouping is
performed at each hop
Computer Networks and Internets -- Module 7 32 Spring, 2014
Copyright  2014. All rights reserved.
ZigBee IP Mesh Routing
d ZIP nodes forward packets toward the border router
d Border router
– Can send outgoing packets to the Internet
– Forwards other packets across the mesh
d If two ZIP nodes communicate
– Packet goes to border router first
– Border router forwards to destination
Computer Networks and Internets -- Module 7 33 Spring, 2014
Copyright  2014. All rights reserved.
Border Router Operation
d To forward across the mesh the border router
– Learns the topology of the mesh
– Computes a path through the mesh to each ZIP node
– Uses IPv6 source routing
d IPv6 source routing
– Requires IP-in-IP tunneling (header modification
prohibited)
– Places an extension header on outer datagram with series
of hops
– Each ZIP node only needs to know its neighbors
Computer Networks and Internets -- Module 7 34 Spring, 2014
Copyright  2014. All rights reserved.
Computing Source Routes
d All nodes run Routing Protocol for lossy and Low power
networks (RPL)
d Each node reports its parent to the border router
d RPL code on border router creates a Destination Oriented
Directed Acyclic Graph (DODAG)
d DODAG is used to compute source routes
Computer Networks and Internets -- Module 7 35 Spring, 2014
Copyright  2014. All rights reserved.
Example DODAG
1
2
3 4
5
6
7
8
9
Border router
d Arcs in DODAG point to parent (path toward border router)
d Source route to node X is reverse of the path from X to
border router
Computer Networks and Internets -- Module 7 36 Spring, 2014
Copyright  2014. All rights reserved.
Does ZigBee IP Make Sense?
d Choosing IPv6 instead of IPv4 means
– Much larger datagram headers
– The use of 6LoWPAN to divide a datagram into MTU-
size pieces
– Sending more data over a slow network
– The need for RPL routing protocols
– Larger memories (and lower battery life)
d Using TCP and HTTP over IPv6 means
– Using DNS to resolve names
– Unnecessary overhead
– Unnecessary memory footprint
Computer Networks and Internets -- Module 7 37 Spring, 2014
Copyright  2014. All rights reserved.
But Wait, There’s More!
d Smart grid applications must be secure, so ZigBee IP
includes security protocols, including TLS
d IPv6 Neighbor Discovery doesn’t work in a mesh network,
so ZigBee IP includes a modification known as 6LoWPAN-
ND
d IEEE 802.15.4 allows short (16-bit) MAC addresses, so
ZigBee IP includes a mechanism that allows a border router
to prevent address collisions
Computer Networks and Internets -- Module 7 38 Spring, 2014
Copyright  2014. All rights reserved.
Major Items In The ZigBee Protocol Stack
IEEE 802.15.4
6LoWPAN adaptation
IPv6, ICMPv6, and 6LoWPAN-ND RPL
TCP and UDP
TLS PANA mDNS and DNS-SD MLE
Application Protocols
d Resulting stack is large
d Design is more general-purpose than necessary
d Technology may be a triumph of politics and economics
Computer Networks and Internets -- Module 7 39 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
Other Trends
In Networking
A Few Key Technologies
d Content Caching
d Peer-To-Peer Communication
d Universal Representation (XML)
d Wireless networks that support mobility
d Higher-speed access technologies (1 Gbps)
d Cloud computing and cloud data centers
Computer Networks and Internets -- Module 7 42 Spring, 2014
Copyright  2014. All rights reserved.
Web Load Balancers
.
.
.
Internet
connection
load balancer
physical severs
site running a web server
shared
database
d Load balancer distributes HTTP requests across servers
d Path from servers back to client may be higher speed
Computer Networks and Internets -- Module 7 43 Spring, 2014
Copyright  2014. All rights reserved.
Overlay Networking
A
B
C
D
E
F
G
H
I
A
B
C
D
E
F
G
H
I
Internet
(a) (b)
(a) Physical connection of computers to the Internet
(b) Logical network imposed by overlay routing
Computer Networks and Internets -- Module 7 44 Spring, 2014
Copyright  2014. All rights reserved.
Other Trends
d Switch to digital telephony and digital video
d Increased use of social networking and social media
d Distributed data centers and migration
Computer Networks and Internets -- Module 7 45 Spring, 2014
Copyright  2014. All rights reserved.
Questions?
STOP

More Related Content

PPT
data communication
PDF
Chapter 7
PPTX
Essentials of Management Information Systems.11E.Laudon.CH07
PDF
MidoNet: Network Virtualization & Policies
PDF
Fundamentals of Computer Networking
PPT
testppt ch01(1)
PPTX
Slides for protocol layering and network applications
PPTX
Lecture 01 {Introduction}.pptx
data communication
Chapter 7
Essentials of Management Information Systems.11E.Laudon.CH07
MidoNet: Network Virtualization & Policies
Fundamentals of Computer Networking
testppt ch01(1)
Slides for protocol layering and network applications
Lecture 01 {Introduction}.pptx

Similar to Lecture_Notes.pdf (20)

PDF
2 set-up-computer-networks
PDF
Zuniga-Privacy-ECSG-update
PPT
It essentials pc hardware and software overview
DOC
Sagar_Ware_Resume
PDF
InternetWorking With TCP\IP
PDF
InternetWorking With TCP\IP
PDF
Wireshark - Basics
DOCX
Np syllabus summary
PPTX
OSNF - Open Sensor Network Framework
DOC
Modified CV
DOCX
Case study on Pamplona National High School Local Area Network
PDF
computer networking from the point of view of the network administrator..pdf
PPTX
Q1W1D1 Exploring Tools and Equipment in ICT.pptx
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
PDF
IT6511 Networks Laboratory
PPT
1-introduction-to-computer-networking.ppt
PPTX
Networking Essentials 2.0 Module2.pptx
DOCX
Punit kumar
PPTX
Week 2 network configurartion
PDF
Networking Concepts And Technology Deepak Kakadia Francesco Dimambro
2 set-up-computer-networks
Zuniga-Privacy-ECSG-update
It essentials pc hardware and software overview
Sagar_Ware_Resume
InternetWorking With TCP\IP
InternetWorking With TCP\IP
Wireshark - Basics
Np syllabus summary
OSNF - Open Sensor Network Framework
Modified CV
Case study on Pamplona National High School Local Area Network
computer networking from the point of view of the network administrator..pdf
Q1W1D1 Exploring Tools and Equipment in ICT.pptx
Daily Lesson Log MATATAG ICT TEchnology 8
IT6511 Networks Laboratory
1-introduction-to-computer-networking.ppt
Networking Essentials 2.0 Module2.pptx
Punit kumar
Week 2 network configurartion
Networking Concepts And Technology Deepak Kakadia Francesco Dimambro
Ad

Recently uploaded (20)

PDF
01-Introduction-to-Information-Management.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Lesson notes of climatology university.
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Computing-Curriculum for Schools in Ghana
PDF
Insiders guide to clinical Medicine.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Cell Types and Its function , kingdom of life
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
01-Introduction-to-Information-Management.pdf
Classroom Observation Tools for Teachers
Lesson notes of climatology university.
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Final Presentation General Medicine 03-08-2024.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Computing-Curriculum for Schools in Ghana
Insiders guide to clinical Medicine.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Microbial disease of the cardiovascular and lymphatic systems
Cell Types and Its function , kingdom of life
Abdominal Access Techniques with Prof. Dr. R K Mishra
O5-L3 Freight Transport Ops (International) V1.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPH.pptx obstetrics and gynecology in nursing
Ad

Lecture_Notes.pdf

  • 1. Fundamentals Of Computer Networking And Internetworking Prof. Douglas Comer Purdue University http://www.cs.purdue.edu/people/comer  Copyright 2014 by Douglas Comer And Pearson Education. All rights reserved.
  • 2. MODULE I Introductions, Course Overview, Approaches To Networking, Open And Closed Systems, Protocols, And Layering Computer Networks and Internets -- Module 1 1 Spring, 2014 Copyright  2014. All rights reserved.
  • 3. Introductions d Professor d TAs d Students Computer Networks and Internets -- Module 1 2 Spring, 2014 Copyright  2014. All rights reserved.
  • 5. Topic And Scope Computer networks and internets: an overview of concepts, terminology, and technologies that form the basis for digital communication in individual networks and the global Internet Computer Networks and Internets -- Module 1 4 Spring, 2014 Copyright  2014. All rights reserved.
  • 6. You Will Learn d Fundamental principles d Concepts d Terminology (lots of it) d Key aspects of networking Computer Networks and Internets -- Module 1 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 7. The Five Key Aspects Of Networking d Data communications: signals over wires and bits over signals d Networks: packets over bits d Internets: datagrams over packets d Network programming: application data over the Internet d Cross-functional concepts and technologies: network configuration, control, and management Computer Networks and Internets -- Module 1 6 Spring, 2014 Copyright  2014. All rights reserved.
  • 8. Features Of The Course d Covers all of networking and internetworking from media to applications d Examines each of the underlying technologies d Focuses on concepts and principles that apply across vendors and products d Provides perspective and shows how the pieces fit together d Explains how an Internet is built from heterogeneous networks Computer Networks and Internets -- Module 1 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 9. What You Will Not Learn d Commercial aspects – Vendors – Products – Prices – Markets and marketing d How to engineer network equipment d How to configure/operate networks d How to design new protocols Computer Networks and Internets -- Module 1 8 Spring, 2014 Copyright  2014. All rights reserved.
  • 10. Practice Sessions (Aka Labs) d Form an important part of the course d You will – Build network programs – Capture and analyze packets – Learn about protocols Computer Networks and Internets -- Module 1 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 11. Background Expected d Our goal is breadth rather than depth d Only a few basics are needed – Ability to program in C – A glancing acquaintance with data structures and pointers – A minor brush with algebra – A basic understanding of operating systems d The major requirement is a desire to learn Computer Networks and Internets -- Module 1 10 Spring, 2014 Copyright  2014. All rights reserved.
  • 12. Summary Of The Course d Explores all aspects of networking and internetworking d Gives concepts and principles d Focuses on the big picture d Includes lots of programming exercises d Moves rapidly and covers lots of vocabulary Computer Networks and Internets -- Module 1 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 15. How Should A Network Be Structured? Computer Networks and Internets -- Module 1 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 16. How Should A Network Be Structured? d The early phone company answer – Data networking is like telephone calls – We will devise and offer various data services – Charges will depend on distance and duration – You only need 128 Kbps Computer Networks and Internets -- Module 1 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 17. How Should A Network Be Structured? d The early phone company answer – Data networking is like telephone calls – We will devise and offer various data services – Charges will depend on distance and duration – You only need 128 Kbps d The early computer vendor answer – A network connects computers in your organization – We will devise all the necessary equipment and software – You only need to connect our computers – You only need to run our applications Computer Networks and Internets -- Module 1 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 18. How Should A Network Be Structured? (continued) d The early network equipment vendor answer – The network is independent of computers – We will create network equipment and interface hardware that connects computers to our network – We will build device drivers for your operating system – You only need to use our network Computer Networks and Internets -- Module 1 15 Spring, 2014 Copyright  2014. All rights reserved.
  • 19. Some Resulting Commercial Network Systems d Apple Computer Appletalk d Banyan Vines d Digital Equipment Corporation DECNET d IBM SNA d Novell Netware d Ungermann Bass NET/ One d Xerox XNS Computer Networks and Internets -- Module 1 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 20. The Researcher’s Answer d Although we have computers at multiple sites, we reject the phone company’s approach d Because we use diverse computer architectures, we reject the computer vendors’ approach d Because a variety of network technologies are possible, we reject the network vendors’ approach d A variety of applications are possible d Let’s experiment with new technologies (short distance as well as long distance) and new applications Computer Networks and Internets -- Module 1 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 21. Some Resulting Research Projects d Xerox Palo Alto Research Center – Ethernet d MIT and elsewhere – Token passing ring networks d Department of Defense – ARPANET – SATNET – Packet radio net – The global Internet Computer Networks and Internets -- Module 1 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 22. Open Vs. Closed Networking d Closed networks – Vertical approach – Each vendor designs/ builds their own – Given technology owned by vendor – Vendor may license technology to other groups d Open networks – Competitive approach – Multiple groups collaborate to define a technology – To insure interoperability, specifications written in standards documents that are available to everyone – Companies build products according to standards Computer Networks and Internets -- Module 1 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 25. Why Standardize? d Networking supports communication among multiple entities d Agreement needed to make communication correct, efficient, and meaningful Computer Networks and Internets -- Module 1 22 Spring, 2014 Copyright  2014. All rights reserved.
  • 26. Which Organizations Issue Standards? d IEEE (Institute of Electrical and Electronics Engineers) d IETF (Internet Engineering Task Force) d ITU (International Telecommunications Union) d ISO (International Organization for Standardization) d W3C (World Wide Web Consortium) d ...and many others Computer Networks and Internets -- Module 1 23 Spring, 2014 Copyright  2014. All rights reserved.
  • 27. Standards And Standardization d Joke: why is networking so difficult? Computer Networks and Internets -- Module 1 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 28. Standards And Standardization d Joke: why is networking so difficult? d Because there are so many standards from which to choose Computer Networks and Internets -- Module 1 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 29. Protocol d Each protocol specifies how to handle one aspect of communication d A protocol can specify – Low-level details such as voltage and frequency – High-level details such as format visible to a user d Many individual communication protocol standards exist d Set of protocols designed to work together is known as a suite – Example: TCP/ IP Internet protocol suite Computer Networks and Internets -- Module 1 25 Spring, 2014 Copyright  2014. All rights reserved.
  • 30. Two Key Properties That Protocols Specify d Syntax – Format of each message – Representation of data items – Encoding of bits in electromagnetic signals d Semantics – Meaning of each message – Procedures used to exchange messages – Actions to take when an error occurs Computer Networks and Internets -- Module 1 26 Spring, 2014 Copyright  2014. All rights reserved.
  • 31. Steps In Protocol Design d Look at the facilities the underlying hardware provides Computer Networks and Internets -- Module 1 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 32. Steps In Protocol Design d Look at the facilities the underlying hardware provides d Imagine an abstract communication mechanism as a user would like it to work Computer Networks and Internets -- Module 1 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 33. Steps In Protocol Design d Look at the facilities the underlying hardware provides d Imagine an abstract communication mechanism as a user would like it to work d Design an efficient implementation of the abstraction Computer Networks and Internets -- Module 1 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 34. Steps In Protocol Design d Look at the facilities the underlying hardware provides d Imagine an abstract communication mechanism as a user would like it to work d Design an efficient implementation of the abstraction d The key to success: choose a good abstraction Computer Networks and Internets -- Module 1 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 35. Why Protocol Design Is Difficult d Multiple implementations of a protocol will exist d Implementations will be created by a multiple individuals/organizations d There are many details to consider d Key tradeoff – A specification that dictates all possible details restricts implementations – A specification that does not specify enough details is ambiguous and leads to incompatible implementations Computer Networks and Internets -- Module 1 28 Spring, 2014 Copyright  2014. All rights reserved.
  • 36. Maximizing Interoperability d Design principle that maximizes interoperability (due to Postel) Be conservative in what you send and be liberal in what you accept. Computer Networks and Internets -- Module 1 29 Spring, 2014 Copyright  2014. All rights reserved.
  • 38. Protocol Layering d Needed because communication is complex d Intended primarily for protocol designers d Divides communication into intellectually manageable pieces d Provides a conceptual framework that can help us understand protocols d Ideally, layering is invisible once protocols have been designed d Notes: – Layering gives a guideline, not a rigid framework – Optimizations may violate strict layering Computer Networks and Internets -- Module 1 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 39. Two Layering Models d Internet protocols use a 5-layer reference model d ISO and the ITU defined a 7-layer model Computer Networks and Internets -- Module 1 32 Spring, 2014 Copyright  2014. All rights reserved.
  • 40. Two Layering Models d Internet protocols use a 5-layer reference model d ISO and the ITU defined a 7-layer model Computer Networks and Internets -- Module 1 32 Spring, 2014 Copyright  2014. All rights reserved.
  • 41. Internet Reference Model Application Transport Internet Network Interface Physical LAYER 1 LAYER 2 LAYER 3 LAYER 4 LAYER 5 d Descriptive model formed after TCP/IP protocols were devised d Used in practice Computer Networks and Internets -- Module 1 33 Spring, 2014 Copyright  2014. All rights reserved.
  • 42. Physical Layer d Underlying transmission media d Electromagnetic energy and its use d Representation of information in signals d Electrical properties such as radio frequencies and voltage d Associated hardware Computer Networks and Internets -- Module 1 34 Spring, 2014 Copyright  2014. All rights reserved.
  • 43. Network Interface Layer d Communication between a computer and network hardware d Also called data link or MAC layer d Mechanisms for gaining access to shared media d Hardware (MAC) addressing d Packet (frame) formats d Packet (frame) types and demultiplexing d Error detection Computer Networks and Internets -- Module 1 35 Spring, 2014 Copyright  2014. All rights reserved.
  • 44. Internet Layer d Communication between a pair of computers across the Internet d Internet packet format (datagram) d Internet addressing model and address assignment d Forwarding of Internet packets d Dividing an Internet packet into smaller packets for transmission d Error detection and reporting Computer Networks and Internets -- Module 1 36 Spring, 2014 Copyright  2014. All rights reserved.
  • 45. Transport Layer d Communication between a pair of applications d Demultiplexing among multiple destinations on a computer d Reliable delivery and retransmission d Mechanisms to control data rate and avoid congestion Computer Networks and Internets -- Module 1 37 Spring, 2014 Copyright  2014. All rights reserved.
  • 46. Application Layer d Format and representation of data and messages d Procedures applications follow to – Transfer data – Handle errors or unexpected conditions d Meaning of messages exchanged d Internet infrastructure such as routing and DNS Computer Networks and Internets -- Module 1 38 Spring, 2014 Copyright  2014. All rights reserved.
  • 47. General Idea d Each computer contains an entire set of layered protocols d When an application sends a message – The message passes down through the layered protocols – A given layer adds information and forms a packet – The computer transmits the final packet d When a packet arrives – The packet passes up through the protocol layers – A given layer performs processing and passes the packet up to the next layer – The application receives the message that was sent Computer Networks and Internets -- Module 1 39 Spring, 2014 Copyright  2014. All rights reserved.
  • 48. Illustration Of Protocol Software On A Computer Application Transport Internet Net. Interface Application Transport Internet Net. Interface Physical Network Computer 1 Computer 2 d Protocols on a computer arranged in a conceptual stack Computer Networks and Internets -- Module 1 40 Spring, 2014 Copyright  2014. All rights reserved.
  • 49. Packet Headers As A Packet Passes Across The Internet d One header prepended by each layer when message sent d Result: headers are nested with lowest-layer header appearing first message the application sent 1: Physical header (possible, but not typical) 2: Network Interface header 3: Internet header 4: Transport header Computer Networks and Internets -- Module 1 41 Spring, 2014 Copyright  2014. All rights reserved.
  • 50. Layering Principle d Layered protocols enforce an invariant: Layer N at the destination receives an exact copy of the message sent by layer N at the source. All headers and other modifications added by lower layers at the source must be removed by lower layers at the destination. d Allows protocol designer to focus on one layer at a time Computer Networks and Internets -- Module 1 42 Spring, 2014 Copyright  2014. All rights reserved.
  • 51. Illustration Of The Layering Principle Application Transport Internet Net. Interface Application Transport Internet Net. Interface SOURCE DESTINATION Physical Network identical message identical packet identical datagram identical frame Computer Networks and Internets -- Module 1 43 Spring, 2014 Copyright  2014. All rights reserved.
  • 52. Do We Understand Layering? Computer Networks and Internets -- Module 1 44 Spring, 2014 Copyright  2014. All rights reserved.
  • 53. Do We Understand Layering? No! Computer Networks and Internets -- Module 1 44 Spring, 2014 Copyright  2014. All rights reserved.
  • 54. A Few Subtle Complications Of Layering Computer Networks and Internets -- Module 1 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 55. A Few Subtle Complications Of Layering d Layering diagrams are abstract and simplistic Computer Networks and Internets -- Module 1 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 56. A Few Subtle Complications Of Layering d Layering diagrams are abstract and simplistic d Details and exceptions complicate practical systems Computer Networks and Internets -- Module 1 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 57. A Few Subtle Complications Of Layering d Layering diagrams are abstract and simplistic d Details and exceptions complicate practical systems d Four examples – Cross-layer communication – Multiple protocols per layer – Layering in an Internet – Technologies that intertwine layers Computer Networks and Internets -- Module 1 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 58. Example Of Cross-Layer Communication d Facts – A transport protocol selects amount of data to send in each packet – To optimize performance, ensure packets are full d Unfortunately – To find maximum packet size, transport protocol must interact with a lower layer Computer Networks and Internets -- Module 1 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 59. Multiple Protocols Per Layer d Consider a typical computer d User can run multiple applications simultaneously – Email – Web browser d Computer can connect to multiple physical networks – Wired Ethernet – Wi-Fi wireless network d Other layers have multiple protocols as well Computer Networks and Internets -- Module 1 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 60. Illustration Of Multiple Protocols At Each Layer appl1 appl2 appl3 TCP UDP IPv4 IPv6 wired interface wireless interface Application Transport Internet Net. Interface Ethernet Wi-Fi Network COMPUTER Computer Networks and Internets -- Module 1 48 Spring, 2014 Copyright  2014. All rights reserved.
  • 61. Layering In An Internet d Our layering diagrams only show two computers connected to a network d The Internet contains multiple networks interconnected by routers d Routers only need layer 2 and layer 3 software to forward packets across the Internet Computer Networks and Internets -- Module 1 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 62. Illustration Of Layers Used To Forward Packets Across The Internet application application transport transport Internet Internet Internet net interface net interface net interface net 1 net 2 Host A Host B router d In practice, routers do more than forward packets d We will learn more later in the course Computer Networks and Internets -- Module 1 50 Spring, 2014 Copyright  2014. All rights reserved.
  • 63. Technologies That Intertwine Layers d Cross-layer functions – Routing protocols operate at layer 5 but change layer 3 forwarding tables – Address resolution maps layer 3 addresses to layer 2 addresses d Layer circularities – Tunneling can be used to send IPv6 (a layer 3 protocol) over IPv4 (another layer 3 protocol) – Virtual Private Networks (VPNs) send IP over IP Computer Networks and Internets -- Module 1 51 Spring, 2014 Copyright  2014. All rights reserved.
  • 64. Illustration Of Layering Used By A VPN VPN appl1 appl2 transport Internet Internet net interface Physical net Computer Networks and Internets -- Module 1 52 Spring, 2014 Copyright  2014. All rights reserved.
  • 65. ISO 7-Layer Reference Model Application Presentation Session Transport Network Data Link Physical LAYER 1 LAYER 2 LAYER 3 LAYER 4 LAYER 5 LAYER 6 LAYER 7 d Prescriptive model formed before protocols were devised d Created by committee vote Computer Networks and Internets -- Module 1 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 66. ISO 7-Layer Reference Model (continued) d Model was defined when data networks connected dumb terminals to large mainframes d Session layer – Handled details of login and control of send/ receive – Provided opportunity for billing and accounting d Presentation layer – Defined data representation – Primary intention was to map character sets d Both layers now superfluous Computer Networks and Internets -- Module 1 54 Spring, 2014 Copyright  2014. All rights reserved.
  • 67. Unfortunately d Marketing organizations decided seven is better than five d Many textbooks and vendors claim to use “all seven layers” Computer Networks and Internets -- Module 1 55 Spring, 2014 Copyright  2014. All rights reserved.
  • 68. Summary d Network systems can be open or closed – Closed systems are created and owned by a single company – Open systems require that technology be specified in standards documents that allow multiple companies to build products d A protocol standard can specify data and message representation, rules for message exchange, error handling, or low-level details such as voltage Computer Networks and Internets -- Module 1 56 Spring, 2014 Copyright  2014. All rights reserved.
  • 69. Summary (continued) d A layering model provides a conceptual framework that helps protocol designers create a suite of protocols d Implementation of layered protocols known as a stack d Internet uses a 5-layer reference model d Remainder of the course explores each layer Computer Networks and Internets -- Module 1 57 Spring, 2014 Copyright  2014. All rights reserved.
  • 71. An Alternative To Layering Computer Networks and Internets -- Module 1 59 Spring, 2014 Copyright  2014. All rights reserved.
  • 72. An Alternative To Layering Hire really, really smart people and have them design a single, large protocol that handles all aspects of communication without dividing the problem into smaller subproblems Computer Networks and Internets -- Module 1 59 Spring, 2014 Copyright  2014. All rights reserved.
  • 73. A List Of All Practical Alternatives To Layering (this page intentionally left blank) Computer Networks and Internets -- Module 1 60 Spring, 2014 Copyright  2014. All rights reserved.
  • 75. MODULE II Network Programming And Applications Computer Networks and Internets -- Module 2 1 Spring, 2014 Copyright  2014. All rights reserved.
  • 76. Topics d Internet services and communication paradigms d Client-server model and alternatives d Network programming with a simplified API d The socket API d Application layer protocols d Examples of standard application protocols Computer Networks and Internets -- Module 2 2 Spring, 2014 Copyright  2014. All rights reserved.
  • 78. General Principle: Intelligence At The Edge The Internet does not provide services. Instead, the Internet only provides communication, and application programs provide all services. Computer Networks and Internets -- Module 2 4 Spring, 2014 Copyright  2014. All rights reserved.
  • 79. General Principle: Intelligence At The Edge The Internet does not provide services. Instead, the Internet only provides communication, and application programs provide all services. d Consequence – Every Internet communication, including voice and video teleconferencing, involves communication among application programs Computer Networks and Internets -- Module 2 4 Spring, 2014 Copyright  2014. All rights reserved.
  • 80. Communication Paradigms d The Internet offers two communication paradigms 2 222222222222222222222222222222222222222222222222222222222222222222 Stream Paradigm Message Paradigm 2 222222222222222222222222222222222222222222222222222222222222222222 Connection-oriented Connectionless 2 222222222222222222222222222222222222222222222222222222222222222222 1-to-1 communication Many-to-many communication 2 222222222222222222222222222222222222222222222222222222222222222222 Sequence of individual bytes Sequence of individual messages 2 222222222222222222222222222222222222222222222222222222222222222222 Arbitrary length transfer Each message limited to 64 Kbytes 2 222222222222222222222222222222222222222222222222222222222222222222 Used by most applications Used for multimedia applications 2 222222222222222222222222222222222222222222222222222222222222222222 Built on TCP protocol Built on UDP protocol 2 222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d Each paradigm has surprising characteristics Computer Networks and Internets -- Module 2 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 81. Stream Paradigm (TCP) d Transfers a sequence of bytes d Connection-oriented: data sent between two applications d Bidirectional (one stream in each direction) d No meaning attached to data and no boundaries inserted in data d Surprising characteristic: Although it delivers all bytes in sequence, the stream paradigm does not guarantee that the chunks of bytes passed to a receiving application correspond to the chunks of bytes transferred by the sending application. Computer Networks and Internets -- Module 2 6 Spring, 2014 Copyright  2014. All rights reserved.
  • 82. Message Paradigm (UDP) d Connectionless: network accepts and delivers individual messages d If the sender places N bytes in a message, a receiver will find exactly N bytes in the incoming message d Paradigm allows unicast, multicast, or broadcast delivery (one destination, multiple destinations, or all destinations) d Surprising characteristic: Although it preserves boundaries, the message paradigm allows messages to be lost, duplicated, or delivered out- of-order; neither the sender nor receiver is informed when such errors occur. Computer Networks and Internets -- Module 2 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 83. Stream Transport And Data Chunks d The protocol system may – Divide the data from the sender into multiple segments and deliver a few bytes at a time to the receiver – Combine data from multiple transmissions into a single large chunk and deliver it to the receiver all at once d Consequence: receiving application cannot know exactly which pieces were sent Computer Networks and Internets -- Module 2 8 Spring, 2014 Copyright  2014. All rights reserved.
  • 84. Example #1 d Assume a stream connection between two applications d Sender – Places 1000-byte message in buffer buf – Makes a single request to send all 1000 bytes d Receiver – Allocates a buffer b with 1000 bytes – Reads 1000 bytes from the stream into buffer b d The OS may return between 1 and 1000 bytes d Application must make repeated calls until all 1000 bytes have been acquired Computer Networks and Internets -- Module 2 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 85. Example #2 d Assume a stream connection between two applications d Sender transmits a sequence of four messages that are each 100 bytes long d Receiver allocates a large buffer b of 1000 bytes and requests that up to 1000 bytes from stream be read into buffer b d The OS may choose to return all four messages (400 bytes) with a single read request d Receiving application must be able to separate received data into four separate messages Computer Networks and Internets -- Module 2 10 Spring, 2014 Copyright  2014. All rights reserved.
  • 86. Programming Hints Computer Networks and Internets -- Module 2 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 87. Programming Hints d When using the stream paradigm Computer Networks and Internets -- Module 2 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 88. Programming Hints d When using the stream paradigm – Devise a way that a receiver knows where a message ends – Read from a socket until the entire message has been acquired Computer Networks and Internets -- Module 2 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 89. Programming Hints d When using the stream paradigm – Devise a way that a receiver knows where a message ends – Read from a socket until the entire message has been acquired d When considering using the message paradigm Computer Networks and Internets -- Module 2 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 90. Programming Hints d When using the stream paradigm – Devise a way that a receiver knows where a message ends – Read from a socket until the entire message has been acquired d When considering using the message paradigm – Don’t (at least not yet) Computer Networks and Internets -- Module 2 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 91. Identifying Individual Messages In A Stream d Possibilities – Send exactly one message followed by end of file (EOF) – Send multiple messages with an integer length before each message – Send multiple messages with a termination character (or sequence) following each message d Notes – Any technique can be used as long as both sides agree – If sending a multi-byte length value or multi-byte termination sequence, remember that the application may need multiple calls receive all bytes Computer Networks and Internets -- Module 2 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 92. Questions Computer Networks and Internets -- Module 2 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 93. Questions d In a realistic setting – Is division of a message likely to occur? – Is aggregation of multiple messages likely to occur? Computer Networks and Internets -- Module 2 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 94. Questions d In a realistic setting – Is division of a message likely to occur? – Is aggregation of multiple messages likely to occur? d Answers Computer Networks and Internets -- Module 2 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 95. Questions d In a realistic setting – Is division of a message likely to occur? – Is aggregation of multiple messages likely to occur? d Answers yes! (depending on the size of the messages) – Messages larger than 1400 characters are usually divided into multiple packets for transmission, and may be delivered together or separately – The stream service is designed to aggregate small messages before making them available to a receiving application Computer Networks and Internets -- Module 2 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 96. Buffering In The Stream Paradigm d Aggregation, which makes bulk transfer more efficient, can occur on the sending or receiving side d The stream paradigm includes a push operation that an application can use to force transmission and delivery d Unix convention: automatically push for each individual write call d Programming hints – To ensure a small message is transmitted and delivered without delay, use a separate write – Even with push, network delays mean applications must be written to tolerate aggregation d More details later in the course Computer Networks and Internets -- Module 2 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 98. Client-Server Model Of Interaction d Used by applications to establish communication d One application acts as a server – Starts execution first – Awaits contact d The other application becomes a client – Starts after server is running – Initiates contact Computer Networks and Internets -- Module 2 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 99. Client-Server Model Of Interaction d Used by applications to establish communication d One application acts as a server – Starts execution first – Awaits contact d The other application becomes a client – Starts after server is running – Initiates contact d Important concept: once communication has been established, data (e.g., requests and responses) can flow in either direction between a client and server Computer Networks and Internets -- Module 2 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 100. Characteristics Of A Client d Arbitrary application program that becomes a client temporarily d Usually invoked directly by a user, and usually executes only for one session d Actively initiates contact with a server, exchanges messages, and then terminates contact d Can access multiple services as needed, but usually contacts one remote server at a time d Runs locally on a user’s personal computer or smart phone d Does not require especially powerful computer hardware Computer Networks and Internets -- Module 2 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 101. Characteristics Of A Server d Special-purpose, privileged program dedicated to providing a service d Usually designed to handle multiple remote clients at the same time d Invoked automatically when a system boots, and continues to execute through many client sessions d Waits passively for contact from arbitrary remote clients and then exchanges messages d Requires powerful hardware and a sophisticated operating system d Runs on a large, powerful computer Computer Networks and Internets -- Module 2 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 102. Characteristics Of A Server d Special-purpose, privileged program dedicated to providing a service d Usually designed to handle multiple remote clients at the same time — complicates the design d Invoked automatically when a system boots, and continues to execute through many client sessions d Waits passively for contact from arbitrary remote clients and then exchanges messages d Requires powerful hardware and a sophisticated operating system d Runs on a large, powerful computer Computer Networks and Internets -- Module 2 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 103. Server Programs And Server-Class Computers d Confusion exists between scientific and marketing terminology d Scientific: a client and a server are each programs d Marketing: a server is a powerful computer Internet connection client runs in a standard computer server runs in a server-class computer Computer Networks and Internets -- Module 2 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 104. Summary Of Client-Server Interaction 2 222222222222222222222222222222222222222222222222222222222222222222222 Server Application Client Application 2 222222222222222222222222222222222222222222222222222222222222222222222 Starts first Starts second 2 222222222222222222222222222222222222222222222222222222222222222222222 Does not need to know which client Must know which server to will contact it contact 2 222222222222222222222222222222222222222222222222222222222222222222222 Waits passively and arbitrarily long Initiates a contact whenever for contact from a client communication is needed 2 222222222222222222222222222222222222222222222222222222222222222222222 Communicates with a client by Communicates with a server by sending and receiving data sending and receiving data 2 222222222222222222222222222222222222222222222222222222222222222222222 Stays running after servicing one May terminate after interacting client, and waits for another with a server 2 222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 2 20 Spring, 2014 Copyright  2014. All rights reserved.
  • 105. Illustration Of Steps Taken By Client And Server Internet Client Side d Agree a priori on a port number, N d Start after server is already running d Obtain server name from user d Use DNS to translate name to IP address d Contact server using IP address and port N d Interact with server and then exit Server Side d Agree a priori on a port number, N d Start before any of the clients d Register port N with the local system d Wait for contact from a client d Interact with client until client finishes d Wait for contact from the next client... Computer Networks and Internets -- Module 2 21 Spring, 2014 Copyright  2014. All rights reserved.
  • 106. Alternatives To Client-Server Computer Networks and Internets -- Module 2 22 Spring, 2014 Copyright  2014. All rights reserved.
  • 107. Alternatives To Client-Server d Broadcast – Sender broadcasts message and all stations receive it – Does not scale well (becomes inefficient) – Difficult to restrict data access Computer Networks and Internets -- Module 2 22 Spring, 2014 Copyright  2014. All rights reserved.
  • 108. Alternatives To Client-Server d Broadcast – Sender broadcasts message and all stations receive it – Does not scale well (becomes inefficient) – Difficult to restrict data access d Rendezvous point – Intermediary connects communicating applications – In essence, there are two clients and a server – Rendezvous point becomes a bottleneck Computer Networks and Internets -- Module 2 22 Spring, 2014 Copyright  2014. All rights reserved.
  • 109. Alternatives To Client-Server (continued) d Peer-To-Peer Interaction – Designed to avoid central server bottleneck – Data divided among N computers – Each computer acts as a server for its data and as a client for other data – Given computer receives 1 / N of the traffic Internet 1/ N of all traffic Computer Networks and Internets -- Module 2 23 Spring, 2014 Copyright  2014. All rights reserved.
  • 110. Network Programming With A Simplified API
  • 111. Network Programming d General term that refers to the creation of client and server applications that communicate over a network d Programmer uses an Application Program Interface (API) – Set of functions – Include control as well as data transfer functions (e.g., establish and terminate communication) d Defined by the operating system; not part of the Internet standards d Socket API has become a de facto standard Computer Networks and Internets -- Module 2 25 Spring, 2014 Copyright  2014. All rights reserved.
  • 112. A Simplified API d Will help you get started d General idea – Server is identified by pair (computer, application) – Server starts first and waits for contact – Client specifies server’s location – Once a connection is established, client and server can exchange data d Only seven functions in the simplified API Computer Networks and Internets -- Module 2 26 Spring, 2014 Copyright  2014. All rights reserved.
  • 113. Our Simplified API 2222222222222222222222222222222222222222222222222222222222222222222222 Operation Meaning 2222222222222222222222222222222222222222222222222222222222222222222222 await_contact Used by a server to wait for contact from a client 2222222222222222222222222222222222222222222222222222222222222222222222 make_contact Used by a client to contact a server 2222222222222222222222222222222222222222222222222222222222222222222222 appname_to_appnum Used to translate a program name to an equivalent internal binary value 2222222222222222222222222222222222222222222222222222222222222222222222 cname_to_comp Used to translate a computer name to an equivalent internal binary value 2222222222222222222222222222222222222222222222222222222222222222222222 send Used by either client or server to send data 2222222222222222222222222222222222222222222222222222222222222222222222 recv Used by either client or server to receive data 2222222222222222222222222222222222222222222222222222222222222222222222 send_eof Used by both client and server after they have finished sending data 2222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 2 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 114. Client And Server Using The API d Sequence of calls for a trivial exchange in which a client sends a single request and the server responds Server await_contact recv send send_eof Client make_contact send recv send_eof d Both sides must call send_eof because communication is bidirectional Computer Networks and Internets -- Module 2 28 Spring, 2014 Copyright  2014. All rights reserved.
  • 115. Data Types For Our Simplified API 22222222222222222222222222222222222222222222222222222222222 Type Name Meaning 22222222222222222222222222222222222222222222222222222222222 appnum A binary value used to identify an application 22222222222222222222222222222222222222222222222222222222222 computer A binary value used to identify a computer 22222222222222222222222222222222222222222222222222222222222 connection A value used to identify the connection between a client and server 22222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 2 29 Spring, 2014 Copyright  2014. All rights reserved.
  • 116. An Extra Function For Convenience d Simplified API includes an extra function, recvln d Not required, but convenient d Similar to recv – Receives data from a connection – Places data in a buffer d Difference – Reads exactly the amount requested – Technique: repeatedly call recv until specified length has been acquired Computer Networks and Internets -- Module 2 30 Spring, 2014 Copyright  2014. All rights reserved.
  • 117. Argument Types For Our API 2 222222222222222222222222222222222222222222222222222222222222222222222222 Function Type Type of Type of Type of Name Returned arg 1 arg 2 args 3–4 2 222222222222222222222222222222222222222222222222222222222222222222222222 await_contact connection appnum – – 2 222222222222222222222222222222222222222222222222222222222222222222222222 make_contact connection computer appnum – 2 222222222222222222222222222222222222222222222222222222222222222222222222 appname_to_appnum appnum char * – – 2 222222222222222222222222222222222222222222222222222222222222222222222222 cname_to_comp computer char * – – 2 222222222222222222222222222222222222222222222222222222222222222222222222 send int connection char * int 2 222222222222222222222222222222222222222222222222222222222222222222222222 recv int connection char * int 2 222222222222222222222222222222222222222222222222222222222222222222222222 recvln int connection char * int 2 222222222222222222222222222222222222222222222222222222222222222222222222 send_eof int connection – – 2 222222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d You will learn more in the PSOs Computer Networks and Internets -- Module 2 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 119. Sockets d Originally part of BSD Unix d Now standard in the industry d AT&T defined an alternative named TLI (Transport Layer Interface), but TLI is now extinct d Almost every OS includes an implementation d MS Windows chose to make minor changes (annoying) Computer Networks and Internets -- Module 2 33 Spring, 2014 Copyright  2014. All rights reserved.
  • 120. Socket Characteristics d Socket can be used for – Connectionless communication (UDP message) – Connection-oriented communication (TCP stream) d Many functions in the API d Approach – Create a socket – Make many function calls to specify type of communication, remote computer’s address, port number to be used, etc. – Use socket to send / receive data – Close the socket (terminate use) Computer Networks and Internets -- Module 2 34 Spring, 2014 Copyright  2014. All rights reserved.
  • 121. Example Socket Calls For Stream Communication CLIENT SIDE SERVER SIDE socket connect send recv close socket bind listen accept recv send close Computer Networks and Internets -- Module 2 35 Spring, 2014 Copyright  2014. All rights reserved.
  • 123. Terminology d Availability of an application protocol – Closed — vendor defines a protocol for their products – Open — standardized and available for all vendors d Basic protocol types – Data representation — message and data formats – Data transfer — procedures for exchanging messages and handling unexpected / error conditions d Notes – Application may define separate protocol for each type – Term Transfer in a protocol title indicates the latter Computer Networks and Internets -- Module 2 37 Spring, 2014 Copyright  2014. All rights reserved.
  • 124. Defining An Application Layer Protocol d Programmer specifies representation – Format of each message and each data item – Meaning of each item in a message d Programmer specifies transfer – Which side sends first – Which side closes the connection first – What to do if one side crashes unexpectedly Computer Networks and Internets -- Module 2 38 Spring, 2014 Copyright  2014. All rights reserved.
  • 125. State In An Application Protocol d Big decision: should state information be kept? d Stateful protocol assumes previous requests have been honored d Stateless protocol assumes each request is independent d Example of stateful interaction – Request 1 specifies “read from file X” – Request 2 specifies “read next 128 bytes” d Example of stateless interaction – Request 1 specifies “read bytes 0-127 from file X” – Request 2 specifies “read bytes 128-255 from file X” Computer Networks and Internets -- Module 2 39 Spring, 2014 Copyright  2014. All rights reserved.
  • 127. Application Protocol Examples d Web browsing d Email d File transfer d Remote login and remote desktop d Domain Name System (name lookup) Computer Networks and Internets -- Module 2 41 Spring, 2014 Copyright  2014. All rights reserved.
  • 128. Application Protocol Examples d Web browsing d Email d File transfer d Remote login and remote desktop d Domain Name System (name lookup) Computer Networks and Internets -- Module 2 41 Spring, 2014 Copyright  2014. All rights reserved.
  • 129. Application-Layer Protocols For The Web 2 222222222222222222222222222222222222222222222222222222222222222222222 Standard Purpose 2 222222222222222222222222222222222222222222222222222222222222222222222 HyperText Markup A representation standard used to specify the Language (HTML) contents and layout of a web page 2 222222222222222222222222222222222222222222222222222222222222222222222 Uniform Resource A representation standard that specifies the Locator (URL) format and meaning of a web page identifier 2 222222222222222222222222222222222222222222222222222222222222222222222 HyperText Transfer A transfer protocol that specifies how a browser Protocol (HTTP) interacts with a web server to transfer data 2 222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d Reminder: keyword Transfer in the name of a protocol means the protocol specifies message exchange Computer Networks and Internets -- Module 2 42 Spring, 2014 Copyright  2014. All rights reserved.
  • 130. HyperText Markup Language (HTML) d Representation standard for multimedia documents d Specifies document is entirely in printable text d Uses declarative rather than procedural approach d Document includes metadata that can link to arbitrary item d Document contains markup guidelines rather than precise, detailed formatting or typesetting instructions – Page can be displayed on arbitrary device – Appearance depends on device d Embedded tags control display – Form is <tag_name> and </tag_name> Computer Networks and Internets -- Module 2 43 Spring, 2014 Copyright  2014. All rights reserved.
  • 131. Uniform Resource Locator (URL) d Representation standard d A text string with punctuation characters separating the string into (optional) subfields d General form is: protocol:// computer_name : port / document_name ? parameters d Example where protocol, port, and parameters are omitted: www . cs . purdue . edu / people / comer Computer Networks and Internets -- Module 2 44 Spring, 2014 Copyright  2014. All rights reserved.
  • 132. HyperText Transfer Protocol (HTTP) d Transfer protocol used with the Web d Specifies format and meaning of messages d Each message represented as text d Transfers arbitrary binary data d Can download or upload data d Incorporates caching for efficiency d Browser sends request to server Computer Networks and Internets -- Module 2 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 133. Four Major HTTP Request Types 2 222222222222222222222222222222222222222222222222222222222222222222222222 Request Description 2 222222222222222222222222222222222222222222222222222222222222222222222222 GET Requests a document; server responds by sending status information followed by a copy of the document 2 222222222222222222222222222222222222222222222222222222222222222222222222 HEAD Requests status information; server responds by sending status information, but does not send a copy of the document 2 222222222222222222222222222222222222222222222222222222222222222222222222 POST Sends data to a server; the server appends the data to a specified item (e.g., a message is appended to a list) 2 222222222222222222222222222222222222222222222222222222222222222222222222 PUT Sends data to a server; the server uses the data to completely replace the specified item (i.e., overwrites the previous data) 2 222222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d GET request has the form: GET /item version CRLF d Version is HTTP/1.0 or HTTP/1.1 Computer Networks and Internets -- Module 2 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 134. HTTP Response d Response begins with a header in text, optionally followed by an item (which can be binary) d Header uses keyword: information form like email header d Header ends with a blank line Computer Networks and Internets -- Module 2 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 135. HTTP Header Format d General form HTTP/1.0 status_code status_string CRLF Server: server_identification CRLF Last-Modified: date_document_was_changed CRLF Content-Length: datasize CRLF Content-Type: document_type CRLF CRLF ... item begins here and contains datasize bytes ... Computer Networks and Internets -- Module 2 48 Spring, 2014 Copyright  2014. All rights reserved.
  • 136. Telnet Example (Apache Web Server) $ telnet www.cs.purdue.edu 80 Trying 128.10.19.20... Connected to lucan.cs.purdue.edu. Escape character is ’^]’. GET /homes/comer/ HTTP/1.0 HTTP/1.1 200 OK Date: Sun, 10 Nov 2013 11:38:27 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8r Last-Modified: Mon, 17 Oct 2011 22:21:41 GMT ETag: "bafb0-a50-4af8607f7c740" Accept-Ranges: bytes Content-Length: 2640 Connection: close Content-Type: text/html ...data from the web page follows here Computer Networks and Internets -- Module 2 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 137. Application Protocol Examples d Web browsing d Email d File transfer d Remote login and remote desktop d Domain Name System (name lookup) Computer Networks and Internets -- Module 2 50 Spring, 2014 Copyright  2014. All rights reserved.
  • 138. Original End-To-End Email Paradigm Internet direct transfer d Each computer runs – Email server to accept incoming email – Email client to send outgoing email d Incoming mail deposited in user’s mailbox d Outgoing mail placed in queue d User interface to read or compose messages separate from transfer applications Computer Networks and Internets -- Module 2 51 Spring, 2014 Copyright  2014. All rights reserved.
  • 139. Current Email Paradigm server at ISP server at ISP Internet email transfer protocol used email access protocol used email access protocol used d User’s mailbox located on separate computer (usually at an ISP) d Mail transfer application deposits message in mailbox d User interface application accesses remote mailbox – A web browser may be used as an access mechanism – Special-purpose applications also exist Computer Networks and Internets -- Module 2 52 Spring, 2014 Copyright  2014. All rights reserved.
  • 140. Simple Mail Transfer Protocol (SMTP) d Standard for email transfer d Follows a stream paradigm d Uses textual control messages d Only transfers text messages d Terminates message with <CR> <LF> . <CR> <LF> d Allows a sender to specify recipients’ names and checks each name d Sends only one copy of a message to a computer, even if destined to multiple recipients on the computer Computer Networks and Internets -- Module 2 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 141. Example SMTP Session S: 220 somewhere.com Simple Mail Transfer Service Ready C: HELO example.edu S: 250 OK C: MAIL FROM:<John_Q_Smith@example.edu> S: 250 OK C: RCPT TO:<Mathew_Doe@somewhere.com> S: 550 No such user here C: RCPT TO:<Paul_Jones@somewhere.com> S: 250 OK C: DATA S: 354 Start mail input; end with <CR><LF>.<CR><LF> C: ...sends body of mail message, which can contain C: ...arbitrarily many lines of text C: <CR><LF>.<CR><LF> S: 250 OK C: QUIT S: 221 somewhere.com closing transmission channel Computer Networks and Internets -- Module 2 54 Spring, 2014 Copyright  2014. All rights reserved.
  • 142. Mail Access Protocols d Two standard protocols – Post Office Protocol version 3 (POP3) – Internet Mail Access Protocol (IMAP) d Functionality – Provide access to a user’s mailbox – Permit user to view headers, download, delete, or send individual messages – Client runs on user’s personal computer – Server runs on a computer that stores user’s mailbox Computer Networks and Internets -- Module 2 55 Spring, 2014 Copyright  2014. All rights reserved.
  • 143. RFC2822 Mail Message Format d Email representation standard d Name derived from the Internet standard in which it is defined d Specifies – Email message consists of text file – Blank line separates header from body – Header lines have the form: Keyword: information Computer Networks and Internets -- Module 2 56 Spring, 2014 Copyright  2014. All rights reserved.
  • 144. RFC2822 Mail Message Format (continued) d Some keywords have defined meanings: – From: – To: – Subject: – Cc: d Keywords starting with uppercase X have no effect Computer Networks and Internets -- Module 2 57 Spring, 2014 Copyright  2014. All rights reserved.
  • 145. RFC2822 Mail Message Format (continued) d Some keywords have defined meanings: – From: – To: – Subject: – Cc: d Keywords starting with uppercase X have no effect d Examples: X-Best-networking-Course: CS422 at Purdue X-Spam-Check-Results: bulk spam 90% likely X-Worst-TV-Shows: any reality show Computer Networks and Internets -- Module 2 57 Spring, 2014 Copyright  2014. All rights reserved.
  • 146. Multimedia Email Computer Networks and Internets -- Module 2 58 Spring, 2014 Copyright  2014. All rights reserved.
  • 147. Multimedia Email d Observe – Email was standardized when computers only had character-oriented (textual) interfaces – SMTP is limited to transferring plain text messages – Users want to email photos, spreadsheets, messages with special fonts and color Computer Networks and Internets -- Module 2 58 Spring, 2014 Copyright  2014. All rights reserved.
  • 148. Multimedia Email d Observe – Email was standardized when computers only had character-oriented (textual) interfaces – SMTP is limited to transferring plain text messages – Users want to email photos, spreadsheets, messages with special fonts and color d Question: can SMTP be used to transfer such email? Computer Networks and Internets -- Module 2 58 Spring, 2014 Copyright  2014. All rights reserved.
  • 149. Multimedia Email d Observe – Email was standardized when computers only had character-oriented (textual) interfaces – SMTP is limited to transferring plain text messages – Users want to email photos, spreadsheets, messages with special fonts and color d Question: can SMTP be used to transfer such email? d Answer: it is possible because one can encode arbitrary binary items in plain text (think of a hex dump) Computer Networks and Internets -- Module 2 58 Spring, 2014 Copyright  2014. All rights reserved.
  • 150. Sending Non-Text Email d Standard is MIME (Multimedia Internet Mail Extensions) d Backward compatible with RFC2822 mail and SMTP d Sender – Encodes arbitrary binary item in plain text – Adds lines to email header to specify MIME – Places additional headers before each item in the message (including plain text items) d Sender can specify content type and encoding d Standard includes Base64 encoding Computer Networks and Internets -- Module 2 59 Spring, 2014 Copyright  2014. All rights reserved.
  • 151. Examples Of Mime Headers d MIME header lines added to other RFC2822 headers MIME-Version: 1.0 Content-Type: Multipart/Mixed; Boundary=xyz123 d Each part of the message has a MIME header that starts with the separator and specifies content type and encoding d Example --xyz123 Content-Type: image/jpeg ←blank line ends header Computer Networks and Internets -- Module 2 60 Spring, 2014 Copyright  2014. All rights reserved.
  • 152. Application Protocol Examples d Web browsing d Email d File transfer d Remote login and remote desktop d Domain Name System (name lookup) Computer Networks and Internets -- Module 2 61 Spring, 2014 Copyright  2014. All rights reserved.
  • 153. File Transfer d Standard is the File Transfer Protocol (FTP) d Once accounted for the most packets on the Internet d Interesting communication paradigm – Client forms a control connection to send requests – Server forms data connection for each file transferred – Server closes data connection after transfer complete d Notes – Using a separate connection allows arbitrary data transfer – For data connections, the server becomes a client and the client becomes a server (important for NAT) Computer Networks and Internets -- Module 2 62 Spring, 2014 Copyright  2014. All rights reserved.
  • 154. Illustration Of FTP Communication server client client forms a control connection client sends directory request over the control connection server forms a data connection server sends directory listing over the data connection server closes the data connection client sends download request over the control connection server forms a data connection server sends a copy of the file over the data connection server closes the data connection client sends a QUIT command over control connection client closes the control connection Computer Networks and Internets -- Module 2 63 Spring, 2014 Copyright  2014. All rights reserved.
  • 155. Application Protocol Examples d Web browsing d Email d File transfer d Remote login and remote desktop d Domain Name System (name lookup) Computer Networks and Internets -- Module 2 64 Spring, 2014 Copyright  2014. All rights reserved.
  • 156. Remote Login And Remote Desktop d Remote login – Intended for systems with command-line interface – Internet standard is TELNET – Secure shell (ssh) encrypts transfers – To appreciate the complexity of application protocols look at the TELNET standard Computer Networks and Internets -- Module 2 65 Spring, 2014 Copyright  2014. All rights reserved.
  • 157. Remote Login And Remote Desktop d Remote login – Intended for systems with command-line interface – Internet standard is TELNET – Secure shell (ssh) encrypts transfers – To appreciate the complexity of application protocols look at the TELNET standard d Remote desktop – Intended for systems that have a Graphical User Interface (GUI) – No Internet standards – Move to thin client has revived interest Computer Networks and Internets -- Module 2 65 Spring, 2014 Copyright  2014. All rights reserved.
  • 158. Application Protocol Examples d Web browsing d Email d File transfer d Remote login and remote desktop d Domain Name System (name lookup) Computer Networks and Internets -- Module 2 66 Spring, 2014 Copyright  2014. All rights reserved.
  • 159. Domain Name System (DNS) d Important piece of Internet infrastructure d Runs at the application layer d Translates human-readable names into the binary addresses used by the Internet Protocol d Example – Computer www.cs.purdue.edu – Has the IP address 128.10.19.20 Computer Networks and Internets -- Module 2 67 Spring, 2014 Copyright  2014. All rights reserved.
  • 160. DNS Terminology d Names are hierarchical d Each name divided into segments by period character, which is read “dot” d Most significant segment is on the right d Rightmost segment known as a top-level domain (TLD) d Client program known as a resolver – Used by web browser, email, etc Computer Networks and Internets -- Module 2 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 161. Top-Level Domains 2222222222222222222222222222222222222222222222222222 Domain Name Assigned To 2222222222222222222222222222222222222222222222222222 aero Air transport industry 2222222222222222222222222222222222222222222222222222 arpa Infrastructure domain 2222222222222222222222222222222222222222222222222222 asia For or about Asia 2222222222222222222222222222222222222222222222222222 biz Businesses 2222222222222222222222222222222222222222222222222222 com Commercial organizations 2222222222222222222222222222222222222222222222222222 coop Cooperative associations 2222222222222222222222222222222222222222222222222222 edu Educational institutions 2222222222222222222222222222222222222222222222222222 gov United States government 2222222222222222222222222222222222222222222222222222 info Information 2222222222222222222222222222222222222222222222222222 int International treaty organizations 2222222222222222222222222222222222222222222222222222 jobs Human resource managers 2222222222222222222222222222222222222222222222222222 mil United States military 2222222222222222222222222222222222222222222222222222 mobi Mobile content providers 2222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 2 69 Spring, 2014 Copyright  2014. All rights reserved.
  • 162. Top-Level Domains (continued) 2 2222222222222222222222222222222222222222222222222 Domain Name Assigned To 2 2222222222222222222222222222222222222222222222222 museum Museums 2 2222222222222222222222222222222222222222222222222 name Individuals 2 2222222222222222222222222222222222222222222222222 net Major network support centers 2 2222222222222222222222222222222222222222222222222 org Non-commercial organizations 2 2222222222222222222222222222222222222222222222222 pro Credentialed professionals 2 2222222222222222222222222222222222222222222222222 travel Travel and tourism 2 2222222222222222222222222222222222222222222222222 xxx Adult entertainment (porn) 2 2222222222222222222222222222222222222222222222222 country code A sovereign nation 2 2222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d In 2014, ICANN decided to allow many new TLDs Computer Networks and Internets -- Module 2 70 Spring, 2014 Copyright  2014. All rights reserved.
  • 163. Domain Registration d Organization – Applies under a specific top-level domain – Can choose an internal hierarchy – Assigns each computer a name d Geographic registration is possible cnri.reston.va.us d Some countries impose conventions – Universities in Great Britain register under ac.uk Computer Networks and Internets -- Module 2 71 Spring, 2014 Copyright  2014. All rights reserved.
  • 164. Domains With Most Hosts (July 2013) 2 22222222222222222222222222222222222222222222 Domain Hosts Explanation 2 22222222222222222222222222222222222222222222 net 366592151 Networks com 163634309 Commercial jp 74461142 Japan de 34904481 Germany br 33691951 Brazil it 26136473 Italy cn 19976554 China mx 17658991 Mexico fr 17437386 France au 16900586 Australia ru 15122103 Russian Federation nl 14011944 Netherlands pl 14011944 Poland ar 13335042 Argentina edu 12251571 Educational ca 9004861 Canada uk 8116718 United Kingdom in 7429638 India tr 7146979 Turkey tw 6429021 Taiwan 2 22222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d See domain survey at www . isc . org for details Computer Networks and Internets -- Module 2 72 Spring, 2014 Copyright  2014. All rights reserved.
  • 165. Host Names and Services Offered d Many organizations choose a host name to match the service a computer offers mail.foobar.com ftp.foobar.com www.foobar.com d Although convenient for humans, a host name does not specify which servers are running (e,g., a computer named mail could run a web server) Computer Networks and Internets -- Module 2 73 Spring, 2014 Copyright  2014. All rights reserved.
  • 166. DNS Servers d Names divided into a hierarchy of servers d Multiple groupings possible d Hypothetical example com foobar candy soap peanut almond walnut (a) root server server for foobar.com server for candy.foobar.com com foobar candy soap peanut almond walnut (b) root server server for walnut.candy.foobar.com server for foobar.com Computer Networks and Internets -- Module 2 74 Spring, 2014 Copyright  2014. All rights reserved.
  • 167. Name Resolution And Caching d Resolver – Acts as a client – Is configured with address of local DNS server – Contacts local server first – Socket library resolver is gethostbyname d Caching – Follows locality of reference principle – Each DNS server caches results – Cached item never kept when stale Computer Networks and Internets -- Module 2 75 Spring, 2014 Copyright  2014. All rights reserved.
  • 168. DNS Server Algorithm Part 1 Given: A request message from a DNS name resolver Provide: A response message that contains the address Method: Extract the name, N, from the request if ( server is an authority for N ) { Form and send an authoritative response to the requester; else if ( answer for N is in the cache ) { Form and send a nonauthoritative response to the requester; 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 2 76 Spring, 2014 Copyright  2014. All rights reserved.
  • 169. DNS Server Algorithm Part 2 else { /* Need to look up an answer */ if ( authority server for N is known ) { Send request to authority server; } else { Send request to root server; } Receive response and place in cache; Form and send a response to the requester; } 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2222222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 2 77 Spring, 2014 Copyright  2014. All rights reserved.
  • 170. Summary d Applications provide all Internet services d Internet offers connection-oriented stream communication or connectionless message communication d Most applications follow client-server approach – Server starts first and awaits client – Client contacts server d Socket API is a de facto standard d Application-layer protocol can define – Data and message formats (representation) – Rules for message exchange (transfer) Computer Networks and Internets -- Module 2 78 Spring, 2014 Copyright  2014. All rights reserved.
  • 171. Summary (continued) d Applications reviewed include – Web (URL, HTML, HTTP) – Email (SMTP, RFC2822, MIME) – File transfer (FTP) – Remote login and remote desktop (TELNET) – Domain Name System (DNS) Computer Networks and Internets -- Module 2 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 173. MODULE III Foundations Of Data Communications And The Physical Layer Computer Networks and Internets -- Module 3 1 Spring, 2014 Copyright  2014. All rights reserved.
  • 174. Topics d Motivation and model d Information sources and signals d Transmission media d Reliability and channel coding d Transmission modes d Modulation and demodulation d Multiplexing and demultiplexing (channelization) Computer Networks and Internets -- Module 3 2 Spring, 2014 Copyright  2014. All rights reserved.
  • 176. What Is Data Communications? d Broad field of study d Usually associated with the Physical Layer d Touches on – Physics – Mathematics – Engineering d Includes – Transmission of signals – Encoding data – Modulation and multiplexing Computer Networks and Internets -- Module 3 4 Spring, 2014 Copyright  2014. All rights reserved.
  • 177. Motivation d Find ways to transmit analog and digital information – Using natural phenomena (e.g., electromagnetic radiation) – Allow multiple senders to share a transmission medium d Data communications provides – A conceptual framework – Mathematical basis Computer Networks and Internets -- Module 3 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 178. Key Concept Although we tend to think of analog and digital communication separately, ultimately, all communication uses the same physical phenomena, usually electromagnetic energy. d Differences lie in the way the physical phenomena are used – Analog: use all values in a continuous range – Digital: restrict use to a fixed set of values, usually two d Data communications covers both analog and digital Computer Networks and Internets -- Module 3 6 Spring, 2014 Copyright  2014. All rights reserved.
  • 179. Conceptual Framework For Data Communications Physical Channel (noise & interference) Modulator Multiplexor Channel Encoder Encryptor (Scrambler) Source Encoder Information Source 1 Channel Encoder Encryptor (Scrambler) Source Encoder Information Source N Demodulator Demultiplexor Channel Decoder Decryptor (Unscrambler) Source Decoder Destination 1 Channel Decoder Decryptor (Unscrambler) Source Decoder Destination N . . . . . . Computer Networks and Internets -- Module 3 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 181. Sources Of Information d An input signal can arise from – Transducer such as a microphone – Receiver such as an Ethernet interface d We use the term signal processing to describe the recognition and transformation of signals Computer Networks and Internets -- Module 3 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 182. Sine Waves Computer Networks and Internets -- Module 3 10 Spring, 2014 Copyright  2014. All rights reserved.
  • 183. Sine Waves d Fundamental because sine waves characterize many natural phenomena d Examples – Audible tones – Radio waves – Light energy Computer Networks and Internets -- Module 3 10 Spring, 2014 Copyright  2014. All rights reserved.
  • 184. Fourier Analysis d Multiple sine waves can be added together – Result is known as a composite wave – Corresponds to combining multiple signals (e.g., playing two musical tones at the same time) d Mathematician named Fourier discovered how to decompose an arbitrary composite wave into individual sine waves d Fourier analysis provides the mathematical basis for signal processing d Bad news: according to Fourier, a digital wave decomposes into an infinite set of sine waves Computer Networks and Internets -- Module 3 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 185. Sine Wave Characteristics d Three important characteristics are used in networks: frequency, amplitude, and phase 0 1 sec 2 sec 1 -1 t (a) Original sine wave: sin(2πt) Computer Networks and Internets -- Module 3 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 186. Sine Wave Characteristics d Three important characteristics are used in networks: frequency, amplitude, and phase 0 0 1 sec 0.5 sec 2 sec 1 -1 t 2 sec 1 -1 t (a) Original sine wave: sin(2πt) (b) Higher frequency: sin(2π2t) Computer Networks and Internets -- Module 3 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 187. Sine Wave Characteristics d Three important characteristics are used in networks: frequency, amplitude, and phase 0 0 0 1 sec 1 sec 0.5 sec 2 sec 1 -1 t 2 sec 1 -1 t 2 sec 1 -1 t (a) Original sine wave: sin(2πt) (b) Higher frequency: sin(2π2t) (c) Lower amplitude: 0.4 sin(2πt) Computer Networks and Internets -- Module 3 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 188. Sine Wave Characteristics d Three important characteristics are used in networks: frequency, amplitude, and phase 0 0 0 0 1 sec 1 sec 1 sec 0.5 sec 2 sec 1 -1 t 2 sec 1 -1 t 2 sec 1 -1 t 2 sec 1 -1 t (a) Original sine wave: sin(2πt) (b) Higher frequency: sin(2π2t) (c) Lower amplitude: 0.4 sin(2πt) (d) New phase: sin(2πt+1.5π) Computer Networks and Internets -- Module 3 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 189. Definition Of Analog Bandwidth d Decompose a signal into a set of sine waves and take the difference between the highest and lowest frequency d Easy to compute from a frequency domain plot d Example signal with bandwidth of 4 Kilohertz (KHz): 1 0 1 2 3 4 5 6 frequency (in KHz) amplitude bandwidth Computer Networks and Internets -- Module 3 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 190. Digital Signals And Signal Levels d A digital signal level can represent multiple bits d Example 0 +5 time amplitude 1 0 1 1 0 0 0 1 two levels with a single bit per level 8 bits sent Computer Networks and Internets -- Module 3 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 191. Digital Signals And Signal Levels d A digital signal level can represent multiple bits d Example 0 +5 time amplitude -5 -2 +2 +5 time amplitude 1 0 1 1 0 0 0 1 11 10 00 00 01 11 01 10 two levels with a single bit per level four levels with two bits per level 8 bits sent 16 bits sent Computer Networks and Internets -- Module 3 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 192. Digital Signals And Signal Levels d A digital signal level can represent multiple bits d Example 0 +5 time amplitude -5 -2 +2 +5 time amplitude 1 0 1 1 0 0 0 1 11 10 00 00 01 11 01 10 two levels with a single bit per level four levels with two bits per level 8 bits sent 16 bits sent d Baud rate is number of times signal changes per second; data rate in bits per second = baud × J Q log2( levels ) J P Computer Networks and Internets -- Module 3 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 193. Converting Digital To Analog d Approximate digital signal with a composite of sine waves: t ................. . . . . . . . . . . . . . . . . . . . . . ................. . . . . . . . . . . . . . . . . . . . . . ................. . . . . . . . . . . . ................. . . . . . . . . . . . . . . . . . . . . . ................. . . . . . . . . . . . . . . . . . . . . . ................. . . . . . . . . . . . ................. . . . . . . . . . . . . . . . . . . . . . ................. . . . . . . . . . . . . . . . . . . . . . ................. . . . . . . . . . . . (a) digital signal (b) sin(2πt/2) (c) sin(2πt/2)+α sin(2π3t/2) (d) sin(2πt/2)+α sin(2π3t/2)+β sin(2π5t/2) d Mathematically, the bandwidth of a digital signal is infinite Computer Networks and Internets -- Module 3 15 Spring, 2014 Copyright  2014. All rights reserved.
  • 194. Converting Analog To Digital d Three steps taken during conversion quantization sampling encoding PCM encoder analog signal digital data d Example sampling using eight levels time Computer Networks and Internets -- Module 3 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 195. Converting Analog To Digital d Three steps taken during conversion quantization sampling encoding PCM encoder analog signal digital data d Example sampling using eight levels time Computer Networks and Internets -- Module 3 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 196. Converting Analog To Digital d Three steps taken during conversion quantization sampling encoding PCM encoder analog signal digital data d Example sampling using eight levels ..................................................................................................................................................... ..................................................................................................................................................... ..................................................................................................................................................... ..................................................................................................................................................... ..................................................................................................................................................... ..................................................................................................................................................... ..................................................................................................................................................... ..................................................................................................................................................... 0 1 2 3 4 5 6 7 time quanta Computer Networks and Internets -- Module 3 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 197. Sampling Rate And Nyquist Theorem d How many samples should be taken per second? Computer Networks and Internets -- Module 3 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 198. Sampling Rate And Nyquist Theorem d How many samples should be taken per second? d Mathematician named Nyquist discovered the answer: sampling rate = 2 × fmax where fmax is highest frequency in the composite signal Computer Networks and Internets -- Module 3 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 199. Sampling Rate And Nyquist Theorem d How many samples should be taken per second? d Mathematician named Nyquist discovered the answer: sampling rate = 2 × fmax where fmax is highest frequency in the composite signal d Example: to capture audio frequencies up to 4000 Hertz, a digital telephone system samples at 8000 samples per second d Amount of data generated by a single digitized voice call: data rate = 8000 second samples 3 3333333 × 8 sample bits 3 333333 = 64,000 second bits 3 333333 Computer Networks and Internets -- Module 3 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 200. Nonlinear Encoding d Linear sampling does not work well for voice d Researchers created nonlinear sampling that modify dynamic range to reproduce sounds to which the human ear is sensitive d Mu-law (µ-law) – Used in North America and Japan – More dynamic range, but more sensitive to noise d A-law – Used in Europe – Less sensitive to noise, but less dynamic range Computer Networks and Internets -- Module 3 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 201. Synchronization Errors And Line Coding d Synchronization error occurs when receiver and sender disagree about bit boundaries (clocks differ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0 0 1 1 0 1 0 1 0 0 0 1 1 0 1 1 0 sent received d Line coding techniques prevent synchronization errors Computer Networks and Internets -- Module 3 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 202. Example Line Coding: Manchester Encoding d Used with Ethernet d Synchronizes receiver with sender (transition represents bit) d Example of (a) Manchester Encoding, and (b) differential Manchester Encoding: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 (a) (b) Computer Networks and Internets -- Module 3 20 Spring, 2014 Copyright  2014. All rights reserved.
  • 204. A Taxonomy Of Transmission Media Twisted Pair Coaxial Cable Optical Fiber InfraRed Laser Terrestrial Radio Satellite Electrical Electromagnetic (Radio) Light Energy Types d Is anything omitted? Computer Networks and Internets -- Module 3 22 Spring, 2014 Copyright  2014. All rights reserved.
  • 205. Some Really Bad News d In the real world, entropy rules d Transmission is plagued with problems Computer Networks and Internets -- Module 3 23 Spring, 2014 Copyright  2014. All rights reserved.
  • 206. Loss, Interference, And Electrical Noise d Problems in the electrical and electromagnetic worlds – Resistance (leads to loss) – Capacitance (leads to distortion) – Inductance (leads to interference) d Random electromagnetic radiation is called noise – Can be generated by specific sources such as electric motor – Background radiation is an inescapable feature of the universe Computer Networks and Internets -- Module 3 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 207. Examples d When electrical signals propagate down a wire, electromagnetic energy is radiated (i.e., the wire acts like an antenna) d When electromagnetic radiation encounters metal, a small electrical current is induced that can interfere with signals being carried on the wire d When an electrical pulse is sent down an unterminated wire, reflection comes back d When a signal passes across the connection between two wires, reflection and loss occur d Note: a network diagnostic tool uses reflection to find the distance to the point where a cable has been cut Computer Networks and Internets -- Module 3 25 Spring, 2014 Copyright  2014. All rights reserved.
  • 208. How Can We Reduce The Effect Of Noise On Copper Wiring d Several techniques have been invented – Unshielded Twisted Pair (UTP) – Coaxial cable – Shielded Twisted Pair (STP) d All are used in computer networks Computer Networks and Internets -- Module 3 26 Spring, 2014 Copyright  2014. All rights reserved.
  • 209. How Twisted Pair Helps Computer Networks and Internets -- Module 3 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 210. How Twisted Pair Helps +5 +5 +5 +5 +3 +3 +3 +3 difference +8 source of radiation d In an untwisted pair of wires, more current is generated in first wire the interference hits Computer Networks and Internets -- Module 3 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 211. How Twisted Pair Helps +5 +5 +5 +5 +3 +3 +3 +3 difference +8 source of radiation d In an untwisted pair of wires, more current is generated in first wire the interference hits +5 +5 +5 +5 +3 +3 +3 +3 difference 0 source of radiation d Twisting exposes each wire equally Computer Networks and Internets -- Module 3 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 212. Coaxial Cable And Shielding d Better protection: wrap a metal shield around the wire outer plastic covering braided metal shield plastic insulation inner wire for signal d Shielding can be added to twisted pair – Around entire cable containing many pairs – Around each pair as well as around cable d Shielding determines maximum data rate Computer Networks and Internets -- Module 3 28 Spring, 2014 Copyright  2014. All rights reserved.
  • 213. Wiring Standards And Data Rates 2 2222222222222222222222222222222222222222222222222222222222222222222222 Category Description Data Rate (in Mbps) 2 2222222222222222222222222222222222222222222222222222222222222222222222 CAT 1 Unshielded twisted pair used for telephones < 0.1 2 2222222222222222222222222222222222222222222222222222222222222222222222 CAT 2 Unshielded twisted pair used for T1 data 2 2 2222222222222222222222222222222222222222222222222222222222222222222222 CAT 3 Improved CAT2 used for computer networks 10 2 2222222222222222222222222222222222222222222222222222222222222222222222 CAT 4 Improved CAT3 used for Token Ring networks 20 2 2222222222222222222222222222222222222222222222222222222222222222222222 CAT 5 Unshielded twisted pair used for networks 100 2 2222222222222222222222222222222222222222222222222222222222222222222222 CAT 5E Extended CAT5 for more noise immunity 125 2 2222222222222222222222222222222222222222222222222222222222222222222222 CAT 6 Unshielded twisted pair tested for 200 Mbps 200 2 2222222222222222222222222222222222222222222222222222222222222222222222 CAT 7 Shielded twisted pair with a foil shield 600 around the entire cable plus a shield around each twisted pair 2 2222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d What common data rate is missing from the list? Computer Networks and Internets -- Module 3 29 Spring, 2014 Copyright  2014. All rights reserved.
  • 214. Media Using Light Energy d InfraRED transmission (short range and low data rate) d Point-to-point lasers (useful between buildings) d Optical fiber (high data rate and long distance) Computer Networks and Internets -- Module 3 30 Spring, 2014 Copyright  2014. All rights reserved.
  • 215. Media Using Light Energy d InfraRED transmission (short range and low data rate) d Point-to-point lasers (useful between buildings) d Optical fiber (high data rate and long distance) d Why light stays in a fiber: α α (a) (b) (c) Refraction Absorption Reflection critical angle low density high density θ Computer Networks and Internets -- Module 3 30 Spring, 2014 Copyright  2014. All rights reserved.
  • 216. Electromagnetic Spectrum And Properties 100 102 104 106 108 1010 1012 1014 1016 1018 1020 1022 1024 Radio & TV Low frequencies Micro- wave InfraRed UV X ray Gamma ray 1 KHz 1 MHz 1 GHz 1 THz visible light 2 222222222222222222222222222222222222222222222222222222222222222222222 Classification Range Type Of Propagation 2 222222222222222222222222222222222222222222222222222222222222222222222 Low < 2 MHz Wave follows earth’s curvature, but Frequency can be blocked by unlevel terrain 2 222222222222222222222222222222222222222222222222222222222222222222222 Medium 2 to 30 MHz Wave can reflect from layers of the Frequency atmosphere, especially the ionosphere 2 222222222222222222222222222222222222222222222222222222222222222222222 High > 30 MHz Wave travels in a direct line, and will Frequency be blocked by obstructions 2 222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 3 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 217. Satellite Communication d Three types of communication satellites 2222222222222222222222222222222222222222222222222222222222222222222222 Orbit Type Description 2222222222222222222222222222222222222222222222222222222222222222222222 Low Has the advantage of low delay, but the disadvantage Earth Orbit that from an observer’s point of view on the earth, ( LEO ) the satellite appears to move across the sky 2222222222222222222222222222222222222222222222222222222222222222222222 Medium An elliptical (rather than circular) orbit primarily Earth Orbit used to provide communication at the North and ( MEO ) South Poles 2222222222222222222222222222222222222222222222222222222222222222222222 Geostationary Has the advantage that the satellite remains at a fixed Earth Orbit position with respect to a location on the earth’s ( GEO ) surface, but the disadvantage of being farther away 2222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 3 32 Spring, 2014 Copyright  2014. All rights reserved.
  • 218. GEO Satellites d Figure below shows the earth’s atmosphere drawn to scale d Where would a GEO satellite be in the figure? Earth atmosphere Computer Networks and Internets -- Module 3 33 Spring, 2014 Copyright  2014. All rights reserved.
  • 219. GEO Satellites (continued) d Distance to GEO satellite is 35,785 km or 22,236 miles d Approximately 3 times earth’s diameter or one-tenth of the distance to the moon Computer Networks and Internets -- Module 3 34 Spring, 2014 Copyright  2014. All rights reserved.
  • 220. GEO Satellites (continued) d Distance to GEO satellite is 35,785 km or 22,236 miles d Approximately 3 times earth’s diameter or one-tenth of the distance to the moon d In other words: the satellite is far off the page Computer Networks and Internets -- Module 3 34 Spring, 2014 Copyright  2014. All rights reserved.
  • 221. GEO Satellites (continued) d Distance to GEO satellite is 35,785 km or 22,236 miles d Approximately 3 times earth’s diameter or one-tenth of the distance to the moon d In other words: the satellite is far off the page d A consequence for networking: a long round-trip time, even at the speed of light: Round trip time = 3 × 108 meters/sec 2 × 35.8 × 106meters 3 3333333333333333333 = 0.238 sec Computer Networks and Internets -- Module 3 34 Spring, 2014 Copyright  2014. All rights reserved.
  • 222. Measures Of Transmission Media d Propagation delay - time required for a signal to traverse a medium d Channel capacity - maximum data rate Computer Networks and Internets -- Module 3 35 Spring, 2014 Copyright  2014. All rights reserved.
  • 223. Channel Capacity d Nyquist’s Theorem gives theoretical bound on maximum data rate for hardware bandwidth B and K signal levels D = 2 B log2K d Mathematical result known as Shannon’s Theorem gives the maximum channel capacity, C, in the presence of noise C = B log2( 1 + S/N) d Quantity S / N is known as the signal-to-noise ratio Computer Networks and Internets -- Module 3 36 Spring, 2014 Copyright  2014. All rights reserved.
  • 224. Assessment d Nyquist’s Theorem gives us hope: using more signal levels can increase the data rate d Shannon’s Theorem is sobering: electrical noise in the universe limits the effective channel capacity of any practical communication system Computer Networks and Internets -- Module 3 37 Spring, 2014 Copyright  2014. All rights reserved.
  • 226. Sources Of Errors And Types d Error sources: interference, distortion, and attenuation d Resulting error types: 2 22222222222222222222222222222222222222222222222222222222222222222222222 Type Of Error Description 2 22222222222222222222222222222222222222222222222222222222222222222222222 Single Bit Error A single bit in a block of bits is changed and all other bits in the block are unchanged (often results from very short-duration interference) 2 22222222222222222222222222222222222222222222222222222222222222222222222 Burst Error Multiple bits in a block of bits are changed (often results from longer-duration interference) 2 22222222222222222222222222222222222222222222222222222222222222222222222 Erasure (Ambiguity) The signal that arrives at a receiver is ambiguous (does not clearly correspond to either a logical 1 or a logical 0; can result from distortion or interference) 2 22222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d Channel coding used to detect and correct errors Computer Networks and Internets -- Module 3 39 Spring, 2014 Copyright  2014. All rights reserved.
  • 227. Concept Of Forward Error Correction (FEC) encoder add extra bits for protection output codeword transmission over channel decoder check and optionally correct receive codeword ORIGINAL MESSAGE ORIGINAL MESSAGE Discard d Examples: – Single parity bit – Row And Column (RAC) – Cyclic Redundancy Check (CRC) Computer Networks and Internets -- Module 3 40 Spring, 2014 Copyright  2014. All rights reserved.
  • 228. Example: Row And Column Code d To send 12 bits, arrange the bits in a matrix, compute a parity for each row and column, and send 20 bits 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1 1 0 parity for each column parity for each row bits from dataword Computer Networks and Internets -- Module 3 41 Spring, 2014 Copyright  2014. All rights reserved.
  • 229. Example: Row And Column Code d To send 12 bits, arrange the bits in a matrix, compute a parity for each row and column, and send 20 bits 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1 1 0 parity for each column parity for each row bits from dataword d Receiver computes same parity for the 12 bits and compares to the parity bits received 1 0 1 1 1 0 1 1 0 1 1 0 1 0 0 0 0 1 1 0 single bit changed during transmission locations where calculated parity bits disagree, indicating the row and column of the error Computer Networks and Internets -- Module 3 41 Spring, 2014 Copyright  2014. All rights reserved.
  • 230. Hamming Distance d Used to assess code’s resistance to errors d Defined to be number of bit changes to transform bit string S1 into bit string S2 d Can be computed as number of 1 bits in the exclusive or of S1 and S2 d To assess code’s strength, compute Hamming distance among all possible pairs of codewords, and take the minimum d If minimum Hamming distance is n, an error that changes fewer than n bits will be detected Computer Networks and Internets -- Module 3 42 Spring, 2014 Copyright  2014. All rights reserved.
  • 231. Internet Checksum Computation Given: A message, M, of arbitrary length Compute: A 16-bit 1s complement checksum, C Method: Pad M to an exact multiple of 16 bits; Set a 32-bit checksum integer, C, to zero; for ( each 16-bit group in M ) { Treat the 16 bits as an integer and add to C; } Extract high-order 16 bits of C and add to C; Checksum is inverse of the low-order 16 bits; If the checksum is zero, substitute all 1s; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 3 43 Spring, 2014 Copyright  2014. All rights reserved.
  • 232. Cyclic Redundancy Code (CRC) d Used with Ethernet and other high-speed networks d Properties: Arbitrary Length Message Excellent Error Detection Fast Hardware Implementation As with a checksum, the size of a dataword is not fixed, which means a CRC can be applied to an arbitrary length message Because the value computed depends on the sequence of bits in a message, a CRC provides excellent error detection capability Despite its sophisticated mathematical basis, a CRC computation can be carried out extremely fast by hardware Computer Networks and Internets -- Module 3 44 Spring, 2014 Copyright  2014. All rights reserved.
  • 233. Explanation Of CRC d Mathematicians explain CRC computation as the remainder from polynomial division d Theoretical computer scientists explain CRC as the remainder from a division of binary numbers d Cryptographers explain CRC as an operation in a Galois field of order 2 d Computer programmers explain CRC as an algorithm that iterates through a message and uses table lookup d Hardware architects explain CRC computation as a small hardware pipeline unit that uses exclusive or Computer Networks and Internets -- Module 3 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 234. Question d Can you explain the following? – Fact 1: it is possible to write a function that computes the 32-bit CRC used with Ethernet – Fact 2: commercial Ethernet products use hardware instead of software to compute a CRC Computer Networks and Internets -- Module 3 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 236. Terminology d Serial - one bit at a time d Parallel - multiple bits at a time Computer Networks and Internets -- Module 3 48 Spring, 2014 Copyright  2014. All rights reserved.
  • 237. Terminology d Serial - one bit at a time d Parallel - multiple bits at a time d Taxonomy of transmission methods: Isochronous Synchronous Asynchronous Serial Parallel Transmission Mode Computer Networks and Internets -- Module 3 48 Spring, 2014 Copyright  2014. All rights reserved.
  • 238. Serial Ordering Of Bits And Bytes d Both sides must agree on order in which bits are transmitted d Two approaches known as big-endian and little-endian d Example: Ethernet uses byte big-endian and bit little-endian order byte 1 byte 2 byte 3 byte 4 x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Computer Networks and Internets -- Module 3 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 239. Asynchronous And Synchronous Transmission d Asynchronous: line idle when not in use; data starts at arbitrary time 0 +15 -15 voltage time arbitrary idle start 1 . . . . . . . . . . . . . . . . . . . . . . . 1 0 1 . . . . . . . . . . . . . . . . . . . . . . . 1 0 1 0 stop . . . . . . . . . . . . . . . . . . . . . . . idle arbitrary d Synchronous: each bit slot used 0 +15 -15 voltage time 1 . . . . . . . . . . . . . . . . . . . . . . . 1 0 1 . . . . . . . . . . . . . . . . . . . . . . . 1 0 1 . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . 0 1 0 1 . . . . . . . . . . . . . . . . . . . . . . . 1 0 receiver must know how to group bits into bytes Computer Networks and Internets -- Module 3 50 Spring, 2014 Copyright  2014. All rights reserved.
  • 240. Illustration Of Simplex And Duplex Modes send receive receive send send receive receive send send receive (a) simplex (b) full-duplex (c) half-duplex Computer Networks and Internets -- Module 3 51 Spring, 2014 Copyright  2014. All rights reserved.
  • 242. Illustration Of Amplitude Modulation Computer Networks and Internets -- Module 3 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 243. Illustration Of Amplitude Modulation carrier Computer Networks and Internets -- Module 3 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 244. Illustration Of Amplitude Modulation carrier signal Computer Networks and Internets -- Module 3 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 245. Illustration Of Amplitude Modulation carrier signal modulated carrier Computer Networks and Internets -- Module 3 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 246. Illustration Of Frequency Modulation signal modulated carrier Computer Networks and Internets -- Module 3 54 Spring, 2014 Copyright  2014. All rights reserved.
  • 247. Shift Keying d Like modulation except signal is digital 0 1 0 0 1 1 0 carrier digital signal carrier with amplitude shift keying Computer Networks and Internets -- Module 3 55 Spring, 2014 Copyright  2014. All rights reserved.
  • 248. A Challenge Write a computer program that takes as input a series of points defining a signal and produces plots of sine waves that show amplitude and frequency modulation as in the previous diagrams Computer Networks and Internets -- Module 3 56 Spring, 2014 Copyright  2014. All rights reserved.
  • 249. Other Modulation Topics d Phase shift modulation d Increasing bits per second by combining amplitude and phase shift (QAM techniques) d Constellation diagrams to represent combinations d Modems (modulator / demodulator) Computer Networks and Internets -- Module 3 57 Spring, 2014 Copyright  2014. All rights reserved.
  • 251. Concept Of Multiplexing And Types sender 1 sender 2 sender N receiver 1 receiver 2 receiver N . . . . . . multiplexor demultiplexor shared medium Computer Networks and Internets -- Module 3 59 Spring, 2014 Copyright  2014. All rights reserved.
  • 252. Concept Of Multiplexing And Types sender 1 sender 2 sender N receiver 1 receiver 2 receiver N . . . . . . multiplexor demultiplexor shared medium d Types: – Frequency division multiplexing – Wavelength division multiplexing – Time division multiplexing – Code division multiplexing Computer Networks and Internets -- Module 3 59 Spring, 2014 Copyright  2014. All rights reserved.
  • 253. Frequency Division Multiplexing (FDM) d Used in broadcast radio and cable TV sender 1 sender 2 sender N receiver 1 receiver 2 receiver N channel 1 channel 2 channel N . . . . . . . . . multiplexor demultiplexor d Demultiplexing implemented with sets of filters filter 1 filter 2 filter N . . . demultiplexor frequencies for all channels each output has frequencies for one channel Computer Networks and Internets -- Module 3 60 Spring, 2014 Copyright  2014. All rights reserved.
  • 254. FDM In Practice d Each channel assigned a range of frequencies 2 22222222222222222222222222222222 Channel Frequencies Used 2 22222222222222222222222222222222 1 100 KHz - 300 KHz 2 320 KHz - 520 KHz 3 540 KHz - 740 KHz 4 760 KHz - 960 KHz 5 980 KHz - 1180 KHz 6 1200 KHz - 1400 KHz 2 22222222222222222222222222222222 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 d A guard band separates adjacent channels 0 200 400 600 800 1000 1200 1400 1 2 3 4 5 6 KHz guard band Computer Networks and Internets -- Module 3 61 Spring, 2014 Copyright  2014. All rights reserved.
  • 255. Wavelength Division Multiplexing (WDM) d Form of FDM used with light (i.e., on an optical fiber) d Separate frequencies called colors or lambdas d Prisms used to separate frequencies λ1 λ2 λk λ1 λ2 λk optical fiber carrying a beam of light prism d Current technology is Dense WDM (DWDM); an individual channel can provide 10 Gbps Computer Networks and Internets -- Module 3 62 Spring, 2014 Copyright  2014. All rights reserved.
  • 256. Time Division Multiplexing d Senders take turns transmitting sender 1 sender 2 sender N receiver 1 receiver 2 receiver N . . . . . . 1 2 3 . . . N 1 2 3 . . . multiplexor demultiplexor data flow d Synchronous TDM – Each sender assigned a slot (typically round-robin) – Used by the telephone company d Statistical TDM – Sender only transmits when ready (e.g., Ethernet) Computer Networks and Internets -- Module 3 63 Spring, 2014 Copyright  2014. All rights reserved.
  • 257. Code Division Multiplexing d Mathematical form of multiplexing used with cell phones d Algorithm – Each sender/receiver pair is assigned a unique number called a chip sequence – Senders multiply the data value by their chip sequence (orthogonal vector spaces) – Transmitted value is a sum of all senders – Each receiver multiplies incoming value by its chip sequence to extract data d Advantage over statistical TDM: lower delay when network loaded Computer Networks and Internets -- Module 3 64 Spring, 2014 Copyright  2014. All rights reserved.
  • 258. Hierarchical Multiplexing d Hierarchies used with FDM and TDM to combine multiple lower-capacity channels d Example of TDM hierarchy used by the phone system 24 DS-0 digital phone channels (64 Kbps each) 4 DS-1 digital phone channels (1.544 Mbps each) 7 DS-2 digital phone channels (6.312 Mbps each) 6 DS-3 digital phone channels (44.736 Mbps each) 1 DS-4 digital phone channel (274.176 Mbps total) Computer Networks and Internets -- Module 3 65 Spring, 2014 Copyright  2014. All rights reserved.
  • 259. Inverse Multiplexing d Divides data from a single channel into several lower-speed channels d Used when high-speed channel is unavailable or too expensive d Some ISPs use inverse multiplexing to combine several 10 Gbps channels into a higher-speed channel multiple low-speed connections single high-speed input single high-speed output Computer Networks and Internets -- Module 3 66 Spring, 2014 Copyright  2014. All rights reserved.
  • 260. Summary d Data communications deals with the Physical Layer and data transmission d Concepts include – Signals and conversion between digital and analog – Transmission media – Reliability and channel coding – Modulation and demodulation – Multiplexing and demultiplexing Computer Networks and Internets -- Module 3 67 Spring, 2014 Copyright  2014. All rights reserved.
  • 262. MODULE IV Computer Network Technologies: Access, Wired And Wireless LANs, Extensions, Bridging, And Layer 2 Switching Computer Networks and Internets -- Module 4 1 Spring, 2014 Copyright  2014. All rights reserved.
  • 263. Topics d Access technologies d Interconnection technologies d Local area network packets, frames, and topologies d Media access mechanisms and the IEEE MAC sub-layer d Wired LAN technologies (Ethernet and 802.3) d Wireless Networking Technologies d LAN Extensions d Switches and switched networks Computer Networks and Internets -- Module 4 2 Spring, 2014 Copyright  2014. All rights reserved.
  • 265. Definition Of Access d Used in the “last mile” between a provider and a subscriber d Informally classified as either narrowband or broadband d May not be the bottleneck d Many are asymmetric with higher data rate downstream provider’s facility subscriber’s location downstream upstream d Note: party that is downstream pays a fee for service Computer Networks and Internets -- Module 4 4 Spring, 2014 Copyright  2014. All rights reserved.
  • 266. Access Technology Types d Narrowband (less than 128 Kbps) – Dialup – Integrated Services Digital Network (ISDN) – Is disappearing d Broadband (more than 128 Kbps) – Digital Subscriber Line (DSL) – Cable modems – Wireless (e.g., Wi-Fi and 4G) Computer Networks and Internets -- Module 4 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 267. Digital Subscriber Line (DSL) Technologies d Use frequency-division multiplexing to share local loop between data and POTS d Head-end equipment is DSL Access Multiplexor (DSLAM) d Asymmetric Digital Subscriber Line (ADSL) – 255 downstream carrier frequencies, 31 upstream – Maximum downstream data rate is 8.45 Mbps – Adaptive selection of carrier frequencies 0 4 26 138 1100 KHz POTS upstream downstream Computer Networks and Internets -- Module 4 6 Spring, 2014 Copyright  2014. All rights reserved.
  • 268. Cable Modem Technology d Sends data over CATV coaxial cable system d Standard is DOCSIS (Data-Over-Cable Service Interface Specification) d Head-end equipment known as Cable Modem Termination System (CMTS) d Version 1.x uses frequency-division multiplexing d Maximum downstream data rate is 52 Mbps d Bandwidth shared among multiple subscribers Computer Networks and Internets -- Module 4 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 269. Cable Modem Technology d Sends data over CATV coaxial cable system d Standard is DOCSIS (Data-Over-Cable Service Interface Specification) d Head-end equipment known as Cable Modem Termination System (CMTS) d Version 1.x uses frequency-division multiplexing d Maximum downstream data rate is 52 Mbps d Bandwidth shared among multiple subscribers – Each subscriber receives N 1 33 of the bandwidth Computer Networks and Internets -- Module 4 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 270. Cable Modem Technology d Sends data over CATV coaxial cable system d Standard is DOCSIS (Data-Over-Cable Service Interface Specification) d Head-end equipment known as Cable Modem Termination System (CMTS) d Version 1.x uses frequency-division multiplexing d Maximum downstream data rate is 52 Mbps d Bandwidth shared among multiple subscribers – Each subscriber receives N 1 33 of the bandwidth – Cable company chooses N Computer Networks and Internets -- Module 4 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 271. Other Access Technologies d Hybrid systems include optical fiber plus copper – Fiber To The Curb (FTTC) – Fiber To The Building (FTTB) – Fiber To The Premises (FTTP) – Fiber To The Home (FTTH) d Key question: how much capacity is needed at each point downstream? d Answer: it depends on whether endpoints have traffic in common – Broadcasts are shared – Individual communications are not Computer Networks and Internets -- Module 4 8 Spring, 2014 Copyright  2014. All rights reserved.
  • 272. Other Access Technologies (continued) d Wireless – Wi-Fi – WIMAX – Satellite – 3G and 4G cellular services d Leased point-to-point circuits (e.g., T1 or fractional T1) Computer Networks and Internets -- Module 4 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 274. Interconnections At The Core Of The Internet d Typically needed by large ISPs d Circuits leased from common carriers (phone companies) d Terminated with a Data Service Unit / Channel Service Unit (DSU/ CSU) d Upstream interface aggregates many lower-speed access connections d Key idea: data rates based on voice – Basic data rate: single digital voice channel (64 Kbps) – Higher data rate circuits created from multiples of voice channels d SONET encoding and framing used Computer Networks and Internets -- Module 4 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 275. Example Data Rates Of Leased Circuits 222222222222222222222222222222222222222222222222222222222222 Name Bit Rate Voice Circuits Location 222222222222222222222222222222222222222222222222222222222222 basic rate 0.064 Mbps 1 222222222222222222222222222222222222222222222222222222222222 T1 1.544 Mbps 24 North America 222222222222222222222222222222222222222222222222222222222222 T2 6.312 Mbps 96 North America 222222222222222222222222222222222222222222222222222222222222 T3 44.736 Mbps 672 North America 222222222222222222222222222222222222222222222222222222222222 E1 2.048 Mbps 30 Europe 222222222222222222222222222222222222222222222222222222222222 E2 8.448 Mbps 120 Europe 222222222222222222222222222222222222222222222222222222222222 E3 34.368 Mbps 480 Europe 222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d T-standards used in North America d E-standards used in Europe d Note: T prefix specifies encoding as well as data rate; data rate alone is given by Digital Signal Level (DS) standards Computer Networks and Internets -- Module 4 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 276. High Capacity Data Circuits 2 22222222222222222222222222222222222222222222222222222222222222222 Copper Name Optical Name Bit Rate Voice Circuits 2 22222222222222222222222222222222222222222222222222222222222222222 STS-1 OC-1 51.840 Mbps 810 2 22222222222222222222222222222222222222222222222222222222222222222 STS-3 OC-3 155.520 Mbps 2430 2 22222222222222222222222222222222222222222222222222222222222222222 STS-12 OC-12 622.080 Mbps 9720 2 22222222222222222222222222222222222222222222222222222222222222222 STS-24 OC-24 1,244.160 Mbps 19440 2 22222222222222222222222222222222222222222222222222222222222222222 STS-48 OC-48 2,488.320 Mbps 38880 2 22222222222222222222222222222222222222222222222222222222222222222 STS-192 OC-192 9,953.280 Mbps 155520 2 22222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 d STS standards specify copper interface d OC standards specify optical fiber interface d Suffix C on OC-standards means single channel Computer Networks and Internets -- Module 4 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 277. Local Area Networks: (Packets, Frames, Topologies)
  • 278. Networks d Distinct from physical communication systems d Attach multiple endpoints d Two broad categories – Circuit switched – Packet switched Computer Networks and Internets -- Module 4 15 Spring, 2014 Copyright  2014. All rights reserved.
  • 279. Circuit Switched Networks d Provide point-to-point communication between pairs of endpoints d Establish path between sender and receiver d Separate steps for circuit creation, use, and termination d Performance equivalent to an isolated physical path d Circuit can be – Permanent/ provisioned (left in place for long periods) – Switched (created on demand) d Concept: user leases piece of underlying infrastructure for a time period Computer Networks and Internets -- Module 4 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 280. Packet Switched Networks d Form the basis for the Internet d Multiplex communication over shared media d All data divided into packets (maximum size fixed) d After sending one packet, sender allows others a chance to transmit before sending a second packet d Arbitrary, asynchronous communication d No set-up required before communication begins d Performance varies due to statistical multiplexing d Concept: underlying infrastructure is shared among users Computer Networks and Internets -- Module 4 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 281. Illustration Of Circuit And Packet Switching d Circuit switching circuit-switched network Computer Networks and Internets -- Module 4 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 282. Illustration Of Circuit And Packet Switching d Circuit switching provides 1-to-1 dedicated connections circuit-switched network Computer Networks and Internets -- Module 4 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 283. Illustration Of Circuit And Packet Switching d Circuit switching provides 1-to-1 dedicated connections circuit-switched network d Packet switching 1 2 1 2 3 . . . packet-switched network Computer Networks and Internets -- Module 4 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 284. Illustration Of Circuit And Packet Switching d Circuit switching provides 1-to-1 dedicated connections circuit-switched network d Packet switching provides statistical TDM sharing 1 2 1 2 3 . . . packet-switched network Computer Networks and Internets -- Module 4 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 285. Categories Of Packet Switched Networks 2222222222222222222222222222222222222222222222222222222222222222222222 Name Expansion Description 2222222222222222222222222222222222222222222222222222222222222222222222 LAN Local Area Network Least expensive; spans a single room or a single building 2222222222222222222222222222222222222222222222222222222222222222222222 MAN Metropolitan Area Network Medium expense; spans a major city or a metroplex 2222222222222222222222222222222222222222222222222222222222222222222222 WAN Wide Area Network Most expensive; spans sites in multiple cities 2222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 286. Categories Of Packet Switched Networks 2222222222222222222222222222222222222222222222222222222222222222222222 Name Expansion Description 2222222222222222222222222222222222222222222222222222222222222222222222 LAN Local Area Network Least expensive; spans a single room or a single building 2222222222222222222222222222222222222222222222222222222222222222222222 MAN Metropolitan Area Network Medium expense; spans a major city or a metroplex 2222222222222222222222222222222222222222222222222222222222222222222222 WAN Wide Area Network Most expensive; spans sites in multiple cities 2222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d Everyone loves names that end in “AN” 2222222222222222222222222222222222222222222222222222222222222222222222222 Name Expansion Description 2222222222222222222222222222222222222222222222222222222222222222222222222 PAN Personal Area Network Spans the area around an individual used for earphones 2222222222222222222222222222222222222222222222222222222222222222222222222 SAN Storage Area Network Spans the distance between a disk farm and processors in a data center 2222222222222222222222222222222222222222222222222222222222222222222222222 CAN Chip Area Network Spans a single chip and connects processor, memories, etc. 2222222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 287. Standards Bodies And Their Bias d Standards bodies and academic departments each emphasize certain layers of a protocol stack, leading to the following views Application Transport Internet Data Link Physical APPLICATION TRANSPORT INTERNET DATA LINK PHYSICAL textbooks W3C IETF IEEE Computer Networks and Internets -- Module 4 20 Spring, 2014 Copyright  2014. All rights reserved.
  • 288. IEEE 802 Model And Standards d IEEE (Institute of Electrical and Electronics Engineers) – Professional society of engineers – Standardizes vendor-independent technologies d Project 802 – LAN/ MAN standards committee – Organized in 1980 – Focuses on layer 1 and layer 2 standards – Divides layer 2 into two sublayers * Logical Link Control (LLC) * Media Access Control (MAC) Computer Networks and Internets -- Module 4 21 Spring, 2014 Copyright  2014. All rights reserved.
  • 289. Example IEEE Standards 2 2222222222222222222222222222222222222222222222222222222222 ID Topic 2 2222222222222222222222222222222222222222222222222222222222 802.1 Higher layer LAN protocols 2 2222222222222222222222222222222222222222222222222222222222 802.2 Logical link control 2 2222222222222222222222222222222222222222222222222222222222 802.3 Ethernet 2 2222222222222222222222222222222222222222222222222222222222 802.4 Token bus (disbanded) 2 2222222222222222222222222222222222222222222222222222222222 802.5 Token Ring 2 2222222222222222222222222222222222222222222222222222222222 802.6 Metropolitan Area Networks (disbanded) 2 2222222222222222222222222222222222222222222222222222222222 802.7 Broadband LAN using Coaxial Cable (disbanded) 2 2222222222222222222222222222222222222222222222222222222222 802.9 Integrated Services LAN (disbanded) 2 2222222222222222222222222222222222222222222222222222222222 802.10 Interoperable LAN Security (disbanded) 2 2222222222222222222222222222222222222222222222222222222222 802.11 Wireless LAN (Wi-Fi) 2 2222222222222222222222222222222222222222222222222222222222 802.12 Demand priority 2 2222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 22 Spring, 2014 Copyright  2014. All rights reserved.
  • 290. More Example IEEE Standards 222222222222222222222222222222222222222222222222 ID Topic 222222222222222222222222222222222222222222222222 802.13 Category 6 - 10Gb LAN 222222222222222222222222222222222222222222222222 802.14 Cable modems (disbanded) 222222222222222222222222222222222222222222222222 802.15 Wireless PAN 802.15.1 (Bluetooth) 802.15.4 (ZigBee) 222222222222222222222222222222222222222222222222 802.16 Broadband Wireless Access 802.16e (Mobile) Broadband Wireless 222222222222222222222222222222222222222222222222 802.17 Resilient packet ring 222222222222222222222222222222222222222222222222 802.18 Radio Regulatory TAG 222222222222222222222222222222222222222222222222 802.19 Coexistence TAG 222222222222222222222222222222222222222222222222 802.20 Mobile Broadband Wireless Access 222222222222222222222222222222222222222222222222 802.21 Media Independent Handoff 222222222222222222222222222222222222222222222222 802.22 Wireless Regional Area Network 222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 23 Spring, 2014 Copyright  2014. All rights reserved.
  • 291. Standards Define d Network topology (shape) d Endpoint addressing scheme d Frame (packet) format d Media access mechanism d Physical layer aspects and wiring Computer Networks and Internets -- Module 4 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 292. Illustration Of The Four LAN Topologies Bus Ring Mesh Star d Each topology has advantages and disadvantages Computer Networks and Internets -- Module 4 25 Spring, 2014 Copyright  2014. All rights reserved.
  • 293. Endpoint Addressing Scheme d Each station on a LAN is assigned a unique address d Each packet specifies a destination address d LAN hardware uses the address in a packet to determine which station(s) receive a copy Computer Networks and Internets -- Module 4 26 Spring, 2014 Copyright  2014. All rights reserved.
  • 294. IEEE Standard For Addressing d Formal name: IEEE Media Access Control address (MAC address) d Informally called an Ethernet address d Each address is 48 bits long d Assigned to Network Interface Card (NIC) when device manufactured d Divided into subfields – 3-byte Organizationally Unique ID (OUI) – 3-byte Network Interface Controller (NIC) Computer Networks and Internets -- Module 4 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 295. Illustration Of Fields In An IEEE 48-Bit Address Network Interface Controller (NIC) specific Organizationally Unique Identifier (OUI) 8 7 6 5 4 3 2 1 3 bytes 3 bytes bits of most significant byte 0 → unicast, 1→ multicast 0 → global, 1→ local d Address types 2 22222222222222222222222222222222222222222222222222222222222222222222 Address Type Meaning And Packet Delivery 2 22222222222222222222222222222222222222222222222222222222222222222222 unicast Destination is a single computer; only that computer should receive a copy of the packet 2 22222222222222222222222222222222222222222222222222222222222222222222 broadcast Destination is all computers on a network; they should each receive a copy of the packet 2 22222222222222222222222222222222222222222222222222222222222222222222 multicast A subset of the computers on a network should receive a copy of the packet 2 22222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 28 Spring, 2014 Copyright  2014. All rights reserved.
  • 296. Algorithm For Processing An Incoming Packet Purpose: Handle a packet that has arrived over a LAN Method: Extract destination address, D, from the packet; if ( D matches “my address” ) { accept and process the packet; } else if ( D matches the broadcast address ) { accept and process the packet; } else if ( D matches one of the multicast addresses for a multicast group of which I am a member ) { accept and process the packet; } else { ignore the packet; } 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 222222222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 4 29 Spring, 2014 Copyright  2014. All rights reserved.
  • 297. Frame Format d Layer 2 packet is called a frame d General layout of a frame HEADER PAYLOAD optional prelude optional postlude d Header usually has fixed fields d Each technology imposes a maximum payload size d Note: we will see specific frame formats later Computer Networks and Internets -- Module 4 30 Spring, 2014 Copyright  2014. All rights reserved.
  • 298. Framing And Serial Communications Systems Computer Networks and Internets -- Module 4 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 299. Framing And Serial Communications Systems d Consider sending packets over a leased circuit Computer Networks and Internets -- Module 4 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 300. Framing And Serial Communications Systems d Consider sending packets over a leased circuit d Circuit hardware either provides a stream of bits or a stream of bytes (characters) d We will consider hardware that provides a byte stream – No frame boundaries – Any 8-bit value can appear in the data Computer Networks and Internets -- Module 4 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 301. Framing And Serial Communications Systems d Consider sending packets over a leased circuit d Circuit hardware either provides a stream of bits or a stream of bytes (characters) d We will consider hardware that provides a byte stream – No frame boundaries – Any 8-bit value can appear in the data d How can we send packets over such a system? d Answer: sender and receiver must agree on framing Computer Networks and Internets -- Module 4 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 302. Example Framing Used With A Leased Circuit d Use SOH and EOT characters to mark the start and end of a frame SOH EOT HEADER PAYLOAD 6 bytes arbitrary bytes Computer Networks and Internets -- Module 4 32 Spring, 2014 Copyright  2014. All rights reserved.
  • 303. Example Framing Used With A Leased Circuit d Use SOH and EOT characters to mark the start and end of a frame SOH EOT HEADER PAYLOAD 6 bytes arbitrary bytes d Use byte stuffing within the payload 2 2222222222222222222222222222222222 Byte In Payload Sequence Sent 2 2222222222222222222222222222222222 SOH ESC A 2 2222222222222222222222222222222222 EOT ESC B 2 2222222222222222222222222222222222 ESC ESC C 2 2222222222222222222222222222222222 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 32 Spring, 2014 Copyright  2014. All rights reserved.
  • 304. Illustration Of Byte Stuffing ESC SOH EOT ESC ESC C ESC A ESC B ESC C original data stuffed data d Internet uses SLIP or PPP (standards) for transmission over serial circuits d Bit stuffing techniques are also available for systems that transfer a stream of bits Computer Networks and Internets -- Module 4 33 Spring, 2014 Copyright  2014. All rights reserved.
  • 306. MAC Protocols d Control access to shared medium d Two types of channel allocation – Static – Dynamic d General principle: Static channel allocation suffices when the set of communicating entities is known in advance and does not change; most networks require a form of dynamic channel allocation. Computer Networks and Internets -- Module 4 35 Spring, 2014 Copyright  2014. All rights reserved.
  • 307. Taxonomy Of Media Access Mechanisms Reservation Polling Token passing ALOHA CSMA / CD CSMA / CA FDMA TDMA CDMA Controlled Access Protocols Random Access Protocols Channelization Protocols Multi-Access Protocols Computer Networks and Internets -- Module 4 36 Spring, 2014 Copyright  2014. All rights reserved.
  • 308. Channelization Protocols d Employ and extend basic multiplexing techniques d May be static or dynamic d Three basic types 222222222222222222222222222222222222222222222 Protocol Expansion 222222222222222222222222222222222222222222222 FDMA Frequency Division Multi-Access 222222222222222222222222222222222222222222222 TDMA Time Division Multi-Access 222222222222222222222222222222222222222222222 CDMA Code Division Multi-Access 222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 37 Spring, 2014 Copyright  2014. All rights reserved.
  • 309. Controlled Access Protocols d Three principal forms 2 2222222222222222222222222222222222222222222222222222222222222222 Type Description 2 2222222222222222222222222222222222222222222222222222222222222222 Polling Centralized controller repeatedly polls stations and allows each to transmit one packet 2 2222222222222222222222222222222222222222222222222222222222222222 Reservation Stations submit a request for the next round of data transmission 2 2222222222222222222222222222222222222222222222222222222222222222 Token Passing Stations circulate a token; each time it receives the token, a station transmits one packet 2 2222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d All three have been used in practice Computer Networks and Internets -- Module 4 38 Spring, 2014 Copyright  2014. All rights reserved.
  • 310. Algorithm For Polled Access Purpose: Control transmission of packets through polling Method: Controller repeats forever { Select a station, S, and send a polling message to S; Wait for S to respond by sending a packet or passing; } 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 4 39 Spring, 2014 Copyright  2014. All rights reserved.
  • 311. Algorithm For Reservation-Based Access d Often used with satellite systems d Stations inform a controller if they have data to send Purpose: Control transmission of packets through reservation Method: Controller repeats forever { Form a list of stations that have a packet to send; Allow each station on the list to transmit; } 11 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 4 40 Spring, 2014 Copyright  2014. All rights reserved.
  • 312. Algorithm For Token Passing Access d Special packet known as a token passed among senders d Station sends one packet each time token arrives Purpose: Control transmission of packets through token passing Method: Each computer on the network repeats { Wait for the token to arrive; Transmit a packet if one is waiting to be sent; Send the token to the next station; } 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 4 41 Spring, 2014 Copyright  2014. All rights reserved.
  • 313. Example Random Access Protocols 22222222222222222222222222222222222222222222222222222222222222222222 Type Description 22222222222222222222222222222222222222222222222222222222222222222222 ALOHA Historic protocol used in an early radio network in Hawaii; popular in textbooks and easy to analyze, but not used in real networks 22222222222222222222222222222222222222222222222222222222222222222222 CSMA / CD Carrier Sense Multi-Access with Collision Detection The basis for the original Ethernet, and the most widely used random access protocol 22222222222222222222222222222222222222222222222222222222222222222222 CSMA / CA Carrier Sense Multi-Access with Collision Avoidance The basis for Wi-Fi wireless networks 22222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 42 Spring, 2014 Copyright  2014. All rights reserved.
  • 314. Aloha d Used in early network in Hawaii (ALOHAnet) d Two carrier frequencies, inbound and outbound d Central transmitter rebroadcast each incoming packet central transmitter outbound frequency inbound frequency outlying station d If inbound packets collide, each sender waits a random time and retransmits d Channel utilization under 20% Computer Networks and Internets -- Module 4 43 Spring, 2014 Copyright  2014. All rights reserved.
  • 315. CSMA / CD d Used in original Ethernet (1973) d Provides access to shared medium d Principle features – Carrier Sense (CS) – Multiple Access (MA) – Collision Detection (CD) d Uses binary exponential backoff Computer Networks and Internets -- Module 4 44 Spring, 2014 Copyright  2014. All rights reserved.
  • 316. CSMA / CD Algorithm Method: When a packet is ready, perform CS (wait for access); Delay for the interpacket gap; Set variable x to the standard backoff range, d ; Attempt to transmit the packet and perform CD; While (collision occurred during transmission) { Choose q to be a random delay between 0 and x ; Delay for q microseconds; Double x in case needed for the next round; Attempt to retransmit the packet and perform CD; } 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 4 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 317. CSMA / CA d Alternative to CSMA / CD d Used in wireless networks (Wi-Fi) d Needed because signals have limited distance, δ d Example: computer 1 cannot receive transmission when computers 2 and 3 communicate computer 1 computer 2 computer 3 δ δ d All computers in range of computers 2 and 3 must be informed that a transmission will occur Computer Networks and Internets -- Module 4 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 318. Illustration Of CSMA / CA 1: ready to send (RTS) 2: clear to send (CTS) 2: clear to send (CTS) 3: packet transmission computer 1 computer 2 computer 3 d Communicating pair exchange RTS and CTS before packet transmission d Any computer less than δ away from either computer 2 or 3 hears at least one of the RTS / CTS messages Computer Networks and Internets -- Module 4 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 320. Wired LAN Technologies Computer Networks and Internets -- Module 4 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 321. Wired LAN Technologies d Explosion of technologies and products during 1980s Computer Networks and Internets -- Module 4 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 322. Wired LAN Technologies d Explosion of technologies and products during 1980s d Consolidation during the 1990s Computer Networks and Internets -- Module 4 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 323. Wired LAN Technologies d Explosion of technologies and products during 1980s d Consolidation during the 1990s d Currently: one de facto wired LAN standard Ethernet Computer Networks and Internets -- Module 4 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 324. Ethernet Technology d Invented at Xerox PARC in 1973 d Standardized by Digital, Intel, and Xerox (DIX) in 1978 d Frame has a 14-byte header followed by payload of 46 to 1500 bytes d Frame format and addressing have survived virtually unchanged header 46 - 1500 bytes of payload 6-byte destination address 6-byte source address 2-byte type header details 4-byte CRC Computer Networks and Internets -- Module 4 50 Spring, 2014 Copyright  2014. All rights reserved.
  • 325. Ethernet Address Filtering d Recall: station accepts a copy of the frame if destination address matches – The station’s unicast address – The broadcast address (all 1s) – A multicast address to which station is listening d Other frames are ignored d Promiscuous mode allows a station to receive all frames regardless of address – Basis of protocol analyzer software such as Wireshark Computer Networks and Internets -- Module 4 51 Spring, 2014 Copyright  2014. All rights reserved.
  • 326. Question If one is looking at the bits of an Ethernet frame as the frame is transmitted across a wire, which bit specifies whether the frame has been sent to a unicast destination address? Hint: look at the 48-bit MAC address format, the Ethernet header format and the byte and bit ordering (Module 2). Computer Networks and Internets -- Module 4 52 Spring, 2014 Copyright  2014. All rights reserved.
  • 327. Frame Type Field d 2-octet field in frame header d Set by sender to identify contents of frame d Used by receiver to determine how to process the frame d Values are standardized d Examples: – Type 0x0800 used for IPv4 datagram – Type 0x86DD used for IPv6 datagram – Type 0x0806 used for ARP Computer Networks and Internets -- Module 4 52 Spring, 2014 Copyright  2014. All rights reserved.
  • 328. Illustration Of Frame Demultiplexing IPv4 module IPv6 module 0800 86DD frame arrives demultiplexing d Performed when frame arrives d Usually handled by protocol software d Frame type field examined and frame passed to appropriate protocol module; unrecognized types are discarded Computer Networks and Internets -- Module 4 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 329. IEEE’s Version Of Ethernet d Standardized in 1983 as IEEE standard 802.3 d Not widely adopted d Header type field reinterpreted as a frame length d Eight bytes of payload occupied by LLC / SNAP header header new hdr. 46 - 1492 bytes of payload 48-bit destination address 48-bit source address 16-bit length IEEE LLC / SNAP Header 24-bit LLC 24-bit OUI 16-bit type 4-byte CRC Computer Networks and Internets -- Module 4 54 Spring, 2014 Copyright  2014. All rights reserved.
  • 330. Ethernet Wiring d Evolved through three generations – Thicknet – Thinnet – Twisted pair d Illustrate a range of possible network wiring schemes Computer Networks and Internets -- Module 4 55 Spring, 2014 Copyright  2014. All rights reserved.
  • 331. Illustration Of Thicknet Wiring thick Ethernet cable computer with NIC AUI cable transceiver terminator d Heavy coaxial cable typically in the ceiling d Each computer attached to the cable Computer Networks and Internets -- Module 4 56 Spring, 2014 Copyright  2014. All rights reserved.
  • 332. Illustration Of Thinnet Wiring computer with NIC terminator Thinnet cable d Flexible coaxial cable d Connections run point-to-point among computers d Disadvantage: user can disconnect the network Computer Networks and Internets -- Module 4 57 Spring, 2014 Copyright  2014. All rights reserved.
  • 333. Illustration Of Twisted Pair Ethernet Wiring computer with NIC hub twisted pair wiring d Unshielded or shielded twisted pairs using RJ45 connectors d Multiple pairs allows full-duplex operation d Each computer connects to central hub d Topology is physical star, but logical bus d Hub is known as “bus in a box” Computer Networks and Internets -- Module 4 58 Spring, 2014 Copyright  2014. All rights reserved.
  • 334. Evolution Of Twisted Pair Ethernet Technologies d Several variants of twisted pair Ethernet have been created d Variants differ in data rate and wiring required 2 2222222222222222222222222222222222222222222222222222222 Designation Name Data Rate Cable Used 2 2222222222222222222222222222222222222222222222222222222 Twisted Pair 10BaseT Ethernet 10 Mbps Category 5 2 2222222222222222222222222222222222222222222222222222222 Fast 100BaseT Ethernet 100 Mbps Category 5E 2 2222222222222222222222222222222222222222222222222222222 Gigabit 1000BaseT Ethernet 1 Gbps Category 6 2 2222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 59 Spring, 2014 Copyright  2014. All rights reserved.
  • 336. Wireless Networks d Many types exist d Technologies differ in – Distance spanned – Data rates – Physical characteristics of electromagnetic energy * Ability to permeate obstructions like walls * Susceptibility to interference – Isolated channel vs. shared channel Computer Networks and Internets -- Module 4 61 Spring, 2014 Copyright  2014. All rights reserved.
  • 337. A Taxonomy Of Wireless Networks d We use a basic taxonomy to help classify wireless technologies Local Area Networks (LANs) Metropolitan Area Networks (MANs) Wide Area Networks (WANs) Personal Area Networks (PANs) Wireless Networks d Note: the terminology is qualitative because some technologies span multiple categories Computer Networks and Internets -- Module 4 62 Spring, 2014 Copyright  2014. All rights reserved.
  • 338. Personal Area Network (PAN) d Terminology used primarily with wireless networks d Spans short distance d Dedicated to a single user (not shared) Computer Networks and Internets -- Module 4 63 Spring, 2014 Copyright  2014. All rights reserved.
  • 339. Personal Area Network (PAN) d Terminology used primarily with wireless networks d Spans short distance d Dedicated to a single user (not shared) d Example PAN technologies 2 22222222222222222222222222222222222222222222222222222222222222222222 Type Purpose 2 22222222222222222222222222222222222222222222222222222222222222222222 Communication over a short distance between a Bluetooth small peripheral device such as a headset or mouse and a system such as a cell phone or a computer 2 22222222222222222222222222222222222222222222222222222222222222222222 Line-of-sight communication between a small device, InfraRed often a hand-held controller, and a nearby system such as a computer or entertainment center 2 22222222222222222222222222222222222222222222222222222222222222222222 Communication over distances about as large as a ZigBee residence, which allows electrical appliances to connect to the Smart Grid 2 22222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 63 Spring, 2014 Copyright  2014. All rights reserved.
  • 340. ISM Wireless Bands d ISM stands for Industrial, Scientific, and Medical d Region of the electromagnetic spectrum available for use without license d Used for wireless LANs and PANs (e.g., cordless phones) d Three separate bands 902 MHz 928 MHz 2.4 GHz 2.484 GHz 5.725 GHz 5.850 GHz 26 MHz bandwidth 83.6 MHz bandwidth 125 MHz bandwidth Unlicensed does not mean unregulated. Computer Networks and Internets -- Module 4 64 Spring, 2014 Copyright  2014. All rights reserved.
  • 341. Wireless LANs And Wi-Fi d Variety of wireless LANs have been created d Vendors moved to open standards in 1990s, with IEEE providing most of the standards under 802.11 d In 1999, vendors formed Wi-Fi Alliance Computer Networks and Internets -- Module 4 65 Spring, 2014 Copyright  2014. All rights reserved.
  • 342. Wireless LANs And Wi-Fi d Variety of wireless LANs have been created d Vendors moved to open standards in 1990s, with IEEE providing most of the standards under 802.11 d In 1999, vendors formed Wi-Fi Alliance d Example IEEE wireless standards 22222222222222222222222222222222222222222222222222222222222222222222222 IEEE Frequency Data Modulation Multiplexing Standard Band Rate Technique Technique 22222222222222222222222222222222222222222222222222222222222222222222222 original 2.4 GHz 1 or 2 Mbps FSK DSSS 222222222222222222222222222222222222222222222222222222222222 802.11 2.4 GHz 1 or 2 Mbps FSK FHSS 222222222222222222222222222222222222222222222222222222222222 InfraRed 1 or 2 Mbps PPM – none – 22222222222222222222222222222222222222222222222222222222222222222222222 802.11b 2.4 GHz 5.5 and 11 Mbps PSK DSSS 22222222222222222222222222222222222222222222222222222222222222222222222 802.11g 2.4 GHz 22 and 54 Mbps various OFDM 22222222222222222222222222222222222222222222222222222222222222222222222 802.11n 2.4 GHz 54 to 600 Mbps various OFDM 22222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 65 Spring, 2014 Copyright  2014. All rights reserved.
  • 343. Spread Spectrum Transmission d Uses multiple frequencies for a single channel d Can increase performance or provide immunity to noise Computer Networks and Internets -- Module 4 66 Spring, 2014 Copyright  2014. All rights reserved.
  • 344. Spread Spectrum Transmission d Uses multiple frequencies for a single channel d Can increase performance or provide immunity to noise d Major spread spectrum techniques 2 2222222222222222222222222222222222222222222222222222222222222222222 Name Expansion Description 2 2222222222222222222222222222222222222222222222222222222222222222222 Direct Similar to CDMA where a sender multiplies DSSS Sequence the outgoing data by a sequence to form Spread multiple frequencies and the receiver Spectrum multiplies by the same sequence to decode 2 2222222222222222222222222222222222222222222222222222222222222222222 Frequency A sender uses a sequence of frequencies FHSS Hopping to transmit data, and a receiver uses the Spread same sequence of frequencies to extract Spectrum data 2 2222222222222222222222222222222222222222222222222222222222222222222 Orthogonal A frequency division multiplexing scheme OFDM Frequency where the transmission band is divided Division into many carriers in such a way that Multiplexing the carriers do not interfere 2 2222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 66 Spring, 2014 Copyright  2014. All rights reserved.
  • 345. More IEEE Wireless LAN Standards 2 222222222222222222222222222222222222222222222222222222222222222222 Standard Purpose 2 222222222222222222222222222222222222222222222222222222222222222222 802.11e Improved quality of service, such as a guarantee of low jitter 2 222222222222222222222222222222222222222222222222222222222222222222 802.11h Like 802.11a, but adds control of spectrum and power (primarily intended for use in Europe) 2 222222222222222222222222222222222222222222222222222222222222222222 802.11i Enhanced security, including Advanced Encryption Standard; the full version is known as WPA2 2 222222222222222222222222222222222222222222222222222222222222222222 802.11k Will provide radio resource management, including transmission power 2 222222222222222222222222222222222222222222222222222222222222222222 802.11n Data rate over 100 Mbps to handle multimedia (video) applications (may be 500 Mbps) 2 222222222222222222222222222222222222222222222222222222222222222222 802.11p Dedicated Short-Range Communication (DSRC) among vehicles on a highway and vehicle-to-roadside 2 222222222222222222222222222222222222222222222222222222222222222222 802.11r Improved ability to roam among access points without losing connectivity 2 222222222222222222222222222222222222222222222222222222222222222222 802.11s Proposed for a mesh network in which a set of nodes automatically form a network and pass packets 2 222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 67 Spring, 2014 Copyright  2014. All rights reserved.
  • 346. Wireless LAN Architecture d IEEE defines two possible modes for wireless LAN communication Computer Networks and Internets -- Module 4 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 347. Wireless LAN Architecture d IEEE defines two possible modes for wireless LAN communication d Infrastructure mode – Wireless devices communicate through an access point (AP) – APs connect to each other and (usually) the Internet – Typical uses: corporate wireless LAN, Internet cafe Computer Networks and Internets -- Module 4 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 348. Wireless LAN Architecture d IEEE defines two possible modes for wireless LAN communication d Infrastructure mode – Wireless devices communicate through an access point (AP) – APs connect to each other and (usually) the Internet – Typical uses: corporate wireless LAN, Internet cafe d Ad hoc mode – Direct communication among wireless devices – Forwarding possible – Seldom used Computer Networks and Internets -- Module 4 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 349. Illustration Of Infrastructure Mode Wireless LAN d Basic Service Set (BSS) for an AP is defined as set of devices that can hear the AP d APs interconnect through wired network BSS #1 BSS #2 BSS #3 AP AP AP access point interconnect such as a switch wireless computer range of access point Computer Networks and Internets -- Module 4 69 Spring, 2014 Copyright  2014. All rights reserved.
  • 350. Practical Considerations And Association d In practice BSSs can overlap (given wireless device can hear more than one AP) BSS #1 BSS #2 BSS #3 switch AP AP AP router to Internet computer in range of two APs d To solve the problem each device associates with one AP at any time Computer Networks and Internets -- Module 4 70 Spring, 2014 Copyright  2014. All rights reserved.
  • 351. Practical Considerations: Wi-Fi Channels Computer Networks and Internets -- Module 4 71 Spring, 2014 Copyright  2014. All rights reserved.
  • 352. Practical Considerations: Wi-Fi Channels d 11 channels defined for North America in 2.4 GHz range Computer Networks and Internets -- Module 4 71 Spring, 2014 Copyright  2014. All rights reserved.
  • 353. Practical Considerations: Wi-Fi Channels d 11 channels defined for North America in 2.4 GHz range d Bad news: 22 MHz bandwidth means channels overlap 1: 2.412 2: 2.417 3: 2.422 4: 2.427 5: 2.432 6: 2.437 7: 2.442 8: 2.447 9: 2.452 10: 2.457 11: 2.462 22 MHz Computer Networks and Internets -- Module 4 71 Spring, 2014 Copyright  2014. All rights reserved.
  • 354. Practical Considerations: Wi-Fi Channels d 11 channels defined for North America in 2.4 GHz range d Bad news: 22 MHz bandwidth means channels overlap 1: 2.412 2: 2.417 3: 2.422 4: 2.427 5: 2.432 6: 2.437 7: 2.442 8: 2.447 9: 2.452 10: 2.457 11: 2.462 22 MHz d Good news: channels 1, 6, and 11 can operate simultaneously with no interference Computer Networks and Internets -- Module 4 71 Spring, 2014 Copyright  2014. All rights reserved.
  • 355. Addresses In 802.11 Frame Format d 802.11 frame is not the same as an Ethernet frame d Each 802.11 frame includes four MAC addresses – Source (e.g., wireless device) – Destination AP (associated AP) – Router along the path to the Internet – Extra address for ad hoc mode CTL DUR Address 1 (destination) Address 2 (source) Address 3 (dest. 2) SEQ Address 4 Payload (0 to 2312 bytes) CRC AP or wireless computer’s MAC sender’s MAC address router’s MAC address used in ad hoc mode Computer Networks and Internets -- Module 4 72 Spring, 2014 Copyright  2014. All rights reserved.
  • 356. Coordination Among Access Points d Coordinated approach – Initial design – Similar to cellular telephone – APs communicate to achieve smooth handoff d Uncoordinated approach – Later alternative – APs do not communicate – Wireless device changes association when communication with an AP lost – Lower overall cost Computer Networks and Internets -- Module 4 73 Spring, 2014 Copyright  2014. All rights reserved.
  • 357. CSMA/ CA Protocol (Review) d Alternative to CSMA/CD used in wireless LANs d Allows stations within range of communicating pair to know when communication starts d Requires exchange of Ready-To-Send (RTS) and Clear-To- Send (CTS) messages d Delay associated with each message to ensure protocol is efficient and correct Computer Networks and Internets -- Module 4 74 Spring, 2014 Copyright  2014. All rights reserved.
  • 358. CSMA/ CA Protocol Details d SIFS — Short Inter-Frame Space of 10 µsec d DIFS — Distributed Inter-Frame Space of 50 µsec d Slot Time of 20 µsec time time DIFS RTS SIFS CTS SIFS data SIFS ACK Computer Networks and Internets -- Module 4 75 Spring, 2014 Copyright  2014. All rights reserved.
  • 359. Wireless MAN Technology (WiMax) d WiMax standard, IEEE 802.16, provides two types – Fixed (802.16-2004) — endpoint does not move – Mobile (802.16e-2005) — endpoint moves d Uses 2 2222222222222222222222222222222222222222222222222222 Access – Last-mile alternative to DSL or cable modems – High-speed interconnection for nomadic users – Unified data and telecommunications access – As a backup for a site’s Internet connection 2 2222222222222222222222222222222222222222222222222222 Interconnect – Backhaul from Wi-Fi access points to a provider – Private connections among sites of a company – Connection between small and large ISPs 2 2222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 76 Spring, 2014 Copyright  2014. All rights reserved.
  • 360. Illustration Of WiMax Uses d Fixed type of WiMax used for high-capacity backhaul requires Line-Of-Sight (LOS) service provider LOS backhaul NLOS access Wi-Fi region wired connection Computer Networks and Internets -- Module 4 77 Spring, 2014 Copyright  2014. All rights reserved.
  • 361. Standards For Wireless PANs d Used in industrial as well as consumer products d Remote control protocols optimized for short commands (do not need high data rate) 2 222222222222222222222222222222222222222222222222222222222222222222222 Standard Purpose 2 222222222222222222222222222222222222222222222222222222222222222222222 802.15.1a Bluetooth technology (1 Mbps; 2.4 GHz) 2 222222222222222222222222222222222222222222222222222222222222222222222 802.15.2 Coexistence among PANs (noninterference) 2 222222222222222222222222222222222222222222222222222222222222222222222 802.15.3 High rate PAN (55 Mbps; 2.4 GHz) 2 222222222222222222222222222222222222222222222222222222222222222222222 802.15.3a Ultra Wideband (UWB) high rate PAN (110 Mbps; 2.4 GHz) 2 222222222222222222222222222222222222222222222222222222222222222222222 802.15.4 ZigBee technology – low data rate PAN for remote control 2 222222222222222222222222222222222222222222222222222222222222222222222 802.15.4a Alternative low data rate PAN that uses low power 2 222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 78 Spring, 2014 Copyright  2014. All rights reserved.
  • 362. Other Short-Distance Wireless Technologies Computer Networks and Internets -- Module 4 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 363. Other Short-Distance Wireless Technologies d Infrared Data Association (IrDA) – Family of standards (data rate of 2.4 Kbps to 16 Mbps) – Range of several meters – Directional transmission with cone covering 30 degrees – Generally low power consumption Computer Networks and Internets -- Module 4 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 364. Other Short-Distance Wireless Technologies d Infrared Data Association (IrDA) – Family of standards (data rate of 2.4 Kbps to 16 Mbps) – Range of several meters – Directional transmission with cone covering 30 degrees – Generally low power consumption d Radio Frequency IDentification (RFID) tags – Over 140 RFID standards exist – Passive RFID tags draw power from reader’s signal – Active RFID tags contain a multi-year battery – Frequencies from less than 100 MHz to 868-954 MHz Computer Networks and Internets -- Module 4 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 365. Wireless WAN Technologies d Cellular communication systems d Satellite communication systems Computer Networks and Internets -- Module 4 80 Spring, 2014 Copyright  2014. All rights reserved.
  • 366. Cellular Telephones And Data Networking d There are more cell phones in the world than computers d The smart phone is now the network interface of choice in emerging countries d Cell phone providers have switched to the Internet protocols Computer Networks and Internets -- Module 4 81 Spring, 2014 Copyright  2014. All rights reserved.
  • 367. Cellular Telephones And Data Networking d There are more cell phones in the world than computers d The smart phone is now the network interface of choice in emerging countries d Cell phone providers have switched to the Internet protocols all Computer Networks and Internets -- Module 4 81 Spring, 2014 Copyright  2014. All rights reserved.
  • 368. Current Cellular System Architecture d Cell has a tower that connects to mobile switching system d Each mobile switching system connects to PSTN or Internet . . . . . . Public Switched Telephone Network plus a connection to the Internet wired connection Mobile Switching Centers cell d Handoff decision made by infrastructure Computer Networks and Internets -- Module 4 81 Spring, 2014 Copyright  2014. All rights reserved.
  • 369. Theoretical And Actual Cells theoretical Computer Networks and Internets -- Module 4 82 Spring, 2014 Copyright  2014. All rights reserved.
  • 370. Theoretical And Actual Cells actual theoretical d Problems include: overlap and gaps Computer Networks and Internets -- Module 4 82 Spring, 2014 Copyright  2014. All rights reserved.
  • 371. Cell Size And Expected Cell Phone Density d Textbook diagrams show equal-size cells d In practice, cell size related to expected number of cell phones d Smaller cells used in high-population areas d Larger cells used in rural areas Computer Networks and Internets -- Module 4 83 Spring, 2014 Copyright  2014. All rights reserved.
  • 372. Frequency Assignment Computer Networks and Internets -- Module 4 84 Spring, 2014 Copyright  2014. All rights reserved.
  • 373. Frequency Assignment d Goal: minimize interference Computer Networks and Internets -- Module 4 84 Spring, 2014 Copyright  2014. All rights reserved.
  • 374. Frequency Assignment d Goal: minimize interference d Principle Interference can be minimized if an adjacent pair of cells do not use the same frequency. Computer Networks and Internets -- Module 4 84 Spring, 2014 Copyright  2014. All rights reserved.
  • 375. Frequency Assignment d Goal: minimize interference d Principle Interference can be minimized if an adjacent pair of cells do not use the same frequency. d Method: devise an assignment of frequencies such that two adjacent cells are not assigned the same frequency Computer Networks and Internets -- Module 4 84 Spring, 2014 Copyright  2014. All rights reserved.
  • 376. Frequency Assignment d Goal: minimize interference d Principle Interference can be minimized if an adjacent pair of cells do not use the same frequency. d Method: devise an assignment of frequencies such that two adjacent cells are not assigned the same frequency d Technique: create a pattern that can be repeated Computer Networks and Internets -- Module 4 84 Spring, 2014 Copyright  2014. All rights reserved.
  • 377. Frequency Assignment d Goal: minimize interference d Principle Interference can be minimized if an adjacent pair of cells do not use the same frequency. d Method: devise an assignment of frequencies such that two adjacent cells are not assigned the same frequency d Technique: create a pattern that can be repeated d Known as a cluster approach Computer Networks and Internets -- Module 4 84 Spring, 2014 Copyright  2014. All rights reserved.
  • 378. Example Clusters That Are Used 3-cell 4-cell 7-cell 12-cell d Each cell in cluster assigned a unique frequency d When replicated, clusters cover 2-dimensional surface d Mathematically, the concept is tiling the plane Computer Networks and Internets -- Module 4 85 Spring, 2014 Copyright  2014. All rights reserved.
  • 379. Illustration Of Cluster Replication A B C D E F G A B C D E F G A B C D E F G A B C D E F G A B C D E F G A B C D E F G A B C D E F G A B C D E F G A B C D E F G d No pair of adjacent cells assigned the same frequency Computer Networks and Internets -- Module 4 86 Spring, 2014 Copyright  2014. All rights reserved.
  • 380. Four Generations Of Cellular Networks d 1G used analog (1970s - 1980s) d 2G and 2.5G use digital signals for voice (1990s-) d 3G and 3.5G also include data transfer at rates of 400 Kbps through 2 Mbps (2000s-) d 4G offers higher data rates and support for real-time multimedia such as television (2008-) Computer Networks and Internets -- Module 4 87 Spring, 2014 Copyright  2014. All rights reserved.
  • 381. Cellular Technologies d Many competing standards d European Conference Of Postal and Telecommunications Administrators chose a TDMA technology known as Global System for Mobile Communications (GSM) for Europe d In US, each carrier created its own standards – Motorola created iDEN using TDMA – Others adopted IS-95A, which uses CDMA d Japan chose PDC, which uses TDMA Computer Networks and Internets -- Module 4 88 Spring, 2014 Copyright  2014. All rights reserved.
  • 382. Summary Of 2G Wireless Standards 2 2222222222222222222222222222222222222222222 Approach Standard Generation 2 2222222222222222222222222222222222222222222 GSM 2G 2 2222222222222222222222222222222 GPRS 2.5G 2 2222222222222222222222222222222 GSM EDGE (EGPRS) 2.5G 2 2222222222222222222222222222222 EDGE Evolution 2.5G 2 2222222222222222222222222222222 HSCSD 2.5G 2 2222222222222222222222222222222222222222222 CDMA IS-95A 2G 2 2222222222222222222222222222222 IS-95B 2.5G 2 2222222222222222222222222222222222222222222 TDMA iDEN 2G 2 2222222222222222222222222222222 IS-136 2G 2 2222222222222222222222222222222 PDC 2G 2 2222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d Note: 2.5G standards extend 2G standards by adding some features of 3G Computer Networks and Internets -- Module 4 89 Spring, 2014 Copyright  2014. All rights reserved.
  • 383. Third Generation Standards d 2G standards were consolidated and extended: 222222222222222222222222222222222222222222222222222222 Approach Standard Successor To 222222222222222222222222222222222222222222222222222222 WCDMA UMTS IS-136, IS-95A, EDGE, PDC 222222222222 HSDPA UMTS 222222222222222222222222222222222222222222222222222222 1xRTT IS-95B 2222222222222222222222222222222222222222 CDMA 2000 EVDO 1xRTT 2222222222222222222222222222222222222222 EVDV 1xRTT 222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d EVDO and EVDV data transfer standards evolved at approximately the same time to deliver data at 2.4 Mbps or 3.1 Mbps d HSDPA can achieve 14 Mbps Computer Networks and Internets -- Module 4 90 Spring, 2014 Copyright  2014. All rights reserved.
  • 384. Fourth Generation Standards d Initially, the ITU insisted on high performance before using the term 4G d Eventually, the ITU allowed intermediate technologies “to be advertised” as 4G 2222222222222222222222222222222222222222222222222222222222222222 Classification Standard 2222222222222222222222222222222222222222222222222222222222222222 Can be advertised as 4G HSPA+, HTC Evo 4G, LTE, WiMAX 2222222222222222222222222222222222222222222222222222222222222222 Adheres to IMT-Advanced LTE Advanced, WiMAX Advanced 2222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 1 Computer Networks and Internets -- Module 4 91 Spring, 2014 Copyright  2014. All rights reserved.
  • 385. Review Of Satellite Types d Low Earth Orbit (LEO) – Appears to move across the sky – Requires a cluster of 66 satellites to cover the earth surface d Medium Earth Orbit (MEO) – Covers the poles – Seldom used for general communication d Geostationary Earth Orbit (GEO) – Appears to remain stationary in the sky – Requires only three satellites to cover the earth’s surface Computer Networks and Internets -- Module 4 92 Spring, 2014 Copyright  2014. All rights reserved.
  • 386. GEO Coverage Of The Earth’s surface d In the best case, only three satellites needed EARTH satellites satellite coverage (footprint) d Surface area covered known as footprint d Ratio of distance to earth’s diameter approximately to scale Computer Networks and Internets -- Module 4 93 Spring, 2014 Copyright  2014. All rights reserved.
  • 387. VSAT Satellite Technology d Stands for Very Small Aperture Terminal d Parabolic antenna focuses incoming signal cross section of dish antenna receiver incoming energy d Example use: connect a company’s retail stores Computer Networks and Internets -- Module 4 94 Spring, 2014 Copyright  2014. All rights reserved.
  • 388. Frequency Bands Used With VSAT Technology d Multiple bands available d Each band has disadvantages 222222222222222222222222222222222222222222222222222222222222222222222 Band Frequency Footprint Signal Strength Effect Of Rain 222222222222222222222222222222222222222222222222222222222222222222222 C Band 3 - 7 GHz Large Low Medium 222222222222222222222222222222222222222222222222222222222222222222222 Ku 10 - 18 GHz Medium Medium Moderate 222222222222222222222222222222222222222222222222222222222222222222222 Ka 18 - 31 GHz Small High Severe 222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 4 95 Spring, 2014 Copyright  2014. All rights reserved.
  • 389. Global Positioning System (GPS) Computer Networks and Internets -- Module 4 96 Spring, 2014 Copyright  2014. All rights reserved.
  • 390. Global Positioning System (GPS) d 24 satellites Computer Networks and Internets -- Module 4 96 Spring, 2014 Copyright  2014. All rights reserved.
  • 391. Global Positioning System (GPS) d 24 satellites d Arranged in 6 orbital planes Computer Networks and Internets -- Module 4 96 Spring, 2014 Copyright  2014. All rights reserved.
  • 392. Global Positioning System (GPS) d 24 satellites d Arranged in 6 orbital planes d Civilian version has accuracy between 20 and 2 meters Computer Networks and Internets -- Module 4 96 Spring, 2014 Copyright  2014. All rights reserved.
  • 393. Global Positioning System (GPS) d 24 satellites d Arranged in 6 orbital planes d Civilian version has accuracy between 20 and 2 meters d Relevance to data networking Computer Networks and Internets -- Module 4 96 Spring, 2014 Copyright  2014. All rights reserved.
  • 394. Global Positioning System (GPS) d 24 satellites d Arranged in 6 orbital planes d Civilian version has accuracy between 20 and 2 meters d Relevance to data networking – Provides accurate time – Can be used to synchronize remote points in a data network (needed by some protocols) Computer Networks and Internets -- Module 4 96 Spring, 2014 Copyright  2014. All rights reserved.
  • 395. Software Defined Radio d Also known as a software programmable radio d New approach emerging from research d Exciting possibilities d Replaces fixed radio components with mechanism that can be controlled by a programmable processor d Can make better use of spectrum d Potential downside: user might choose parameters that interfere with police or emergency vehicles Computer Networks and Internets -- Module 4 97 Spring, 2014 Copyright  2014. All rights reserved.
  • 396. Features Controlled In A Software Radio 2 2222222222222222222222222222222222222222222222222222222222222222222222 Feature Description 2 2222222222222222222222222222222222222222222222222222222222222222222222 Frequency The exact set of frequencies used at a given time 2 2222222222222222222222222222222222222222222222222222222222222222222222 Power The amount of power the transmitter emits 2 2222222222222222222222222222222222222222222222222222222222222222222222 Modulation The signal and channel coding and modulation 2 2222222222222222222222222222222222222222222222222222222222222222222222 Multiplexing Any combination of CDMA, TDMA, FDMA and others 2 2222222222222222222222222222222222222222222222222222222222222222222222 Signal Direction Antennas can be tuned for a specific direction 2 2222222222222222222222222222222222222222222222222222222222222222222222 MAC Protocol All aspects of framing and MAC addressing 2 2222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d Enabling technologies – Tunable analog filters to select frequencies and control power – Multiple antenna management to select direction Computer Networks and Internets -- Module 4 98 Spring, 2014 Copyright  2014. All rights reserved.
  • 397. Multiple Antenna Management d Needed because – No single antenna handles all frequencies – Directional signals important in focusing communication d Multiple-Input Multiple-Output (MIMO) technology can aim transmission or reception Computer Networks and Internets -- Module 4 99 Spring, 2014 Copyright  2014. All rights reserved.
  • 399. Network Design Tradeoffs Computer Networks and Internets -- Module 4 101 Spring, 2014 Copyright  2014. All rights reserved.
  • 400. Network Design Tradeoffs d Network technology engineered for – Distance spanned – Maximum data rate – Cost Computer Networks and Internets -- Module 4 101 Spring, 2014 Copyright  2014. All rights reserved.
  • 401. Network Design Tradeoffs d Network technology engineered for – Distance spanned – Maximum data rate – Cost d LAN technologies maximize data rate and minimize cost Computer Networks and Internets -- Module 4 101 Spring, 2014 Copyright  2014. All rights reserved.
  • 402. Network Design Tradeoffs d Network technology engineered for – Distance spanned – Maximum data rate – Cost d LAN technologies maximize data rate and minimize cost d General principle A maximum length specification is a fundamental part of LAN technology; LAN hardware will not work correctly over wires that exceed the bound. Computer Networks and Internets -- Module 4 101 Spring, 2014 Copyright  2014. All rights reserved.
  • 403. Technologies That Extend LANs d Variety of techniques have been invented to extend LANs d Three key extension technologies – Fiber modems – Repeaters – Bridges Computer Networks and Internets -- Module 4 102 Spring, 2014 Copyright  2014. All rights reserved.
  • 404. Fiber Modems d Communicate over an optical fiber d Can span long distance d Provide standard network interface (e.g., Ethernet) d Can be used to extend connection between computer and network d Illustration of an extended network connection Ethernet hub or switch connection from computer fiber modem fiber modem optical fiber Computer Networks and Internets -- Module 4 103 Spring, 2014 Copyright  2014. All rights reserved.
  • 405. Repeaters d Operate at layer 1 (do not understand packets) d Repeat and amplify signals d Low cost d Example use: extended infrared sensor on a cable box repeater remote sensor Cable box connection to cable box extended connection d Disadvantage: amplifies and repeats noise Computer Networks and Internets -- Module 4 104 Spring, 2014 Copyright  2014. All rights reserved.
  • 407. Bridge d Originally sold as stand-alone device to extend two LAN segments d Operates at layer 2 d Can connect two or more segments d Listens in promiscuous mode on each segment and sends copy of each frame to other segments d Does not copy noise, collisions, or frames that are incorrectly formed d Makes connected segments appear to be a single, large LAN d Uses source MAC address in frames to learn computer locations automatically, and uses destination MAC address to filter frames Computer Networks and Internets -- Module 4 106 Spring, 2014 Copyright  2014. All rights reserved.
  • 408. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 409. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Bridge boots – – – Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 410. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Bridge boots – – – A sends to B A – Both Segments Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 411. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Bridge boots – – – A sends to B A – Both Segments B sends to A A, B – Segment 1 only Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 412. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Bridge boots – – – A sends to B A – Both Segments B sends to A A, B – Segment 1 only X broadcasts A, B X Both Segments Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 413. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Bridge boots – – – A sends to B A – Both Segments B sends to A A, B – Segment 1 only X broadcasts A, B X Both Segments Y sends to A A, B X, Y Both Segments Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 414. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Bridge boots – – – A sends to B A – Both Segments B sends to A A, B – Segment 1 only X broadcasts A, B X Both Segments Y sends to A A, B X, Y Both Segments Y sends to X A, B X, Y Segment 2 only Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 415. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Bridge boots – – – A sends to B A – Both Segments B sends to A A, B – Segment 1 only X broadcasts A, B X Both Segments Y sends to A A, B X, Y Both Segments Y sends to X A, B X, Y Segment 2 only C sends to Z A, B, C X, Y Both Segments Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 416. Illustration Of A Bridge Learning A B C X Y Z hub 1 hub 2 bridge LAN segment Event Segment 1 Segment 2 Frame Sent Bridge boots – – – A sends to B A – Both Segments B sends to A A, B – Segment 1 only X broadcasts A, B X Both Segments Y sends to A A, B X, Y Both Segments Y sends to X A, B X, Y Segment 2 only C sends to Z A, B, C X, Y Both Segments Z sends to X A, B, C X, Y, Z Segment 2 only Computer Networks and Internets -- Module 4 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 417. General Principle Because a bridge permits simultaneous activity on attached segments, a pair of computers on one segment can communicate at the same time as a pair of computers on another segment. d Each segment forms a separate collision domain Computer Networks and Internets -- Module 4 108 Spring, 2014 Copyright  2014. All rights reserved.
  • 418. A Problem With Bridges Computer Networks and Internets -- Module 4 109 Spring, 2014 Copyright  2014. All rights reserved.
  • 419. A Problem With Bridges d A bridge always forwards broadcast and multicast frames Computer Networks and Internets -- Module 4 109 Spring, 2014 Copyright  2014. All rights reserved.
  • 420. A Problem With Bridges d A bridge always forwards broadcast and multicast frames d Consider four bridges used to connect four LAN segments in a loop hub 1 hub 2 hub 3 hub 4 Bridge 1 Bridge 2 Bridge 3 Bridge 4 Computer Networks and Internets -- Module 4 109 Spring, 2014 Copyright  2014. All rights reserved.
  • 421. A Problem With Bridges d A bridge always forwards broadcast and multicast frames d Consider four bridges used to connect four LAN segments in a loop hub 1 hub 2 hub 3 hub 4 Bridge 1 Bridge 2 Bridge 3 Bridge 4 d What happens if a computer attached to one of the segments sends a broadcast frame? Computer Networks and Internets -- Module 4 109 Spring, 2014 Copyright  2014. All rights reserved.
  • 422. A Problem With Bridges d A bridge always forwards broadcast and multicast frames d Consider four bridges used to connect four LAN segments in a loop hub 1 hub 2 hub 3 hub 4 Bridge 1 Bridge 2 Bridge 3 Bridge 4 d What happens if a computer attached to one of the segments sends a broadcast frame? Copies of the frame cycle around the bridges forever! Computer Networks and Internets -- Module 4 109 Spring, 2014 Copyright  2014. All rights reserved.
  • 423. Distributed Spanning Tree d Prevents a packet from circulating around a cycle of bridges d Initial protocol developed by Perlman at Digital Equipment Corporation d Executed by each bridge when the bridge boots d Allows bridges to break a forwarding cycle d Name Spanning Tree Protocol (STP) applies to basic protocol d Many variants have been created with extended names Computer Networks and Internets -- Module 4 110 Spring, 2014 Copyright  2014. All rights reserved.
  • 424. How STP Works d Executed at startup d Distributed algorithm – Each bridge runs it independently – No central coordination d Algorithm guaranteed to converge quickly d No data packets forwarded until STP finishes Computer Networks and Internets -- Module 4 111 Spring, 2014 Copyright  2014. All rights reserved.
  • 425. Steps Taken By STP d Bridges exchange a series of STP messages (frames) that are used to – Elect a root bridge – Select a shortest path to the root d Each bridge disables forwarding broadcast or multicast except along the selected path d Result is a tree Computer Networks and Internets -- Module 4 112 Spring, 2014 Copyright  2014. All rights reserved.
  • 426. Bridging Is Alive And Well d Stand-alone bridge devices are seldom used d Bridge technology is now incorporated into other devices – DSL modems – Cable modems – Wi-Fi “repeaters” – Satellite systems Computer Networks and Internets -- Module 4 113 Spring, 2014 Copyright  2014. All rights reserved.
  • 428. Layer 2 Switch d Physically similar to a layer 2 hub – Network device – Connects multiple computers – Computers appear to be attached to a LAN segment d Logically similar to a set of bridged networks – Switch understands packets, not just signals – No contention, and no need for CSMA / CD – Ports operate in parallel – Switch can include services that examine packets Computer Networks and Internets -- Module 4 115 Spring, 2014 Copyright  2014. All rights reserved.
  • 429. Logical Function Of A Switch switch computers simulated bridge simulated Ethernet segment port on the switch d Switch offers same advantage as bridged networks: multiple transfers can occur simultaneously Computer Networks and Internets -- Module 4 116 Spring, 2014 Copyright  2014. All rights reserved.
  • 430. Actual Switch Architecture switch computers fabric (interconnect) interfaces d Switching fabric used for high throughput Computer Networks and Internets -- Module 4 117 Spring, 2014 Copyright  2014. All rights reserved.
  • 431. Thought Problem Suppose a computer is unplugged from a port on a Layer 2 switch and plugged into another port. Suppose the computer does not send any packets. Will the computer continue to receive unicast frames that are sent to it? Why or why not? Computer Networks and Internets -- Module 4 118 Spring, 2014 Copyright  2014. All rights reserved.
  • 432. Virtual Local Area Network (VLAN) Switch d Physically – Similar to a conventional Layer 2 switch – Has ports to which computer can connect d Logically – Manager can configure one or more broadcast domains – Each port assigned to one broadcast domain d Frame sent to broadcast or multicast address only propagated to ports in the same broadcast domain Computer Networks and Internets -- Module 4 119 Spring, 2014 Copyright  2014. All rights reserved.
  • 434. A Wide Variety of Networking Technologies Computer Networks and Internets -- Module 4 121 Spring, 2014 Copyright  2014. All rights reserved.
  • 435. A Wide Variety of Networking Technologies d LAN technologies – Token ring (esp., IBM Token Ring) – FDDI/ CDDI Computer Networks and Internets -- Module 4 121 Spring, 2014 Copyright  2014. All rights reserved.
  • 436. A Wide Variety of Networking Technologies d LAN technologies – Token ring (esp., IBM Token Ring) – FDDI/ CDDI d WAN technologies – X.25 – Frame Relay – ATM – ISDN – MPLS d See Chapter 19 for a longer list Computer Networks and Internets -- Module 4 121 Spring, 2014 Copyright  2014. All rights reserved.
  • 437. Asynchronous Transfer Mode (ATM) d Created by phone companies in 1990s d Intended as replacement for the Internet d Paradigm was connection-oriented d Used small cells (53 octets) d Network guaranteed per-connection Quality of Service (QoS) – Throughput – Bound on delay – Bound on jitter Computer Networks and Internets -- Module 4 122 Spring, 2014 Copyright  2014. All rights reserved.
  • 438. Asynchronous Transfer Mode (ATM) (continued) d QoS in ATM – Specified for each transfer (i.e., each TCP connection) – Required setup time – Meant each switch maintained state – Was difficult/impossible to enforce at high speed d Despite the failure of ATM, proponents still argue that Internet needs QoS Computer Networks and Internets -- Module 4 123 Spring, 2014 Copyright  2014. All rights reserved.
  • 439. Summary d Packet switching divides data into small packets d Each packet (frame) specifies destination d Access technologies are used in the last mile d Media access can be controlled, random, or channelized d IEEE specifies Local Area Network standards d Topologies used with LANs: bus, star, ring, and mesh d Ethernet is the de facto standard for wired LANs d Current Ethernets use twisted pair wiring Computer Networks and Internets -- Module 4 124 Spring, 2014 Copyright  2014. All rights reserved.
  • 440. Summary d Wireless networks include PANs, LANs, and WANs, d Cellular telephones are using packet technology d Satellite can deliver data through a dish antenna d Software-defined radio adds flexibility to wireless devices d LAN extensions include repeaters and bridges d Once stand-alone devices, bridges are now incorporated into other devices d Layer 2 switch acts like bridged networks Computer Networks and Internets -- Module 4 125 Spring, 2014 Copyright  2014. All rights reserved.
  • 442. MODULE V Internetworking: Concepts, Addressing, Architecture, Protocols, Datagram Processing, Transport-Layer Protocols, And End-To-End Services Computer Networks and Internets -- Module 5 1 Spring, 2014 Copyright  2014. All rights reserved.
  • 443. Topics d Internet concept and architecture d Internet addressing d Internet Protocol packets (datagrams) d Datagram forwarding d Address resolution d Error reporting mechanism d Configuration d Network address translation Computer Networks and Internets -- Module 5 2 Spring, 2014 Copyright  2014. All rights reserved.
  • 444. Topics (continued) d Transport layer protocol characteristics and techniques d Message transport with the User Datagram Protocol (UDP) d Stream transport with the Transmission Control Protocol (TCP) d Routing algorithms and protocols d Internet multicast and multicast routing Computer Networks and Internets -- Module 5 3 Spring, 2014 Copyright  2014. All rights reserved.
  • 446. What Is The Internet? Computer Networks and Internets -- Module 5 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 447. What Is The Internet? d Users see it as services and applications – Web and e-commerce – Email, texting, instant messenger – Social networking and blogs – Music and video download (and upload) – Voice and video teleconferencing Computer Networks and Internets -- Module 5 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 448. What Is The Internet? d Users see it as services and applications – Web and e-commerce – Email, texting, instant messenger – Social networking and blogs – Music and video download (and upload) – Voice and video teleconferencing d Networking professionals see it as infrastructure – Platform on which above services run – Grows rapidly Computer Networks and Internets -- Module 5 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 449. Growth Of The Internet 1981 1985 1990 1995 2000 2005 2010 0M 100M 200M 300M 400M 500M 600M 700M 800M 900M 1000M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... ...... ...... ...... ........ .......... ......... ...... ............ .......... ............ .......... ......... ......... d Plot shows number of computers on the Internet each year Computer Networks and Internets -- Module 5 6 Spring, 2014 Copyright  2014. All rights reserved.
  • 450. Growth Of The Internet (log scale) 1981 1985 1990 1995 2000 2005 2010 102 103 104 105 106 107 108 109 1010 . . . . . ....... ...... ...... . . . . . ....... .......... ........ ........ ...... ...... ...... ...... ....... ...... ...... ...... ...... ...... ...... ...... . . . . . ...... ...... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . d Plot shows number of computers on the Internet each year Computer Networks and Internets -- Module 5 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 451. Actual Size Of The Internet d Previous plots are somewhat misleading – Derived by walking the Domain Name System – Only report hosts with IP addresses d Since around 2000, many Internet devices – Do not have a fixed IP address – Connect behind a NAT box (e.g., wireless router) d Actual size is difficult to measure Computer Networks and Internets -- Module 5 8 Spring, 2014 Copyright  2014. All rights reserved.
  • 452. Internet Architecture And Design Computer Networks and Internets -- Module 5 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 453. Internet Architecture And Design d If one were to design a global communication system from scratch – How should it be organized? – Which technology or technologies should be used? Computer Networks and Internets -- Module 5 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 454. Internet Architecture And Design d If one were to design a global communication system from scratch – How should it be organized? – Which technology or technologies should be used? d The challenges – Which applications should it support? – Which network technologies should it use * PANs / LANs / MANs / WANs * Wired / wireless * Terrestrial / satellite Computer Networks and Internets -- Module 5 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 455. Internet Architecture And Design (continued) d Key principles – Internet is designed to accommodate extant services plus new services that will be invented – Internet is designed to accommodate any network technology, allowing each technology to be used where appropriate Computer Networks and Internets -- Module 5 10 Spring, 2014 Copyright  2014. All rights reserved.
  • 456. Internet Philosophy d Infrastructure – Provides a packet communication service – Treats all attached endpoints as equal (any endpoint can send a packet to any other endpoint) – Does not restrict or dictate packet contents – Does not restrict or dictate underlying network technologies d Attached endpoints – Run applications that use the network to communicate with applications on other endpoints – Control all content and provide all services Computer Networks and Internets -- Module 5 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 457. Advantages Of The Internet Philosophy d Accommodates heterogeneous underlying networks d Accommodates arbitrary applications and services d Separates communication from services Computer Networks and Internets -- Module 5 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 458. Internet d Follows a network of networks approach d Allows arbitrary networks to be included d Uses IP routers to interconnect individual networks d Permits each router to connect two or more networks routers networks Computer Networks and Internets -- Module 5 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 459. Internet Architecture: Logical View host computers d Computers attached to Internet known as host computers d To a host, Internet appears to be one giant network Computer Networks and Internets -- Module 5 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 460. Internet Architecture: Physical View net 2 net 4 net 5 net 3 net 1 router physical net host computers d Network of heterogeneous networks connected by routers d Each host attaches to a network Computer Networks and Internets -- Module 5 15 Spring, 2014 Copyright  2014. All rights reserved.
  • 462. The Situation d Internet addressing is defined by the Internet Protocol (IP) d IP is changing – Current version is 4 (IPv4) – New version is 6 (IPv6) Computer Networks and Internets -- Module 5 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 463. History Of The Internet Protocol d IP separated from TCP in 1978 d Version 1-3 discarded quickly; version 4 was the first version used by researchers d By early 1990s, a movement started that clamored for a new version of IP because the 32-bit address space would run out “soon” d In 1993, the IETF received proposals, and formed a working group to find a compromise d By 1995, a new version had been proposed and documents written Computer Networks and Internets -- Module 5 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 464. Background Of The New Version Of IP d Various groups offered opinions about the features Computer Networks and Internets -- Module 5 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 465. Background Of The New Version Of IP d Various groups offered opinions about the features – Cable companies wanted support for broadcast delivery Computer Networks and Internets -- Module 5 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 466. Background Of The New Version Of IP d Various groups offered opinions about the features – Cable companies wanted support for broadcast delivery – Telephone companies argued that everyone would soon be using a connection-oriented network technology (ATM) Computer Networks and Internets -- Module 5 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 467. Background Of The New Version Of IP d Various groups offered opinions about the features – Cable companies wanted support for broadcast delivery – Telephone companies argued that everyone would soon be using a connection-oriented network technology (ATM) – Several groups wanted mobility Computer Networks and Internets -- Module 5 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 468. Background Of The New Version Of IP d Various groups offered opinions about the features – Cable companies wanted support for broadcast delivery – Telephone companies argued that everyone would soon be using a connection-oriented network technology (ATM) – Several groups wanted mobility – The military pushed for better security Computer Networks and Internets -- Module 5 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 469. Background Of The New Version Of IP d Various groups offered opinions about the features – Cable companies wanted support for broadcast delivery – Telephone companies argued that everyone would soon be using a connection-oriented network technology (ATM) – Several groups wanted mobility – The military pushed for better security d A compromise was reached: IP version 6 includes all the above Computer Networks and Internets -- Module 5 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 470. The Uphill Battle To Change IPv4 d IP is difficult to change because – IP lies at the heart of the Internet protocols – Version 4 of IP has a proven track record The success of the current version of IP is incredible — the protocol has accommodated changes in hardware technologies, heterogeneous networks, and extremely large scale. Computer Networks and Internets -- Module 5 20 Spring, 2014 Copyright  2014. All rights reserved.
  • 471. The Hourglass Model Appl1 Appl2 Appln Net1 Net2 Netm IP . . . . . . d IP lies in the middle — changing it means changing all hosts and routers in the Internet Computer Networks and Internets -- Module 5 21 Spring, 2014 Copyright  2014. All rights reserved.
  • 472. Our Approach d In the current Internet, both IPv4 and IPv6 are relevant and important d Throughout the course, we will – Discuss general concepts – See how IPv4 and IPv6 implement the concepts Computer Networks and Internets -- Module 5 22 Spring, 2014 Copyright  2014. All rights reserved.
  • 474. Addressing In The Internet Computer Networks and Internets -- Module 5 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 475. Addressing In The Internet d Can we use MAC addresses across an internet? Computer Networks and Internets -- Module 5 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 476. Addressing In The Internet d Can we use MAC addresses across an internet? d No: heterogeneity means – Multiple types of MAC addresses – MAC address meaningful on one network not meaningful on another Computer Networks and Internets -- Module 5 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 477. Addressing In The Internet d Can we use MAC addresses across an internet? d No: heterogeneity means – Multiple types of MAC addresses – MAC address meaningful on one network not meaningful on another d Solution – Create new addressing scheme that is independent of MAC addresses Computer Networks and Internets -- Module 5 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 478. The Two Forms Of Addresses d Identity – Unique number assigned to each endpoint – Analogous to Ethernet address d Locator – Endpoint address encodes location information, such as * Geographic location * Location relative to a service provider * Computer on a given physical network Computer Networks and Internets -- Module 5 25 Spring, 2014 Copyright  2014. All rights reserved.
  • 479. Two Principles To Keep In Mind Both identify and locator forms have advantages in some situations; no form is best in all cases Addressing is inherently linked to routing; the choice of an addressing scheme affects the cost of computing and maintaining routes Computer Networks and Internets -- Module 5 26 Spring, 2014 Copyright  2014. All rights reserved.
  • 480. The IPv4 Addressing Scheme d Unique number is assigned to each Internet host d 32-bit binary value known as IPv4 address d Virtual address, not derived from MAC address d Divided into two parts – Prefix identifies physical network (locator) – Suffix identifies a host on the network (identity) Computer Networks and Internets -- Module 5 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 481. Dotted Decimal Notation (IPv4) d Convenient for humans d Divides IPv4 address into octets of eight bits each d Represents each octet in decimal separated by dots Computer Networks and Internets -- Module 5 28 Spring, 2014 Copyright  2014. All rights reserved.
  • 482. Dotted Decimal Notation (IPv4) d Convenient for humans d Divides IPv4 address into octets of eight bits each d Represents each octet in decimal separated by dots d Examples 22222222222222222222222222222222222222222222222222222222222222222222222222 32-bi t Binary Number Equivalent Dot ted Decimal 22222222222222222222222222222222222222222222222222222222222222222222222222 10000001 00110100 00000110 00000000 129 . 52 . 6 . 0 22222222222222222222222222222222222222222222222222222222222222222222222222 11000000 00000101 00110000 00000011 192 . 5 . 48 . 3 22222222222222222222222222222222222222222222222222222222222222222222222222 00001010 00000010 00000000 00100101 10 . 2 . 0 . 37 22222222222222222222222222222222222222222222222222222222222222222222222222 10000000 00001010 00000010 00000011 128 . 10 . 2 . 3 22222222222222222222222222222222222222222222222222222222222222222222222222 10000000 10000000 11111111 00000000 128 . 128 . 255 . 0 2222222222222222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 5 28 Spring, 2014 Copyright  2014. All rights reserved.
  • 483. Division Between Prefix And Suffix d Original scheme (classful addressing) – Each address divided on octet (8-bit) boundary – Division could be computed from the address d Current scheme (classless addressing) – Formal name Classless Inter-Domain Routing (CIDR) – Division permitted at arbitrary bit position – Boundary must be specified external to the address Computer Networks and Internets -- Module 5 29 Spring, 2014 Copyright  2014. All rights reserved.
  • 484. Classful Addressing d Now historic d Explains IPv4 multicast range 0 prefix suffix 1 0 prefix suffix 1 1 0 prefix suffix 1 1 1 0 multicast address 1 1 1 1 reserved (not assigned) Class A Class B Class C Class D Class E 0 1 2 3 4 8 16 24 31 Bits Computer Networks and Internets -- Module 5 30 Spring, 2014 Copyright  2014. All rights reserved.
  • 485. Address Mask d Required with classless addressing d Associated with a network d Specifies division of addresses into network prefix and host suffix for that network d 32-bit binary value – 1-bits correspond to prefix – 0-bits correspond to suffix d Example mask that specifies six bits of prefix 11111100 00000000 00000000 00000000 Computer Networks and Internets -- Module 5 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 486. CIDR Notation d Used by humans to enter address mask d Avoids dotted decimal errors d Follows address with slash and integer X, where X is the number of prefix bits d Example – In dotted decimal, a 26-bit mask is 255 . 255 . 255 . 192 – CIDR merely writes /26 Computer Networks and Internets -- Module 5 32 Spring, 2014 Copyright  2014. All rights reserved.
  • 487. Table Of CIDR And Dotted Decimal Equivalences Length (CIDR) Address Mask Notes / 0 0 0 0 0 . . . / 1 128 0 0 0 . . . / 2 192 0 0 0 . . . / 3 224 0 0 0 . . . / 4 240 0 0 0 . . . / 5 248 0 0 0 . . . / 6 252 0 0 0 . . . / 7 254 0 0 0 . . . / 8 255 0 0 0 . . . / 9 255 128 0 0 . . . / 10 255 192 0 0 . . . / 11 255 224 0 0 . . . / 12 255 240 0 0 . . . / 13 255 248 0 0 . . . / 14 255 252 0 0 . . . / 15 255 254 0 0 . . . / 16 255 255 0 0 . . . All 0s (equivalent to no mask) 1-octet boundary 2-octet boundary Computer Networks and Internets -- Module 5 33 Spring, 2014 Copyright  2014. All rights reserved.
  • 488. Table Of CIDR And Dotted Decimal Equivalences Length (CIDR) Address Mask Notes / 17 255 255 128 0 . . . / 18 255 255 192 0 . . . / 19 255 255 224 0 . . . / 20 255 255 240 0 . . . / 21 255 255 248 0 . . . / 22 255 255 252 0 . . . / 23 255 255 254 0 . . . / 24 255 255 255 0 . . . / 25 255 255 255 128 . . . / 26 255 255 255 192 . . . / 27 255 255 255 224 . . . / 28 255 255 255 240 . . . / 29 255 255 255 248 . . . / 30 255 255 255 252 . . . / 31 255 255 255 254 . . . / 32 255 255 255 255 . . . 3-octet boundary All 1s (host specific mask) Computer Networks and Internets -- Module 5 34 Spring, 2014 Copyright  2014. All rights reserved.
  • 489. Why CIDR Is Useful d ISPs assign IP addresses d Corporate customer with N computers needs N addresses d CIDR permits ISP to round to nearest power of two d Example – Assume ISP owns address block 128.211.0.0/ 16 – Customer has 12 computers – ISP assigns 4 bits of suffix to customer – Mask used is /28 – Example: customer is assigned 128.211.0.16/ 28 – Each computer at customer site has unique final 4 bits Computer Networks and Internets -- Module 5 35 Spring, 2014 Copyright  2014. All rights reserved.
  • 490. Example Of A /28 Address Block . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 28 31 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 28 31 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 28 31 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 28 31 Network Prefix 128.211.0.16 / 28 Address Mask 255.255.255.240 Lowest Host Address 128.211.0.17 Highest Host Address 128.211.0.30 Computer Networks and Internets -- Module 5 36 Spring, 2014 Copyright  2014. All rights reserved.
  • 491. Special IPv4 Addresses d Some address forms are reserved 22222222222222222222222222222222222222222222222222222222222222222222 Prefix Suffix Type Of Address Purpose 22222222222222222222222222222222222222222222222222222222222222222222 all-0s all-0s this computer used during bootstrap 22222222222222222222222222222222222222222222222222222222222222222222 network all-0s network identifies a network 22222222222222222222222222222222222222222222222222222222222222222222 network all-1s directed broadcast broadcast on specified net 22222222222222222222222222222222222222222222222222222222222222222222 all-1s all-1s limited broadcast broadcast on local net 22222222222222222222222222222222222222222222222222222222222222222222 127 / 8 any loopback testing 22222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 d Loopback address ( 127.0.0.1 ) used for testing – Packets never leave the local host d Addresses 240.0.0.0/ 8 and above are multicast Computer Networks and Internets -- Module 5 37 Spring, 2014 Copyright  2014. All rights reserved.
  • 492. Host Address Count d For a given network prefix, the all-0s and all-1s suffixes have special meaning d Consequence: if a suffix has N bits, 2 N − 2 hosts can be present Computer Networks and Internets -- Module 5 38 Spring, 2014 Copyright  2014. All rights reserved.
  • 493. IP Addressing Principle An IP address does not identify a specific computer. Instead, each IP address identifies a connection between a computer and a network. Computer Networks and Internets -- Module 5 39 Spring, 2014 Copyright  2014. All rights reserved.
  • 494. IP Addressing Principle An IP address does not identify a specific computer. Instead, each IP address identifies a connection between a computer and a network. d Consequence A router or a host with multiple network connections must be assigned one IP address for each connection. d Note: host with multiple network connections is called a multi-homed host Computer Networks and Internets -- Module 5 39 Spring, 2014 Copyright  2014. All rights reserved.
  • 495. Illustration Of IPv4 Address Assignment Wired Ethernet 131.108.0.0 / 16 Wi-Fi Net 223.240.129.0 / 24 WAN 78.0.0.0 / 8 223.240.129.2 131.108.99.5 78.0.0.17 223.240.129.17 router 1 router 2 d Each network assigned a unique prefix d Each host on a network assigned a unique suffix Computer Networks and Internets -- Module 5 40 Spring, 2014 Copyright  2014. All rights reserved.
  • 496. IPv6 Host Addresses d Like IPv4 – Binary value – Divided into locator prefix and unique ID suffix – Identifies a connection to a network d Unlike IPv4 – 128 bits long – Suffix can be derived from MAC address – 3-level address hierarchy Computer Networks and Internets -- Module 5 41 Spring, 2014 Copyright  2014. All rights reserved.
  • 497. The IPv6 3-Level Hierarchy GLOBAL PREFIX SUBNET INTERFACE (COMPUTER) K bits 64–K bits 64 bits d Prefix size chosen by ISP d Subnet area allows organization to have multiple networks Computer Networks and Internets -- Module 5 42 Spring, 2014 Copyright  2014. All rights reserved.
  • 498. IPv6 Address Types 22222222222222222222222222222222222222222222222222222222222222222 Type Purpose 22222222222222222222222222222222222222222222222222222222222222222 unicast The address corresponds to a single computer. A datagram sent to the address is routed along a shortest path to the computer. 22222222222222222222222222222222222222222222222222222222222222222 multicast The address corresponds to a set of computers, and membership in the set can change at any time. IPv6 delivers one copy of the datagram to each member of the set. 22222222222222222222222222222222222222222222222222222222222222222 anycast The address corresponds to a set of computers that share a common prefix. A datagram sent to the address is delivered to exactly one of the computers (e.g., the computer closest to the sender). 22222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 5 43 Spring, 2014 Copyright  2014. All rights reserved.
  • 499. Colon Hex Notation d Syntactic form used by humans to enter addresses d Replacement for IPv4’s dotted decimal d Expresses groups of 16 bits in hexadecimal separated by colons d Example: 105.220.136.100.255.255.255.255.0.0.18. 128.140.10.255.255 becomes 69DC:8864:FFFF:FFFF:0:1280:8C0A:FFFF Computer Networks and Internets -- Module 5 44 Spring, 2014 Copyright  2014. All rights reserved.
  • 500. Colon Compression d Many IPv6 addresses contain long strings of zeroes d Successive zeros can be replaced by two colons d Example FF0C:0:0:0:0:0:0:B1 can be written: FF0C::B1 Computer Networks and Internets -- Module 5 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 501. Two Major Reasons To Adopt IPv6 Computer Networks and Internets -- Module 5 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 502. Two Major Reasons To Adopt IPv6 d More addresses Computer Networks and Internets -- Module 5 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 503. Two Major Reasons To Adopt IPv6 d More addresses – Eventually, IPv4 addresses will be depleted Computer Networks and Internets -- Module 5 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 504. Two Major Reasons To Adopt IPv6 d More addresses – Eventually, IPv4 addresses will be depleted – IPv6 provides more addresses than we will ever need 340,282,366,920,938,463,463,374,607,431,768,211,456 Computer Networks and Internets -- Module 5 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 505. Two Major Reasons To Adopt IPv6 d More addresses – Eventually, IPv4 addresses will be depleted – IPv6 provides more addresses than we will ever need 340,282,366,920,938,463,463,374,607,431,768,211,456 – 1024 addresses per square meter of the Earth’s surface! Computer Networks and Internets -- Module 5 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 506. Two Major Reasons To Adopt IPv6 d More addresses – Eventually, IPv4 addresses will be depleted – IPv6 provides more addresses than we will ever need 340,282,366,920,938,463,463,374,607,431,768,211,456 – 1024 addresses per square meter of the Earth’s surface! d Hype and excitement Computer Networks and Internets -- Module 5 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 507. Two Major Reasons To Adopt IPv6 d More addresses – Eventually, IPv4 addresses will be depleted – IPv6 provides more addresses than we will ever need 340,282,366,920,938,463,463,374,607,431,768,211,456 – 1024 addresses per square meter of the Earth’s surface! d Hype and excitement – Researchers view IPv6 as an opportunity to be part of the action Computer Networks and Internets -- Module 5 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 508. Two Major Reasons To Adopt IPv6 d More addresses – Eventually, IPv4 addresses will be depleted – IPv6 provides more addresses than we will ever need 340,282,366,920,938,463,463,374,607,431,768,211,456 – 1024 addresses per square meter of the Earth’s surface! d Hype and excitement – Researchers view IPv6 as an opportunity to be part of the action – Industries view IPv6 as an opportunity for revenue enhancement Computer Networks and Internets -- Module 5 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 509. IPv6 And Children Computer Networks and Internets -- Module 5 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 510. IPv6 And Children Child Of Famous Parent Internet Protocol version 6 3333333333333333333333333333333333333333333333333333333333333333333333 d Greatness is anticipated and expectations run high d Child’s success is often compared to the parent’s d To achieve acclaim, the child must outperform the parent d We say that the child grows up “in the shadow” of the parent Computer Networks and Internets -- Module 5 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 511. IPv6 And Children Child Of Famous Parent Internet Protocol version 6 3333333333333333333333333333333333333333333333333333333333333333333333 d Greatness is anticipated and expectations run high d Child’s success is often compared to the parent’s d To achieve acclaim, the child must outperform the parent d We say that the child grows up “in the shadow” of the parent d Bad news: guiding genetic principle is known as the “tendency toward the mean” Computer Networks and Internets -- Module 5 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 512. IPv6 And Children Child Of Famous Parent Internet Protocol version 6 3333333333333333333333333333333333333333333333333333333333333333333333 d Greatness is anticipated and expectations run high d Child’s success is often compared to the parent’s d To achieve acclaim, the child must outperform the parent d We say that the child grows up “in the shadow” of the parent d Bad news: guiding genetic principle is known as the “tendency toward the mean” Child Of Famous Parent Internet Protocol version 6 3333333333333333333333333333333333333333333333333333333333333333333333 d Greatness is anticipated and expectations run high d IPv6’s success is often compared to IPv4’s d To achieve acclaim, IPv6 must outperform IPv4 d IPv6 has been growing up “in the shadow” of IPv4 Computer Networks and Internets -- Module 5 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 513. IPv6 And Children Child Of Famous Parent Internet Protocol version 6 3333333333333333333333333333333333333333333333333333333333333333333333 d Greatness is anticipated and expectations run high d Child’s success is often compared to the parent’s d To achieve acclaim, the child must outperform the parent d We say that the child grows up “in the shadow” of the parent d Bad news: guiding genetic principle is known as the “tendency toward the mean” Child Of Famous Parent Internet Protocol version 6 3333333333333333333333333333333333333333333333333333333333333333333333 d Greatness is anticipated and expectations run high d IPv6’s success is often compared to IPv4’s d To achieve acclaim, IPv6 must outperform IPv4 d IPv6 has been growing up “in the shadow” of IPv4 d Bad news: guiding engineering principle is known as the “second-system syndrome” Computer Networks and Internets -- Module 5 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 515. Internet Packets Because it includes incompatible networks, the Internet cannot adopt a particular hardware packet format. To accommodate heterogeneity, the Internet Protocol defines a hardware- independent packet format. Computer Networks and Internets -- Module 5 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 516. IP Datagram d Virtual packet format used in the Internet d Same general layout as a network frame Header Data Area (known as a payload area) d Format of header determined by protocol version (IPv4 or IPv6) d Size of payload determined by application – Maximum payload is almost 64K octets – Typical datagram size is 1500 octets Computer Networks and Internets -- Module 5 50 Spring, 2014 Copyright  2014. All rights reserved.
  • 517. IPv4 Datagram Header d Most header fields have fixed size and position d Header specifies source, destination, and content type 0 4 8 16 19 24 31 VERS H. LEN SERVICE TYPE TOTAL LENGTH IDENTIFICATION FLAGS FRAGMENT OFFSET TIME TO LIVE TYPE HEADER CHECKSUM SOURCE IP ADDRESS DESTINATION IP ADDRESS IP OPTIONS (MAY BE OMITTED) PADDING BEGINNING OF PAYLOAD (DATA BEING SENT) . . . Computer Networks and Internets -- Module 5 51 Spring, 2014 Copyright  2014. All rights reserved.
  • 518. A Few Details d SOURCE IP ADDRESS field gives the IPv4 address of the original source d DESTINATION IP ADDRESS field gives the IPv4 address of the ultimate destination d Intermediate router addresses do not appear in header d Header size – Almost no Internet datagrams contain options – Therefore header length is usually 20 octets Computer Networks and Internets -- Module 5 52 Spring, 2014 Copyright  2014. All rights reserved.
  • 519. IPv6 Header Arrangement d Multiple headers used: base plus zero or more extension(s) Base Header Extension Header 1 . . . Extension Header N Payload (Data) optional d The figure is not to scale: extension headers and/or the payload can be much larger than the base header Computer Networks and Internets -- Module 5 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 520. IPv6 Base Header Format 0 4 12 16 24 31 VERS TRAFFIC CLASS FLOW LABEL PAYLOAD LENGTH NEXT HEADER HOP LIMIT SOURCE ADDRESS DESTINATION ADDRESS d Flow Label field allows datagram to be associated with a flow Computer Networks and Internets -- Module 5 54 Spring, 2014 Copyright  2014. All rights reserved.
  • 521. Identifying Headers d Each header contains a NEXT HEADER field d Value specifies the type of the next item d Each layer 4 protocol (UDP, TCP, etc) is also assigned a type Computer Networks and Internets -- Module 5 55 Spring, 2014 Copyright  2014. All rights reserved.
  • 522. Example Use Of Next Header Field d Illustration of headers when a datagram contains a base header and transport protocol Base Header NEXT=TCP TCP Data d Illustration of headers when a datagram also contains an optional route header Base Header NEXT=ROUTE Route Header NEXT=TCP TCP Data Computer Networks and Internets -- Module 5 56 Spring, 2014 Copyright  2014. All rights reserved.
  • 523. The Size Of An Extension Header d Fixed length headers – Size is specified in the standards document – Protocol software contains size constant d Variable length headers – Size is determined by sender – Header contains an explicit length field 0 8 16 31 NEXT HEADER HEADER LEN ONE OR MORE OPTIONS Computer Networks and Internets -- Module 5 57 Spring, 2014 Copyright  2014. All rights reserved.
  • 524. Consequences For Packet Processing d Consider a host or router that receives an IPv6 datagram d The datagram contains a set of extension headers d Each extension header can contain an explicit length field d To parse the datagram, IP software must iterate through headers d Conclusion: processing IPv6 can entail extra overhead Computer Networks and Internets -- Module 5 58 Spring, 2014 Copyright  2014. All rights reserved.
  • 526. Internet Communication Paradigm d Each datagram handled independently d Datagram formed on source computer d Source sends datagram to nearest router d Router forwards datagram to next router along path to destination d Final router delivers datagram to destination d Datagram passes across a single physical network at each step Computer Networks and Internets -- Module 5 60 Spring, 2014 Copyright  2014. All rights reserved.
  • 527. Datagram Forwarding d Performed by initial host and each router along path d Selects next hop for the datagram as either – Next router along the path – Ultimate destination d Uses a forwarding table with one entry per network d Important point: size of forwarding table proportional to number of networks in the Internet Computer Networks and Internets -- Module 5 61 Spring, 2014 Copyright  2014. All rights reserved.
  • 528. Forwarding Table Entry d Uses IP addresses only (no MAC addresses) d Contains – Destination network IP prefix – Address mask for the destination network – IP address of next hop Computer Networks and Internets -- Module 5 62 Spring, 2014 Copyright  2014. All rights reserved.
  • 529. Illustration Of An IPv4 Forwarding Table 30.0.0.7 40.0.0.7 40.0.0.8 128.1.0.8 128.1.0.9 192.4.10.9 30.0.0.0 / 8 40.0.0.0 / 8 128.1.0.0/16 192.4.10.0/24 Destination Mask Next Hop 30.0.0.0 255.0.0.0 40.0.0.7 40.0.0.0 255.0.0.0 deliver direct 128.1.0.0 255.255.0.0 deliver direct 192.4.10.0 255.255.255.0 128.1.0.9 (a) (b) router R1 router R2 router R3 d In practice, table usually contains a default entry Computer Networks and Internets -- Module 5 63 Spring, 2014 Copyright  2014. All rights reserved.
  • 530. Prefix Extraction d Forwarding paradigm – Use network prefix when forwarding – Use host when delivering d Conceptual forwarding step – Compare destination in each forwarding table entry with datagram’s destination address, D – During comparison, only examine network prefix d Note: mask in forwarding table makes comparison efficient if ( (Mask[i] & D) == Destination[i] ) forward to NextHop[i]; Computer Networks and Internets -- Module 5 64 Spring, 2014 Copyright  2014. All rights reserved.
  • 531. Longest Prefix Match d Classless addressing means forwarding table entries can be ambiguous d Example: consider destination 128.10.2.3 and a table that includes the following two entries: 128.10.0.0 / 16 next hop A 128.10.2.0 / 24 next hop B d The destination matches both of them! d Solution: select the match that has the longest prefix (in the example, take next hop B) d Known as longest prefix match Computer Networks and Internets -- Module 5 65 Spring, 2014 Copyright  2014. All rights reserved.
  • 532. Datagram Encapsulation d Needed because underlying network hardware does not understand datagrams d Entire datagram travels in payload area of frame Frame Header Frame Payload IP Header IP Payload d Frame header contains MAC address of next hop d Frame only used for trip across one network: when frame arrives at next hop, datagram is extracted and frame is discarded d Datagram remains intact end-to-end Computer Networks and Internets -- Module 5 66 Spring, 2014 Copyright  2014. All rights reserved.
  • 533. Illustration Of Encapsulation Router 1 Router 2 Source host Destination host Net 1 Net 2 Net 3 datagram datagram datagram datagram datagram datagram datagram Frame Hdr 1 Frame Hrd 2 Frame Hdr 3 Computer Networks and Internets -- Module 5 67 Spring, 2014 Copyright  2014. All rights reserved.
  • 534. Semantics Of Internet Communication d IP uses best effort delivery semantics Computer Networks and Internets -- Module 5 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 535. Semantics Of Internet Communication d IP uses best effort delivery semantics d IP attempts to deliver each datagram, but specifies that a datagram can be – Lost – Duplicated – Delayed – Delivered out-of-order – Delivered with bits scrambled Computer Networks and Internets -- Module 5 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 536. Semantics Of Internet Communication d IP uses best effort delivery semantics d IP attempts to deliver each datagram, but specifies that a datagram can be – Lost – Duplicated – Delayed – Delivered out-of-order – Delivered with bits scrambled d Motivation: accommodate any underlying network Computer Networks and Internets -- Module 5 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 537. Semantics Of Internet Communication d IP uses best effort delivery semantics d IP attempts to deliver each datagram, but specifies that a datagram can be – Lost – Duplicated – Delayed – Delivered out-of-order – Delivered with bits scrambled d Motivation: accommodate any underlying network d Note: in practice, IP works and it works well Computer Networks and Internets -- Module 5 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 538. MTU And Network Heterogeneity d Each network technology specifies a Maximum Transfer Unit (MTU) that is the largest amount of data that can be sent in a packet d Example: Ethernet MTU is 1500 octets d Datagram can be as large as the network MTU d Consider a 1500-octet datagram set from H1 to H2 in the following network R H1 H2 Net 1 (MTU=1500) Net 2 (MTU=1000) d Datagram can reach router R, but cannot traverse Net 2 Computer Networks and Internets -- Module 5 69 Spring, 2014 Copyright  2014. All rights reserved.
  • 539. Datagram Fragmentation d Technique for accommodating heterogeneous MTUs d Needed if datagram exceeds MTU d Original datagram divided into smaller datagrams called fragments d Header of fragment derived from original datagram header d Each fragment is forwarded independently d IPv4 allows routers to perform fragmentation d IPv6 requires sending host to perform fragmentation d Important principle for both IPv4 and IPv6: The ultimate destination reassembles fragments. Computer Networks and Internets -- Module 5 70 Spring, 2014 Copyright  2014. All rights reserved.
  • 540. The General Idea Of Fragmentation d Divide the payload into a series of datagrams IP Header original datagram payload IP Hdr 1 IP Hdr 2 IP Hdr 3 payload 1 pay. 3 payload 2 . . . . . . . . . . . . . . . . d Note: the tail fragment may be smaller than the others Computer Networks and Internets -- Module 5 71 Spring, 2014 Copyright  2014. All rights reserved.
  • 541. IPv4 Fragmentation Details d Datagram header contains fixed fields that control fragmentation d A bit in FLAGS field specifies whether given datagram is a fragment or complete datagram d An additional FLAGS bit specifies whether the fragment carries the tail of the original datagram d OFFSET field specifies where the payload belongs in the original datagram Computer Networks and Internets -- Module 5 72 Spring, 2014 Copyright  2014. All rights reserved.
  • 542. IPv6 Fragmentation Details d Always performed by the original source, never by routers d Rule: no header changes are allowed as an IPv6 datagram traverses the Internet d Consequences – Source must discover path MTU – Separate extension header contains fragmentation information (same items as IPv4) d Fragmentable part of datagram may include some extension headers Computer Networks and Internets -- Module 5 73 Spring, 2014 Copyright  2014. All rights reserved.
  • 543. Illustration of IPv6 Fragmentation Unfragmentable Part Fragmentable Part (can include headers as well as data) Unfragmentable Part Frag. 1 Header P1 Unfragmentable Part Frag. 2 Header P2 Unfragmentable Part Frag. 3 Header P3 (a) (b) (c) (d) P1 P2 P3 d A datagram (a) divided into fragments (b through d) Computer Networks and Internets -- Module 5 74 Spring, 2014 Copyright  2014. All rights reserved.
  • 544. Collecting Fragments d Destination collects incoming fragments d IDENTIFICATION field used to group related fragments d OFFSET field allows receiver to recreate the original payload d LAST FRAGMENT bit allows receiver to know when all fragments have arrived d If a fragment fails to arrive within a timeout period, entire datagram is discarded d Note: if an IPv4 fragment is divided into subfragments, reassembly does not require reassembling subfragments Computer Networks and Internets -- Module 5 75 Spring, 2014 Copyright  2014. All rights reserved.
  • 545. Thought Problem d Suppose – A vendor sells a network security appliance that fits between a computer and an Ethernet switch – The appliance encrypts each IP datagram that the computer sends – Encryption adds only three bytes of extra data to the payload d Measurements show that throughput decreases dramatically whenever the appliance is enabled d Explain the lower throughput Computer Networks and Internets -- Module 5 76 Spring, 2014 Copyright  2014. All rights reserved.
  • 547. Review Of Datagram Transmission Computer Networks and Internets -- Module 5 78 Spring, 2014 Copyright  2014. All rights reserved.
  • 548. Review Of Datagram Transmission d Host or router has datagram to send Computer Networks and Internets -- Module 5 78 Spring, 2014 Copyright  2014. All rights reserved.
  • 549. Review Of Datagram Transmission d Host or router has datagram to send d IP uses longest-prefix match to look up datagram’s destination address in forwarding table and obtains – IP address of next hop – Network over which to send (in case there is more than one network connection) Computer Networks and Internets -- Module 5 78 Spring, 2014 Copyright  2014. All rights reserved.
  • 550. Review Of Datagram Transmission d Host or router has datagram to send d IP uses longest-prefix match to look up datagram’s destination address in forwarding table and obtains – IP address of next hop – Network over which to send (in case there is more than one network connection) d IP encapsulates datagram in frame (entire datagram placed in payload area of frame) Computer Networks and Internets -- Module 5 78 Spring, 2014 Copyright  2014. All rights reserved.
  • 551. Review Of Datagram Transmission d Host or router has datagram to send d IP uses longest-prefix match to look up datagram’s destination address in forwarding table and obtains – IP address of next hop – Network over which to send (in case there is more than one network connection) d IP encapsulates datagram in frame (entire datagram placed in payload area of frame) d Is the resulting frame ready to send to the next hop? Computer Networks and Internets -- Module 5 78 Spring, 2014 Copyright  2014. All rights reserved.
  • 552. Review Of Datagram Transmission d Host or router has datagram to send d IP uses longest-prefix match to look up datagram’s destination address in forwarding table and obtains – IP address of next hop – Network over which to send (in case there is more than one network connection) d IP encapsulates datagram in frame (entire datagram placed in payload area of frame) d Is the resulting frame ready to send to the next hop? No! Computer Networks and Internets -- Module 5 78 Spring, 2014 Copyright  2014. All rights reserved.
  • 553. Hardware And Protocol Addressing Computer Networks and Internets -- Module 5 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 554. Hardware And Protocol Addressing d Underlying network hardware – Only understands MAC addresses – Requires each outgoing frame to contain the MAC address of the next hop Computer Networks and Internets -- Module 5 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 555. Hardware And Protocol Addressing d Underlying network hardware – Only understands MAC addresses – Requires each outgoing frame to contain the MAC address of the next hop d IP forwarding – Deals only with (abstract) IP addresses – Computes the IP address of the next hop Computer Networks and Internets -- Module 5 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 556. Hardware And Protocol Addressing d Underlying network hardware – Only understands MAC addresses – Requires each outgoing frame to contain the MAC address of the next hop d IP forwarding – Deals only with (abstract) IP addresses – Computes the IP address of the next hop d Conclusion The IP address of the next hop must be translated to a MAC address before a frame can be sent. Computer Networks and Internets -- Module 5 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 557. Address Resolution d Translates IP address to equivalent MAC address that the hardware understands d IP address is said to be resolved d Restricted to a single physical network at a time d Example: consider computer X sending to computer Y X A B C Y D R1 R2 d A MAC address is needed at each hop Computer Networks and Internets -- Module 5 80 Spring, 2014 Copyright  2014. All rights reserved.
  • 558. An Example With MAC Addresses X Y R1 R2 128.10.0.0 /16 10.0.0.0 /8 192.168.0.0 /16 MAC: 3A-12-C9 IP: 128.10.0.1 MAC: 04-CF-47 IP: 192.168.0.1 MAC: 59-61-33 IP: 128.10.0.100 MAC: 97-27-D3 IP: 10.0.0.100 MAC: 8E-1A-7F IP: 10.0.0.200 MAC: 54-DB-31 IP: 192.168.0.200 Sender NEXT-HOP SRC MAC DST MAC SRC IP DST IP 2 222222222222222222222222222222222222222222222222222222222222222222222222 X 128.10.0.100 3A-12-C9 59-61-33 128.10.0.1 192.168.0.1 R1 10.0.0.200 97-27-D3 8E-1A-7F 128.10.0.1 192.168.0.1 R2 192.168.0.1 54-DB-31 04-CF-47 128.10.0.1 192.168.0.1 d How can a host or router find the MAC address of the next hop? Computer Networks and Internets -- Module 5 81 Spring, 2014 Copyright  2014. All rights reserved.
  • 559. Address Resolution Protocol (ARP) d Designed for IPv4 over Ethernet d Used by two computers on the same physical network d Allows a computer to find the MAC address of another computer d Operates at layer 2 d Uses network to exchange messages d Computer seeking an address sends request to which another replies Computer Networks and Internets -- Module 5 82 Spring, 2014 Copyright  2014. All rights reserved.
  • 560. Example Of ARP Exchange d Assume – Four computers attached to an Ethernet – Computer B has a datagram to send d Computer B – Uses forwarding table to find next-hop address IC – Broadcasts an ARP request: “I’m looking for a computer with IP address IC” d Computer C – Receives the request and replies; “I’m the computer with IP address IC” Computer Networks and Internets -- Module 5 83 Spring, 2014 Copyright  2014. All rights reserved.
  • 561. Illustration Of The ARP message Exchange Ethernet switch Ethernet switch W X Y Z W X Y Z (a) (a) d Request is broadcast to all computers d Only the intended recipient replies d Reply is sent unicast Computer Networks and Internets -- Module 5 84 Spring, 2014 Copyright  2014. All rights reserved.
  • 562. ARP Message Format Computer Networks and Internets -- Module 5 85 Spring, 2014 Copyright  2014. All rights reserved.
  • 563. ARP Message Format d Sufficiently general to permit – Arbitrary high-level protocol address – Arbitrary hardware address Computer Networks and Internets -- Module 5 85 Spring, 2014 Copyright  2014. All rights reserved.
  • 564. ARP Message Format d Sufficiently general to permit – Arbitrary high-level protocol address – Arbitrary hardware address d In practice, only used with IP and 48-bit Ethernet addresses Computer Networks and Internets -- Module 5 85 Spring, 2014 Copyright  2014. All rights reserved.
  • 565. ARP Message Format d Sufficiently general to permit – Arbitrary high-level protocol address – Arbitrary hardware address d In practice, only used with IP and 48-bit Ethernet addresses 0 8 16 24 31 HARDWARE ADDRESS TYPE PROTOCOL ADDRESS TYPE HADDR LEN PADDR LEN OPERATION SENDER HADDR (first 4 octets) SENDER HADDR (last 2 octets) SENDER PADDR (first 2 octets) SENDER PADDR (last 2 octets) TARGET HADDR (first 2 octets) TARGET HADDR (last 4 octets) TARGET PADDR (all 4 octets) Computer Networks and Internets -- Module 5 85 Spring, 2014 Copyright  2014. All rights reserved.
  • 566. ARP Encapsulation d ARP message is placed in payload area of hardware frame d When used with Ethernet, type is 0x0806 d Source and destination MAC addresses must be added to frame header before sending FRAME HEADER FRAME PAYLOAD CRC ARP MESSAGE Computer Networks and Internets -- Module 5 86 Spring, 2014 Copyright  2014. All rights reserved.
  • 567. ARP Algorithm And Caching Given: An incoming ARP request or response Purpose: Process the message and update the ARP cache Method: Extract sender’s IP address, I, and MAC address, M If ( address I is already in the ARP cache ) { Replace corresponding MAC address with M; } if ( message is a request and target is “me” ) { Add sender’s entry to the ARP cache providing no entry exists; Generate and send a response; } 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2222222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 5 87 Spring, 2014 Copyright  2014. All rights reserved.
  • 568. Boundary Between Protocol And MAC Addressing d ARP isolates hardware addresses, allowing layers above to use only IP Network Interface Physical address resolution Application Transport Internet conceptual boundary IP addresses used MAC addresses used Computer Networks and Internets -- Module 5 88 Spring, 2014 Copyright  2014. All rights reserved.
  • 569. Thought Problem d ARP is sometimes cited as a security weakness d If someone gains access to a given network, how can they exploit ARP to intercept packets? Computer Networks and Internets -- Module 5 89 Spring, 2014 Copyright  2014. All rights reserved.
  • 570. Address Binding With IPv6 d IPv6 does not use ARP d Instead, IPv6 defines a new address binding mechanism known as IPv6 Neighbor Discovery (IPv6-ND) d IPv6-ND – Maintains a neighbor cache – Keeps the cache up-to-date at all times d IPv6-ND operation – Sends a multicast request to find neighbors and populate the cache – Polls neighbors periodically, even if no datagrams are being sent to the neighbor Computer Networks and Internets -- Module 5 90 Spring, 2014 Copyright  2014. All rights reserved.
  • 572. IP Error Detection And Reporting d Recall that IP allows datagrams to be – Lost – Duplicated – Delayed – Delivered out-of-order Computer Networks and Internets -- Module 5 92 Spring, 2014 Copyright  2014. All rights reserved.
  • 573. IP Error Detection And Reporting d Recall that IP allows datagrams to be – Lost – Duplicated – Delayed – Delivered out-of-order d Why is error reporting needed? Computer Networks and Internets -- Module 5 92 Spring, 2014 Copyright  2014. All rights reserved.
  • 574. IP Error Detection And Reporting d Recall that IP allows datagrams to be – Lost – Duplicated – Delayed – Delivered out-of-order d Why is error reporting needed? d Answer: best-effort does not mean “careless” — the design is intended to tolerate errors in the underlying networks, not to introduce them d IP reports problems when they are detected Computer Networks and Internets -- Module 5 92 Spring, 2014 Copyright  2014. All rights reserved.
  • 575. General Error Detection d A variety of basic error detection mechanisms exist d Examples – Parity bits and other forward error codes can detect transmission errors – A CRC can detect an incorrect frame – The IP header checksum can detect an incorrect datagram header – IP’s TTL (hop limit) can detect a routing loop – A reassembly timer can detect lost fragments d Only some types of errors can be reported Computer Networks and Internets -- Module 5 93 Spring, 2014 Copyright  2014. All rights reserved.
  • 576. Internet Control Message Protocol (ICMP) d Required and integral part of IP d Reports errors back to the original source d Uses IP to carry messages d Defines many types of messages, each with a specific format and contents d Includes information messages as well as error reports d ICMPv4 and ICMPv6 share many messages Computer Networks and Internets -- Module 5 94 Spring, 2014 Copyright  2014. All rights reserved.
  • 577. Example ICMP Messages 22222222222222222222222222222222222222222222222222222222222222222222 Number Type Purpose 22222222222222222222222222222222222222222222222222222222222222222222 0 Echo Reply Used by the ping program 22222222222222222222222222222222222222222222222222222222222222222222 3 Dest. Unreachable Datagram could not be delivered 22222222222222222222222222222222222222222222222222222222222222222222 5 Redirect Host must change a route 22222222222222222222222222222222222222222222222222222222222222222222 8 Echo Request Used by the ping program 22222222222222222222222222222222222222222222222222222222222222222222 11 Time Exceeded TTL expired or fragments timed out 22222222222222222222222222222222222222222222222222222222222222222222 12 Parameter Problem IP header is incorrect 22222222222222222222222222222222222222222222222222222222222222222222 30 Traceroute Used by the traceroute program 22222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d Most heavily-used ICMP messages are 8 and 0, which are sent and received by the ping program Computer Networks and Internets -- Module 5 95 Spring, 2014 Copyright  2014. All rights reserved.
  • 578. ICMP Encapsulation d Two levels of encapsulation – ICMP message encapsulated in an IP datagram – IP datagram encapsulated in a network frame Frame Header Frame Payload IP Header IP Payload ICMP Payload ICMP Hdr Computer Networks and Internets -- Module 5 96 Spring, 2014 Copyright  2014. All rights reserved.
  • 579. Example Of An ICMP Error Report d Host S creates a datagram for destination D d S sets the TTL to 255 and sends the datagram d Datagram reaches a loop in the middle of the Internet d Datagram circulates around the loop until the TTL reaches zero d Router that decrements the TTL to zero – Sends a type 11 ICMP message to S – Discards the datagram that caused the problem Computer Networks and Internets -- Module 5 97 Spring, 2014 Copyright  2014. All rights reserved.
  • 581. Protocol Configuration d Many items must be set before protocols can be used – IP address of each network interface – Address mask for each network – Initial values in the forwarding table d Process is known as protocol configuration d Usually occurs when operating system boots d Two basic approaches – Manual – Automatic Computer Networks and Internets -- Module 5 99 Spring, 2014 Copyright  2014. All rights reserved.
  • 582. Manual Configuration d Used for IP routers or host that has a permanent IP address d Manager – Enters configuration once – Specifies that the configuration be saved in non-volatile storage – Interfaces include Command Line Interface (CLI) and web d OS – Fetches values from non-volatile storage whenever the device boots Computer Networks and Internets -- Module 5 100 Spring, 2014 Copyright  2014. All rights reserved.
  • 583. Automatic Configuration d Used primarily for hosts d Initially created for diskless workstations d Basic idea – Use network to obtain configuration information – Configure protocol software, and then start to run applications d A seeming paradox Automatic configuration requires a computer to be able to use a network before the computer’s protocol parameters have been configured. Computer Networks and Internets -- Module 5 101 Spring, 2014 Copyright  2014. All rights reserved.
  • 584. Ways To Solve The Paradox d Use layer 2 protocols to obtain layer 3 parameters, then use layer 3 to obtain higher layers – Historic approach – Relied on Ethernet broadcast – One computer on a network responded to requests d Use layer 3 to obtain all parameters – Current approach – Relies on IP broadcast (IPv4) or multicast (IPv6) – Means routers can forward requests to a remote server Computer Networks and Internets -- Module 5 102 Spring, 2014 Copyright  2014. All rights reserved.
  • 585. Dynamic Host Configuration Protocol (DHCP) d The standard protocol for automatic configuration d Popular in private enterprises as well as with service providers d Host broadcasts/multicasts a request and receives a reply d Single message exchange allows a host to obtain – An IP address and address mask to use – The IP address of a default router – The address of a DNS server – A DNS name – The location of an image to boot (optional) Computer Networks and Internets -- Module 5 103 Spring, 2014 Copyright  2014. All rights reserved.
  • 586. DHCP Message Format d Same message format used for requests and responses 0 8 16 24 31 OP HTYPE HLEN HOPS TRANSACTION IDENTIFIER SECONDS ELAPSED FLAGS CLIENT IP ADDRESS YOUR IP ADDRESS SERVER IP ADDRESS ROUTER IP ADDRESS CLIENT HARDWARE ADDRESS (16 OCTETS) . . . SERVER HOST NAME (64 OCTETS) . . . BOOT FILE NAME (128 OCTETS) . . . OPTIONS (VARIABLE) . . . Computer Networks and Internets -- Module 5 104 Spring, 2014 Copyright  2014. All rights reserved.
  • 587. DHCP Protocol d Significant features of the protocol – Recovers from loss or duplication – Avoids synchronized flooding of requests after a power- failure and restart – Host discovers DHCP server once and caches server address for future interaction d Derived from BOOTstrap Protocol (BOOTP), but adds dynamic address assignment Computer Networks and Internets -- Module 5 105 Spring, 2014 Copyright  2014. All rights reserved.
  • 588. Address Lease Paradigm d DHCP server – Owns a set of IP addresses – Chooses an address from the set when a request arrives – Issues a lease for the address for specified time, T d Client – Obtains an address and starts a timer for T time units – Uses the address to communicate – When the timer expires, requests the server renew the lease – Either receives a renewal and restarts timer or stops using the address Computer Networks and Internets -- Module 5 106 Spring, 2014 Copyright  2014. All rights reserved.
  • 589. Thought Problem d Consider how addresses are assigned d An ISP using DHCP can choose which IP address to assign to a customer at a given time d There are two approaches – The ISP can remember which address was previously assigned to each customer and use the same address – The ISP can assign addresses at random, meaning the customer will not retain the same address d Many ISPs try to change the address frequently d Why? Computer Networks and Internets -- Module 5 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 590. IPv6 Configuration d DHCPv6 has been defined, but... d IPv6 prefers a new procedure known as IPv6 autoconfiguration d General idea: host can generate an address without using a server d Motivation: allow two hosts to communicate without further infrastructure Computer Networks and Internets -- Module 5 108 Spring, 2014 Copyright  2014. All rights reserved.
  • 591. Steps In IPv6 Autoconfiguration d Obtain a network prefix – Convention is to use a /64 prefix – Globally-valid prefix can be obtained from a router – Local-scope prefix created if no router available d Generate a unique suffix d Verify that no one else on the network is using the resulting address Computer Networks and Internets -- Module 5 109 Spring, 2014 Copyright  2014. All rights reserved.
  • 592. IPv6 Autoconfiguration in Practice d Need a unique host suffix d For /64 network, a 64-bit host suffix is needed d Recommended approach – Start with MAC address (globally unique, but only 48 bits) – Create a 64-bit value d IEEE standard EUI-64 specifies how 48 bits of an IEEE MAC address are placed in a 64-bit host suffix Computer Networks and Internets -- Module 5 110 Spring, 2014 Copyright  2014. All rights reserved.
  • 594. NAT Motivation d IPv4 was running out of addresses d ISPs only want to limit a customer to one IP address at any time, but customers want multiple devices to be online d Engineers invented Network Address Translation (NAT) as a way to solve both problems Computer Networks and Internets -- Module 5 112 Spring, 2014 Copyright  2014. All rights reserved.
  • 595. NAT Operation d Conceptually, NAT device is located between computers at a site and the rest of the Internet d Site – Only needs one globally-valid IP address – Can have multiple local hosts using the Internet d Local host has full Internet access d Service is transparent – No change in protocols on local hosts – No change in protocols on Internet servers Computer Networks and Internets -- Module 5 113 Spring, 2014 Copyright  2014. All rights reserved.
  • 596. Conceptual Organization Of NAT Internet Internet site with multiple computers NAT Device from the Internet, site appears to be a single host d NAT is said to be in-line d From the Internet, site appears to be a single computer d From within the site, each computer appears to have an independent connection to the Internet Computer Networks and Internets -- Module 5 114 Spring, 2014 Copyright  2014. All rights reserved.
  • 597. Addresses Used by NAT d NAT device runs a DHCP server to hand out IP addresses to computers at the site d Addresses assigned are IPv6 link-local or IPv4 private 2 2222222222222222222222222222222222222222222222222 Block Description 2 2222222222222222222222222222222222222222222222222 10.0.0.0/8 Class A private address block 2 2222222222222222222222222222222222222222222222222 169.254.0.0/16 Class B private address block 2 2222222222222222222222222222222222222222222222222 172.16.0.0/12 16 contiguous Class B blocks 2 2222222222222222222222222222222222222222222222222 192.168.0.0/16 256 contiguous Class C blocks 2 2222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 – NAT translates source and/or destination addresses in datagrams that pass between the site and the Internet Computer Networks and Internets -- Module 5 115 Spring, 2014 Copyright  2014. All rights reserved.
  • 598. NAT Variants d Basic NAT – Only translates IP addresses – Seldom used in practice d NAPT – Translates IP address and transport-layer port numbers – Most widely-used type of NAT d Twice NAT – Works with DNS server – Provides NAPT plus ability to accept incoming communication Computer Networks and Internets -- Module 5 116 Spring, 2014 Copyright  2014. All rights reserved.
  • 599. Example Of Basic NAT d Suppose – NAT box has globally-valid IP address of 128.210.24.6 – Computer at a site has private address 192.168.0.1 – Computer contacts Internet site 198.133.219.25 d Resulting translation is: NAT to the Internet SRC = 192.168.0.1 DST = 198.133.219.25 SRC = 128.210.24.6 DST = 198.133.219.25 SRC = 198.133.219.25 DST = 128.210.24.6 SRC = 198.133.219.25 DST = 192.168.0.1 valid address 128.210.24.6 host at site with private address 192.168.0.1 Computer Networks and Internets -- Module 5 117 Spring, 2014 Copyright  2014. All rights reserved.
  • 600. Implementation Of NAT d NAT device keeps an internal translation table d Table stores translations for both outgoing and incoming datagrams d Values filled in automatically when computer at site first sends datagram to the Internet d Translation table for previous example 2 22222222222222222222222222222222222222222222222222222222222222 Direction Field Old Value New Value 2 22222222222222222222222222222222222222222222222222222222222222 out IP Source 192.168.0.1 128.210.24.6 222222222222222222222222222222222222222222222222222 IP Destination 198.133.219.25 -- no change -- 2 22222222222222222222222222222222222222222222222222222222222222 in IP Source 198.133.219.25 -- no change -- 222222222222222222222222222222222222222222222222222 IP Destination 128.210.24.6 192.168.0.1 2 22222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 5 118 Spring, 2014 Copyright  2014. All rights reserved.
  • 601. Transport-Layer NAT (NAPT) d Handles TCP, UDP, and ICMP d Translates TCP/ UDP protocol port numbers as well as IP addresses d Permits multiple computers at a site to contact the same Internet service simultaneously without interference d Examples: – Two computers at a site download songs from iTunes – Three computers at a site contact Google simultaneously Computer Networks and Internets -- Module 5 119 Spring, 2014 Copyright  2014. All rights reserved.
  • 602. Example Of NAPT Translation d Suppose – Computers at site have private addresses assigned from private address block 192.168 / 16 – Two computers at the site each contact TCP port 30000 on computer 128 210.19.20 d NAPT chooses a new port number for each and translates 22222222222222222222222222222222222222222222222222222222222222222222 Dir. Fields Old Value New Value 22222222222222222222222222222222222222222222222222222222222222222222 out IP SRC:TCP SRC 192.168.0.1:30000 128.10.24.6:40001 22222222222222222222222222222222222222222222222222222222222222222222 out IP SRC:TCP SRC 192.168.0.2 :30000 128.10.24.6 :40002 22222222222222222222222222222222222222222222222222222222222222222222 in IP DEST:TCP DEST 128.10.24.6 :40001 192.168.0.1 :30000 22222222222222222222222222222222222222222222222222222222222222222222 in IP DEST:TCP DEST 128.10.24.6 :40002 192.168.0.2 :30000 22222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 5 120 Spring, 2014 Copyright  2014. All rights reserved.
  • 603. NAT In Practice d Many consumer products have NAT built in d Examples: – Cable and DSL modems – Wireless routers d Note that most wireless routers provide both wired and wireless network connections; they provide NAT on all connections Internet connection DSL or cable modem wireless router Computer Networks and Internets -- Module 5 121 Spring, 2014 Copyright  2014. All rights reserved.
  • 605. What Should A Network Provide? Computer Networks and Internets -- Module 5 123 Spring, 2014 Copyright  2014. All rights reserved.
  • 606. What Should A Network Provide? d One possibility: network centric – Network offers all services, such as email, web, etc – Host accesses services – Network authenticates user, handles reliability – Know as customer-provider communication Computer Networks and Internets -- Module 5 123 Spring, 2014 Copyright  2014. All rights reserved.
  • 607. What Should A Network Provide? d One possibility: network centric – Network offers all services, such as email, web, etc – Host accesses services – Network authenticates user, handles reliability – Know as customer-provider communication d Another possibility: network provides communication – Network only transfers packets – Applications handle everything else, including reliability, flow control, and authentication – Known as end-to-end communication Computer Networks and Internets -- Module 5 123 Spring, 2014 Copyright  2014. All rights reserved.
  • 608. End-To-End Principle d Fundamental concept in the Internet d Network provides best-effort packet transport d Endpoints – Control communication – Provide all reliability d Consequence Some of the most complex protocols in the Internet protocol suite run in hosts rather than in routers. Computer Networks and Internets -- Module 5 124 Spring, 2014 Copyright  2014. All rights reserved.
  • 609. Transport Layer d Layer between applications and IP Application Transport Internet Network Interface Physical LAYER 1 LAYER 2 LAYER 3 LAYER 4 LAYER 5 d Allows multiple applications on a given host to communicate with applications on other hosts d Uses IP to carry messages Computer Networks and Internets -- Module 5 125 Spring, 2014 Copyright  2014. All rights reserved.
  • 610. Problems A Transport Protocol Can Handle d Accommodate speed mismatch between sender and receiver d Detect and recover from datagram loss d Eliminate duplicate packets d Guarantee that messages arrive in order d Respond to congestion in the Internet d Prevent delayed packets from being misinterpreted d Verify that data was not corrupted during transit d Ensure that each party has agreed to communicate d Note: a given transport protocol may not handle all problems Computer Networks and Internets -- Module 5 126 Spring, 2014 Copyright  2014. All rights reserved.
  • 611. Techniques Transport Protocols Use d Application demultiplexing – Sender places a value in each outgoing packet that identifies an application on the receiving host – Receiver uses the value to determine which application should receive the packet Computer Networks and Internets -- Module 5 127 Spring, 2014 Copyright  2014. All rights reserved.
  • 612. Techniques Transport Protocols Use d Application demultiplexing – Sender places a value in each outgoing packet that identifies an application on the receiving host – Receiver uses the value to determine which application should receive the packet d Flow-control mechanisms – Receiver informs sender of acceptable data rate – Sender limits rate to prevent overrunning the receiver Computer Networks and Internets -- Module 5 127 Spring, 2014 Copyright  2014. All rights reserved.
  • 613. Techniques Transport Protocols Use (continued) d Congestion control mechanisms – Receiver or network informs sender about congestion in the network – Sender reduces data rate (packet rate) until congestion subsides Computer Networks and Internets -- Module 5 128 Spring, 2014 Copyright  2014. All rights reserved.
  • 614. Techniques Transport Protocols Use (continued) d Congestion control mechanisms – Receiver or network informs sender about congestion in the network – Sender reduces data rate (packet rate) until congestion subsides d Sequence numbers – Sender places a sequence number in each packet – Receiver uses the sequence numbers to ensure no packets are missing and that packets are delivered in the correct order Computer Networks and Internets -- Module 5 128 Spring, 2014 Copyright  2014. All rights reserved.
  • 615. Techniques Transport Protocols Use (continued) d Positive acknowledgement with retransmission – Receiver sends acknowledgement to inform sender when a packet arrives – Sender retransmits packet if acknowledgement fails to arrive within a specified time Computer Networks and Internets -- Module 5 129 Spring, 2014 Copyright  2014. All rights reserved.
  • 616. Techniques Transport Protocols Use (continued) d Positive acknowledgement with retransmission – Receiver sends acknowledgement to inform sender when a packet arrives – Sender retransmits packet if acknowledgement fails to arrive within a specified time d Sliding window – Instead of transmitting a packet and waiting for an acknowledgement, a sender transmits K packets and each time an acknowledgement arrives, transmits another Computer Networks and Internets -- Module 5 129 Spring, 2014 Copyright  2014. All rights reserved.
  • 617. Transport Protocols Used In The Internet d Two primary transport protocols used in the Internet – User Datagram Protocol (UDP) – Transmission Control Protocol (TCP) d Choice determined by application protocol – Many applications specify the use of a single transport (e.g., email transfer uses TCP) – Some applications allow the use of either (e.g., DNS queries can be sent via UDP or TCP) d Recall: each transport protocol has some surprising characteristics Computer Networks and Internets -- Module 5 130 Spring, 2014 Copyright  2014. All rights reserved.
  • 618. Message Transport With The User Datagram Protocol
  • 619. User Datagram Protocol (UDP) d Used – During startup – For VoIP and some video applications d Accounts for less than 10% of Internet traffic d Blocked by some ISPs Computer Networks and Internets -- Module 5 132 Spring, 2014 Copyright  2014. All rights reserved.
  • 620. UDP Characteristics d End-to-end d Connectionless communication d Message-oriented interface d Best-effort semantics d Arbitrary interaction d Operating system independence d No congestion or flow control Computer Networks and Internets -- Module 5 133 Spring, 2014 Copyright  2014. All rights reserved.
  • 621. End-To-End Communication d UDP provides communication among applications d Sending UDP – Accepts outgoing message from application – Places message in a User Datagram – Encapsulates User Datagram in an IP datagram and sends d Receiving UDP – Accepts incoming User Datagram from IP – Extracts message and delivers to receiving application d Note: message is unchanged by the network Computer Networks and Internets -- Module 5 134 Spring, 2014 Copyright  2014. All rights reserved.
  • 622. Connectionless Communication d An application using UDP can – Send a message to any receiver (universal) – Send at any time (asynchronous) – Stop sending at any time (unterminated) d That is, a sender does not – Inform the network before sending (i.e., does not establish a communication channel) – Inform the other endpoint before sending – Inform the network or other endpoint that no more messages will be sent Computer Networks and Internets -- Module 5 135 Spring, 2014 Copyright  2014. All rights reserved.
  • 623. Message-Oriented Interface d UDP – Accepts and delivers messages (blocks of data) – Does not require all messages to be the same size, but does define a maximum message size – Places each outgoing User Datagram in a single IP datagram for transmission – Always delivers a complete message to receiving application d Sending application must divide outgoing data into messages; UDP sends what it is given (or reports an error if the message is too large) Computer Networks and Internets -- Module 5 136 Spring, 2014 Copyright  2014. All rights reserved.
  • 624. UDP Message Size d UDP allows up to 64K octet messages d As a practical limit, the size of a User Datagram is limited by payload area in IP datagram d Maximum IP payload is 64K octets minus size of IP header d Therefore, the maximum UDP payload is 64K octets minus size of IP and UDP headers (usually 64K octets minus 28) d Application can choose any message size up to the maximum UDP payload Computer Networks and Internets -- Module 5 137 Spring, 2014 Copyright  2014. All rights reserved.
  • 625. Large And Small Messages d What happens if an application sends a 10K octet message? Computer Networks and Internets -- Module 5 138 Spring, 2014 Copyright  2014. All rights reserved.
  • 626. Large And Small Messages d What happens if an application sends a 10K octet message? d The message fits into an IP datagram, but... Computer Networks and Internets -- Module 5 138 Spring, 2014 Copyright  2014. All rights reserved.
  • 627. Large And Small Messages d What happens if an application sends a 10K octet message? d The message fits into an IP datagram, but... network frames have a smaller MTU (typically 1500 octets) Computer Networks and Internets -- Module 5 138 Spring, 2014 Copyright  2014. All rights reserved.
  • 628. Large And Small Messages d What happens if an application sends a 10K octet message? d The message fits into an IP datagram, but... network frames have a smaller MTU (typically 1500 octets) d So, the result of sending a large message is Computer Networks and Internets -- Module 5 138 Spring, 2014 Copyright  2014. All rights reserved.
  • 629. Large And Small Messages d What happens if an application sends a 10K octet message? d The message fits into an IP datagram, but... network frames have a smaller MTU (typically 1500 octets) d So, the result of sending a large message is IP Fragmentation! Computer Networks and Internets -- Module 5 138 Spring, 2014 Copyright  2014. All rights reserved.
  • 630. Large And Small Messages d What happens if an application sends a 10K octet message? d The message fits into an IP datagram, but... network frames have a smaller MTU (typically 1500 octets) d So, the result of sending a large message is IP Fragmentation! d What happens if an application chooses a small message size, such as 20 octets? Computer Networks and Internets -- Module 5 138 Spring, 2014 Copyright  2014. All rights reserved.
  • 631. Large And Small Messages d What happens if an application sends a 10K octet message? d The message fits into an IP datagram, but... network frames have a smaller MTU (typically 1500 octets) d So, the result of sending a large message is IP Fragmentation! d What happens if an application chooses a small message size, such as 20 octets? Inefficiency! Computer Networks and Internets -- Module 5 138 Spring, 2014 Copyright  2014. All rights reserved.
  • 632. Choosing An Optimal Message Size Computer Networks and Internets -- Module 5 139 Spring, 2014 Copyright  2014. All rights reserved.
  • 633. Choosing An Optimal Message Size d What size messages should an application send? Computer Networks and Internets -- Module 5 139 Spring, 2014 Copyright  2014. All rights reserved.
  • 634. Choosing An Optimal Message Size d What size messages should an application send? d Optimal UDP message size is S = M – H – M is the path MTU (i.e., minimum MTU on the path) – H is the size of IP and UDP headers Computer Networks and Internets -- Module 5 139 Spring, 2014 Copyright  2014. All rights reserved.
  • 635. Choosing An Optimal Message Size d What size messages should an application send? d Optimal UDP message size is S = M – H – M is the path MTU (i.e., minimum MTU on the path) – H is the size of IP and UDP headers d Finding M requires an application to – Violate layering and obtain forwarding information from IP – Note: for IPv4, only the local MTU is known d Bottom line: it may be difficult/ impossible for an application to compute S Computer Networks and Internets -- Module 5 139 Spring, 2014 Copyright  2014. All rights reserved.
  • 636. UDP Semantics d UDP uses IP for delivery Computer Networks and Internets -- Module 5 140 Spring, 2014 Copyright  2014. All rights reserved.
  • 637. UDP Semantics d UDP uses IP for delivery and offers the same semantics! Computer Networks and Internets -- Module 5 140 Spring, 2014 Copyright  2014. All rights reserved.
  • 638. UDP Semantics d UDP uses IP for delivery and offers the same semantics! d UDP packet can be – Lost – Duplicated – Delayed – Delivered out of order – Delivered with data bits altered Computer Networks and Internets -- Module 5 140 Spring, 2014 Copyright  2014. All rights reserved.
  • 639. UDP Semantics d UDP uses IP for delivery and offers the same semantics! d UDP packet can be – Lost – Duplicated – Delayed – Delivered out of order – Delivered with data bits altered d Note 1: UDP does not introduce such errors; the errors arise from the underlying networks Computer Networks and Internets -- Module 5 140 Spring, 2014 Copyright  2014. All rights reserved.
  • 640. UDP Semantics d UDP uses IP for delivery and offers the same semantics! d UDP packet can be – Lost – Duplicated – Delayed – Delivered out of order – Delivered with data bits altered d Note 1: UDP does not introduce such errors; the errors arise from the underlying networks d Note 2: UDP does include an optional checksum to protect the data (but the checksum may be disabled) Computer Networks and Internets -- Module 5 140 Spring, 2014 Copyright  2014. All rights reserved.
  • 641. Using Best-Effort Semantics d Questions – Do best-effort semantics make any sense for applications? – Why would a programmer choose UDP? Computer Networks and Internets -- Module 5 141 Spring, 2014 Copyright  2014. All rights reserved.
  • 642. Using Best-Effort Semantics d Questions – Do best-effort semantics make any sense for applications? – Why would a programmer choose UDP? d Answers – Retransmitting a lost message does not make sense for real-time audio and video applications because a retransmitted packet arrives too late to be used – Additional real-time protocols can be added to UDP to handle out-of-order delivery (we will cover later in the course) Computer Networks and Internets -- Module 5 141 Spring, 2014 Copyright  2014. All rights reserved.
  • 643. Arbitrary Interaction d UDP permits arbitrary interaction among applications 1-to-1 1-to-many Many-to-1 Many-to-many d Application programmer chooses interaction type d Ability to send a single message to multiple recipients can be valuable Computer Networks and Internets -- Module 5 142 Spring, 2014 Copyright  2014. All rights reserved.
  • 644. Efficient Implementation Of Interaction d Key point: UDP can use IP broadcast or multicast to deliver messages d Provides efficient delivery to a set of hosts d Example: UDP packet sent to IPv4 destination address 255.255.255.255 is delivered to all hosts on the local network (IPv6 has an all nodes multicast address) d No need for sender to transmit individual copies d Allows application to find a server without knowing the computer on which the server runs d Broadcast is a significant advantage of UDP over TCP for some applications Computer Networks and Internets -- Module 5 143 Spring, 2014 Copyright  2014. All rights reserved.
  • 645. Operating System Independence d Goal is to allow applications on heterogeneous computers to interact d Must avoid OS-specific identifiers, such as – Process IDs – Task names d Instead, create application identifiers that are not derived from any OS Computer Networks and Internets -- Module 5 144 Spring, 2014 Copyright  2014. All rights reserved.
  • 646. UDP Application Identifiers d 16-bit integer known as UDP protocol port number d Each application using UDP must obtain a port number d Sending UDP – Places a port number in UDP header to identify destination application on receiving host – Also includes port number of sending application d Receiving UDP – Uses value in header to select appropriate application UDP protocol port numbers are universal across all computers, and do not depend on the operating system. Computer Networks and Internets -- Module 5 145 Spring, 2014 Copyright  2014. All rights reserved.
  • 647. Identifying An Application d Both sending and receiving applications need a port number d Assignment of port numbers depends on the type of application d Application that offers a standardized service (server) – Uses a well-known port number for the service – Value is less than 1024 – Example: TFTP service uses UDP port 69 d Other applications (client) – Request a port number from the local operating system – Value is greater than 49151 Computer Networks and Internets -- Module 5 146 Spring, 2014 Copyright  2014. All rights reserved.
  • 648. Steps Taken To Contact A Service d Request an unused local port number from the local operating system d Obtain the IP address of the local computer from the operating system d Look up the port number of the service to be contacted d Obtain the domain name of a computer that runs the service and map to an IP address d Form a UDP datagram with a source port field set to the local port number and the destination port field set to the port number of the service d Request that the UDP datagram be encapsulated in an IP datagram and sent using the source and destination IP addresses obtained above Computer Networks and Internets -- Module 5 147 Spring, 2014 Copyright  2014. All rights reserved.
  • 649. Examples Of Well-Known UDP Ports 222222222222222222222222222222222222222222222222222222 Port Number Description 222222222222222222222222222222222222222222222222222222 0 Reserved (never assigned) 7 Echo 9 Discard 11 Active Users 13 Daytime 15 Network Status Program 17 Quote of the Day 19 Character Generator 37 Time 42 Host Name Server 43 Who Is 53 Domain Name Server 67 BOOTP or DHCP Server 68 BOOTP or DHCP Client 69 Trivial File Transfer 88 Kerberos Security Service 111 Sun Remote Procedure Call 123 Network Time Protocol 161 Simple Network Management Protocol 162 SNMP Traps 514 System Log 222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 5 148 Spring, 2014 Copyright  2014. All rights reserved.
  • 650. UDP Datagram Format d Extremely thin layer d User Datagram is divided into header and payload d Header contains only 8 octets: 0 16 31 UDP SOURCE PORT UDP DESTINATION PORT UDP MESSAGE LENGTH UDP CHECKSUM PAYLOAD (MESSAGE DATA) . . . d Question: why is length needed? Computer Networks and Internets -- Module 5 149 Spring, 2014 Copyright  2014. All rights reserved.
  • 651. UDP Checksum Computer Networks and Internets -- Module 5 150 Spring, 2014 Copyright  2014. All rights reserved.
  • 652. UDP Checksum d 16-bit 1s-complement checksum Computer Networks and Internets -- Module 5 150 Spring, 2014 Copyright  2014. All rights reserved.
  • 653. UDP Checksum d 16-bit 1s-complement checksum d Covers entire UDP packet, including data (recall: IP does not checksum the payload) Computer Networks and Internets -- Module 5 150 Spring, 2014 Copyright  2014. All rights reserved.
  • 654. UDP Checksum d 16-bit 1s-complement checksum d Covers entire UDP packet, including data (recall: IP does not checksum the payload) d Is optional: value of zero means sender did not compute a checksum Computer Networks and Internets -- Module 5 150 Spring, 2014 Copyright  2014. All rights reserved.
  • 655. UDP Checksum d 16-bit 1s-complement checksum d Covers entire UDP packet, including data (recall: IP does not checksum the payload) d Is optional: value of zero means sender did not compute a checksum d Includes extra pseudo header that contains IP addresses d Example of IPv4 pseudo header: 0 16 31 IP SOURCE ADDRESS IP DESTINATION ADDRESS ZERO PROTO UDP LENGTH Computer Networks and Internets -- Module 5 150 Spring, 2014 Copyright  2014. All rights reserved.
  • 656. Purpose Of A Pseudo Header d Receiver can verify that message arrived at correct computer as well as correct application on that computer d Consequence for NAT: if it changes the IP source or destination address, NAT must recompute UDP checksum d Note: pseudo headers provide another example of layering violations Computer Networks and Internets -- Module 5 151 Spring, 2014 Copyright  2014. All rights reserved.
  • 657. UDP Encapsulation d User Datagram travels in IP datagram d Two levels of encapsulation occur Frame Header Frame Payload IP Header IP Payload UDP Payload UDP Hdr d Note: the message the application places in the UDP Payload field may also have header and payload fields Computer Networks and Internets -- Module 5 152 Spring, 2014 Copyright  2014. All rights reserved.
  • 659. Transmission Control Protocol (TCP) d The primary transport-layer protocol used in the Internet d Accounts for about 90% of all Internet traffic (some estimates are higher) d Provides reliability d Appeals to programmers Computer Networks and Internets -- Module 5 154 Spring, 2014 Copyright  2014. All rights reserved.
  • 660. TCP Characteristics d End-to-end communication d Connection-oriented paradigm d Point-to-point connections d Complete reliability d Full-duplex communication d Stream interface d Reliable connection startup d Graceful connection shutdown Computer Networks and Internets -- Module 5 155 Spring, 2014 Copyright  2014. All rights reserved.
  • 661. End-To-End Communication d TCP provides communication among pairs of applications d Allows an application on one host to communicate with an application on another host d Permits multiple applications on a given computer to communicate simultaneously without interference d Uses protocol port numbers to distinguish among applications d Note: TCP ports are completely independent of UDP ports Computer Networks and Internets -- Module 5 156 Spring, 2014 Copyright  2014. All rights reserved.
  • 662. End-To-End Principle And Transport Protocols Computer Networks and Internets -- Module 5 157 Spring, 2014 Copyright  2014. All rights reserved.
  • 663. End-To-End Principle And Transport Protocols d Transport protocols operate in end systems, and view the underlying Internet as a virtual network Computer Networks and Internets -- Module 5 157 Spring, 2014 Copyright  2014. All rights reserved.
  • 664. End-To-End Principle And Transport Protocols d Transport protocols operate in end systems, and view the underlying Internet as a virtual network TCP TCP IP IP IP net iface. net iface. net iface. appl. appl. net 1 net 2 Host A Host B router The Internet communication system as viewed by TCP Computer Networks and Internets -- Module 5 157 Spring, 2014 Copyright  2014. All rights reserved.
  • 665. End-To-End Principle And Transport Protocols d Transport protocols operate in end systems, and view the underlying Internet as a virtual network TCP TCP IP IP IP net iface. net iface. net iface. appl. appl. net 1 net 2 Host A Host B router communication system as viewed by TCP d IP does not read or interpret TCP packets Computer Networks and Internets -- Module 5 157 Spring, 2014 Copyright  2014. All rights reserved.
  • 666. End-To-End Principle And Transport Protocols d Transport protocols operate in end systems, and view the underlying Internet as a virtual network TCP TCP IP IP IP net iface. net iface. net iface. appl. appl. net 1 net 2 Host A Host B router communication system as viewed by TCP d IP does not read or interpret TCP packets d When forwarding datagrams, router only processes layers 1 through 3 Computer Networks and Internets -- Module 5 157 Spring, 2014 Copyright  2014. All rights reserved.
  • 667. TCP Protocol Port Numbers d 16-bit integers used to identify applications d Each application needs a port number d TCP well-known port assignments are independent of UDP assignments d However, to help humans, the same value chosen if service available via either transport d Examples – Both UDP and TCP assign port 53 to the Domain Name System (DNS) – Both UDP and TCP assign port 7 to the echo service Computer Networks and Internets -- Module 5 158 Spring, 2014 Copyright  2014. All rights reserved.
  • 668. Protocol Ports, The Four-Tuple, And Flows d Key concept: because a TCP connection corresponds to a pair of endpoints, the connection is identified by four items – IP source address – TCP source port – IP destination address – TCP destination port d Commonly called the four-tuple d Explains how an application such as a web server can communicate with multiple clients at the same time d Interestingly, more than four values must be extracted from a frame to identify a TCP flow Computer Networks and Internets -- Module 5 159 Spring, 2014 Copyright  2014. All rights reserved.
  • 669. TCP’s Connection-Oriented Paradigm d Analogous to a telephone call d Pair of applications must – Establish a TCP connection before communicating – Terminate the connection when finished d Important insights – A TCP connection is virtual because only the two endpoints know a connection is in place – TCP does not have keep-alive messages: no packets are exchanged unless applications are sending data Computer Networks and Internets -- Module 5 160 Spring, 2014 Copyright  2014. All rights reserved.
  • 670. Limited Interaction d A TCP connection only provides communication between a pair of applications d Known as a point-to-point communication d TCP connection does not support – Reception from an arbitrary set senders – Multi-point connections with more than two endpoints – Broadcast or multicast delivery Computer Networks and Internets -- Module 5 161 Spring, 2014 Copyright  2014. All rights reserved.
  • 671. The TCP Reliability Guarantee d TCP provides full reliability d Compensates for – Loss – Duplication – Delivery out of order d Does so without overloading the underlying networks and routers d TCP makes the following guarantee Data will be delivered or sender will (eventually) be notified. Computer Networks and Internets -- Module 5 162 Spring, 2014 Copyright  2014. All rights reserved.
  • 672. TCP Reliability d Uses timeout-and-retransmission d Receiver returns an acknowledgement (ACK) to sender when data arrives d Sender waits for acknowledgement and retransmits data if no acknowledgement arrives Computer Networks and Internets -- Module 5 163 Spring, 2014 Copyright  2014. All rights reserved.
  • 673. Illustration Of TCP Retransmission Events at Host 1 Events at Host 2 send message 1 receive message 1 send ack 1 receive ack 1 send message 2 receive message 2 send ack 2 receive ack 2 send message 3 retransmission timer expires retransmit message 3 receive message 3 send ack 3 packet lost Computer Networks and Internets -- Module 5 164 Spring, 2014 Copyright  2014. All rights reserved.
  • 674. Why TCP Retransmission Is Hard d TCP designed for Internet – Round-trip delays differ among connections – Round-trip delays vary over time d Waiting too long introduces unnecessary delay d Not waiting long enough sends unnecessary copies d Key to TCP’s success: adaptive retransmission Computer Networks and Internets -- Module 5 165 Spring, 2014 Copyright  2014. All rights reserved.
  • 675. How Bad Is The Internet? d In the old days: delays in seconds, high variability Computer Networks and Internets -- Module 5 166 Spring, 2014 Copyright  2014. All rights reserved.
  • 676. How Bad Is The Internet? d In the old days: delays in seconds, high variability d Now: Computer Networks and Internets -- Module 5 166 Spring, 2014 Copyright  2014. All rights reserved.
  • 677. How Bad Is The Internet? d In the old days: delays in seconds, high variability d Now: delays in seconds, high variability Computer Networks and Internets -- Module 5 166 Spring, 2014 Copyright  2014. All rights reserved.
  • 678. How Bad Is The Internet? d In the old days: delays in seconds, high variability d Now: delays in seconds, high variability Example round-trip measurements from Ireland to California, 2009 Computer Networks and Internets -- Module 5 166 Spring, 2014 Copyright  2014. All rights reserved.
  • 679. Adaptive Retransmission d Continually estimate round-trip time of each connection d Set retransmission timer from round-trip estimate d Illustration of timeout on two connections: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . est 1 est 2 timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . est 1 est 2 timeout . . . packet lost packet lost Computer Networks and Internets -- Module 5 167 Spring, 2014 Copyright  2014. All rights reserved.
  • 680. Review Of Sliding Window d Transport protocols use sliding window mechanism d Idea is to send multiple packets before waiting for an acknowledgment d Window size is relatively small (tens of packets, not millions) d Motivation is to increase throughput Computer Networks and Internets -- Module 5 168 Spring, 2014 Copyright  2014. All rights reserved.
  • 681. Illustration Of TCP’s Sliding Window 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 window window window initial position intermediate position final position already acknowledged still unsent window moves as acknowledgements arrive Computer Networks and Internets -- Module 5 169 Spring, 2014 Copyright  2014. All rights reserved.
  • 682. How Sliding Window Improves Data Rate host 1 host 2 stop-and-go send packet send packet send packet send packet send ack send ack send ack send ack done Computer Networks and Internets -- Module 5 170 Spring, 2014 Copyright  2014. All rights reserved.
  • 683. How Sliding Window Improves Data Rate host 1 host 2 host 1 host 2 stop-and-go sliding window send packet send packet send packet send packet send ack send ack send ack send ack done send four packets send four acks done d Window size of K improves data rate by a factor of K Computer Networks and Internets -- Module 5 170 Spring, 2014 Copyright  2014. All rights reserved.
  • 684. TCP Flow Control And TCP Window d Flow control mechanism coordinates data being sent with receiver’s speed d Buffer size used instead of data rate d Receiver tells sender size of initial buffer d Each acknowledgement specifies space remaining in buffer d Known as window advertisement Computer Networks and Internets -- Module 5 171 Spring, 2014 Copyright  2014. All rights reserved.
  • 685. Illustration Of TCP Flow Control Sender Events Receiver Events advertise window=2500 send data octets 1-1000 send data octets 1001-2000 send data octets 2001-2500 ack up to 1000, window=1500 ack up to 2000, window=500 ack up to 2500, window=0 receive ack for 1000 receive ack for 2000 receive ack for 2500 application reads 2000 octets ack up to 2500, window=2000 send data octets 2501-3500 send data octets 3501-4500 ack up to 3500, window=1000 ack up to 4500, window=0 receive ack for 3500 receive ack for 4500 ack up to 4500, window=1000 application reads 1000 octets receive ack for 4500 . . . Computer Networks and Internets -- Module 5 172 Spring, 2014 Copyright  2014. All rights reserved.
  • 686. TCP Congestion Control And Slow Start d TCP uses loss or changes in delay to infer congestion in the network d When congestion is detected, sending TCP temporarily reduces the size of the window d When a packet is lost, TCP temporarily reduces the effective window to one half its current value d Later, TCP slowly increases the window again d Congestion avoidance also used when a connection starts – Temporarily use a window size of one segment – Double the window size when ACK arrives – Known as slow start Computer Networks and Internets -- Module 5 173 Spring, 2014 Copyright  2014. All rights reserved.
  • 687. Full-Duplex Communication d TCP connection between A and B provides two independent data streams, one from A to B and the other from B to A d Each side – Has a receive buffer – Advertises a window size for incoming data – Uses sequence numbers to number outgoing data bytes – Implements timeout-and-retransmission for data it sends d Application can choose to shut down communication in one direction Computer Networks and Internets -- Module 5 174 Spring, 2014 Copyright  2014. All rights reserved.
  • 688. Full-Duplex Communication (continued) d Each TCP packet contains fields for both forward and reverse data streams – Sequence number for data being sent in the forward direction – Acknowledgement number for data that has been received Computer Networks and Internets -- Module 5 175 Spring, 2014 Copyright  2014. All rights reserved.
  • 689. Stream Interface d After connection is established, TCP accepts a stream of data bytes from the sending application and transfers them d Sending application can choose amount of data to pass on each request d Surprise: TCP decides how to group bytes into packets d Known as stream interface d Consequence Data may be passed to a receiving application in chunks that differ from the chunks that the sending application generated. Computer Networks and Internets -- Module 5 176 Spring, 2014 Copyright  2014. All rights reserved.
  • 690. Connection Startup And Shutdown d Difficult problem d Packets can be – Lost – Duplicated – Delayed – Delivered out-of-order d Either end can crash and reboot d Need to know that both sides have agreed to start/ terminate the connection Computer Networks and Internets -- Module 5 177 Spring, 2014 Copyright  2014. All rights reserved.
  • 691. Reliable Connection Startup d TCP guarantees reliable connection startup that avoids replay problems d Performed with 3-way handshake Events at Host 1 Events at Host 2 send SYN receive SYN send SYN + ACK receive SYN + ACK send ACK receive ACK d Each side chooses starting sequence number at random Computer Networks and Internets -- Module 5 178 Spring, 2014 Copyright  2014. All rights reserved.
  • 692. Graceful Connection Shutdown d Analogous to 3-way handshake for startup d Guarantees no ambiguity about connection termination Events at Host 1 Events at Host 2 send FIN + ACK receive FIN + ACK send FIN + ACK receive FIN + ACK send ACK receive ACK . . . Computer Networks and Internets -- Module 5 179 Spring, 2014 Copyright  2014. All rights reserved.
  • 693. TCP Segment Format d TCP packet is called a segment d Segment is encapsulated in IP for transmission d Single format used for SYNs, FINs, ACKs, and data 0 4 10 16 24 31 SOURCE PORT DESTINATION PORT SEQUENCE NUMBER ACKNOWLEDGEMENT NUMBER HLEN NOT USED CODE BITS WINDOW CHECKSUM URGENT POINTER OPTIONS (if any) BEGINNING OF DATA . . . Computer Networks and Internets -- Module 5 180 Spring, 2014 Copyright  2014. All rights reserved.
  • 695. Historical Perspective d Computing in the 1960s – Mainframes – Batch processing with punched cards – Usually one computer per organization d Computing in the 1970s – Minicomputers – A few computers per organization – Dumb terminals Computer Networks and Internets -- Module 5 182 Spring, 2014 Copyright  2014. All rights reserved.
  • 696. Traditional Wide Area Networks d Developed during 1960s mainframe era d Predate – LANs – PCs d Basic motivation – Interconnect mainframe at one site to mainframes at other sites – Allow resource sharing d First to employ dynamic routing Computer Networks and Internets -- Module 5 183 Spring, 2014 Copyright  2014. All rights reserved.
  • 697. Traditional WAN Architecture d Dedicated device known as packet switch placed at each site d Packet switch provides – Local connections for host computer(s) at the site – Long-distance connections to other sites d Connection among sites – Leased digital circuits – Leased raw copper or fiber with customer supplying modems Computer Networks and Internets -- Module 5 184 Spring, 2014 Copyright  2014. All rights reserved.
  • 698. Packet Switch Used In Traditional WAN d Special-purpose, stand-alone device d Dedicated to packet forwarding d Small computer with – Processor – Memory – Program on stable storage – I/ O interfaces Computer Networks and Internets -- Module 5 185 Spring, 2014 Copyright  2014. All rights reserved.
  • 699. Conceptual View Of Traditional Packet Switch packet switch local computers processor memory I/O interfaces for local computers I/O interfaces for remote sites internal interconnects leased circuits to remote sites d Memory needed to store packets Computer Networks and Internets -- Module 5 186 Spring, 2014 Copyright  2014. All rights reserved.
  • 700. Store And Forward Paradigm d Key paradigm used in packet switching d Operation – Interface hardware places each arriving packet in a queue in memory – Processor continually removes next packet from the queue and forwards toward its destination d Motivation: memory is a buffer that accommodates a short burst of packets that arrive back-to-back Important point: packet traffic tends to be bursty. Computer Networks and Internets -- Module 5 187 Spring, 2014 Copyright  2014. All rights reserved.
  • 701. Example Of Traditional WAN Architecture d Packet switch at each site connects to other sites d Circuits accommodate traffic and desired robustness packet switch at site 1 packet switch at site 2 packet switch at site 3 packet switch at site 4 each computer connects to a packet switch digital circuits between switches Computer Networks and Internets -- Module 5 188 Spring, 2014 Copyright  2014. All rights reserved.
  • 702. Traditional WAN Addressing Computer Networks and Internets -- Module 5 189 Spring, 2014 Copyright  2014. All rights reserved.
  • 703. Traditional WAN Addressing d Hierarchical model analogous to Internet addressing Computer Networks and Internets -- Module 5 189 Spring, 2014 Copyright  2014. All rights reserved.
  • 704. Traditional WAN Addressing d Hierarchical model analogous to Internet addressing d Conceptual two-level hierarchy ( site, computer at the site ) Computer Networks and Internets -- Module 5 189 Spring, 2014 Copyright  2014. All rights reserved.
  • 705. Traditional WAN Addressing d Hierarchical model analogous to Internet addressing d Conceptual two-level hierarchy ( site, computer at the site ) d In practice, one packet switch per site and K connections for local computers means the address hierarchy is: ( packet switch, local connection on the switch ) Computer Networks and Internets -- Module 5 189 Spring, 2014 Copyright  2014. All rights reserved.
  • 706. Illustration Of Traditional WAN Addressing 1 2 3 4 5 6 1 2 3 4 5 6 packet switch 1 packet switch 2 address is [1,2] address is [1,5] address is [2,1] address is [2,6] d The two parts of an address are combined to form a single binary number Computer Networks and Internets -- Module 5 190 Spring, 2014 Copyright  2014. All rights reserved.
  • 707. Next-Hop Forwarding d Analogous to IP datagram forwarding d Each packet contains a destination address d Forwarding uses only the packet switch portion of an address; delivery uses the rest of the address d If packet has reached the destination packet switch, deliver to locally-connected computer d Otherwise, forward to another packet switch that is closer to the destination site Computer Networks and Internets -- Module 5 191 Spring, 2014 Copyright  2014. All rights reserved.
  • 708. Algorithm For Packet Forwarding Given: An incoming packet arriving at a packet switch Perform: The next-hop forwarding step Method: Extract the destination address from the packet and divide into packet switch, P, and computer, C; if ( P is the same as “my” packet switch number ) { Deliver the packet to local computer C; } else { Use P to select a next hop, and forward the packet over the selected link to the next hop; } 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2222222222222222222222222222222222222222222222222222222 Computer Networks and Internets -- Module 5 192 Spring, 2014 Copyright  2014. All rights reserved.
  • 709. WAN Forwarding Table d Analogous to IP forwarding table d Each entry in table refers to a switch, not an individual computer to reach send to switch 1 switch 2 switch 3 interface 1 local delivery interface 4 Example WAN with three packet switches Forwarding table for switch 2 [1,2] [1,5] [3,2] [3,5] [2,1] [2,6] packet switch 1 packet switch 3 packet switch 2 interface 1 interface 4 Computer Networks and Internets -- Module 5 193 Spring, 2014 Copyright  2014. All rights reserved.
  • 710. Modern WAN Architecture d Uses IP technology d Router at site has – Local connections to networks at the site – Long-distance connections to routers at other sites d Typical use: connect all sites of an organization Computer Networks and Internets -- Module 5 194 Spring, 2014 Copyright  2014. All rights reserved.
  • 711. Illustration Of Modern WAN Connections LAN (e.g., Ethernet) Router local computers connections to other sites d Uses conventional IP router d Typical remote connection is a leased data circuit d Router can also provide connection to the Internet Computer Networks and Internets -- Module 5 195 Spring, 2014 Copyright  2014. All rights reserved.
  • 713. Constructing A Forwarding Table d Two basic approaches d Static routing – Used in Internet hosts – Entries inserted when system boots and do not change d Dynamic routing – Used in packet switches and IP routers – Initial entries inserted when system boots – Routing software continually monitors network, computes shortest paths, and updates forwarding table Computer Networks and Internets -- Module 5 197 Spring, 2014 Copyright  2014. All rights reserved.
  • 714. Static Routing d Used in most hosts d Only K+1 entries in forwarding table if host has K network connections d K entries, one per network connection – IP prefix for the network – Address mask for the network – Interface for the network d Final entry: default route – default IP router address – Interface for the default router Computer Networks and Internets -- Module 5 198 Spring, 2014 Copyright  2014. All rights reserved.
  • 715. Dynamic Routing d Routing Software – Runs on each packet switch or router – Computes shortest paths and installs entries in local forwarding table d Models the network as a graph 1 2 3 4 1 2 3 4 Example WAN Equivalent graph edges or links nodes Computer Networks and Internets -- Module 5 199 Spring, 2014 Copyright  2014. All rights reserved.
  • 716. Example Graph And Next-Hop Forwarding Tables 1 2 3 4 2 222222222222222 2 2222222222222222 2 2222222222222222 2 2222222222222222 to send to send to send to send reach over reach over reach over reach over 2 222222222222222 2 2222222222222222 2 2222222222222222 2 2222222222222222 1 – 1 (2,3) 1 (3,1) 1 (4,3) 2 222222222222222 2 2222222222222222 2 2222222222222222 2 2222222222222222 2 (1,3) 2 – 2 (3,2) 2 (4,2) 2 222222222222222 2 2222222222222222 2 2222222222222222 2 2222222222222222 3 (1,3) 3 (2,3) 3 – 3 (4,3) 2 222222222222222 2 2222222222222222 2 2222222222222222 2 2222222222222222 4 (1,3) 4 (2,4) 4 (3,4) 4 – 11 1 1 1 1 1 1 1 1 1 1 2 22222222222222211 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 2 222222222222222211 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 2 222222222222222211 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 2 222222222222222211 1 1 1 1 1 1 1 1 1 1 node 1 node 2 node 3 node 4 Computer Networks and Internets -- Module 5 200 Spring, 2014 Copyright  2014. All rights reserved.
  • 717. Dynamic Routing d Goals – Consistent, optimal routes – Automatic route change to accommodate failures d Each node (packet switch or router) participates d Routing software on a node exchanges information with routing software on other nodes d Distributed computation d Two basic algorithms employed – Distance-Vector (DV) – Link-State Routing (LSR) Computer Networks and Internets -- Module 5 201 Spring, 2014 Copyright  2014. All rights reserved.
  • 718. Distance-Vector (DV) Routing d Approach used in many early routing protocols d Also known as Bellman Ford d Node – Receives information from neighbors – Combines information from all neighbors with local information – Sends copy of processed information to all neighbors Computer Networks and Internets -- Module 5 202 Spring, 2014 Copyright  2014. All rights reserved.
  • 719. How DV Works d A participant periodically sends route advertisement to each neighbor d Advertisement specifies reachable sites and distance to each I can reach site X, and its distance from me is Y. I can reach site Z, and its distance from me is W. . . . d Neighbor receives advertisement and updates its forwarding table d In next round, neighbors each send advertisements to their neighbors Computer Networks and Internets -- Module 5 203 Spring, 2014 Copyright  2014. All rights reserved.
  • 720. Distance-Vector Algorithm d Used when advertisement arrives d Examine each item in advertisement – If neighbor can reach site X and I cannot, add an entry to my forwarding table for X with the neighbor as the next hop – If I already have a route to X with the neighbor as the next hop, replace the distance in the route with the advertised distance – If I have a route to X that is more expensive than going through the neighbor, change the next hop to the neighbor Computer Networks and Internets -- Module 5 204 Spring, 2014 Copyright  2014. All rights reserved.
  • 721. Measuring The Distance Of A Route d Possible measures – Hops – Delay – Throughput – Economic or administrative cost d Many protocols use hops, but routing software often permits a manager to assign administrative hop counts Computer Networks and Internets -- Module 5 205 Spring, 2014 Copyright  2014. All rights reserved.
  • 722. Link-State Routing (LSR) d Chief alternative to distance-vector d Each node – Sends link status information – Computes shortest paths independently – Does not rely on computation performed by others d Name – Formal name is Link-State or Link-Status Routing – Also called Shortest Path First (SPF), a somewhat misleading term derived from underlying algorithm Computer Networks and Internets -- Module 5 206 Spring, 2014 Copyright  2014. All rights reserved.
  • 723. How LSR Works d Each pair of directly-connected nodes periodically – Tests connection between them – Broadcasts one of the following messages: The link between X and Y is up. or The link between X and Y is down. d Each node – Collects incoming broadcast messages and creates a graph – Uses Dijkstra’s SPF algorithm to compute a forwarding table (see text for details and example) Computer Networks and Internets -- Module 5 207 Spring, 2014 Copyright  2014. All rights reserved.
  • 724. Review Of Internet Forwarding d Hosts – Use static routing – Entries placed in forwarding table when system boots and remain unchanged d Routers – Use dynamic routing – Initial entries placed in forwarding table when system boots and routing software updates entries continually Computer Networks and Internets -- Module 5 208 Spring, 2014 Copyright  2014. All rights reserved.
  • 725. Example Of Host Routing Ethernet 128.10.0.0 / 16 Router R1 128.10.0.0 default 255.255.0.0 0.0.0.0 direct 128.10.0.100 Net Mask Next hop hosts on a network forwarding table in each host router address 128.10.0.100 to rest of Internet d Next hop in default route is known as a default router Computer Networks and Internets -- Module 5 209 Spring, 2014 Copyright  2014. All rights reserved.
  • 726. Why Dynamic Internet Routing Is Needed d Router – Only has direct connections to a few networks – Must know how to forward datagram to arbitrary destination d Example R1 R2 network 1 network 2 network 3 d Router R1 must learn about network 2 and R2 must learn about network 1 Computer Networks and Internets -- Module 5 210 Spring, 2014 Copyright  2014. All rights reserved.
  • 727. Important Principle No single routing protocol can be used across the entire Internet because the overhead is too high. Computer Networks and Internets -- Module 5 211 Spring, 2014 Copyright  2014. All rights reserved.
  • 728. Autonomous System Concept d Internet divided into a set of routing domains d Each routing domain is – Known as an autonomous system (AS) – Assigned a unique number d Generally, an AS is a contiguous set of routers and networks under one administrative authority d No exact definition; think of a large ISP or a large corporation d AS gathers and summarizes routing information before passing it to another AS Computer Networks and Internets -- Module 5 212 Spring, 2014 Copyright  2014. All rights reserved.
  • 729. Two Types Of Internet Routing Protocols Computer Networks and Internets -- Module 5 213 Spring, 2014 Copyright  2014. All rights reserved.
  • 730. Two Types Of Internet Routing Protocols d Interior Gateway Protocols (IGPs) – Used within an autonomous system – Choice of IGP is made by each AS – Relatively easy to install and manage Computer Networks and Internets -- Module 5 213 Spring, 2014 Copyright  2014. All rights reserved.
  • 731. Two Types Of Internet Routing Protocols d Interior Gateway Protocols (IGPs) – Used within an autonomous system – Choice of IGP is made by each AS – Relatively easy to install and manage d Exterior Gateway Protocols (EGPs) – Used between autonomous systems – More complex to install and configure – Include policy constraints that control which information is revealed Computer Networks and Internets -- Module 5 213 Spring, 2014 Copyright  2014. All rights reserved.
  • 732. Illustration Of IGPs and EGPs R1 R2 R3 R4 R5 R6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................... ................................... Autonomous System 1 Autonomous System 2 EGP used IGP1 used IGP2 used d Because metrics used in each AS may differ, direct comparison is impossible Computer Networks and Internets -- Module 5 214 Spring, 2014 Copyright  2014. All rights reserved.
  • 733. Principle Of Route And Data Flow d Data flows in opposite direction of routes d Example: ISP1 advertises route to customer Q and receives traffic for customer Q R1 R2 ISP1 ISP2 Routes for customers of ISP1 Data to customers of ISP1 Computer Networks and Internets -- Module 5 215 Spring, 2014 Copyright  2014. All rights reserved.
  • 735. Border Gateway Protocol (BGP) d Primary Exterior Gateway Protocol used in the Internet d Used by Tier 1 ISPs at the center of the Internet d Current version is 4 (BGP-4) d Characteristics – Provides routing among autonomous systems – Includes provisions for policies – Distinguishes transit routes from terminal routes – Uses reliable transport (TCP) – Sends path information Computer Networks and Internets -- Module 5 217 Spring, 2014 Copyright  2014. All rights reserved.
  • 736. Illustration Of BGP Paths d Modified Distance-Vector protocol d Advertisement contains a path in place of a distance d Path lists the autonomous systems to destination d Example To reach network X, I send along path Z, Y, W,... d Path information means receiver can apply policies (e.g., receiver can choose to ignore all routes that pass through AS number N) Computer Networks and Internets -- Module 5 218 Spring, 2014 Copyright  2014. All rights reserved.
  • 737. Routing Information Protocol (RIP) d Among the earliest Interior Gateway Protocols d Characteristics – Distance-Vector that uses hop-count metric – Sent over UDP (unreliable transport) – Advertises CIDR prefixes – Includes facility for default route propagation – Broadcast or multicast delivery d Current version is 2 (RIP2) Computer Networks and Internets -- Module 5 219 Spring, 2014 Copyright  2014. All rights reserved.
  • 738. RIP2 Packet Format 0 8 16 24 31 COMMAND (1-5) VERSION (2) MUST BE ZERO FAMILY OF NET 1 ROUTE TAG FOR NET 1 IP ADDRESS OF NET 1 ADDRESS MASK FOR NET 1 NEXT HOP FOR NET 1 DISTANCE TO NET 1 FAMILY OF NET 2 ROUTE TAG FOR NET 2 IP ADDRESS OF NET 2 ADDRESS MASK FOR NET 2 NEXT HOP FOR NET 2 DISTANCE TO NET 2 . . . d Note: routing protocols run at application layer (layer 5) Computer Networks and Internets -- Module 5 220 Spring, 2014 Copyright  2014. All rights reserved.
  • 739. Open Shortest Path First Protocol (OSPF) d Created by the IETF to be an open standard (reaction to proprietary protocols) d Characteristics – Interior Gateway Protocol – Advertises CIDR prefixes – Authenticated message exchange – Can import routes from BGP – Link-state algorithm – Provides for multi-access networks – Divides large network into areas Computer Networks and Internets -- Module 5 221 Spring, 2014 Copyright  2014. All rights reserved.
  • 740. Illustration Of An OSPF Graph R1 R2 R3 R4 R5 R6 R1 R2 R3 R4 R5 R6 a network the OSPF graph d Graph shows a link between each pair of routers even though some connections cross a shared network Computer Networks and Internets -- Module 5 222 Spring, 2014 Copyright  2014. All rights reserved.
  • 741. Intermediate System - Intermediate System (IS-IS) d Originally part of DECNET V protocols d Uses LSR approach d Initially – Considered somewhat over featured – Not widely accepted in the Internet – Overshadowed by OSPF d Eventually – OSPF became complex as features were added – IS-IS started to gain acceptance Computer Networks and Internets -- Module 5 223 Spring, 2014 Copyright  2014. All rights reserved.
  • 743. Where Intuition Fails d Routing is not like water flowing through pipes or traffic on highways – Multi-path routing is difficult – Capacity can go unused if not along shortest path d Fewest hops may not always be best – Compare two Ethernet hops and one satellite hop d Routing around congestion is not straightforward, and does not always yield a big improvement – Can cause out-of-order packets (TCP reacts) – Can result in route flapping Computer Networks and Internets -- Module 5 225 Spring, 2014 Copyright  2014. All rights reserved.
  • 744. Loops And Convergence d Routing loop – Circular routes – Can be caused if “good news” flows backward d Slow convergence (count to infinity) problem arises – Routes fail to converge after a change – Can cause a routing loop to persist Computer Networks and Internets -- Module 5 226 Spring, 2014 Copyright  2014. All rights reserved.
  • 745. How Good News Can Backwash d A story with three routers and a network A B C network N Computer Networks and Internets -- Module 5 227 Spring, 2014 Copyright  2014. All rights reserved.
  • 746. How Good News Can Backwash d A story with three routers and a network A B C network N Computer Networks and Internets -- Module 5 227 Spring, 2014 Copyright  2014. All rights reserved.
  • 747. How Good News Can Backwash d A story with three routers and a network A B C network N Computer Networks and Internets -- Module 5 227 Spring, 2014 Copyright  2014. All rights reserved.
  • 748. How Good News Can Backwash d A story with three routers and a network A B C network N Computer Networks and Internets -- Module 5 227 Spring, 2014 Copyright  2014. All rights reserved.
  • 749. How Good News Can Backwash d A story with three routers and a network A B C network N Computer Networks and Internets -- Module 5 227 Spring, 2014 Copyright  2014. All rights reserved.
  • 750. How Good News Can Backwash d A story with three routers and a network A B C network N Computer Networks and Internets -- Module 5 227 Spring, 2014 Copyright  2014. All rights reserved.
  • 751. How Good News Can Backwash d A story with three routers and a network A B C network N Computer Networks and Internets -- Module 5 227 Spring, 2014 Copyright  2014. All rights reserved.
  • 752. How Good News Can Backwash d A story with three routers and a network A B C network N d In practice, modern DV protocols employ heuristics that – Eliminate backflow – Lock down changes after a failure Computer Networks and Internets -- Module 5 227 Spring, 2014 Copyright  2014. All rights reserved.
  • 753. Other Routing Problems d Black hole – Routing system sends packets for a set of destinations to a location where they are silently discarded – Can be caused if routing update packets are lost d Route flapping (lack of convergence) – Routes continue to oscillate – Can be caused by equal-length paths Computer Networks and Internets -- Module 5 228 Spring, 2014 Copyright  2014. All rights reserved.
  • 754. Routing Overhead d Traffic from routing protocols is “overhead” d Specific cases – DV advertisements tend to be large – LSR uses broadcast d Fundamental tradeoff – Decreasing frequency of routing exchanges lowers overhead – Increasing frequency of routing exchanges reduces the time between a failure and rerouting around the failure Computer Networks and Internets -- Module 5 229 Spring, 2014 Copyright  2014. All rights reserved.
  • 756. IPv4 Multicast d Defined early; informally called “Deering multicast” d Provides Internet-wide multicast dissemination d Uses IPv4 addresses 224.0.0.0 through 239.255.255.255 (the original Class D address space) d In theory, any host in the Internet can – Join or leave any group at any time – Send a datagram to any group at any time Computer Networks and Internets -- Module 5 231 Spring, 2014 Copyright  2014. All rights reserved.
  • 757. IPv4 Multicast d Defined early; informally called “Deering multicast” d Provides Internet-wide multicast dissemination d Uses IPv4 addresses 224.0.0.0 through 239.255.255.255 (the original Class D address space) d In theory, any host in the Internet can – Join or leave any group at any time – Send a datagram to any group at any time Internet-wide multicast is not widely deployed Computer Networks and Internets -- Module 5 231 Spring, 2014 Copyright  2014. All rights reserved.
  • 758. IPv6 Multicast d Fundamental part of IPv6 d IPv6 prohibits broadcast, but defines multicast groups that are equivalent – All routers – All nodes Computer Networks and Internets -- Module 5 232 Spring, 2014 Copyright  2014. All rights reserved.
  • 759. Internet Group Multicast Protocol (IGMP) d Allows a host to join or leave a multicast group d Restricted to a single network (host talks to local router) d When first host on a network joins a new group or last host on a network leaves a group, router(s) on the network change multicast routes accordingly Computer Networks and Internets -- Module 5 233 Spring, 2014 Copyright  2014. All rights reserved.
  • 760. IP Multicast And Ethernet Delivery d When sending IP multicast across Ethernet – Can use Ethernet multicast capability – IP multicast address is mapped to an Ethernet multicast address d Problem – Most interface hardware limits the number of Ethernet multicast addresses that can be used simultaneously – Trick: use a few multicast addresses and allow software to decide how a given packet should be processed Computer Networks and Internets -- Module 5 234 Spring, 2014 Copyright  2014. All rights reserved.
  • 761. Multicast Routing Protocols d Needed to propagate multicast routes throughout the Internet d Goals – Ensure all participants in a group receive packets sent to the group – Avoid flooding multicast across a network unless a host is listening d General approach – Form a graph-theoretic tree for each multicast group – Forward multicast along links of the tree d Trick: send a request for group X toward the “center” of the Internet until it reaches a router that knows about group X Computer Networks and Internets -- Module 5 235 Spring, 2014 Copyright  2014. All rights reserved.
  • 762. Example Multicast Routing Protocols d Many multicast routing protocols have been proposed d A few examples 2222222222222222222222222222222222222222222222 Protocol Type 2222222222222222222222222222222222222222222222 DVMRP Configuration-and-Tunneling 2222222222222222222222222222222222222222222222 CBT Core-Based-Discovery 2222222222222222222222222222222222222222222222 PIM-SM Core-Based-Discovery 2222222222222222222222222222222222222222222222 PIM-DM Flood-And-Prune 2222222222222222222222222222222222222222222222 MOSPF Link-State (within an organization) 2222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 5 236 Spring, 2014 Copyright  2014. All rights reserved.
  • 763. Summary d Internet – Consists of a network of heterogeneous networks – Separates communication from content and services – Accommodates arbitrary network technologies and applications d IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses d Internet packet is known as an IP datagram d Datagram is encapsulated for transmission d Fragmentation and reassembly accommodate heterogeneous MTUs Computer Networks and Internets -- Module 5 237 Spring, 2014 Copyright  2014. All rights reserved.
  • 764. Summary (continued) d IPv4 uses ARP for address resolution and IPv6 uses ND d ICMP (Internet Control Message Protocol) reports errors back to the original source d Ping uses ICMP echo request and echo response d DHCP allows automatic configuration d NAT hides multiple computers behind a single address d Internet follows the end-to-end principle Computer Networks and Internets -- Module 5 238 Spring, 2014 Copyright  2014. All rights reserved.
  • 765. Summary (continued) d Transport protocols that provide end-to-end service run in hosts d Internet has two main transport protocols – UDP provides unreliable, connectionless message delivery – TCP provides reliable, stream-oriented delivery d Dynamic routing was created for WANs and is used in the Internet d Two basic approaches – Distance Vector – Link State (also called SPF) Computer Networks and Internets -- Module 5 239 Spring, 2014 Copyright  2014. All rights reserved.
  • 766. Summary (continued) d Internet is divided into Autonomous Systems d EGPs used between Autonomous Systems d IGPs used within an Autonomous System d Internet routing protocols include – Border Gateway Protocol (BGP) – Routing Information Protocol (RIP) – Open Shortest Path First (OSPF) – Intermediate System-Intermediate System (IS-IS) d Multicast routing protocols defined, but are not in wide use Computer Networks and Internets -- Module 5 240 Spring, 2014 Copyright  2014. All rights reserved.
  • 768. MODULE VI Other Topics Computer Networks and Internets -- Module 6 1 Spring, 2014 Copyright  2014. All rights reserved.
  • 769. Topics d Measuring network performance d Quality of Service (QoS) and provisioning d Multimedia and IP telephony d Network security d Traffic engineering and MPLS d Network management (SNMP) Computer Networks and Internets -- Module 6 2 Spring, 2014 Copyright  2014. All rights reserved.
  • 771. Why Measure Network Performance? d Optimization d Planning (anticipating future needs) d Assessing and understanding traffic – Trends in applications and network use – Detecting anomalous traffic patterns d Contract (SLA) enforcement d Bragging rights – IT staff in an organization – Marketing department in an equipment vendor Computer Networks and Internets -- Module 6 4 Spring, 2014 Copyright  2014. All rights reserved.
  • 772. Qualitative Terminology And Marketing Computer Networks and Internets -- Module 6 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 773. Qualitative Terminology And Marketing d Marketing seems to love qualitative terms – High-speed – Fast – Powerful – High bandwidth Computer Networks and Internets -- Module 6 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 774. Qualitative Terminology And Marketing d Marketing seems to love qualitative terms – High-speed – Fast – Powerful – High bandwidth d Unfortunately – Qualitative terminology is vague – Networking technologies change rapidly Computer Networks and Internets -- Module 6 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 775. Qualitative Terminology That Faded d A high-speed leased line – Was once defined to run at 9.6 Kbps d The Internet’s Very high-speed Backbone Network System (VBNS) – Used OC-12 links, that are no longer considered very high speed d Fast Ethernet – Runs at 100 Mbps and is only one-tenth as fast as Gigabit Ethernet technology d Broadband – Was once defined by the FCC to start at 128 Kbps Computer Networks and Internets -- Module 6 6 Spring, 2014 Copyright  2014. All rights reserved.
  • 776. Quantitative Measures d Quantifiable measurement is surprisingly difficult d Routes and data rates can be asymmetric, making measurements in one direction differ from measurements in the other d Inserting measurement probes can affect the performance of the system being measured d Conditions can change rapidly Computer Networks and Internets -- Module 6 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 777. Aggregate Traffic Analysis Computer Networks and Internets -- Module 6 8 Spring, 2014 Copyright  2014. All rights reserved.
  • 778. Aggregate Traffic Analysis d Short-term variation – Packets tend to arrive in clumps called bursts d Long-term variation – Diurnal and annual patterns exist Computer Networks and Internets -- Module 6 8 Spring, 2014 Copyright  2014. All rights reserved.
  • 779. Aggregate Traffic Analysis d Short-term variation – Packets tend to arrive in clumps called bursts d Long-term variation – Diurnal and annual patterns exist d Interestingly, data traffic is unlike voice traffic – Aggregate of voice telephone calls is smooth average – Aggregate of data traffic is bursty Computer Networks and Internets -- Module 6 8 Spring, 2014 Copyright  2014. All rights reserved.
  • 780. Self-Similarity Unlike voice telephone traffic, data traffic is bursty. Data traffic is said to be self-similar because aggregates of data traffic exhibit a pattern of burstiness that is statistically similar to the burstiness on a single link. The point: data traffic is not easy to analyze Computer Networks and Internets -- Module 6 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 781. Practical Measures Of Network Performance d Three primary quantitative measures 2222222222222222222222222222222222222222222222222222222222222222222 Measure Description 2222222222222222222222222222222222222222222222222222222222222222222 Latency (delay) The time required to transfer a bit across a network from one end to another 2222222222222222222222222222222222222222222222222222222222222222222 Throughput (capacity) The amount of data that can be transferred over a network per unit time 2222222222222222222222222222222222222222222222222222222222222222222 Jitter (variability) The changes in delay that occur and the duration of the changes 2222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d We will see that the three are not completely independent Computer Networks and Internets -- Module 6 10 Spring, 2014 Copyright  2014. All rights reserved.
  • 782. Latency Or Delay d Time required for data to travel “across” a network d Think of latency as the time required for a single bit to traverse a network d Depends on – Physical properties of the universe (the speed of light) – Traffic on the network Computer Networks and Internets -- Module 6 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 783. Latency And Perceived Response Time d Users are interested in response time d Several components of delay contribute to overall response time a user perceives 2 222222222222222222222222222222222222222222222222222222222222222222 Type Explanation 2 222222222222222222222222222222222222222222222222222222222222222222 Access Delay The time needed to obtain access to a transmission medium (e.g., a cable) 2 222222222222222222222222222222222222222222222222222222222222222222 Propagation Delay The time required for a signal to travel across a transmission medium 2 222222222222222222222222222222222222222222222222222222222222222222 Switching Delay The time required to forward a packet 2 222222222222222222222222222222222222222222222222222222222222222222 Queuing Delay The time a packet spends in the memory of a switch or router waiting to be selected for transmission 2 222222222222222222222222222222222222222222222222222222222222222222 Server Delay The time required for a server to respond to a request and send a response 2 222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 784. Bottlenecks d Any part of a communication system can be a bottleneck that causes the most delay d Examples – Access delay: acquiring a wireless channel – Propagation delay: a satellite transmission – Switching delay: deep packet inspection – Server delay: a news agency web site overloaded during a crisis – Queuing delay: packets arriving faster than they depart Computer Networks and Internets -- Module 6 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 785. Assessing Delay d Make multiple measurements over an interval d Report minimum, maximum, mean, and standard deviation d Divide delay into constituent components if possible d Choose small intervals to look for repeated patterns Computer Networks and Internets -- Module 6 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 786. Throughput d Maximum amount of data a network can transport per unit time d Expressed as data rate in bits per second (e.g., 100 megabits per second) d Mistakenly cited as network “speed”, but really a measure of network capacity d Gives an upper-bound on performance, not a guarantee Computer Networks and Internets -- Module 6 15 Spring, 2014 Copyright  2014. All rights reserved.
  • 787. Assessing Throughput d Several possible measures – Capacity of a single communication channel – Capacity along a path through the network – Aggregate capacity of all channels – Capacity among pairs of ingress and egress points when used simultaneously Computer Networks and Internets -- Module 6 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 788. The Concept Of Goodput d Invented to provide meaningful assessment of network performance d Defined as the effective rate at which an application receives data d Can differ from throughput for any of the following reasons – Application protocol overhead – Channel coding overhead – Packet header overhead – Receiver buffer limitations – Congestion avoidance mechanisms – Packet retransmission Computer Networks and Internets -- Module 6 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 789. Assessing Goodput d Measure data that arrives successfully, and compute the amount of data per unit time d Goodput measurements also include the overhead introduced by – Operating system – Transport protocol – Lower layer encodings and protocols – Application protocol and implementation d Note: although they use the term throughput, most measurement tools report goodput Computer Networks and Internets -- Module 6 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 790. Jitter d Another prominent measure of network performance d Especially important in transmission of streaming audio and video d Measures variation in delay d Example – Suppose network has average delay D – If each packet takes exactly D time units to traverse the network, jitter is zero – If packets alternate between delays of D+ε and D – ε, average delay remains D, but jitter increases Computer Networks and Internets -- Module 6 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 791. Key Observation In the Internet, congestion is the single most significant cause of packet loss, high jitter, and long delays. Computer Networks and Internets -- Module 6 20 Spring, 2014 Copyright  2014. All rights reserved.
  • 792. Handling Jitter d Replace the Internet with an isochronous network – Approach used in the original telephone network – All parallel paths have exactly the same delay d Change the Internet to reserve capacity – Discussed later in the module d Keep the current Internet design and add protocols that compensate for jitter – Basic technique is a jitter buffer – Discussed later in the module Computer Networks and Internets -- Module 6 21 Spring, 2014 Copyright  2014. All rights reserved.
  • 793. Understanding Throughput And Delay d An analogy – Think of a network as a road between two locations – Propagation delay determines how long it takes a single car to traverse the road – Throughput determines how many cars can enter the road per unit time d Observe – Adding a lane doubles the throughput (i.e., capacity), but leaves the delay unchanged – It is possible to have arbitrarily high throughput, even if the delay is long (imagine a long road with hundreds of lanes) Computer Networks and Internets -- Module 6 22 Spring, 2014 Copyright  2014. All rights reserved.
  • 794. Understanding Throughput And Delay (continued) d The analogy helps us understand network measures Computer Networks and Internets -- Module 6 23 Spring, 2014 Copyright  2014. All rights reserved.
  • 795. Understanding Throughput And Delay (continued) d The analogy helps us understand network measures Propagation delay specifies the time a single bit remains in transit in a network. Throughput, which specifies how many bits can enter the network per unit time, measures network capacity. Computer Networks and Internets -- Module 6 23 Spring, 2014 Copyright  2014. All rights reserved.
  • 796. Understanding Throughput And Delay (continued) d The analogy helps us understand network measures Propagation delay specifies the time a single bit remains in transit in a network. Throughput, which specifies how many bits can enter the network per unit time, measures network capacity. d The key consequence is incorporated in an aphorism You can always buy more throughput, but you cannot buy lower delay. Computer Networks and Internets -- Module 6 23 Spring, 2014 Copyright  2014. All rights reserved.
  • 797. Delay-Throughput Product d Specifies the maximum amount of data “in flight” Bits present in a network = D × T where – D is delay measured in seconds – T is throughput measured in bits per second d Specifies how many bits can be transmitted before the first bit arrives at the receiver d Often incorrectly labeled the delay-bandwidth product Computer Networks and Internets -- Module 6 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 798. Delay-Throughput Terminology And Examples d Ethernet – Although it has high throughput, the short delay limits the delay-throughput product d Satellite link – Usually has a high delay-throughput product because delay is long and throughput is high d Informally, we use an analogy – A network with a long delay is called a long pipe – A network with high throughput is called a fat pipe – A satellite is known as a long, fat pipe Computer Networks and Internets -- Module 6 25 Spring, 2014 Copyright  2014. All rights reserved.
  • 800. Relationship Between Delay And Throughput d In theory, delay and throughput are independent d In practice, they are related d Reason – Throughput determines rate at which traffic can pass across a communication link – A switch or router queues packets until they can be sent – If data arrives at a switch or router faster than it leaves, queue length grows, which means increased delay (congestion) Computer Networks and Internets -- Module 6 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 801. Illustration Of How Congestion Occurs d Consider a router with three 1 Gbps connections, and assume that traffic is arriving over two connections destined for the third router input 1 (1 Gpbs) input 2 (1 Gbps) output (1 Gbps) d If the capacity of the red link is doubled, all links can experience more congestion, which increases delay Computer Networks and Internets -- Module 6 28 Spring, 2014 Copyright  2014. All rights reserved.
  • 802. Utilization d Measure of the current load on a network link d Given as a percentage of capacity being used, and expressed as a real value between 0.0 and 1.0 d Example: if a link capable of 1 Gbps has traffic of 500 Mbps, link utilization is 0.5 d Because utilization changes over time, it is reported over an interval by giving – Peak (i.e., maximum) – Average (i.e., mean) Computer Networks and Internets -- Module 6 29 Spring, 2014 Copyright  2014. All rights reserved.
  • 803. Utilization As Estimate Of Delay d Packet traffic is bursty d Key discovery: the effective queuing delay can be estimated from the utilization as follows: D = (1 − U) D0 3333333 d Where – D0 is delay when the network is idle – U is current utilization between 0 and 1 Computer Networks and Internets -- Module 6 30 Spring, 2014 Copyright  2014. All rights reserved.
  • 804. Delay As A Function Of Utilization utilization relative delay 25% 50% 75% 100% 1 2 3 4 5 6 idle delay Computer Networks and Internets -- Module 6 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 805. Practical Interpretation Of Utilization d Delay increases rapidly as utilization climbs d When utilization reaches 50%, delay is double d When utilization reaches 80%, delay is five times higher than average Computer Networks and Internets -- Module 6 32 Spring, 2014 Copyright  2014. All rights reserved.
  • 806. The 50-80 Rule d Heuristic managers follow – When utilization reaches 50%, plan an upgrade – When utilization reaches 80%, an upgrade is overdue d Note: alternative consists of partitioning a network (e.g., separating VLANs) Computer Networks and Internets -- Module 6 33 Spring, 2014 Copyright  2014. All rights reserved.
  • 807. Line Speed And Packets Per Second d Networking equipment is said to operate at line speed if the equipment can handle a sequence of back-to-back packets d Observe – Per-packet overhead is often the bottleneck in equipment – For a given data rate, equipment processes * Fewer packets per second if packets are large * More packets per second if packets are small d Conclusion: line speed is meaningless without a specification of packet size Computer Networks and Internets -- Module 6 34 Spring, 2014 Copyright  2014. All rights reserved.
  • 808. Quality of Service (QoS) and Provisioning
  • 809. Quality of Service (QoS) d Set of technologies that can be used to provide service guarantees – Bound on latency – Guarantee on throughput – Bound on jitter d Marketing – Tries to equate QoS and “quality” – Implies that lack of QoS means lack of quality Computer Networks and Internets -- Module 6 36 Spring, 2014 Copyright  2014. All rights reserved.
  • 810. QoS In The Internet d Motivation – Make it possible to run applications such as streaming video with no interruptions – Allow service providers to charge (much) more for better service d Three approaches have been proposed and studied – Priority – Fine-grain QoS – Coarse-grain QoS Computer Networks and Internets -- Module 6 37 Spring, 2014 Copyright  2014. All rights reserved.
  • 811. Priority Approach d Each packet assigned a priority, and multiplexing selects packets in priority order d Popular among ISPs, and used by some corporations to give voice and video traffic priority d Advantages – Easy to implement – Can assign priority to a “customer” rather than to a specific type of data d Disadvantages – No quantitative guarantees – Can lead to starvation Computer Networks and Internets -- Module 6 38 Spring, 2014 Copyright  2014. All rights reserved.
  • 812. Fine-grain QoS Approach d Pursued by the IETF under the name Integrated Services (IntServ) and adopted in ATM networks d QoS parameters negotiated for each flow (e.g., each TCP connection) – Maximum delay – Minimum throughput – Maximum jitter d Difficult/ impossible to implement After many years of research and standards work, the fine- grain approach to QoS has been relegated to a few special cases. Computer Networks and Internets -- Module 6 39 Spring, 2014 Copyright  2014. All rights reserved.
  • 813. QoS Terminology That Has Survived d Derived from ATM 2 2222222222222222222222222222222222222222222222222222222222222222222222222 Abbreviation Expansion Meaning 2 2222222222222222222222222222222222222222222222222222222222222222222222222 Data enters the flow at a fixed rate, CBR Constant Bit Rate such as data from a digitized voice call entering at exactly 64 Kbps 2 2222222222222222222222222222222222222222222222222222222222222222222222222 Data enters the flow at a variable VBR Variable Bit Rate rate within specified statistical bounds 2 2222222222222222222222222222222222222222222222222222222222222222222222222 The flow agrees to use whatever ABR Available Bit Rate data rate is available at a given time 2 2222222222222222222222222222222222222222222222222222222222222222222222222 No bit rate is specified for the flow; UBR Unspecified Bit Rate the application is satisfied with best-effort service 2 2222222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d Bounds specified statistically (e.g., average and peak throughput and burst size) Computer Networks and Internets -- Module 6 40 Spring, 2014 Copyright  2014. All rights reserved.
  • 814. Coarse-grain QoS Approach d Current approach approved by the IETF under the name Differentiated Services (DiffServ) d Divides traffic into classes d Service guaranteed for each class rather than per flow d Easier to implement than fine-grain approach d Usually implemented as a proportional guarantee rather than absolute quantities d Example policy At least 10% of the underlying network capacity is reserved for voice traffic Computer Networks and Internets -- Module 6 41 Spring, 2014 Copyright  2014. All rights reserved.
  • 815. Steps A Router Takes To Implement QoS router implementing QoS Classification and Policing Forwarding Computation Output Queuing Traffic Scheduling packets arrive packets leave d Policing enforces rules on incoming traffic d Forwarding can select among multiple paths (router may have many output queues) d Queuing may use Random Early Discard (RED) Computer Networks and Internets -- Module 6 42 Spring, 2014 Copyright  2014. All rights reserved.
  • 816. Traffic Scheduling d Algorithm used to select packets from queues d Principal types 2 22222222222222222222222222222222222222222222222222222222222222222222222 Algorithm Description 2 22222222222222222222222222222222222222222222222222222222222222222222222 Leaky Bucket Allows a queue to send packets at a fixed rate by incrementing a packet counter periodically and using the counter to control transmission 2 22222222222222222222222222222222222222222222222222222222222222222222222 Token Bucket Allows a queue to send data at a fixed rate by incrementing a byte counter periodically and using the counter to control transmission 2 22222222222222222222222222222222222222222222222222222222222222222222222 Weighted Selects packets from a set of queues according to a Round Robin set of weights that divide the capacity into fixed percentages, assuming a uniform packet size 2 22222222222222222222222222222222222222222222222222222222222222222222222 Deficit A variant of the round-robin approach that accounts for Round Robin bytes sent rather than packets transferred, and allows a temporary deficit caused by a large packet 2 22222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 43 Spring, 2014 Copyright  2014. All rights reserved.
  • 818. Traffic Engineering d An approach to networking that allows a manager to establish and control routes through a network and assign specific types of data to each d Implies – Non-standard forwarding mechanism – All traffic of a given type sent along a specified path d Most popular technology: MPLS Computer Networks and Internets -- Module 6 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 819. Multi-Protocol Label Switching (MPLS) d Widely deployed among tier-1 ISPs d Requires participating routers to have MPLS module d MPLS tunnel created by configuring routers along a path d Router may allow manager to assign a portion of link capacity to each tunnel – Term multi-protocol arises because an MPLS packet can contain arbitrary content Computer Networks and Internets -- Module 6 46 Spring, 2014 Copyright  2014. All rights reserved.
  • 820. Label Rewriting d Concept came from ATM and is used in MPLS d Each link in path has different integer label d Router rewrites label in MPLS datagram before forwarding to next hop d Known as label switching d Motivation: avoid global coordination and allow local assignment of labels d Disadvantages: – No general protocol available to configure an MPLS path – Can be difficult to debug Computer Networks and Internets -- Module 6 47 Spring, 2014 Copyright  2014. All rights reserved.
  • 821. How MPLS Works d Datagram encapsulated in MPLS header by router at the start of a tunnel d MPLS datagram tagged with label of path over which it must pass d Each router along the path – Uses label to make forwarding decision – Replaces label with value used on next hop d MPLS encapsulation removed when datagram reaches end of tunnel Computer Networks and Internets -- Module 6 48 Spring, 2014 Copyright  2014. All rights reserved.
  • 822. Illustration Of Label Rewriting R1 R2 R3 R4 H1 H2 A A B A B C A B A B C A Computer Networks and Internets -- Module 6 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 823. Illustration Of Label Rewriting R1 R2 R3 R4 H1 H2 A A B A B C A B A B C A send to label 4 4 32 B 32 12 B 12 3 C receive from label 3 d Labels along the path are: 4, 32, 12, 3 Computer Networks and Internets -- Module 6 49 Spring, 2014 Copyright  2014. All rights reserved.
  • 825. A Few Definitions d Multimedia combines two or more forms of information, such as – Photos and music – Audio and video d Real-time refers to information that must be presented in a predetermined timed sequence, such as – Audio – Video d An individual source provides one particular sequence of real-time information Computer Networks and Internets -- Module 6 51 Spring, 2014 Copyright  2014. All rights reserved.
  • 826. A Few Definitions (continued) d Playback refers to the output of real-time information for a user (e.g., video display or audio output) d Sample rate refers to the rate at which real-time information has been converted to digital form (e.g., audio sampled 8000 times per second) d Synchronization refers to the coordination of playback information from multiple sources (e.g., a movie requires synchronization between audio and video) Computer Networks and Internets -- Module 6 52 Spring, 2014 Copyright  2014. All rights reserved.
  • 827. Real-Time Sample Rates d Each source of real-time data can choose a sample rate and encoding d Examples – A video stream might contain 30 frames per second, with an encoding that uses compression – An audio stream might contain 8000 audio samples per second using a PCM encoding d Important concept Because each source of real-time information can choose a sample rate, playback and synchronization must know the sample rate and encoding that was selected. Computer Networks and Internets -- Module 6 53 Spring, 2014 Copyright  2014. All rights reserved.
  • 828. Transfer Of Streamed Real-Time Data d Source – Samples information at regular intervals – Generates data continuously – Prepares data for transmission d Ideal transmission channel – Accepts input at rate source produces – Delivers output at same rate as input Computer Networks and Internets -- Module 6 54 Spring, 2014 Copyright  2014. All rights reserved.
  • 829. Quantitative Network Performance Needed For Real-Time Streaming d QoS type: Constant Bit Rate (CBR) d Throughput sufficient to accommodate sender’s data rate (known in advance) d Latency within a specified bound, usually 200 msec d Jitter of zero or near-zero Computer Networks and Internets -- Module 6 55 Spring, 2014 Copyright  2014. All rights reserved.
  • 830. Buffering d Especially important in a packet transmission system d Combines multiple samples into a single transmission d Advantage – Increases transmission efficiency d Disadvantage – Introduces delay Computer Networks and Internets -- Module 6 56 Spring, 2014 Copyright  2014. All rights reserved.
  • 831. Buffering Example d Consider PCM audio d One eight-bit audio sample taken every 125 µseconds d Ethernet has 1500 octet payload d Waiting to fill an entire frame takes 125 × 10−6 seconds/byte × 1500 bytes = 0.188 seconds d Filling a packet incurs delay at the source Computer Networks and Internets -- Module 6 57 Spring, 2014 Copyright  2014. All rights reserved.
  • 832. Buffering Compromise d Choose buffer size according to application d Example: send 128 audio samples in each packet d Tradeoffs – Packet size is larger than one sample per packet, but generates more packets than absolutely necessary – Header overhead is a smaller percentage of total bits than with one sample per packet, but a greater percentage than for larger packets – Latency is better than with many samples per packet, but not as good as with one sample per packet Computer Networks and Internets -- Module 6 58 Spring, 2014 Copyright  2014. All rights reserved.
  • 834. Streaming Of Real-Time Data Across The Internet d Must handle – Lost packets – Duplicated packets – Packets delivered out of order – Variance in delay (jitter) d Key facts – Conventional retransmission is useless – Jitter is unavoidable Computer Networks and Internets -- Module 6 60 Spring, 2014 Copyright  2014. All rights reserved.
  • 835. Two Useful Techniques d Timestamps – Provided by sender – Assigned to each piece of data – Allow receiver to know when data should be played – Use relative values to avoid need for clock synchronization d Jitter buffer – Used by receiver – Accommodates small variance in delay Computer Networks and Internets -- Module 6 61 Spring, 2014 Copyright  2014. All rights reserved.
  • 836. Jitter Buffer d Used by receiver to assemble incoming real-time data d Timestamp on an item determines where item is placed in the playback sequence d General principle: ensure information will be available in time to play without delay d Trick: to compensate for maximum jitter of d, delay playback for d time units d Result: jitter buffer holds just enough data so playback can proceed uninterrupted Computer Networks and Internets -- Module 6 62 Spring, 2014 Copyright  2014. All rights reserved.
  • 837. Illustration Of A Jitter Buffer display jitter buffer playback process connection to Internet packets arrive in bursts packets extracted at a uniform rate d d During normal operation, playback can continue for d time units while waiting for delayed packets Computer Networks and Internets -- Module 6 63 Spring, 2014 Copyright  2014. All rights reserved.
  • 838. Real-Time Transport Protocol (RTP) d Widely used for voice and video d Despite the name, not really a transport protocol d Does not contain a jitter buffer and does not control playback d Provides three basic mechanisms – Sequence number on each packet that allows a receiver to handle loss and out-of-order delivery – Timestamp used for playback of the data – Series of source identifiers that tell a receiver the source(s) of the data Computer Networks and Internets -- Module 6 64 Spring, 2014 Copyright  2014. All rights reserved.
  • 839. RTP Details d Allows sender and receiver to choose sample rate and encoding d Specifies a header for each message transferred d Uses UDP for transport d Separates timestamp from packet sequence number d Includes a marker bit that allows some frames to be marked d Companion protocol allows receivers to inform sender about transfer Computer Networks and Internets -- Module 6 65 Spring, 2014 Copyright  2014. All rights reserved.
  • 840. Motivation For RTP Design d Marking – Permits differential encoding with a full frame followed by incremental changes – Example use: video I-frame followed by B-frames d Separation of timestamp and packet sequence – Means timestamps do not need to be linearly related to packets – Allows compression schemes that vary the rate at which data is sent Computer Networks and Internets -- Module 6 66 Spring, 2014 Copyright  2014. All rights reserved.
  • 841. RTP Header Format 0 1 3 8 16 31 VER P X CC M PAYTYPE SEQUENCE NUMBER TIMESTAMP SYNCHRONIZATION SOURCE IDENTIFIER CONTRIBUTING SOURCE IDENTIFIER . . . d TIMESTAMP is interpreted by sender and receiver d PAYTYPE specifies the payload type d Initial SEQUENCE NUMBER chosen at random d CONTRIBUTING SOURCE IDENTIFIERS allow sender to mix streams from multiple sources Computer Networks and Internets -- Module 6 67 Spring, 2014 Copyright  2014. All rights reserved.
  • 842. RTP Encapsulation d Three levels of encapsulation Frame Header Frame Payload IP Header IP Payload UDP Payload UDP Hdr RTP Payload RTP Hdr d Use of UDP permits sending one multicast instead of multiple unicast copies Computer Networks and Internets -- Module 6 68 Spring, 2014 Copyright  2014. All rights reserved.
  • 844. IP Telephony d Known as Voice over IP (VoIP) d Two groups have created standards – International Telecommunications Union (ITU) – Internet Engineering Task Force (IETF) d Standards agree on two basics – Audio encoded using Pulse Code Modulation (PCM) – RTP used to transfer digitized audio d Standards disagree on – Signaling – Public Switched Telephone Network (PSTN) interaction Computer Networks and Internets -- Module 6 70 Spring, 2014 Copyright  2014. All rights reserved.
  • 845. Signaling d Telco term for the process of establishing and terminating a call d Includes – Mapping a phone number to a location – Finding a route to the called party – Recording information used for accounting and billing – Handling functions such as call forwarding d Standard call management facility for the traditional telephone system is known as Signaling System 7 (SS7) Computer Networks and Internets -- Module 6 71 Spring, 2014 Copyright  2014. All rights reserved.
  • 846. IETF Approach d Known as Session Initiation Protocol (SIP) d Domain Name System used to map a telephone number to an IP address d SIP signaling system – User agent makes or terminates calls (e.g., an IP phone) – Location server consults a database of users, services to which they subscribe, and preferences – Proxy server forwards requests and optimizes routing – Redirect server handles tasks such as call forwarding and 800-number connections – Registrar server allows users to register for service Computer Networks and Internets -- Module 6 72 Spring, 2014 Copyright  2014. All rights reserved.
  • 847. ITU Approach d Standard is H.323 d Differs substantially from terminology used by SIP d Terminal provides IP telephone functions and may also include facilities for video and data transmission d Gatekeeper provides location and signaling functions, and establishes connections to the PSTN d Gateway interconnects the IP phone system and PSTN, and handles both signaling and media translation d Multipoint Control Unit (MCU) provides services such as multipoint conferencing Computer Networks and Internets -- Module 6 73 Spring, 2014 Copyright  2014. All rights reserved.
  • 848. International Softswitch Consortium (ISC) d Formed by vendors to consolidate terminology from multiple standards and create a single conceptual model d Defined a list of 10 functions that are sufficient to explain all others d Invented new terms for each function Computer Networks and Internets -- Module 6 74 Spring, 2014 Copyright  2014. All rights reserved.
  • 849. Summary Of VoIP Protocols And Layering Layer Call User User Support Routing Signal Process. multimedia Data Transport 5 H.323 RTP T.120 RTCP ENUM SIGTRAN Megaco RTSP TRIP MGCP NTP SIP SDP 4 TCP UDP TCP TCP SCTP UDP UDP 3 IP, RSVP, and IGMP d Each protocol can be complex d H.323 is an umbrella Computer Networks and Internets -- Module 6 75 Spring, 2014 Copyright  2014. All rights reserved.
  • 850. H.323 d Large set of protocols collected together d Provides voice, video, and data transfer d Summary of major protocols Layer Signaling Registration Audio Video Data Security 5 H.225.0-Q.931 H.225.9-RAS G.711 H.261 T.120 H.235 H.250-Annex G H.263 H.323 H.245 G.722 H.250 G.723 G.728 RTP, RTCP 4 TCP, UDP UDP TCP TCP, UDP 3 IP, RSVP, and IGMP Computer Networks and Internets -- Module 6 76 Spring, 2014 Copyright  2014. All rights reserved.
  • 851. Telephone Number Mapping And Routing d Two standards proposed by IETF – TRIP relies on location servers to exchange information – ENUM (E.164 NUMbers) uses arpa top-level domain in the Domain Name System d ENUM example – Phone number is 1-800-555-1234 – Domain name is constructed as the string 4.3.2.1.5.5.5.0.0.8.1.e164.arpa Computer Networks and Internets -- Module 6 77 Spring, 2014 Copyright  2014. All rights reserved.
  • 853. Network Security d Large subject with many aspects d Major problems include 2 222222222222222222222222222222222222222222222222222222222222222222222222 Problem Description 2 222222222222222222222222222222222222222222222222222222222222222222222222 Phishing Masquerading as a well-known site such as a bank to obtain a user’s personal information, typically an account number and access code 2 222222222222222222222222222222222222222222222222222222222222222222222222 Misrepresentation Making false or exaggerated claims about goods or services, or delivering fake or inferior products 2 222222222222222222222222222222222222222222222222222222222222222222222222 Scams Various forms of trickery intended to deceive naive users into investing money or abetting a crime 2 222222222222222222222222222222222222222222222222222222222222222222222222 Denial of Service Intentionally blocking a particular Internet site to prevent or hinder business activities and commerce 2 222222222222222222222222222222222222222222222222222222222222222222222222 Loss of Control An intruder gains control of a computer system and uses the system to perpetrate a crime 2 222222222222222222222222222222222222222222222222222222222222222222222222 Loss of Data Loss of intellectual property or other valuable proprietary business information 2 222222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 79 Spring, 2014 Copyright  2014. All rights reserved.
  • 854. Examples Of Techniques Attackers Use 2 222222222222222222222222222222222222222222222222222222222222222222222222 Technique Description 2 222222222222222222222222222222222222222222222222222222222222222222222222 Wiretapping Making a copy of packets 2 222222222222222222222222222222222222222222222222222222222222222222222222 Replay Sending packets captured from a previous session 2 222222222222222222222222222222222222222222222222222222222222222222222222 Buffer Overflow Overflowing a memory buffer to overwrite values 2 222222222222222222222222222222222222222222222222222222222222222222222222 Address Spoofing Faking the IP source address in a packet 2 222222222222222222222222222222222222222222222222222222222222222222222222 Name Spoofing Using a misspelling of a well-known name 2 222222222222222222222222222222222222222222222222222222222222222222222222 DoS and DDoS Flooding a site with packets to prevent access 2 222222222222222222222222222222222222222222222222222222222222222222222222 SYN Flood Sending a stream of random TCP SYN segments 2 222222222222222222222222222222222222222222222222222222222222222222222222 Key Breaking Guessing a decryption key or password 2 222222222222222222222222222222222222222222222222222222222222222222222222 Port Scanning Probing ports to find a vulnerable application 2 222222222222222222222222222222222222222222222222222222222222222222222222 Packet Interception Removing a packet from the Internet 2 222222222222222222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 80 Spring, 2014 Copyright  2014. All rights reserved.
  • 855. Indirect Attacks d Attacker commandeers computers of unwitting users d Bots running on commandeered computers launch attack d Example: Distributed Denial of Service (DDoS) Internet attacker commandeers multiple computers and streams packets to target aggregate traffic overwhelms server Computer Networks and Internets -- Module 6 81 Spring, 2014 Copyright  2014. All rights reserved.
  • 856. Packet Interception d Extreme vulnerability d Can be exploited for many attacks d Permits man-in-the-middle attacks d Example attacks source server man-in-the-middle can wiretap, replay, spoof, break keys, scan ports, and impersonate a server can impersonate a host or pass altered packets on to any Internet destination Computer Networks and Internets -- Module 6 82 Spring, 2014 Copyright  2014. All rights reserved.
  • 857. Security Policy d No absolutely secure network exists d Before security mechanisms are meaningful, organization must define a security policy – Data integrity (no unauthorized change) – Data availability (no disruption of service) – Data confidentiality (no unauthorized access) – Privacy (no disclosure of sender’s identity) – Accountability (record keeping and audit trail) – Authorization (who is permitted to access information) Computer Networks and Internets -- Module 6 83 Spring, 2014 Copyright  2014. All rights reserved.
  • 858. Authorization And Authentication d Authorization is intertwined with authentication – Authorization meaningless without authentication – Must know identity of a requester d There is no point in defining a security policy that cannot be enforced Computer Networks and Internets -- Module 6 84 Spring, 2014 Copyright  2014. All rights reserved.
  • 859. Enforcement Mechanisms 2 2222222222222222222222222222222222222222222222222222222222222222222222 Technique Purpose 2 2222222222222222222222222222222222222222222222222222222222222222222222 Hashing Data integrity 2 2222222222222222222222222222222222222222222222222222222222222222222222 Encryption Confidentiality 2 2222222222222222222222222222222222222222222222222222222222222222222222 Digital Signatures Message authentication 2 2222222222222222222222222222222222222222222222222222222222222222222222 Digital Certificates Sender authentication 2 2222222222222222222222222222222222222222222222222222222222222222222222 Firewalls Site integrity 2 2222222222222222222222222222222222222222222222222222222222222222222222 Intrusion Detection Systems Site integrity 2 2222222222222222222222222222222222222222222222222222222222222222222222 Deep Packet Inspection & Content Scanning Site integrity 2 2222222222222222222222222222222222222222222222222222222222222222222222 Virtual Private Networks (VPNs) Data confidentiality and trusted access 2 2222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 85 Spring, 2014 Copyright  2014. All rights reserved.
  • 860. Hash d Used to guarantee message arrives with no – Changes – Additions d Sender and receiver share a key d Sender uses key to compute a small value, H, called a – Message Authentication Code (MAC) – Hash of the message d Sender transmits H with the message d Receiver uses same key to compute hash of received message and compares to H Computer Networks and Internets -- Module 6 86 Spring, 2014 Copyright  2014. All rights reserved.
  • 861. Encryption d Fundamental security technique d Predates computers and computer networks d Extensive mathematical analysis d Definitions – Plaintext: original, unencrypted message – Cyphertext: message after encryption – Encryption key: short bit string used for encryption – Decryption key: short bit string used for decryption d Note: in some schemes, the encryption and decryption keys differ; in others, they are identical Computer Networks and Internets -- Module 6 87 Spring, 2014 Copyright  2014. All rights reserved.
  • 862. Mathematics Of Encryption d Encryption and decryption viewed as functions d Encrypt takes key, K1, and plaintext message, M, as arguments and produces cyphertext, C, as a result C = encrypt ( K1 , M ) d Decrypt takes a key, K2, and cyphertext, C, as arguments, and produces a plaintext message, M, as a result M = decrypt ( K2 , C ) d Mathematically, decrypt is the inverse of encrypt M = decrypt ( K2 , encrypt ( K1 , M ) ) Computer Networks and Internets -- Module 6 88 Spring, 2014 Copyright  2014. All rights reserved.
  • 863. Two Main Types Of Encryption d Private or secret key encryption (symmetric) – Encryption and decryption use same key – Key is a shared secret M = decrypt ( K , encrypt ( K , M ) ) d Public key encryption (asymmetric) – Encryption and decryption use different keys – Public key is widely disseminated – Private key is known only to one party – Knowing a user’s public key does not help one guess the corresponding private key Computer Networks and Internets -- Module 6 89 Spring, 2014 Copyright  2014. All rights reserved.
  • 864. Authentication With Digital Signatures d Uses encryption (works well with public key methods) d Allows receiver to verify the identity of the sender d Example – Bob sends message to Alice * Uses his private key to encode message * Includes specific information such as Alice’s name and a date to avoid a replay attack – Alice * Uses Bob’s public key to decrypt message * Knows that only Bob could have sent the message Computer Networks and Internets -- Module 6 90 Spring, 2014 Copyright  2014. All rights reserved.
  • 865. Authentication With Digital Signatures (continued) d Can use additional level of encryption to guarantee confidentiality d Bob signs message and encrypts using Alice’s public key X = encrypt ( alice_pub , encrypt ( bob_priv, M ) ) d Alice decrypts message with her private key, and then authenticates the sender by decrypting with Bob’s public key M = decrypt ( bob_pub , decrypt ( alice_priv , X ) ) Computer Networks and Internets -- Module 6 91 Spring, 2014 Copyright  2014. All rights reserved.
  • 866. Key Distribution d Everyone needs to obtain a copy of each user’s public key d If an attacker distributes an incorrect key, the entire encryption scheme is compromised d Question: how can public keys be distributed in a way that guarantees each copy is correct? d Several solutions have been proposed; most rely on key authority organizations that hand out public keys d Message containing keys signed by well-known authority is a digital certificate d Note: knowing the public key of an authority makes it possible to obtain other public keys securely Computer Networks and Internets -- Module 6 92 Spring, 2014 Copyright  2014. All rights reserved.
  • 867. Firewall Technology d Inserted between site and Internet d Filters packets according to policy d Controls both incoming and outgoing traffic d General approach: prevent all communication unless explicitly allowed by policy Computer Networks and Internets -- Module 6 93 Spring, 2014 Copyright  2014. All rights reserved.
  • 868. Firewall Example d Consider a site with three servers web sever ( 192.5.48.1 ) email sever ( 192.5.48.2 ) DNS sever ( 192.5.48.3 ) Internet firewall in switch d Firewall only allows packets to/ from each server Computer Networks and Internets -- Module 6 94 Spring, 2014 Copyright  2014. All rights reserved.
  • 869. Firewall Example (continued) d Example of firewall rules for the site: 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 Dir Frame Type IP Src IP Dest IP Type Src Port Dst Port 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 in 0800 * 192.5.48.1 TCP * 80 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 in 0800 * 192.5.48.2 TCP * 25 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 in 0800 * 192.5.48.3 TCP * 53 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 in 0800 * 192.5.48.3 UDP * 53 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 out 0800 192.5.48.1 * TCP 80 * 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 out 0800 192.5.48.2 * TCP 25 * 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 out 0800 192.5.48.3 * TCP 53 * 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 out 0800 192.5.48.3 * UDP 53 * 2 2222222222222222222222222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 95 Spring, 2014 Copyright  2014. All rights reserved.
  • 870. Other Network Security Systems d Intrusion Detection System (IDS) – Watches incoming packet stream – Attempts to identify unusual activity d Deep Packet Inspection (DPI) – Looks beyond header into packet contents – Requires significant processing d File inspection systems – Examine whole data file (e.g., email) – Can detect more problems than systems that examine individual packets Computer Networks and Internets -- Module 6 96 Spring, 2014 Copyright  2014. All rights reserved.
  • 871. Virtual Private Network (VPN) d Emulates a dedicated network connection d Sends traffic across commodity Internet d Uses encryption to guarantee confidentiality d Technique known as tunneling d Can be used – Among sites of an organization – Between individual and organization Computer Networks and Internets -- Module 6 97 Spring, 2014 Copyright  2014. All rights reserved.
  • 872. Encryption And Tunneling Used In VPNs d Three basic approaches used – Payload encryption – IP-in-IP tunneling – IP-in-TCP tunneling d Original data is encrypted in all three d For additional security, pad datagram length Computer Networks and Internets -- Module 6 98 Spring, 2014 Copyright  2014. All rights reserved.
  • 873. Illustration Of IP-in-IP Tunneling Used For A Secure VPN src = R1 dst = R2 Encrypted Datagram Encapsulated For Transmission Encrypted Version Of Original Datagram src = X dst = Y Original (Unencrypted) Payload encrypt Computer Networks and Internets -- Module 6 99 Spring, 2014 Copyright  2014. All rights reserved.
  • 874. Examples Of Security Technologies d PGP (Pretty Good Privacy) d SSH (Secure Shell) d SSL (Secure Socket Layer) d TLS (Transport Layer Security) d HTTPS (HTTP Security) d IPsec (IP security) d RADIUS (Remote Authentication Dial-In User Service) d WEP (Wired Equivalent Privacy) d WPA (Wi-Fi Protected Access) Computer Networks and Internets -- Module 6 100 Spring, 2014 Copyright  2014. All rights reserved.
  • 876. Terminology d Network manager or network administrator is a person responsible for network – Planning – Installation – Operation – Monitoring d Network refers to intranet – Owned and operated by a single organization – Contains many managed items such as routers, switches, servers, and hosts – May span multiple sites Computer Networks and Internets -- Module 6 102 Spring, 2014 Copyright  2014. All rights reserved.
  • 877. An Interesting Problem d Many protocol mechanisms have been created to overcome problems automatically – Forward error correction – Retransmission – Routing protocols d Consequence: protocols may hide problems from a manager! Computer Networks and Internets -- Module 6 103 Spring, 2014 Copyright  2014. All rights reserved.
  • 878. The Industry Standard Model d Derived from ITU recommendation M.3400 d Known by abbreviation, FCAPS d Acronym refers to five aspects of management 2 2222222222222222222222222222222222222222222222222222222222 Abbreviation Meaning 2 2222222222222222222222222222222222222222222222222222222222 F Fault detection and correction 2 2222222222222222222222222222222222222222222222222222222222 C Configuration and operation 2 2222222222222222222222222222222222222222222222222222222222 A Accounting and billing 2 2222222222222222222222222222222222222222222222222222222222 P Performance assessment and optimization 2 2222222222222222222222222222222222222222222222222222222222 S Security assurance and protection 2 2222222222222222222222222222222222222222222222222222222222 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 104 Spring, 2014 Copyright  2014. All rights reserved.
  • 879. Fault Isolation And Root-Cause Analysis d Users report high-level symptoms – Example: I lost access to a shared file system d Manager must relate symptoms to underlying cause – Cable cut – Power supply has failed or disk has crashed – Software configuration changed (e.g., file system renamed or moved) – Security changed (e.g., password expired) Computer Networks and Internets -- Module 6 105 Spring, 2014 Copyright  2014. All rights reserved.
  • 880. Network Element d Generic term for a managed entity – Physical device – Service (e.g., DNS) d Examples 222222222222222222222222222222222222222222222222222 Manageable Network Elements 222222222222222222222222222222222222222222222222222 Layer 2 Switch IP router 222222222222222222222222222222222222222222222222222 VLAN Switch Firewall 222222222222222222222222222222222222222222222222222 Wireless Access Point Digital Circuit (CSU/DSU) 222222222222222222222222222222222222222222222222222 Head-End DSL Modem DSLAM 222222222222222222222222222222222222222222222222222 DHCP Server DNS Server 222222222222222222222222222222222222222222222222222 Web Server Load Balancer 222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 106 Spring, 2014 Copyright  2014. All rights reserved.
  • 881. Element Management System d Management tool that can manage one element at a time d Typically, supplied by vendor of the network element d Limitation of element management systems – When configuring MPLS tunnel across multiple routers, element management system only allows manager to configure one router at a time – If routers sold by multiple vendors, each vendor may have its own element management system d Unfortunately, many networks only have element management Computer Networks and Internets -- Module 6 107 Spring, 2014 Copyright  2014. All rights reserved.
  • 882. Types Of Network Management Tools Physical Layer Testing Performance Monitoring Reachability And Connectivity Flow Analysis Packet Analysis Routing And Traffic Engineering Network Discovery Configuration Device Interrogation Security Enforcement Event Monitoring Network Planning Computer Networks and Internets -- Module 6 108 Spring, 2014 Copyright  2014. All rights reserved.
  • 883. How Should Management Systems Operate? d Some possibilities – Use a parallel physical network – Use a parallel logical network – Use a special link-layer protocol – Use the same links, equipment, and protocols as data d Surprise: modern network management follows the last approach Computer Networks and Internets -- Module 6 109 Spring, 2014 Copyright  2014. All rights reserved.
  • 884. Simple Network Management Protocol (SNMP) d Internet standard d Allows software in a manager’s computer (manager) to interact with software that runs in an element (agent) d Specifies format and meaning of messages exchanged d Runs as an application protocol over TCP or UDP d Uses fetch-store paradigm Computer Networks and Internets -- Module 6 110 Spring, 2014 Copyright  2014. All rights reserved.
  • 885. SNMP Fetch-Store Paradigm d Set of conceptual variables defined d Each variable given a name d Set of variables known as Management Information Base (MIB) d SNMP offers two basic operations – GET to read the value of a variable – PUT to store a value into a variable d All management functions are defined as side-effects of GET or PUT to a MIB variable d Example: reboot defined as side-effect of PUT Computer Networks and Internets -- Module 6 111 Spring, 2014 Copyright  2014. All rights reserved.
  • 886. SNMP Encoding d SNMP uses a standard known as Abstract Syntax Notation.1 (ASN.1) d Variable-length encoding d Example: integer encoded as length and value 2 222222222222222222222222222222222222222222222222222222 Decimal Hexadecimal Length Bytes Of Value Integer Equivalent Byte (in hex) 2 222222222222222222222222222222222222222222222222222222 27 1B 01 1B 2 222222222222222222222222222222222222222222222222222222 792 318 02 03 18 2 222222222222222222222222222222222222222222222222222222 24,567 5FF7 02 5F F7 2 222222222222222222222222222222222222222222222222222222 190,345 2E789 03 02 E7 89 2 222222222222222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 6 112 Spring, 2014 Copyright  2014. All rights reserved.
  • 887. MIB Variable Names d Are hierarchical d Begin with standard prefix d Identify a specific protocol and variable d Example: counter for IP packets received has name iso.org.dod.internet.mgmt.mib.ip.ipInReceives d Name is encoded as integers: 1.3.6.1.2.1.4.3 Computer Networks and Internets -- Module 6 113 Spring, 2014 Copyright  2014. All rights reserved.
  • 888. Arrays In A MIB d ASN.1 does not define an array type d Many MIB variables correspond to conceptual array – Routing table – ARP cache – Set of network interfaces d Trick – The “index” is appended onto variable name – Manager software uses GET-NEXT operation to move through array Computer Networks and Internets -- Module 6 114 Spring, 2014 Copyright  2014. All rights reserved.
  • 889. Example Of Indexing d IP routing table assigned variable name standard-prefix.ip.ipRoutingTable d Each field has a name d Issuing GET_NEXT operation gets first routing table entry d For example, name of destination address field variable is standard-prefix.ip.ipRoutingTable.ipRouteEntry.field.IPdestaddr Computer Networks and Internets -- Module 6 115 Spring, 2014 Copyright  2014. All rights reserved.
  • 890. A Plethora Of MIBs d Initially – One MIB – Defined variables for IP, TCP, UDP, ICMP d Now – Many MIBs – Variables for routers, switches, modems, printers, hosts, and other network elements Computer Networks and Internets -- Module 6 116 Spring, 2014 Copyright  2014. All rights reserved.
  • 891. Summary d Streamed transfer of real-time data incompatible with Internet’s best-effort delivery d Two approaches – Isochronous network – Timestamps and jitter buffer d Real-Time Transport Protocol (RTP) uses timestamps and sequence numbers Computer Networks and Internets -- Module 6 117 Spring, 2014 Copyright  2014. All rights reserved.
  • 892. Summary (continued) d Many IP telephony standards proposed d Connection to PSTN causes debate d H.323 and SIP standards are most widely used d ENUM system uses DNS to convert phone number to IP address Computer Networks and Internets -- Module 6 118 Spring, 2014 Copyright  2014. All rights reserved.
  • 893. Summary (continued) d Quantitative measures of networks include delay, throughput, goodput, and jitter d Delay increases as utilization increases d One can purchase more throughput, but not less delay d Quality of Service (QoS) technologies provide guarantees on performance d The industry has moved away from fine-grain QoS (per-flow as in ATM and IntServ) to coarse-grain QoS (DiffServ) d Multi-Protocol Label Switching (MPLS) is used by tier-1 ISPs to provide circuit-oriented networking Computer Networks and Internets -- Module 6 119 Spring, 2014 Copyright  2014. All rights reserved.
  • 894. Summary (continued) d Network security is complex and difficult d No network is completely secure d Life goes on anyway d Network management is complex and difficult d Current tools are fairly primitive d Life goes on anyway Computer Networks and Internets -- Module 6 120 Spring, 2014 Copyright  2014. All rights reserved.
  • 896. MODULE VII Emerging Technologies Computer Networks and Internets -- Module 7 1 Spring, 2014 Copyright  2014. All rights reserved.
  • 897. Topics d Software Defined Networking d The Internet Of Things d Other trends in networking Computer Networks and Internets -- Module 7 2 Spring, 2014 Copyright  2014. All rights reserved.
  • 899. What Is Software Defined Networking? d One of the hottest topics in networking d According to marketing SDN is – A way to eliminate all human error – A technology that improves overall routing – An approach that eliminates 66% to 80% of operational costs d In reality SDN is – A technology that gives programmers more control over network equipment – An approach with the potential to make some improvements in network configuration and management Computer Networks and Internets -- Module 7 4 Spring, 2014 Copyright  2014. All rights reserved.
  • 900. Motivation For SDN d Switch from element management to network management d Move from proprietary to open standards d Automate and unify network-wide configuration d Change from per-layer to cross-layer control d Accommodate virtualization used in data centers Computer Networks and Internets -- Module 7 5 Spring, 2014 Copyright  2014. All rights reserved.
  • 901. Background And Definitions d Terminology adopted from network equipment engineers d Data plane – Refers to packet processing mechanisms – Typical functions include packet classification and packet forwarding – Operates at wire speed d Control plane – Refers to management – Typical functions include interacting with network manager and modifying forwarding tables – Operates slowly and only when changes are needed Computer Networks and Internets -- Module 7 6 Spring, 2014 Copyright  2014. All rights reserved.
  • 902. Conceptual Organization Of Network Devices control plane (software) data plane (hardware) control plane loads new configuration into the hardware data plane passes management packets up to control plane packets arrive packets leave d Data plane may use ASIC hardware for speed d Control plane includes a TCP/IP stack Computer Networks and Internets -- Module 7 7 Spring, 2014 Copyright  2014. All rights reserved.
  • 903. Control Plane Interface Modules CLI WEB SNMP data plane (hardware) common interface (internal) ... packets arrive packets leave d Managers can choose among command line interface, web interface, and SNMP Computer Networks and Internets -- Module 7 8 Spring, 2014 Copyright  2014. All rights reserved.
  • 904. The SDN Approach: An External Controller CLI WEB SNMP sdn data plane (hardware) common interface (internal) packets arrive packets leave External Controller PC running Linux Computer Networks and Internets -- Module 7 9 Spring, 2014 Copyright  2014. All rights reserved.
  • 905. In Practice Controller 1 Controller 2 Controller 3 Controller 4 Controller 5 Domain 1 Domain 2 Domain 3 Domain 4 Domain 5 controller to controller controller to element d Each controller can operate multiple devices d Controllers coordinate to provide consistent configuration Computer Networks and Internets -- Module 7 10 Spring, 2014 Copyright  2014. All rights reserved.
  • 906. SDN Communication d Two conceptually separate types – Controller to network element – Controller to controller d Protocols used can differ Computer Networks and Internets -- Module 7 11 Spring, 2014 Copyright  2014. All rights reserved.
  • 907. OpenFlow d Specification for controller-to-element communication d Devised at Stanford d Now a de facto industry standard for SDN d Defines – Secure communication (over SSL) – Message format – Items to be managed d Completely unlike SNMP Computer Networks and Internets -- Module 7 12 Spring, 2014 Copyright  2014. All rights reserved.
  • 908. OpenFlow Model d Uses flow table abstraction – Data plane is assumed to have a sequence of flow tables – Each flow table specifies how to parse packets and handle them d OpenFlow allows manager to set values in each flow table d Important note: flow table model closely matches classification hardware found in Ethernet switches Computer Networks and Internets -- Module 7 13 Spring, 2014 Copyright  2014. All rights reserved.
  • 909. Classification d Alternative to packet demultiplexing d Examines headers from multiple layers at the same time d Uses an array of pairs (pattern, action) d Where – Pattern is a pattern that is matched against packets – Action specifies steps to be taken if the match succeeds Computer Networks and Internets -- Module 7 14 Spring, 2014 Copyright  2014. All rights reserved.
  • 910. Classification Hardware classification engine packet to be matched pattern 1 pattern 2 pattern 3 pattern N (default that matches any packet) action 1 action 2 action 3 action N . . . . . . d Hardware checks all patterns in parallel d Result is extremely high speed classification Computer Networks and Internets -- Module 7 15 Spring, 2014 Copyright  2014. All rights reserved.
  • 911. TCAM d Acronym for Ternary Content Addressable Memory d Hardware technology used for high-speed classification d Pattern is ternary because value for each bit can be 0, 1, or “don’t care” d TCAM matches all patterns at once, and performs the action on the first matching table entry Computer Networks and Internets -- Module 7 16 Spring, 2014 Copyright  2014. All rights reserved.
  • 912. Example Of IPv4 Classification d The challenge – A frame arrives – What is the minimum number of steps needed to determine whether the frame carries an IPv4 datagram destined for a web server? d The answer – Check whether the frame type field specifies IPv4 (0x0800) – Check whether the IP protocol field specifies TCP (6) – Check whether the TCP destination port specifies a web server (80) Computer Networks and Internets -- Module 7 17 Spring, 2014 Copyright  2014. All rights reserved.
  • 913. IPv6 Classification d Simplest case (only a base header) – Frame type field specifies IPv6 (0x86DD) – Next Header field specifies TCP (6) – TCP destination port specifies a web server (80) d Additional patterns needed for extension headers d Example: base header plus a route header – Frame type field specifies IPv6 (0x86DD) – Next Header field specifies Route Header (43) – Next Header field specifies TCP (6) – TCP destination port specifies a web server (80) Computer Networks and Internets -- Module 7 18 Spring, 2014 Copyright  2014. All rights reserved.
  • 914. Example Items In An OpenFlow Pattern Field Meaning 2 22222222222222222222222222222222222222222222222222222222222222222 Layer 2 fields Ingress Port Switch port over which the packet arrived Metadata 64-bit field of metadata used in the pipeline Ether src 48-bit Ethernet source address Ether dst 48-bit Ethernet destination address Ether Type 16-bit Ethernet type field VLAN id 12-bit VLAN tag in the packet VLAN priority 3-bit VLAN priority number ARP opcode 8-bit ARP opcode Layer 3 fields MPLS label 20-bit MPLS label MPLS class 3-bit MPLS traffic class IPv4 src 32-bit IPv4 source address IPv4 dst 32-bit IPv4 destination address IPv6 src 128-bit IPv6 source address IPv6 dst 128-bit IPv6 destination address IPv4 Proto 8-bit IPv4 protocol field IPv6 Next Header 8-bit IPv6 next header field TOS 8-bit IPv4 or IPv6 Type of Service bits Computer Networks and Internets -- Module 7 19 Spring, 2014 Copyright  2014. All rights reserved.
  • 915. Example Items In An OpenFlow Pattern (continued) Field Meaning 2 22222222222222222222222222222222222222222222222222222222222222 Layer 4 fields TCP/UDP/SCTP src 16-bit TCP/UDP/SCTP source port TCP/UDP/SCTP dst 16-bit TCP/UDP/SCTP destination port ICMP type 8-bit ICMP type field ICMP code 8-bit ICMP code field Computer Networks and Internets -- Module 7 20 Spring, 2014 Copyright  2014. All rights reserved.
  • 916. Examples Of SDN Functionality d End-to-end layer 2 paths d Forwarding based on source as well as destination d All traffic from a specific MAC address sent along a specific path d Segregation of traffic based on application type d Multipath forwarding based on hash of 4-tuple d Transport of nonstandard layer 3 protocols Computer Networks and Internets -- Module 7 21 Spring, 2014 Copyright  2014. All rights reserved.
  • 918. The Internet Of Things
  • 919. Internet Of Things d Awkward term used for embedded systems on the Internet – Generally not operated by humans – Can access one another or cloud services d Examples – Scientific sensor systems – Home automation systems – Smart grid – Retail systems Computer Networks and Internets -- Module 7 24 Spring, 2014 Copyright  2014. All rights reserved.
  • 920. Technology Characteristics d Low power – Energy harvesting (e.g., door latch) – Multi-year battery life d Wireless communication – Necessary in many situations – Enables mobility Computer Networks and Internets -- Module 7 25 Spring, 2014 Copyright  2014. All rights reserved.
  • 921. Wireless Mesh Network d Useful when individual nodes have very low power (limited range) d Allows a set of nodes to communicate even if some nodes cannot communicate directly d Each node agrees to forward packets on behalf of neighbors Computer Networks and Internets -- Module 7 26 Spring, 2014 Copyright  2014. All rights reserved.
  • 922. Example Wireless Mesh Technology d ZigBee IP – Created by ZigBee Alliance – Uses IEEE 802.15.4 wireless radios – Intended for smart grid d ZigBee protocol stack – Goal is to run IPv6, TCP, and HTTP – Includes many other protocols Computer Networks and Internets -- Module 7 27 Spring, 2014 Copyright  2014. All rights reserved.
  • 923. 802.15.4 Wireless Characteristics d Goal is low power, and result is – Extremely low data rate – Extremely small MTU – Limited distance 222222222222222222222222222222222222222222 Property Value 222222222222222222222222222222222222222222 Networking paradigm Packet switching 222222222222222222222222222222222222222222 Maximum data rate 250 Kbps 222222222222222222222222222222222222222222 Payload size (MTU) 102 octets 222222222222222222222222222222222222222222 Maximum distance 10 meters 222222222222222222222222222222222222222222 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Computer Networks and Internets -- Module 7 28 Spring, 2014 Copyright  2014. All rights reserved.
  • 924. ZigBee IP Mesh Routing d One or more border routers – Connect to global Internet – Are more powerful than other nodes d Set of ZigBee IP routers (ZIP routers) – Attach to appliances – Form a mesh – Forward traffic to border router Computer Networks and Internets -- Module 7 29 Spring, 2014 Copyright  2014. All rights reserved.
  • 925. Choosing A Path d ZIP router must choose a path to a border router d Cannot simply choose node with the strongest transmission signal B1 B2 N Internet d Additional protocol used to find which node receives strongest signal (MLE) Computer Networks and Internets -- Module 7 30 Spring, 2014 Copyright  2014. All rights reserved.
  • 926. Running IPv6 Over A ZigBee Network d IPv6 can only run over networks that offer an MTU of 1280 or higher, but 802.15.4 has an MTU of 102 d Solution – Additional protocol named 6LoWPAN – Shim layer between IP and device driver Computer Networks and Internets -- Module 7 31 Spring, 2014 Copyright  2014. All rights reserved.
  • 927. 6LoWPAN Operation d Sending side – Divides datagram into series of blocks – Transmits each block in a packet d Receiving side – Joins blocks into a datagram – Delivers entire datagram to IPv6 d Notes – Division into block does not use IP fragmentation – Unlike fragmentation, division and regrouping is performed at each hop Computer Networks and Internets -- Module 7 32 Spring, 2014 Copyright  2014. All rights reserved.
  • 928. ZigBee IP Mesh Routing d ZIP nodes forward packets toward the border router d Border router – Can send outgoing packets to the Internet – Forwards other packets across the mesh d If two ZIP nodes communicate – Packet goes to border router first – Border router forwards to destination Computer Networks and Internets -- Module 7 33 Spring, 2014 Copyright  2014. All rights reserved.
  • 929. Border Router Operation d To forward across the mesh the border router – Learns the topology of the mesh – Computes a path through the mesh to each ZIP node – Uses IPv6 source routing d IPv6 source routing – Requires IP-in-IP tunneling (header modification prohibited) – Places an extension header on outer datagram with series of hops – Each ZIP node only needs to know its neighbors Computer Networks and Internets -- Module 7 34 Spring, 2014 Copyright  2014. All rights reserved.
  • 930. Computing Source Routes d All nodes run Routing Protocol for lossy and Low power networks (RPL) d Each node reports its parent to the border router d RPL code on border router creates a Destination Oriented Directed Acyclic Graph (DODAG) d DODAG is used to compute source routes Computer Networks and Internets -- Module 7 35 Spring, 2014 Copyright  2014. All rights reserved.
  • 931. Example DODAG 1 2 3 4 5 6 7 8 9 Border router d Arcs in DODAG point to parent (path toward border router) d Source route to node X is reverse of the path from X to border router Computer Networks and Internets -- Module 7 36 Spring, 2014 Copyright  2014. All rights reserved.
  • 932. Does ZigBee IP Make Sense? d Choosing IPv6 instead of IPv4 means – Much larger datagram headers – The use of 6LoWPAN to divide a datagram into MTU- size pieces – Sending more data over a slow network – The need for RPL routing protocols – Larger memories (and lower battery life) d Using TCP and HTTP over IPv6 means – Using DNS to resolve names – Unnecessary overhead – Unnecessary memory footprint Computer Networks and Internets -- Module 7 37 Spring, 2014 Copyright  2014. All rights reserved.
  • 933. But Wait, There’s More! d Smart grid applications must be secure, so ZigBee IP includes security protocols, including TLS d IPv6 Neighbor Discovery doesn’t work in a mesh network, so ZigBee IP includes a modification known as 6LoWPAN- ND d IEEE 802.15.4 allows short (16-bit) MAC addresses, so ZigBee IP includes a mechanism that allows a border router to prevent address collisions Computer Networks and Internets -- Module 7 38 Spring, 2014 Copyright  2014. All rights reserved.
  • 934. Major Items In The ZigBee Protocol Stack IEEE 802.15.4 6LoWPAN adaptation IPv6, ICMPv6, and 6LoWPAN-ND RPL TCP and UDP TLS PANA mDNS and DNS-SD MLE Application Protocols d Resulting stack is large d Design is more general-purpose than necessary d Technology may be a triumph of politics and economics Computer Networks and Internets -- Module 7 39 Spring, 2014 Copyright  2014. All rights reserved.
  • 937. A Few Key Technologies d Content Caching d Peer-To-Peer Communication d Universal Representation (XML) d Wireless networks that support mobility d Higher-speed access technologies (1 Gbps) d Cloud computing and cloud data centers Computer Networks and Internets -- Module 7 42 Spring, 2014 Copyright  2014. All rights reserved.
  • 938. Web Load Balancers . . . Internet connection load balancer physical severs site running a web server shared database d Load balancer distributes HTTP requests across servers d Path from servers back to client may be higher speed Computer Networks and Internets -- Module 7 43 Spring, 2014 Copyright  2014. All rights reserved.
  • 939. Overlay Networking A B C D E F G H I A B C D E F G H I Internet (a) (b) (a) Physical connection of computers to the Internet (b) Logical network imposed by overlay routing Computer Networks and Internets -- Module 7 44 Spring, 2014 Copyright  2014. All rights reserved.
  • 940. Other Trends d Switch to digital telephony and digital video d Increased use of social networking and social media d Distributed data centers and migration Computer Networks and Internets -- Module 7 45 Spring, 2014 Copyright  2014. All rights reserved.
  • 942. STOP