CS352- Link Layer Dept. of Computer Science Rutgers University.
Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided...
Transcript of Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided...
![Page 1: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/1.jpg)
Review for Internet Introduction
![Page 2: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/2.jpg)
What’s the Internet: Two Views
▪ View 1: “Nuts and Bolts” View • billions of connected hosts
• routers and switches
• protocols control sending, receiving of messages
• “network of networks”
Introduction 1-2
mobile network
global ISP
regional ISP
home network
institutionalnetwork
▪ View 2: Service View • Infrastructure that provides services
to applications:
• Web, VoIP, email, games, e-commerce, social nets, …
![Page 3: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/3.jpg)
Internet Components ▪ Network Edge:
• hosts: clients and servers
▪ Access networks
▪ Home: DSL & Cable
▪ Institutional: Ethernet
▪ Wireless: WiFi & 3G & 4G LTE
▪ Physical Media
▪ guided media: copper, fiber, coax
▪ unguided media: radio
▪ Network Core: • Interconnected Routers
• Packet Switching: Shared Resources: Store and Forward
• Circuit Switching: Shared Resources: Reserved Circuit
mobile network
global ISP
regional ISP
home network
institutionalnetwork
Quiz 1
Quiz 4
![Page 4: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/4.jpg)
Internet Structure: Network of Networks
▪ End systems connect to Internet via access ISPs
• residential, company and university ISPs
▪ Access ISPs in turn must be interconnected.
IXP IXP IXP
Tier 1 ISP Tier 1 ISP Google
Regional ISP Regional ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
access
ISP
![Page 5: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/5.jpg)
Network Metrics 1: Delay
propagation
processingqueueing
dnodal = dproc + dqueue + dtrans + dprop
A
B
transmission
Quiz 2
![Page 6: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/6.jpg)
Introduction
Network Metrics 2: Packet loss
▪ Queue (aka buffer) has limited capacity
▪ Packet is dropped if arriving to full queue (aka lost)
A
Bpacket arriving to
full buffer is lost
buffer
(waiting area)
1-6
![Page 7: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/7.jpg)
Introduction
Network Metrics 3: Throughput
▪ throughput: rate (bits/time unit) at which bits transferred between sender/receiver• Real-time: rate at a given time point
• Average: rate over longer period of time
1-7
![Page 8: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/8.jpg)
Introduction
Internet protocol stack
▪ application: supporting network applications• FTP, SMTP, HTTP
▪ transport: process-process data transfer• TCP, UDP
▪ network: routing of datagrams from source to destination• IP, routing protocols
▪ link: data transfer between neighboring network devices• Ethernet, 802.111 (WiFi), PPP
▪ physical: bits “on the wire”
application
transport
network
link
physical
1-8
Quiz 3-1
![Page 9: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/9.jpg)
Introduction
ISO/OSI reference model
▪ Open Systems Interconnections• Presentation: allow applications to
interpret meaning of data, e.g., encryption, compression,
• Session: synchronization, recovery of data exchange
▪ 5-layer Internet stack “missing”these 2 layers!• these services, if needed, must be
implemented in application
application
presentation
session
transport
network
link
physical
1-9
Quiz 3-2
![Page 10: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/10.jpg)
Introduction
Network security
▪ field of network security:• how bad guys can attack computer networks
• how we can defend networks against attacks
• how to design architectures that are immune to attacks
▪ Malware can get in host from:
• Virus & Worm
▪ Denial of Service (DoS): attackers make resources (server, bandwidth) unavailable to legitimate traffic by overwhelming resource with bogus traffic
1-10
![Page 11: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/11.jpg)
Review for App Layer Protocols
![Page 12: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/12.jpg)
12
App-Layer Protocols
Application
Layer
Transport
Layer
Network
Layer
H-to-N
Layer
Application Protocol
Transport Protocol
Host A Host B
Application
Layer
Transport
Layer
Network
Layer
H-to-N
Layer
Network
Layer
H-to-N
Layer
Network
Layer
H-to-N
Layer
Router Router
![Page 13: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/13.jpg)
13
App-layer protocol defines
▪ Types of messages exchanged: • e.g., request, response
▪ Message format:• Syntax :what fields in messages
• Semantics: meaning of information in fields
▪ Rules for when and how processes send & respond to messages
Public-domain protocols:
▪ defined in RFCs
▪ DNS, HTTP, FTP, SMTP
Proprietary protocols:
▪ e.g., Skype, Hangout
A network connection is a 4-tuple:IPS, PortS, IPD, PortD
To communicate, 2 hosts need to identify each other with IP address
More than one process on a host: Port #
![Page 14: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/14.jpg)
14
Client-server architecture (CS)
Server:• Always-on host
• Permanent IP address
• A net of servers for scaling
Clients:• may not be always connected
• may have dynamic IP addresses
• communicate with server but do not communicate directly with each other
server
client
client
Quiz 5
![Page 15: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/15.jpg)
App-layer protocols
▪ DNS: Domain Name Service
▪ HTTP: HyperText Transfer Protocol
▪ CDN: Content Distribution Networks
▪ FTP: File Transfer Protocol
▪ SMTP: Simple Mail Transfer Protocol
15
Quiz 6
Quiz 7
Quiz 8
Quiz 9
Quiz 10
![Page 16: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/16.jpg)
DNS
![Page 17: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/17.jpg)
17
Domain Name System (DNS)
▪ For any networked application, we need to know the IP address of a given host name
▪ Problem:• On average, IP addresses have 12 digits
• We need an easier way to remember IP addresses
▪ Solution:• Use names to refer to hosts
• Add a service (DNS) to map between host names and IP addresses
• We call this Address Resolution
![Page 18: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/18.jpg)
Simple DNS
Centralize DNS?
▪ Single Point of Failure
▪ traffic volume
▪ Distant centralized database
▪ maintenance
18
QUERY | cs.rutgers.edu
RESPONSE | 128.6.4.2
<Client IP, CPort, DNS server IP, 53>
<DNS server, 53, Client IP, Cport>
doesn’t scale!
Quiz 6
![Page 19: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/19.jpg)
19
Root DNS Servers
com DNS servers org DNS servers edu DNS servers
rutgers.edu
DNS servers
umass.edu
DNS serversyahoo.com
DNS serversamazon.com
DNS servers
pbs.org
DNS servers
Distributed, Tree-based DNS Database
cs.rutgers.edu
DNS server
RFC 1034
![Page 20: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/20.jpg)
2 DNS Query Types
20
requesting hostcis.poly.edu
gaia.cs.umass.edu
root DNS server
local DNS serverdns.poly.edu
1
23
4
5
6
cs.umass.edu DNS serverdns.cs.umass.edu
78
.edu DNS server
requesting hostcis.poly.edu
gaia.cs.umass.edu
root DNS server
local DNS serverdns.poly.edu
1
2
45
6
cs.umass.edu DNS serverdns.cs.umass.edu
7
8
.edu DNS server
3
Iterated
Query
Recursive
Query
![Page 21: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/21.jpg)
21
DNS: Caching, Updating, Bootstrapping
▪ Once (any) name server learns mapping, it caches mapping
▪ Cache entries timeout (disappear) after some time
▪ How does a host contact the name server if all it has is the name and no IP address?
• IP address of at least 1 nameserver must be given in advance
![Page 22: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/22.jpg)
HTTP
![Page 23: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/23.jpg)
23
HTTP overview
▪ Web page consists of a base HTML-file which includes several referenced objects addressable by a URL
▪ Client/Server model
• client: browser that requests, receives, “displays” Web objects
• server: Web server sends objects in response to requests
▪ Request & Response Message
PC runningExplorer
Server running
Apache Webserver
Mac runningNavigator
![Page 24: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/24.jpg)
24
HTTP connectionsNonpersistent HTTP
▪ At most one object is sent over a single TCP connection.
Persistent HTTP
▪ Multiple objects can be sent over a single TCP connection between client and server.
Nonpersistent HTTP issues:
requires 2 RTTs per object
❖ TCP Connection and HTTP Request
Browsers can open parallel TCP connections to fetch objects
Persistent HTTP
server leaves TCP connection open after sending response
subsequent HTTP messages sent over open connection
Quiz 8
![Page 25: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/25.jpg)
25
Cookie : User-server State
HTTP is “stateless”▪ server maintains no information about past client requests
▪ What state can bring:• Authorization, shopping carts, recommendations, user session state
Four components:1) cookie header line of HTTP response message
2) cookie header line in HTTP request message
3) cookie file kept on user’s host, managed by user’s browser
4) back-end database at Web site
![Page 26: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/26.jpg)
26
Web caches (proxy server)
▪ browser sends all HTTP requests to cache• Miss: cache requests object
from origin server, then returns object to client
• Hit: cache returns object
• Reduce response time for client request.
• Reduce traffic on an institution’s access link.
guarantees cache content is
up-to-date
saves traffic and response
time whenever possible
![Page 27: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/27.jpg)
CDN
![Page 28: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/28.jpg)
Content Distribution Networks (CDN)
28
Reduce bandwidth Requirement & Traffic of content provider
Reduce $$ of maintaining Servers
Improve response time to user
Without CDN
Origin ServerClients
Origin server
CDN servers
With CDN
Huge B/W
requirements
& Does not scale
Quiz 7
![Page 29: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/29.jpg)
FTP
![Page 30: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/30.jpg)
30
FTP: the file transfer protocol
▪ Transfer file to/from remote host
▪ client/server model
• client: side that initiates transfer (either to/from remote)
• server: remote host
▪ “out of band” control• Control connection port 21 & Data connection port 20
Active connection: data connection initiated form server
Passive connection: : data connection initiated form client
▪ Key Drawback: Sends passwords in plain ASCII text
Replaced with scp, sftp instead
file transferFTP
server
FTPuser
interface
FTPclient
local filesystem
remote filesystem
user at host
Quiz 9
![Page 31: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/31.jpg)
SMTP
![Page 32: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/32.jpg)
32
Electronic Mail
Three Components:
1. User Agents
2. Mail Servers mailbox contains incoming
messages for user
message queue of outgoing (to be sent) mail messages
3. SMTP protocol Used to send messages
Client: sending user agent or sending mail server
server: receiving mail server
Mail access protocol: retrieval from
server
❖ POP: Post Office Protocol IMAP:
Internet Mail Access Protocol
❖ HTTP: Hotmail , Yahoo! Mail, etc.
Quiz 10
![Page 33: Review for Internet Introduction - Computer Sciencedz220/CS352/CS352 3RD2.pdf · guided media:copper, fiber, coax unguided media: ... 2 hosts need to identify each other with IP address](https://reader034.fdocuments.us/reader034/viewer/2022042801/5ae23b7c7f8b9a495c8bcee7/html5/thumbnails/33.jpg)
Questions?