Docsity

Slides on Internet Protocol Stack - Computer Networks | EECS 489, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
Internet Protocol Stack!
application: supporting network applications!
•!HTTP, SMTP, FTP, etc.!
transport: endhost-endhost data transfer!
•!TCP, UDP!
network: routing of datagrams from source
to destination!
•!IP, routing protocols!
link: data transfer between neighboring
network elements!
•!Ethernet, WiFi!
physical: bits “on the wire”!
application
transport
network
link
physical
Principles of Network Applications!
Our goals: !
•!conceptual, implementation aspects of network application
protocols!
•!transport-layer service models!
•!client-server paradigm!
•!peer-to-peer paradigm!
•!examine some popular application-level protocols
•!HTTP
•!SMTP / POP3 / IMAP
Application-Layer Protocols!
•!Messages exchanged between applications!
•!syntax and semantics of the messages between end-
hosts!
•!tailored to the specific application (e.g., Web, e-mail)!
•!Messages transferred over transport connection (e.g.,
TCP)!
•!Popular application-layer protocols!
•!HTTP, SMTP, FTP, SSH, …!
Client Server
GET /index.html HTTP/1.1
HTTP/1.1 200 OK
Some Network Apps"
(and Their Protocols)!
•!E-mail (SMTP)!
•!Web (HTTP)!
•!Instant messaging (IRC)!
•!Remote login (Telnet)!
•!P2P file sharing (Napster,
Gnutella, KaZaa)!
•!Multi-user network games !
•!Streaming stored video
clips (Adobe’s RTMP)!
•!Internet telephone
(Skype)
•!Real-time video
conference (RTP)
•!Massively parallel
computing
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Slides on Internet Protocol Stack - Computer Networks | EECS 489 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Internet Protocol Stack!

application: supporting network applications!

-! HTTP, SMTP, FTP, etc.!

transport: endhost-endhost data transfer!

•! TCP, UDP!

network: routing of datagrams from source

to destination!

-! IP, routing protocols!

link: data transfer between neighboring

network elements!

-! Ethernet, WiFi!

physical: bits “on the wire”!

application transport network link physical

Principles of Network Applications!

Our goals:!

-! conceptual, implementation aspects of network application

protocols!

-! transport-layer service models! -! client-server paradigm! -! peer-to-peer paradigm! -! examine some popular application-level protocols -! HTTP -! SMTP / POP3 / IMAP

Application-Layer Protocols!

•! Messages exchanged between applications!

-! syntax and semantics of the messages between end-

hosts!

-! tailored to the specific application (e.g., Web, e-mail)! -! Messages transferred over transport connection (e.g.,

TCP)!

•! Popular application-layer protocols!

-! HTTP, SMTP, FTP, SSH, …!

Client Server

GET /index.html HTTP/1.

HTTP/1.1 200 OK

Some Network Apps"

(and Their Protocols)!

-! E-mail (SMTP)! -! Web (HTTP)! -! Instant messaging (IRC)! -! Remote login (Telnet)! -! P2P file sharing (Napster,

Gnutella, KaZaa)!

-! Multi-user network games! -! Streaming stored video

clips (Adobe’s RTMP)!

-! Internet telephone

(Skype)

-! Real-time video

conference (RTP)

-! Massively parallel

computing

Creating a Network Application!

!! Write programs that!

-! run on different end systems and! -! communicate over a network.! -! e.g., Web browser software communicates with browser server!

!! No app software written for

devices in network core!

-! Network core devices do not function at app layer! -! This design allows for rapid app development! application transport network data link physical application transport network data link physical application transport network data link physical

Application Architectures!

Peer-to-peer (p2p):!

-! hybrid of p2p and centralized server! -! pure p2p! -! hierarchical p2p!

•! end-host (p2p) multicast! Client-server:!

-! DNS! -! FTP! -! SMTP! -! HTTP! -! cookies! -! web caching! -! CDN! -! Multi-player games!

Hybrid of P2P and Centralized Server!

Napster:!

-! file transfer P2P! -! file search centralized:! -! peers register IP address and content at central index server! -! peers query central index server to locate content!

Pure P2P Architecture!

•! no always-on server!

•! arbitrary end systems directly communicate!

•! peers are intermittently connected and change IP

addresses!

•! example: Gnutella!

•! highly scalable (why?)!

•! but difficult to manage!

-! how to find peer?! -! how to find content?!

Challenges for P2P Networks!

1.! NAT and firewall:!

-! cannot peer with a host you can’t address!

Solutions:!

-! Gnutella:! -! querier sends PUSH message to responder over the p2p network! -! responder opens a TCP connection to querier and send over the file! -! no luck if both are behind firewalls! -! KaZaA, eDonkey, Skype:! -! supernodes act as proxy if both peers are behind firewalls! -! Standards to circumvent NAT (and firewall!): UPnP, STUN!

2.! Download/upload bandwidth asymmetry!

needs bandwidth subsidy by content provider or CDN,"

or suffer long download time!

Application Architectures!

Peer-to-peer (p2p):!

-! hybrid of p2p and centralized server! -! pure p2p! -! hierarchical p2p!

•! end-host (p2p) multicast! Client-server:!

-! DNS! -! FTP! -! SMTP! -! HTTP! -! cookies! -! web caching! -! CDN! -! Multi-player games!

Modes of Delivery!

Unicast, broadcast, multicast!

Assuming a video conference "

involving S , D2 , and D

-! unicasting: two copies of packets from S are sent over

the SR link!

-! broadcasting: one copy of packet sent from S to all

destinations, but packet sent to D1 and D

unnecessarily!

-! multicasting: one copy of packets from S is sent over

the SR link, R then sends one copy each to D2 and D

D D D D S R

Multicast Delivery!

Uses of multicasting:!

-! video conferencing, distance learning, distributed

computation, p2p delivery, multi-player gaming, etc.!

Multicast design goals:!

-! can support millions of receivers per multicast group! -! receivers can join and leave any group at any time! -! senders don’t have to know all receivers! -! senders don’t have to be members of a group to send!

•! there could be more than one senders per group!

Multicast Group Management!

Issues in multicast group management:!

1.! how to advertise/discover a multicast group?!

2.! how to join a multicast group?!

3.! delivering multicast packets to the group!

IPv4 multicast:!

-! use multicast (Class-D) addresses as anonymous

rendezvous point!

-! create a well-known multicast group (address) to

advertise/discover multicast groups!

-! multicast data is sent using UDP! -! sender sendto() the multicast address! -! receiver recvfrom() the multicast address! -! not uniformly deployed throughout the Internet!

End-host Multicast!

Issues in multicast group management:!

1.! how to advertise/discover a multicast group?!

2.! how to join a multicast group?!

3.! delivering multicast packets to the group!

End-host (p2p) multicast:!

-! use a well-known, centralized rendezvous server! -! each peer must register with rendezvous server! -! rendezvous server returns a (random) list of peers! -! each peer can support only a limited number of peers! -! avoid sending duplicate messages and looping:! -! if single source, construct a shortest-path tree rooted at source! -! or use flood-and-prune algorithm! -! prefer peers in same subnet!

Flood and Prune!

How to ensure that only one copy of packet

from S is forwarded by P3 to P4 ?!

-! keep track of sequence number! -! only forward packet that comes from" shortest path from (to) source!

How to ensure that only one copy of packet

from S reaches P3 ?!

-! only forward if self is on neighbor’s shortest path from (to) source! -! prune ( P3 telling P2 not to forward pkts from S )! -! must be done per source if there are multiple sources," each source forming its own multicast group and (logically) its own multicast tree! -! must periodically flood in case of membership change!

S!

P3!

P1! P2!

P4!

Application Architectures!

Peer-to-peer (p2p):!

-! hybrid of p2p and centralized server! -! pure p2p! -! hierarchical p2p!

•! end-host (p2p) multicast! Client-server:!

-! DNS! -! FTP! -! SMTP! -! HTTP! -! cookies! -! web caching! -! CDN! -! Multi-player games!

Fixed Header vs. ASCII Commands!

What are the advantages and disadvantages of using

ASCII commands over fixed header as with IP or TCP?!

Why limit ASCII commands to four letter words?!

Why use numeric code in reply?!

Why bother with ASCII message in reply?!

Application Architectures!

Peer-to-peer (p2p):!

-! hybrid of p2p and centralized server! -! pure p2p! -! hierarchical p2p!

•! end-host (p2p) multicast! Client-server:!

-! DNS! -! FTP! -! SMTP! -! HTTP! -! cookies! -! web caching! -! CDN! -! Multi-player games!

Three major components:!

-! user agents! -! mail servers! -! simple mail " transfer protocol (SMTP)!

User agent!

-! a.k.a. “mail reader”! -! composing, editing, reading mail messages! -! e.g., Thunderbird, Apple Mail, Eudora, Outlook! -! outgoing, incoming messages stored on server!

Mail servers :!

-! mailbox contains incoming messages for user! -! message queue contains outgoing (to be sent) mail messages!

Electronic Mail!

user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP SMTP SMTP SMTP mail access protocol mail message format

Electronic Mail: SMTP (RFC 2821)!

SMTP protocol runs between mail servers to send email messages!

-! client: sending mail server! -! server: receiving mail server! Uses TCP to reliably transfer email message from client to server, port 25! -! direct transfer: sending server to receiving server! -! three phases of transfer! -! handshaking (greeting)! -! transfer of messages! -! closure! -! command/response interaction! -! commands: ASCII text! -! response: status code and phrase! -! messages must be in 7-bit ASCII!

Sample SMTP Interaction!

S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: S: 250 [email protected]... Sender ok C: RCPT TO: S: 250 [email protected] ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C:. S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection Try it out!! (Real programmers send email by... not)!

Mail Message Format (RFC 822)!

•! SMTP: protocol for exchanging email messages!

•! RFC 822: standard for text only message format:!

-! header lines, e.g.,! -! To:! -! From:! -! Subject:! -! different from SMTP commands!! -! body! -! the “message”, ASCII characters only! user agent sender’s mail server user agent SMTP mail access protocol receiver’s mail server mail message mail message format SMTP format

header!

body!

blank! line!

Mail Message Format: MIME!

!! MIME: MultIMEdia mail extension (RFC 2045, 2056)!

!! additional lines in msg header declare MIME content type!

From: [email protected] To: [email protected] Subject: Picture of yummy crepe. MIME-Version: 1. Content-Transfer-Encoding: base Content-Type: image/jpeg base64 encoded data ..... ......................... ......base64 encoded data multimedia data! type, subtype,! parameter declaration! method used! to encode data! MIME version! encoded data!

example!

Mail Access Protocols!

•! SMTP: delivery/storage to receiver’s server!

•! Mail access protocol: retrieval from server!

-! POP: Post Office Protocol (RFC 1939)! -! authorization (agent server) and download! -! IMAP: Internet Mail Access Protocol (RFC 1730)! -! more features (more complex)! -! manipulation of stored messages on server! -! HTTP: Yahoo! Mail, Gmail, Hotmail, etc.! user agent sender’s mail server user agent SMTP^ mail access protocol receiver’s mail server SMTP