Communicating Applications



Similar documents
FTP: the file transfer protocol

The Application Layer: DNS

Domain Name System (or Service) (DNS) Computer Networks Term B10

FTP and . Computer Networks. FTP: the file transfer protocol

Domain Name System Richard T. B. Ma

DATA COMMUNICATOIN NETWORKING

CMPE 80N: Introduction to Networking and the Internet

DNS: Domain Name System

Chapter 2 Application Layer

Computer Networks & Security 2014/2015

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

FTP: the file transfer protocol

internet technologies and standards

DNS and P2P File Sharing

Chapter 2 Application Layer. Lecture 5 FTP, Mail. Computer Networking: A Top Down Approach

CPSC Network Programming. , FTP, and NAT.

1 Introduction: Network Applications

DNS and electronic mail. DNS purposes

Application Layer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

CSCI-1680 SMTP Chen Avin

Names vs. Addresses. Flat vs. Hierarchical Space. Domain Name System (DNS) Computer Networks. Lecture 5: Domain Name System

How To Map Between Ip Address And Name On A Domain Name System (Dns)

Protocolo FTP. FTP: Active Mode. FTP: Active Mode. FTP: Active Mode. FTP: the file transfer protocol. Separate control, data connections

Domain Name System (DNS)

Naming and the DNS. Focus. How do we name hosts etc.? Application Presentation Topics. Session Domain Name System (DNS) /URLs

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting

Distributed Systems. 2. Application Layer

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting, NTP

CS 43: Computer Networks Naming and DNS. Kevin Webb Swarthmore College September 17, 2015

. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Domain Name System (DNS)

DNS. Spring 2016 CS 438 Staff 1

HW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009

Review of Networking Basics. Yao Wang Polytechnic University, Brooklyn, NY11201

Domain Name System DNS

Domain Name System (DNS) RFC 1034 RFC

Network Applications

Introduction to Computer Networks

Network programming, DNS, and NAT. Copyright University of Illinois CS 241 Staff 1

Network Technologies

The Application Layer. CS158a Chris Pollett May 9, 2007.

DNS: Domain Name System

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

CS43: Computer Networks . Kevin Webb Swarthmore College September 24, 2015

Internet Technology 2/13/2013

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

Principles of Network Applications. Dr. Philip Cannata

Domain Name System (DNS) Reading: Section in Chapter 9

INF3190 Application Layer DNS, Web, Mail

1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

2.5 DNS The Internet s Directory Service

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

Computer Networks. Examples of network applica3ons. Applica3on Layer

Lecture 28: Internet Protocols

CONTENT of this CHAPTER

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

Electronic Mail

Domain Name System (DNS)

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Chapter 2 Application Layer

, SNMP, Securing the Web: SSL

Data Communication I

Network(Security(Protocols(

Application-layer protocols

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

NET0183 Networks and Communications

C 1. Last Time. CSE 486/586 Distributed Systems Domain Name System. Review: Causal Ordering. Review: Causally Ordered Multicast.

Application Layer, Client/Server Computing and Socket Programming (II)

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

. MIME is the protocol that was devised to allow non-ascii encoded content in an and attached files to an .

Computer Networks - CS132/EECS148 - Spring

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

The Web: some jargon. User agent for Web is called a browser: Web page: Most Web pages consist of: Server for Web is called Web server:

Networking Applications

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

The Web History (I) The Web History (II)

Application Layer -1- Network Tools

Overview of Computer Networks

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

Chapter 11. User Datagram Protocol (UDP)

CS 5480/6480: Computer Networks Spring 2012 Homework 1 Solutions Due by 9:00 AM MT on January 31 st 2012

Chakchai So-In, Ph.D.

Transport and Network Layer

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP - Message Format. The Client/Server model is used:

Transcription:

Communicating Applications

Network Applications The raison d'être of computer networks Innovation happens in the application layer There is always a killer application Remote login -> Email -> Web -> P2P Easy to add new protocols only end-hosts need to install application program Lower layers fixed Will we ever have IPv6, multicast, QoS?

Applications Exist in End-points Application API Transport Network Link Network Link Application API Transport Network Link

What is in an Application? HTTP,SMTP,FTP, etc. Application process App. Protocol BSD Socket API Application process App. Protocol BSD Socket API OS Stack OS Stack

Application Architectures Client-Server Peer-to-Peer

Client-Server Architecture Applications: Web, Email, File Transfer Server: provides a service, e.g., content always on, passive, fixed address/name single point of failure server farms, load balancing, provide robustness and scalability Client: service consumer initiates service requests, can come and go

Peer-to-Peer Architecture Applications: BitTorrent, Gnutella, Skype, etc. No infrastructure Hosts/peers communicate directly and are equal self-scalability often requires boot-strap server (entry into network) Applications often form a logical Overlay Network overlay network physical network

Client/Server Architectures with Overlay Aspects DNS (Domain Name System) Hierarchical network of DNS servers Akamai Content Delivery Network (CDN) for Web content Clever use of DNS to redirect your request to nearest server Email MTAs communicate via SMTP to deliver emails Routing Protocols (RIP, OSPF) Routers communicate to exchange path information not really client/server

Where to Draw the Line No strict definition of peer-to-peer and overlay General definition p2p = many-to-many (client/server = many-to-one) Includes distributed client/server (infrastructure in p2p mode) Pure/strict definition No infrastructure Entirely user driven Often associated with specific applications (e.g, KaZaa, Gnutella, BitTorrent, Skype)

Internet Traffic Trends Source: CacheLogic

Application Service Requirements Application Data loss Bandwidth Time Sensitive file transfer e-mail web documents real-time audio/video stored audio/video interactive games financial apps no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant no loss elastic elastic elastic audio: 5Kb-1Mb video:10kb-5mb same as above few Kbps up elastic no no no yes, 100 s msec yes, few secs yes, 100 s msec yes and no

Transport Services Available to Applications TCP (Transport Control Protocol): full duplex byte stream connection reliable data transfer (loss-free, in order delivery) congestion control UDP (User Datagram Protocol): lightweight, connectionless datagram delivery service unreliable (losses, out-of-order delivery) no congestion control DCCP (Datagram Congestion Control Protocol): a mix between TCP and UDP No security!

Addressing Applications In packet switched networks all packets carry the end-host address of the destination e.g., IP address in the Internet Protocol But, once at the destination, how does the host know which application the packet is for? The transport protocol specifies a 16-bit port number A port maps to a process on the host The task of mapping the incoming packets to specific applications is called demultiplexing demultiplexing p1 p2 p3 Network stack p1 p2 p3 Network stack multiplexing

Port Numbers Port numbers assigned by IANA/ICANN Well-known port numbers (0-1023) 80 = HTTP, 21 = FTP, 25 = SMTP Restricted access in OS Registered port numbers (1024-49151) Application ports that can be registered by e.g., companies 1214 = KaZaa, 26000 = Quake Dynamic port numbers (49152-65535) Operating system dynamically allocates client source port

Writing Applications: What is a socket? Operating system handle for identifying the endpoints of communication Berkeley sockets (BSD) de facto standard To an application process a socket is just a number Internally (in the OS), a socket is a struct : Local IP and port number Remote IP and port number State sock = socket(pf_inet, SOCK_STREAM, 0); bind(sock, &sock_addr, addr_length);

Application Layer Protocols

The World Wide Web (1990s) Four main components Server (e.g., Apache) Client (Firefox, IE, Safari) Application protocol (HTTP=stateless protocol) Objects/data (HTML document, picture) Persistent and non-persistent connections Parallel transfers Cookies state on clients Web caching

HyperText Transfer Protocol GET / HTTP/1.1 Host: www.it.uu.se Connection: close User-agent: Mozilla/4.0 Accept-language: sv HTTP/1.1 200 OK Connection: close Date: Mon, 03 Nov 2008 12:00:01 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Sun, 2 Nov 2008 15.34:23 GMT Content-Length: 8736 Content-Type: text/html <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <link rel="shortcut ICON" href="/favicon.ico"> <title>uu/department of Information Technology</title> <link rel="stylesheet" type="text/css" href="/css/it-style.css"> <!-- Mozilla/5.0 (X11; U; Linux x86_64; en-us; rv:1.9a8) Gecko/2007100619 GranParadiso/ 3.0a8 --> <link rel="author" href="/katalog/search.php?name=lotta%20lundell&exact=yes"> <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/"> <meta name="dc.title" content="department of Information Technology, Uppsala University"> </head> <body class='rededge' > <table style='height:100%;overflow:visible;' cellspacing

File Transfer Protocol - FTP Killer application of the 80ies Separate channels for control traffic and data traffic Commands do not have to wait for data (sent out-of-band) Authentication Server keeps state e.g., client's current directory FTP client FTP TCP control connection (port 21) FTP Server FTP File system TCP data connection (port 20) File system

Email Asynchronous communication service One of the first applications of the Internet Remains one of the most important applications to this day Components: Mail User Agents (MUAs): Outlook, Thunderbird Mail Transfer Agents (MTAs) Sendmail, Postfix, Microsoft Exchange server Simple Mail Transfer Protocol (SMTP) Push protocol 7-bit ASCII encoding (headers and body) Mail access protocols: POP/IMAP

Sending and Receiving Email E-mail client SMTP SMTP server SMTP SMTP SMTP server E-mail client POP POP server POP SMTP server SMTP

SMTP Interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu... 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

SMTP vs. HTTP HTTP is a pull protocol SMTP is a push protocol Both have ASCII command/response interaction HTTP encapsulates each object in its own response message SMTP sends multiple objects in multipart message SMTP uses persistent connections (optional for HTTP)

Mail message format SMTP: protocol for exchanging email msgs RFC 822: standard for text message format: Header lines, e.g., To: From: Subject: different from SMTP commands! Body the message, ASCII characters only header body blank line 24

Message format: multimedia extensions MIME: multimedia mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type MIME version method used to encode data multimedia data type, subtype, parameter declaration encoded data From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data.........base64 encoded data 25

POP3 and IMAP POP3 Download and delete mode. Cannot re-read e-mail if one changes client Download-and-keep : copies of messages on different clients POP3 is stateless across sessions IMAP Keep all messages in one place: the server Allows user to organize messages in folders IMAP keeps user state across sessions: names of folders and mappings between message IDs and folder name 26

Domain Name System (DNS) Problem: It is difficult to remember addresses based on numbers Name hosts with human readable names e.g. hamberg.it.uu.se Translate between address and name Initially done by editing /etc/hosts file Not really scalable DNS developed in the late 80ies Distributed hierarchical directory service

Distributed, Hierarchical Database Root DNS Servers com DNS servers org DNS servers edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers poly.edu umass.edu DNS servers DNS servers Client wants IP for www.amazon.com; 1 st approx: client queries a root server to find com DNS server client queries com DNS server to get amazon.com DNS server client queries amazon.com DNS server to get IP address for www.amazon.com 28

DNS name resolution example root DNS server Host at cis.poly.edu wants IP address for gaia.cs.umass.edu 2 3 4 5 TLD DNS server iterated query: contacted server replies with name of server to contact I don t know this name, but ask this server local DNS server dns.poly.edu 1 8 requesting host cis.poly.edu 7 6 authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu 2: Application Layer 29

DNS: Root name servers contacted by local name server that can not resolve name root name server: contacts authoritative name server if name mapping not known gets mapping returns mapping to local name server e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 36 other locations) a Verisign, Dulles, VA c Cogent, Herndon, VA (also LA) d U Maryland College Park, MD g US DoD Vienna, VA h ARL Aberdeen, MD j Verisign, ( 21 locations) k RIPE London (also 16 other locations) i Autonomica, Stockholm (plus 28 other locations) m WIDE Tokyo (also Seoul, Paris, SF) b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA 13 root name servers worldwide 2: Application Layer 30