0% found this document useful (0 votes)
5 views

02-architecture

Uploaded by

olajameel89
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

02-architecture

Uploaded by

olajameel89
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Internet Architecture

Lecture 2, Computer Networks (198:552)


Fall 2019
What happens when you browse?
(1) Request gmail.com for your mail
(2) Google churns on your request
(3) Receive & display the response!

The Internet
But how does your laptop know
where the google.com server is,
and how to reach it?
But how does your laptop know
where the google.com server is,
and how to reach it?
Addressing
Both your laptop and google.com
have many addresses.
But how does your laptop know
where the google.com server is,
and how to reach it?
Routing
There may be many kinds of networks
between you and google, each using its
own way to stitch together the path
Addressing
Rutgers campus
The Internet
network

Transport address (port) With which app is this


Ex: 64058 conversation associated?

Network address (IP address) Whose network am I


Ex: 192.168.1.4 attached to?

Hardware address (MAC address) How do I identify my


Ex: 00-15-C5-49-04-A9 network interface (device)?
The Internet Google’s network

Application address (URL)


Ex: mail.google.com

Transport address (port)


Ex: 4096

Network address (IP address)


Ex: 10.1.1.104

Hardware address (MAC address)


Ex: 00-15-C5-49-04-A7
Software and hardware for networking
are arranged in layers.

Layering provides modularity:

Each layer has a distinct function


& interacts with other layers through
well-defined interfaces.
Modularity through layering Protocols “stacked” in
endpoint and router
software/hardware

Apps: useful user-level functions HTTP FTP NV TFTP

TCP UDP
Transport: provide guarantees to apps
IP

Network: best-effort global pkt delivery Ether ATM … WiFi

IP is the “thin waist” of


Link: best-effort local pkt delivery the Internet, enabling
interoperability across
apps & network media
The Internet

Applications Packet starts as an Applications


app “payload”

Transport Packet takes on Transport


info at each layer

Network Network

Link layer Link layer


The Internet
Applications Applications

Transport Transport

Network Network Network Network

Link layer Link layer Link layer Link layer


Applications Routers do not typically Applications
have transport or app
functionality
Transport (more on this later.) Transport

Network Network Network Network

Link layer Link layer Link layer Link layer


Time for an activity
Where do all the addresses come from?
• You, as the user, only know the application address of your
destination (google.com)

• Do we need all these addresses, or can we get rid of some?


• Should addresses correspond to the endpoint, or point of
attachment, or to the application?

• How does your laptop find all the other addresses?


Addresses and what they correspond to
• Transport address (TCP/UDP port): app-level conversation

• Network-level address (IP address): point of attachment

• Link-level address (MAC address): device


Directories
• Directories map a name to an address
• Simplistic designs
• Central directory
• Ask everyone (e.g., flooding in ARP)
• Tell everyone (e.g., pushing /etc/hosts)
• Fix a value a priori (e.g., dst port 80 is typically HTTP)
• Scalable distributed designs
• Hierarchical namespace (e.g., Domain Name System)
• Flat name space (e.g., Distributed Hash Table)
Domain Name System
root DNS server
Host at cis.poly.edu
wants IP address for
2
gaia.cs.umass.edu 3
TLD DNS server
4
local DNS server
dns.poly.edu 5

7 6
1 8 authoritative DNS server
dns.cs.umass.edu

requesting host
Recursive query: #1 cis.poly.edu
Iterative queries: #2, 4, 6 gaia.cs.umass.edu
Routing

19
Path computation: Routing
• “I know where you are, but how do I get there?”
• End-to-end paths (e.g., source routing)
• Each node picks the best end-to-end path
• Spanning tree (e.g., Ethernet)
• One tree that connects every pair of nodes
• Shortest paths (e.g., OSPF, IS-IS, RIP)
• Shortest-path tree rooted at each node
• Locally optimal paths (e.g., BGP)
• Each node selects the best among its neighbors
• More on this in the next lecture…
20
The Internet’s approach to routing
aggregate routers into regions known as
“autonomous systems” (AS) (a.k.a. “domains”)

intra-AS routing inter-AS routing


§ routing among hosts, routers in same
• routing among AS’es
AS (“network”)
§ all routers in AS must run same intra- • gateways perform inter-domain
domain protocol routing (as well as intra-domain
routing)
§ routers in different AS can run
different intra-domain routing protocol
§ gateway router: at “edge” of its own
AS, has link(s) to router(s) in other
AS’es
21
Interconnected ASes
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b AS1
1d • Paths configured by both intra- and
inter-AS routing algorithm
• intra-AS routing determine
Intra-AS
Routing
Inter-AS
Routing entries for destinations within
algorithm algorithm
AS
Forwarding
table
• inter-AS & intra-AS
determine entries for external
destinations

22
What happens when you browse?
(1) Request gmail.com for your mail
(2) Google churns on your request
(3) Receive & display the response!

The Internet

But how did the Google server and your laptop


attach to the network in the first place? How did
they get assigned their addresses?
The roles of the endpoint

24
The roles of endpoint network software
• Bootstrapping the host into the network
• How does the endpoint get an address?
• How does the endpoint make itself known to others?
• Providing an interface to networked applications
• How do higher-level applications access the network?
• What abstractions does the host provide to apps?
• Distributed resource sharing
• What roles does the host play in network resource allocation
decisions?
•25 … apart from other things.
(1) Bootstrapping host into network
adapter
• The lowest level address is hard-wired
Applications • The network adapter (NIC) comes with MAC address
• Higher-level addresses can be statically or
dynamically configured
Transport
• IP address
• Statically configured, or dynamically with DHCP
Network • TCP port
• Pick a transient value, ex. HTTP src port
• … or a value agreed upon a priori, ex. HTTP dst port
Link layer such as 80
Dynamic Host Configuration Protocol
DHCP
disco
(broa ver
d cast)
arriving
endpoint o ffer
HC P
D
Host learns
IP address, DHCP DHCP server
Subnet mask, reque
(broa st
Gateway address, d cast)
DNS server(s),
and a lease time.
AC K
H C P
D
(2) Socket: the interface to applications
• Best-effort packet delivery is a clumsy abstraction
• Applications typically want higher-level abstractions
• Messages, uncorrupted data, reliable in-order delivery
User process User process

socket socket
Operating Operating
System System
• Applications communicate using “sockets”
• Stream socket: reliable stream of bytes (like a file)
• Message socket: unreliable message delivery
28
Two Basic Transport Features
• Demultiplexing: port numbers Server host 128.2.194.242
Service request for
Client host
128.2.194.242:80 Web server
(port 80)
(i.e., the Web server)
Client OS
Echo server
(port 7)

• Error detection: checksums

IP payload

29 detect corruption
Two Main Transport Layers
• User Datagram Protocol (UDP)
• Just provides demultiplexing and error detection
• Header fields: port numbers, checksum, and length
• Low overhead, good for query/response and multimedia
• Transmission Control Protocol (TCP)
• Adds support for a “stream of bytes” abstraction
• Retransmitting lost or corrupted data
• Putting out-of-order data back in order
• Preventing overflow of the receiver buffer
• Adapting the sending rate to alleviate congestion
• Higher overhead, good for most stateful applications
30
Socket: the interface to applications
User process User process

socket socket
Operating Operating
System System

• A socket is associated with five pieces of information:


• Source and destination IP address
• Source and destination port
• Kind of transport protocol (TCP/UDP)
• Together referred to as the connection five-tuple
Discussion
• Is a socket between two IP addresses the right abstraction?
• Mobile hosts?
• Replicated services?

• Is end-to-end error detection and correction the right model?


• High loss environments?
• Expense of retransmitting over the entire path?

32
(3) Distributed sharing of the network
• Best-effort network easily becomes overloaded
• No mechanism to “block” excess calls
• Instead excess packets are simply dropped
• Examples
• Shared Ethernet medium: frame collisions
• Ethernet switches and IP routers: full packet buffers
• Quickly leads to congestion collapse
“congestion
Increase in load that results in a
Useful work collapse” decrease in useful work done.

33
Load
Endpoints adjust to congestion
• End hosts adapt their sending rates: congestion control
• In response to network conditions
• Learning that the network is congested
• Shared Ethernet: carrier sense multiple access
• Seeing your own frame collide with others
• IP network: observing your end-to-end performance
• Packet delay or loss over the end-to-end path
• Adapting to congestion
• Slowing down the sending rate for the greater good
• Slow down too little: don’t effectively relieve congestion
34
• Slow down too much: lose application performance
Ethernet back-off mechanism

• Carrier sense: wait for link to be idle


• If idle, start sending; if not, wait until idle
• Collision detection: listen while transmitting
• If collision: abort transmission, and send jam signal
• Exponential back-off: wait before retransmitting
• Wait random time, exponentially larger on each retry
35
TCP congestion control (much more later)
• Additive increase, multiplicative decrease
• On packet loss, divide congestion window in half
• On success for last window, increase window linearly

Loss
Window

halved
time
36 Other mechanisms: slow start, fast retransmit vs. timeout loss, etc.
Discussion
• What role should the network play in resource allocation?
• Explicit feedback to the endpoints?
• Enforcing an explicit rate allocation?

• What is a good definition of fairness?

• What about hosts who cheat to hog resources?


• How to detect cheating? How to prevent/punish?

37

You might also like