Lecture04 Architectural Principles
Lecture04 Architectural Principles
Computer Networks:
Architecture and Protocols
Lecture 4
- Packet Delays
- How the Internet works
- Three Architectural Principles
Rachit Agarwal
Context for and Goals of Today’s Lecture
• Context:
• Today’s lecture is going to be one of the hardest lectures
• If you understand everything
• There is something wrong!
• Goals:
• How does the Internet work?
• An end-to-end view
• Three Principles
But, as usual, lets start with:
what we learnt last lecture
Recap: Challenges with Circuit switching (reservation)
• Handling failures
• Resource underutilization
• Blocked connections
• Connection set up overheads
• Per-connection state in switches (scalability problem)
Recap: Solution: Packet switching
• Break data into smaller pieces
• Packets!
• Propagation delay:
• Time taken to move one bit from one end of the link to other
• = Link length / Speed of light
Questions?
Today’s lecture
1. Dive into end-to-end: from source to destination
2. First look into switches: routing, queueing, forwarding
3. First look into network stack: sockets, ports, “the stack”
4. Second look into the stack: layers
5. Why layering?
First look into end-to-end
End-to-end: what mechanisms do we need?
Source
Source
Destination
Destination
Four fundamental problems!
• Locating the destination: Naming, addressing
• Before you can send packets to www.cornell.edu, you must resolve names
into the host’s address
Header Data
What does a switch/router look like
Input queue Output queue
• Each input queue could send packets to each output queue at full rate
• That is, a switch architecture is heavily parallelized
• Can always focus on a single outgoing queue for design/analysis
Queueing and processing delay: Case I (low load)
1 packet/time
2 packets/time
Queueing and processing delay: Case II (balanced load)
1 packet/time
2 packets/time
Queueing and processing delay: Case II (high load)
1 packet/time
2 packets/time
Queueing and processing delay
• Processing delay
• Easy; each switch/router needs to decide where to put packet
• Requires checking header, etc.
• Queueing delay
• Depends on network load
• As load increases, queueing delay increases
• When a packet arrives at a host, what does the host do with it?
• To which process (application) should the packet be sent?
• If the packet header only has the destination address, how does the host
know where to deliver packet?
• There may be multiple applications on that destination
And while we are finishing our story ….
• Who puts the source address, source port, destination address,
destination port in the packet header?
The final piece in the game: End-host stack
Of Sockets and Ports
• Applications:
• Send and receive packets
• Understand content of packet bodies
• If each component’s task well-defined, one can focus design on that task
• And replace it with any other implementation that does that task
• Without changing anything else
What is Modularity
• Modularity is nothing more than decomposing programs/systems into
smaller units.
• A clean “separation of concerns”
• … and networking
Modularity in Computer Science
• Examples
• Libraries encapsulating set of functionalities
• Programming language abstracts away CPU
• Packets on wire
• Packets on wire
• A kind of modularity
• Functionality separated into layers
• Layer n interfaces with only layer n-1
• Hides complexity of surrounding layers
• Evolution of “modules”
• (IP) Connectivity becomes a commodity
Three Observations
• Each layer:
• Depends on the layer below
• Supports layer above
• Independent of others
• Layering doesn't tell you what services each layer should provide
network
Suppose the link layer is reliable. Does that ensure reliable data transfer?
Suppose the link layer is reliable. Does that ensure
reliable file transfer?
Suppose the network layer is reliable. Does that ensure reliable data
transfer?
Suppose the network layer is reliable. Does that
ensure reliable file transfer?
End-to-end Principle (Interpretation)
• End-to-end implementation
• Correct
• Generalized, and simplifies lower layers
• In-network implementation
• Insufficient
• May help — or hurt — performance
Examples? Contradicfons?
End-to-end Principle (Interpretation)
• Failure avoidance?
• Failure reaction?
• Routing?
• Topology discovery?
• Path Selection?
• Security?
• Network management?
• Resource management?
Summary
• Where to implement functionality is complicated
• No right or wrong answer
• But everyone agrees that reliability does not belong in the network
• Only way failure can cause loss of the critical state is if the entity that
cares about it also fails …
• … in which case it doesn’t matter
• Often argues for keeping network state at end hosts rather than inside
routers
• E.g., packet-switching rather than circuit-switching
Decisions and their Principles
• How to break system into modules
• Dictated by layering