0% found this document useful (0 votes)
33 views38 pages

CS - ECE438 Lec4 InternetArchitecturalPrinciples

Uploaded by

Greajoe Theon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views38 pages

CS - ECE438 Lec4 InternetArchitecturalPrinciples

Uploaded by

Greajoe Theon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

CS/ECE 438: Communica on Networks

How does the Internet work?


Three Architectural Principles

Saksham Agarwal
1
ti
Maintaining connec vity under failures: s ll a challenge!

ti
ti
Context for today’s lecture
• So far: discussed several high-level concepts
• Design goals of the Internet
• End-to-end working of the Internet
• Addressing, rou ng, forwarding, reliability
• Also did a deeper dive into
• Network sharing
• Circuit vs packet switching
• You know more about computer networks than what you may realize!

• Today: lay the founda on for the rest of this course!


ti
ti
Goals for today’s lecture
• Three architectural principles
• Layering
• End-to-end principle
• Fate sharing principle

• We will come back to these over and over again


• Almost every lecture!
Quick recap on how does the Internet work?
Recap: Four fundamental problems!
• Loca ng the des na on: Naming, addressing
• Mapping of names to addresses using Domain Name System (DNS)

• Finding path to des na on: Rou ng


• Distributed algorithm that computes and stores rou ng tables

• Sending data to des na on: Forwarding


• Input queues, virtual output queues, output queues
• Enablers: Packet header (address), and rou ng table (outgoing link)

• Reliability: Failure handling


• Not much ques on, but the ques on: hosts or networks?
ti
ti
ti
ti
ti
ti
ti
ti
ti
ti
ti
ti
Recap: the nal piece in the story — Host network stack
Of Sockets and Ports

• When a process wants access to the network, it opens a socket, which is associated with a port

• Socket: an OS mechanism that connects processes to the network stack

• Port: number that iden es that par cular socket

• The port number is used by the OS to direct incoming packets


fi
ti
fi
ti
Recap: the end-to-end story
• Applica on opens a socket that allows it to connect to the network strack

• Maps name of the website to its address using DNS

• The network stack at the source embeds the address and port for both the source and the des na on in
packet header

• Each router constructs a rou ng table using a distributed algorithm

• Each router uses des na on address in the packet header to look up the outgoung link in the rou ng table
• And when the link is free, forward the packet

• When a packet arrives at the des na on:


• The network stack at the des na on uses the port to forward the packet to the right applica on
ti
ti
ti
ti
ti
ti
ti
ti
ti
ti
ti
ti
Ques ons?
ti
Separa on of concerns
• Network fabric (links, switches/routers): Deliver packets from host to host (based on address)

• Network stack (OS): Deliver packets to appropriate socket (based on port)

• Applica ons:
• Send and receive packets
• Understand content of packet bodies
ti
ti
Who cares?
• Why is separa on of concerns important?
• Separa on of concerns ~ Modularity

• If each component’s task is well-de ned, one can focus design on that task
• And replace it with any other implementa on that does that task
• Without changing anything else
ti
ti
fi
ti
Computer System Modularity
• Par on system into modules
• Each module has a well de ned interface

• Interfaces give exibility in implementa on


• Changes have limited scope

• Examples
• Libraries encapsula ng set of func onali es
• Programming language abstracts away CPU

• The trick is to nd the right modularity


• The interfaces should be long-las ng
• If interfaces are changing o en, modularity is wrong

https://numpy.org/doc/stable/reference/generated/numpy.sort.html
ti
ti
fi
fl
ti
fi
ft
ti
ti
ti
ti
Network System Modularity
• The need for modularity s ll applies
• And is even more important! (Why?)

• Network implementa ons not just distributed across many lines of code

• Networking is distributed across many machines


• Hosts
• Routers
ti
ti
Network Modularity Decisions
• How to break system into modules?
• Classic decomposi on into tasks

• Where are modules implemented?


• Hosts?
• Routers?
• Both?

• Where is state stored?


• Hosts?
• Routers?
• Both?
ti
Leads to three design principles
• How to break system into modules?
• Layering

• Where are modules implemented?


• End-to-end principle

• Where is state stored?


• Fate-sharing
Layering
Breakdown end-to-end func onality into tasks
• Transmit data (bits) over communica on channel (wire, air, …): Physical (layer 1)

• Forwarding data (packets) between neighboring network elements: Link (layer 2)

• Rou ng data across (global) network elements: Network (layer 3)

• Deliver data between host processes: Transport (layer 4)

• Do something with the data: Applica on (layer 5)


ti
ti
ti
ti
Five layers (Top - Down)
• Applica on (L5): Providing network support for apps

• Transport (L4): (Reliable) end-to-end delivery

• Network (L3): Rou ng across networks

• Link (L2): Forwarding across a network link

• Physical (L1): Bits on wire


ti
ti
Layering

• A kind of modularity
Applica Built on top of reliable delivery
• Func onality separated into layers

• Layer n interfaces with only layer n-1 and n+1 Socket


• Hides complexity of surrounding layers
Data Transport (L4) Built on top of (global) rou ng
• Interface between successive layers?
L4
• Sockets and packet headers! Segment
• Each layer encapsulates its header L4 Data Network (L3) Built on top of (local) forwarding

L3
Datagram
L3 L4 Data Data Link (L2) Built on top of data communica on

L2
Frame
L2 L3 L4 Data Physical (L1)
ti
ti
ti
ti
Ques ons?
ti
Leads to three design principles
• How to break system into modules?
• Layering

• Where are modules implemented?


• End-to-end principle

• Where is state stored?


• Fate-sharing
Distribu ng layers across network
• Layers are simple if only a single machine
• Just stack of modules interac ng with those above/below

• But we need to implement layers across machines


• Hosts
• Routers/switches

• What gets implemented where? And why?


ti
ti
What gets implemented on Router?
• Bits arrive on wire
• Physical layer necessary

• Packets must be forwarded to the next router/switch


• Link layer necessary

• Routers par cipate in global rou ng


• Network layer necessary

• Routers do not support reliable delivery


• Transport layer (and above) not supported
• Why?
ti
ti
What gets implemented on Switch? (Routers vs Switches)
• Bits arrive on wire
• Physical layer necessary

• Packets must be forwarded to the next router/switch


• Link layer necessary

• Switches do not par cipate in global rou ng


• Network layer not supported
• Key di erence between a router and a switch
• Typically used in Local Area Networks (LANs)
• More discussion about switches and forwarding in LANs later in the course…

• Switches do not support reliable delivery


• Transport layer (and above) not supported
ff
ti
ti
Example of Local Area Networks
Switch LAN1 (DCL Building)

Router

Router
LAN2 (Grainger)

Switch
Link

End hosts
Visualizing what gets implemented where
• L1 + L2 layers implemented everywhere

• L3 also implemented at routers;

• L3+L4+L5 also implemented at hosts

Applica Applica

Transport Transport

Network Network Network Network

Data Link Data Link Data Link Data Link Data Link Data Link

Physical Physical Physical Physical Physical Physical

Host Switch Router Router Switch Host


ti
ti
But why implemented this way?
• Layering doesn’t tell you what services each layer should provide

• What is an e ec ve division of responsibility between various layers?


ff
ti
End-to-end principle
• If a func on can completely and correctly be implemented only with the knowledge and help of the applica on
standing at the endpoints of the communica on system

• Then providing that func on as a feature of the communica on system itself is not possible.

• Some mes providing an incomplete version of that func on as a feature of the communica on system itself may
be useful as a performance enhancement.
ti
ti
ti
ti
ti
ti
ti
ti
End-to-end principle: an example
• Suppose each link layer transmission is reliable
• Does that ensure end-to-end (applica on-to-applica on) reliability?

• Suppose network layer is reliable


• Does that ensure end-to-end (applica on-to-applica on) reliability?

Applica Applica

Transport Transport

Network Network Network Network

Data Link Data Link Data Link Data Link Data Link Data Link

Physical Physical Physical Physical Physical Physical

Host Switch Router Router Switch Host


ti
ti
ti
ti
ti
ti
End-to-end principle: let us read it again
• If a func on can completely and correctly be implemented only with the knowledge and help of the applica on
standing at the endpoints of the communica on system

• Then providing that func on as a feature of the communica on system itself is not possible.

• Some mes providing an incomplete version of that func on as a feature of the communica on system itself may
be useful as a performance enhancement.
ti
ti
ti
ti
ti
ti
ti
ti
End-to-end principle: interpreta on
• Assume the condi on (IF) holds. Then,

• End-to-end implementa on
• Correct
• Generalized, and simpli es lower layers

• In-network implementa on
• Insu cient
• May help — or hurt — performance
ffi
ti
fi
ti
ti
ti
End-to-end principle (Three things to know)
• Everyone knows what it is
• So, you must!

• Everyone believes it
• So, you must!

• Nobody knows what it means


• So, it is okay you feel so too :-)
Ques ons?
ti
Leads to three design principles
• How to break system into modules?
• Layering

• Where are modules implemented?


• End-to-end principle

• Where is state stored?


• Fate-sharing
What does state mean?
• Hosts (network stacks) store state
• Socket/port related
• (If reliability implemented at hosts) Reliability related
• …

• Network routers store state


• Rou ng tables (across networks)
• Forwarding state (within a local area network)
• …
ti
Generalized Principle: Fate-sharing
• When storing state in a distributed system, colocate it with en es that rely on that state

• Only way failure can cause loss of the cri cal state is if the en ty that cares about it also fails…
• …in which case it doesn’t ma er

• O en argues for keeping network state at end hosts rather than inside routers
• Eg., packet switching rather than circuit switching
ft
tt
ti
ti
ti
ti
Generalized Principle: Fate-sharing
• Note that end-to-end principle relied on fate-sharing
• Invariants only break when endpoints themselves break
• Minimize the dependence on other network elements

• This should dictate placement of state


Decisions and their principles
• How to break system into modules?
• Dictated by layering

• Where are modules implemented?


• Dictated by end-to-end principle

• Where is state stored?


• Dictated by fate sharing

You might also like