Lecture on Computer Network For 08 Spring 2010 Chapter 2 application layer W erTeng Wfsundlutegmail.com School of software Dalian University of Technology
Lecture on Computer Network For 08 Spring 2010 Weifeng Sun Wfsun.dlut@gmail.com School of Software Dalian University of Technology Chapter 2 application layer
Chapter 2 application layer 2. 1 Principles of 2.6 P2P applications network 2.7 Socket applications programming with 2.2 Web and Http tcp 2. 3 FTP 2. 8 Socket 24日 ectronic Mail programming with SMTP POP3, IMAP UDP 2,5 DNS uct by Weifeng Sun chapter 2-application layer 2/73
Introduct by Weifeng Sun chapter2- application layer 2/73 Chapter 2: Application layer • 2.1 Principles of network applications • 2.2 Web and HTTP • 2.3 FTP • 2.4 Electronic Mail – SMTP, POP3, IMAP • 2.5 DNS • 2.6 P2P applications • 2.7 Socket programming with TCP • 2.8 Socket programming with UDP
Some network apps e-mail voice over ip web real-time video instant messaging conferencing remote login grid computing P2P file sharing multi-user network games streaming stored go clips uct by Weiteng Sun chapter 2-application layer 3/73
Introduct by Weifeng Sun chapter2- application layer 3/73 Some network apps • e-mail • web • instant messaging • remote login • P2P file sharing • multi-user network games • streaming stored video clips • voice over IP • real-time video conferencing • grid computing • • •
FTP TELNET Http NFS SMTP SNMP TFTP DNS TCP UDP ICMP IGMP ARP RARP EtherNet, Token Ring, Token Bus, FDDI, PPP/SLIP, X 25 duct by Weifeng Sun d
Introduct by Weifeng Sun chapter2- application layer 4/73 EtherNet, Token Ring, Token Bus, FDDI, PPP/SLIP, X. 25 ICMP IP IGMP ARP RARP TCP UDP HTTP SMTP 。。。 FTP TELNET NFS 。。。 SNMP DNS TFTP
Creating a network app Freor ication data link write programs that run on ( differentend systems communicate over network e.g. web server software communicates with browser software applicati No need to write software transport network data link for network-core devices Network-core devices do link physIcal not run user applications applications on end systems aeWs for rapid app development, propagation uct by Weiteng Sun chapter 2-application layer 5/73
Introduct by Weifeng Sun chapter2- application layer 5/73 Creating a network app write programs that – run on (different) end systems – communicate over network – e.g., web server software communicates with browser software No need to write software for network-core devices – Network-core devices do not run user applications – applications on end systems allows for rapid app development, propagation application transport network data link physical application transport network data link physical application transport network data link physical
application architectures ppl Client-server Peer-to-peer( P2P) Hybrid of client-server and P2P uct by Weifeng Sun chapter 2-application layer 6/73
Introduct by Weifeng Sun chapter2- application layer 6/73 Application architectures • Client-server • Peer-to-peer (P2P) • Hybrid of client-server and P2P
Client-server architecture server. always-0 n host谷歌金永 在线主 permanent IP address server farms for scaling谷歌金山为扩大服务器群 clients communicate with server client/server may be intermittent!(间歇 地 connected may have dynamic IP addresses do not communicate directly with each other uct by Weifeng Sun chapter 2-application layer 7/73
Introduct by Weifeng Sun chapter2- application layer 7/73 Client-server architecture server: – always-on host(谷歌金山:永远 在线主机) – permanent IP address – server farms for scaling(谷歌金山:为扩大服务器群) clients: – communicate with server – may be intermittently(间歇 地)connected – may have dynamic IP addresses – do not communicate directly with each other client/server
Pure p2p architecture no always-on server Arbitrary任意的end systems directly peer-peer communicate peers are intermittently connected and change IP addresses Highly scalable(r扩展的but 2Dcult to manage uct by Weiteng Sun chapter 2-application layer 8/73
Introduct by Weifeng Sun chapter2- application layer 8/73 Pure P2P architecture • no always-on server • Arbitrary(任意的) end systems directly communicate` • peers are intermittently connected and change IP addresses Highly scalable(可扩展的) but difficult to manage peer-peer
Hybrid of client-server and P2P Skype voie-0Ver-IP(谷歌金山IP承载语)P2 P application centralized server finding address of remote party client-client connection: direct(not through server) Instant messaging chatting between two users is P2P centralized service: client presence detection/location user registers its IP address with central server when it comes online ser contacts central server to find IP addresses of buddies uct by Weifeng Sun chapter 2-application layer 9/73
Introduct by Weifeng Sun chapter2- application layer 9/73 Hybrid of client-server and P2P Skype – voice-over-IP(谷歌金山:IP承载语音) P2P application – centralized server: finding address of remote party: – client-client connection: direct (not through server) Instant messaging – chatting between two users is P2P – centralized service: client presence detection/location • user registers its IP address with central server when it comes online • user contacts central server to find IP addresses of buddies
Processes communicating Process: program running Client process: process within a host that initiates within same host. two communication processes communicate Server process:process using inter-process that waits to be communication(defined contacted by oS processes in different Note: applications with hosts communicate by P2P architectures have exchanging messages client processes server processes uct by Weiteng Sun chapter2-application layer 10/73
Introduct by Weifeng Sun chapter2- application layer 10/73 Processes communicating Process: program running within a host. • within same host, two processes communicate using inter-process communication (defined by OS). • processes in different hosts communicate by exchanging messages Client process: process that initiates communication Server process: process that waits to be contacted • Note: applications with P2P architectures have client processes & server processes