Transcript ppt - NOISE

Intro (continued) and
Design Principles
Nick Feamster
CS 3251: Computer Networking I
Spring 2013
Step 1: How to Draw a Network
Node
Link
Node
• Electrical questions
– Voltage, frequency, …
– Wired or wireless?
• Link-layer issues: How to send data?
– When to talk – can everyone talk at once?
– What to say – low-level format?
– Stay tuned for lecture 5
• Okay… what about more nodes?
Some Important Concepts
• Protocols
• Layering and the Internet Protocol Stack
– The Internet’s “Narrow Waist”
• Resource Sharing
– Circuit switching vs. packet switching
– “Best effort” networks
What is a Protocol?
• The syntax and semantics by which hosts and
nodes agree on how to talk
– Must be standardized and agreed upon by all parties
– Standardization process
• IETF Requests for Comments (RFC)
• De-facto standards
• Format of messages
• Expectations for message delivery
4
From Signals to Packets
Analog Signal
“Digital” Signal
Bit Stream
Packets
0 0 1 0 1 1 1 0 0 0 1
0100010101011100101010101011101110000001111010101110101010101101011010111001
Header/Body
Packet
Transmission
Sender
Header/Body
Header/Body
Receiver
Analog versus Digital Encoding
• Digital transmissions.
– Interpret the signal as a series of 1’s and 0’s
– E.g. data transmission over the Internet
• Analog transmission
– Do not interpret the contents
– E.g broadcast radio
• Why digital transmission?
Layering
• Helps manage complexity
• Each layer:
– Relies on services from layer below
– Provides services to layer above
• For example: IP (network) layer
– IP relies on connectivity to next hop, access to
medium
– IP provides a datagram service
• Best effort delivery
• Packets may be lost, corrupted, reordered, etc.
– Layers on top of IP (e.g., TCP) may guarantee
reliable, in-order delivery
7
Layering Mechanism: Encapsulation
User A
User B
Application
(message)
Get index.html
Transport
(segment)
Connection ID
Network
(datagram)
Source/Destination
Link (frame)
Link Address
• This can be more complex
• Example: Network layers can be encapsulated within
another network layer
8
The Internet Protocol Stack
• Need to interconnect many existing networks
• Hide underlying technology from applications
• Decisions
– Network provides minimal functionality
– IP as the “Narrow waist”
email WWW phone...
SMTP HTTP RTP...
Applications
TCP UDP…
IP
ethernet PPP…
CSMA async sonet...
Technology
copper fiber radio...
9
The “Narrow Waist”
• Facilitates interconnection and interoperability
• IP over anything, anything over IP
– Has allowed for much innovation both above and
below the IP layer of the stack
– Any device with an IP stack can “get on the Internet”
• Drawback: very difficult to make changes to IP
10
Resource Sharing
• How? Multiplexing
– Switched network
– Party “A” gets resources sometimes
– Party “B” gets them sometimes
• Interior nodes (“Routers” or “Switches”)
arbitrate access to resources
11
An Age-Old Debate!
Circuit Switching
• Resource control, accounting, ability to “pin”
paths, etc.
Packet Switching
• Sharing of resources, soft state (good resilience
properties), etc.
It is held that packet switching was one of the Internet’s
greatest design choices.
Of course, there are constant attempts to shoehorn the best
aspects of circuits into packet switching.
Examples: MPLS, ATM, IntServ QoS, etc.
Circuit Switching
• Resources are reserved
• Source first establishes a connection (circuit) to
the destination
• Source sends the data over the circuit
– Constant transmission rate
• Example: telephone network
– Early early versions: Human-mediated switches.
– Early versions: End-to-end electrical connection
– Today: Virtual circuits or lambda switching
13
Resource Sharing in
Circuit-Switched Networks
• Frequency-Division Multiplexing (FDM)
– Link dedicates a frequency to each
connection
– Width of this frequency band is called
“bandwidth”
– We will discuss the capacity in Lecture 10
• Time-Division Multiplexing
– Each circuit gets all of the bandwidth on a
link for brief periods of time
14
Circuit Switching
• Advantages
– Fast and simple data transfer, once the circuit
has been established
– Predictable performance since the circuit
provides isolation from other users
• Guaranteed bandwidth
• Disadvantages
– What about bursty traffic?
– Users with differing needs for bandwidth
– What if all resources are allocated?
15
Packet Switching (Our Focus)
• Resources are not reserved
• Packets are self-contained
– Each has a destination address
– Source may have to break up single message
• Each packet travels independently to the
destination host
– Routers and switches use the address in the packet
to determine how to forward the packets
16
Resource Sharing: Packet Switching
• Statistical multiplexing
• Switches arbitrate between inputs
• Can send from any input that’s ready
–
–
–
–
Links are never idle when traffic to send
Efficiency!
Requires buffering/queues
Implies a service model/discipline (Lecture 21)
17
Type of Packet Switching: Datagrams
• Information for forwarding traffic is contained in
destination address of packet
• No state established ahead of time
Alternatives
• Source routing: Complete route is contained in
each data packet
• Circuit Switching: Signaling protocol sets up
entire path out-of-band. (cf. the phone network)
• Virtual Circuits: Hybrid approach. Packets
carry “tags” to indicate path, forwarding over IP
Forwarding: Packet-Switched Networks
• Each packet contains a destination in the header
– Much like a postal address on an envelope
• Each hop (“router” or “switch”) inspects the
destination address to determine the next hop
• Will a packet always take the same path?
• How do the hops know how to forward packets?
19
Delay in Packet Switched Networks
• Four contributors to hop-by-hop delay
– Processing: Lookup, etc.
– Queueing: Time the packet must wait before being
transmitted
– Transmission: time to push the packet onto the link
– Propagation: time for the packet to propagate from A
to B
• End-to-end performance metrics
– Latency
– Throughput
20