Chapter 2: Application layer Chapter 2 Application Layer � 2.1 Principles of � 2.6 P2P applications network applications � 2.7 Socket programming � 2.2 Web and HTTP with TCP � 2.3 FTP � 2.8 Socket programming with UDP with UDP � 2.4 Electronic Mail � 2.4 Electronic Mail �������������������������������������� � SMTP, POP3, IMAP �������������������������������������������������������������������������������� Computer Networking: ����������� �!�� ����������������������������������������������������� � 2.5 DNS �������������������������������������������������������������������������� A Top Down Approach , ������������ ��� ���!�����������������"������������������!��������������� 5 th edition. �����!���� � "��������������������������������������������������������������������������� Jim Kurose, Keith Ross ������������������������������������������!�������������������������������#� Addison#Wesley, April � "�����������������������������������������������������������!!!������������ ������������������������������������������������������������������������������ 2009. ������������������������������������ �������������$��#��%&'('�) �����������������������*++,-.//+ %�&�'����������'����)���������)������)������� 2: Application Layer 2: Application Layer � � Chapter 2: Application Layer Some network apps Our goals: � learn about protocols � e#mail � voice over IP � conceptual, by examining popular � web � real#time video implementation application#level conferencing � instant messaging aspects of network protocols � grid computing application protocols � remote login � HTTP � FTP FTP � transport#layer transport#layer � P2P file sharing P2P file sharing � � service models � SMTP / POP3 / IMAP � multi#user network � � DNS � client#server games � � programming network paradigm � streaming stored video applications � peer#to#peer clips � socket API paradigm 2: Application Layer 2: Application Layer � �
Chapter 2: Application layer Creating a network app application transport network data link write programs that physical � 2.1 Principles of � 2.6 P2P applications � run on (different) end network applications � 2.7 Socket programming systems � 2.2 Web and HTTP with TCP � communicate over network � 2.3 FTP � 2.8 Socket programming � e.g., web server software communicates with browser communicates with browser with UDP with UDP � 2.4 Electronic Mail � 2.4 Electronic Mail software � 2.9 Building a Web application � SMTP, POP3, IMAP No need to write software transport network server � 2.5 DNS data link for network#core devices application physical transport network � Network#core devices do data link physical not run user applications � applications on end systems allows for rapid app development, propagation 2: Application Layer 2: Application Layer � � Application architectures Client#server architecture server: � Client#server � always#on host � Peer#to#peer (P2P) � permanent IP address � Hybrid of client#server and P2P � server farms for scaling scaling clients: � communicate with server client/server � may be intermittently connected � may have dynamic IP addresses � do not communicate directly with each other 2: Application Layer 2: Application Layer � �
Pure P2P architecture Hybrid of client#server and P2P Skype � no always#on server � voice#over#IP P2P application � arbitrary end systems � centralized server: finding address of remote party: directly communicate peer#peer � client#client connection: direct (not through � peers are intermittently server) connected and change IP connected and change IP Instant messaging Instant messaging addresses � chatting between two users is P2P � centralized service: client presence detection/location • user registers its IP address with central Highly scalable but server when it comes online difficult to manage • user contacts central server to find IP addresses of buddies 2: Application Layer 2: Application Layer � �� Processes communicating Sockets Client process: process Process: program running ������� ������� � process sends/receives ������ ������ that initiates within a host. messages to/from its communication socket � within same host, two ������������� ������������� Server process: process processes communicate � socket analogous to door ������� ������� that waits to be that waits to be using inter#process using inter#process � sending process shoves � sending process shoves ������ ������ contacted contacted communication (defined message out door ����� �� ����� �� $������� �!""���# by OS). �!""���# � sending process relies on ��� ����� ��� ����� transport infrastructure � Note: applications with � processes in different on other side of door which P2P architectures have hosts communicate by ���������� brings message to socket client processes & ���%& exchanging messages at receiving process server processes � API: (1) choice of transport protocol; (2) ability to fix a few parameters (lots more on this later) 2: Application Layer 2: Application Layer �� ��
Addressing processes Addressing processes � to receive messages, � to receive messages, � identifier includes both process must have process must have IP address and port identifier identifier numbers associated with process on host. � host device has unique � host device has unique 32#bit IP address 32#bit IP address � Example port numbers: � Q: does IP address of � Q: does IP address of � Q: does IP address of � Q: does IP address of � HTTP server: 80 � HTTP server: 80 host suffice for host on which process � Mail server: 25 identifying the process? runs suffice for � to send HTTP message identifying the to gaia.cs.umass.edu web process? server: � A: No, many � IP address: 128.119.245.12 processes can be � Port number: 80 running on same host � more shortly… 2: Application Layer 2: Application Layer �� �� What transport service does an app need? App#layer protocol defines Data loss Throughput � some apps (e.g., audio) can � some apps (e.g., � Types of messages Public#domain protocols: tolerate some loss multimedia) require exchanged, � defined in RFCs � other apps (e.g., file minimum amount of � e.g., request, response � allows for transfer, telnet) require throughput to be � Message syntax: interoperability 100% reliable data “effective” � what fields in messages & � what fields in messages & � e.g., HTTP, SMTP � e.g., HTTP, SMTP transfer transfer � other apps (“elastic apps”) how fields are delineated Proprietary protocols: Timing make use of whatever � Message semantics � some apps (e.g., � e.g., Skype throughput they get � meaning of information in Internet telephony, Security fields interactive games) � Rules for when and how � Encryption, data require low delay to be processes send & “effective” integrity, … respond to messages 2: Application Layer 2: Application Layer �� ��
Recommend
More recommend