Internet Applications Development Basic Internet Applications1 Topics on Basic Internet Applications What is Internet? Key Milestones in Evolution How Internet is organized? Internet Applications Internet Protocols Client-server paradigm Domain Name System (DNS)
What is Internet? The network formed by the co-operative interconnection of a large number of computer networks. Network of networks. No one owns the internet Every person who makes a connection owns a slice of the Internet. There is no central administration to the Internet. Basic Internet Applications2
Key Milestones in Evolution 1950’s ARPA (Advanced Research Projects Agency) 1970 – ARPANET creates precursor to Transmission Control Protocol (TCP) 1971 Universities added to net Telnet and FTP are available 1972 First electronic mail message sent ARPANET connected to England and Norway TCP starts being used for communicating across a system of networks US DoD starts building defense data networks based on ARPANET technology Basic Internet Applications3
Key Milestones in Evolution (contd.) ARPANET splits into ARPANET and MILNET Internet now in place TCP/IP standardized National Science Foundation (NSF) implements NFSNET; a system of regional network of routers connected over a backbone network 1990 Tim Berners-Lee starts work on a global hypertext system, GUI browser / editor using the NeXTStep development environment. He makes up "WorldWideWeb" as a name for the program First (text only) web browser available. Archie and Gopher released Basic Internet Applications4
Key Milestones in Evolution (contd.) Internet links more that 17,000 networks in 33 countries; 3 million hosts World Wide Web is launched ,000 WWW sites. Over 1500 registered servers Interconnected network providers start offering service About 30 million users 100,000 WWW Sites. New WWW technologies emerge: JAVA, Javascript, ActiveX, VRML, Search engines. WWW traffic now dominates NSF backbone traffic Over 500,000 WWW Sites. Microsoft enters. Internet phones arrive. Basic Internet Applications5
Key Milestones in Evolution (contd.) 1997 Over 1,300,000 WWW Sites. Streaming media available Over 3,300,000 WWW Sites. Web size estimated at about 300,000,000 pages. E-Commerce, E-Auctions, Portals; E-trading begins Over 9,500,000 WWW Sites. E-Trade, Online Banking, MP3 popular Over 22,000,000 WWW Sites. Estimated 6 billion people on line. Wireless technologies maturing Over 575,000,000 WWW sites by January, estimated 1.4 billion pages. Broadband high speed access enters mainstream Basic Internet Applications6
Growth of Internet Basic Internet Applications7
How Internet is organized? The Internet is not a single network, but a worldwide collection of loosely connected networks that are accessible by individual computer hosts in a variety of ways, including gateway, routers, dial-up connections, cell phones Internet enabled, etc, and Internet Service Providers (ISP). The Internet has two aspects, physical and logical and it can be viewed as a collection of physical and logical pieces that are tied together physically and logically. The physical aspect is a collection of wires, optical fibers, and microwave radio links and other devices that carry digital signal between computers. Basic Internet Applications8
How Internet is organized? (contd.) The logical aspect is a set of standards for the signals that travel through that network. The Internet uses various protocols depending on what kind of job is to be done and what kind of data is being transferred. The language that allow computers to talk to another are called protocols. The protocol is the method in which the network interface cards (NIC) communicate over the topology. The chief protocol and the defining standard of the Internet is TCP/IP (Transmission Control Protocol/Internet Protocol). Basic Internet Applications9
How Internet is organized? (contd.) Basic Internet Applications10
Internet Applications Elements of Internet Applications – Client-server model iterative vs. concurrent server Important Internet Applications – Telnet – File Transfer Protocol (FTP) – Electronic Mail ( ) – World Wide Web (WWW) – Internet Relay Chat (IRC) – Usenet News – Gopher Basic Internet Applications11
Internet Protocol (IP) The Internet Protocol (IP) is the principal communications protocol used for relaying datagrams (also known as network packets) across an internetwork using the Internet Protocol Suite responsible for routing packets across network boundaries. It is the primary protocol that establishes the Internet. IP is the primary protocol in the Internet Layer of the Internet Protocol Suite and has the task of delivering datagrams from the source host to the destination host solely based on the addresses. Basic Internet Applications12
Internet Protocol (IP) (contd.) Basic Internet Applications13
IP address An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there.“ Basic Internet Applications14
IP address (contd.) The designers of the Internet Protocol defined an IP address as a 32-bit number and this system, known as Internet Protocol Version 4 (IPv4), is still in use today. A new version of IP (IPv6), using 128 bits for the address, was developed in IPv6 was standardized as RFC 2460 in 1998, and its deployment has been ongoing since the mid- 2000s. IP addresses are binary numbers, but they are usually stored in text files and displayed in human-readable notations, such as (for IPv4), and 2001:db8:0:1234:0:567:8:1 (for IPv6). Basic Internet Applications15
Elements of Internet Applications Network application – communicating, distributed processes (programs) running in network hosts – exchange messages to implement application (e.g., , file transfer, web) – message format and actions to be taken are defined by application- layer protocols (e.g., FTP, SMTP, HTTP) Computing model used: – Software that implements Internet services use client-server computing – Some computer on the Internet offer services that others access Basic Internet Applications16
Client-server paradigm Client-server paradigm is a form of communication Server application is ``listener'’ – Waits (passively) for incoming message – Performs service – Returns results Eg, a mail server’s function is to receive, store and deliver s. Client application establishes connection – Sends message to server – Waits for return message Eg, a mail client (also called a mailer or mail program mail application) is a software that allows a user to manage, read, and compose . Basic Internet Applications17
Client-server paradigm Basic Internet Applications18
Characteristics of client Arbitrary application program Becomes client when network service is needed (Eg, a sender’s computer becomes a client to a remote mail server) Also performs other computations Invoked directly by user Runs locally on user's computer Initiates contact with server Can access multiple services (one at a time) Does not require special hardware or sophisticated operating system Basic Internet Applications19
Characteristics of server Special purpose application dedicated to providing network service Starts automatically at system initialization time (system boot) Runs on a remote computer (usually centralized, shared computer) Waits for service requests from clients; loops to wait for next request Will accept requests from arbitrary clients; provides one service to each client May require powerful hardware and sophisticated operating system Basic Internet Applications20
Server types: Iterative server: – can process one request at a time. – it receives a request, processes it, and sends the response to the requestor before it handles another request. Concurrent server: – can process many requests at the same time. Basic Internet Applications21
Multiple servers for one service Responding to a client request may require significant time Other clients must wait while earlier requests are satisfied concurrent program - has > 1 thread of control concurrent server offers service to multiple clients at the same time When a request arrives, the server assigns the request to a thread of control that can execute concurrently with existing threads In other words, multiple copies of a servers for a single service can handle requests concurrently Basic Internet Applications22
Dynamic servers Concurrent server operates dynamically One way to run concurrent servers is to dynamically create server processes for each client Parent (or Master) server accepts incoming requests and starts Child (or slave) server for each client Child server handles subsequent requests from its client Parent server then waits for next request Basic Internet Applications23
Client-Server Example Basic Internet Applications24
Selecting from multiple servers How do incoming messages get delivered to the correct server? To allow a process to identify the other process with which it wants to communicate some form of addressing is needed. Addressing: Each transport session has two unique identifiers – (IP address, port number) on server – (IP address, port number) on client A port number is a 16 bits number located in the TCP header port numbers 0 to 1,023 (controlled by IANA (Internet Assigned Numbers Authority)) are reserved for `well-known` services like telnet and ftp port numbers 1,024 to 49,151 (not controlled by IANA, these ports can only be registered with IANA) port numbers from 49,152 to 65,535 are ephemeral ports (Dynamic and/or Private Ports) and can be used by any process. No two clients on one computer can use same source port Thus, client endpoints are unique, and server computer protocol software can deliver messages to correct server process Basic Internet Applications25
Domain Name System (DNS) All applications use IP addresses through the TCP/IP protocol software Difficult for humans to remember: The Domain Name System (DNS) provides translation between symbolic names and IP addresses DNS is the naming scheme used in the Internet Basic Internet Applications26
Structure of DNS names Each name consists of a sequence of alphanumeric components separated by periods Examples: – – – charcoal.eg.bucknell.edu – challenger.atc.fhda.edu Names are hierarchical, with most-significant component on the right Left-most component is computer name Domain name space: names are defined in an inverted-tree structure with the root at the top the tree can have only 128 levels: level 0 (root) to level 127. Basic Internet Applications27
DNS: Tree Structure – Each node in the tree has a label - a string with a maximum of 63 characters. a domain name - a sequence of labels separated by dots. Basic Internet Applications28
DNS naming structure Domain: a part of the computer naming hierarchy used in the Internet. Eg, commercial organization have names registered under the.com domain Top level domains (right-most components; also known as TLDs) defined by global authority Basic Internet Applications29
DNS naming structure Organizations apply for names in a top-level domain: – bucknell.edu – macdonalds.com Organizations determine own internal structure – cs.stanford.edu – cs.purdue.edu – ie.cuhk.edu.hk Basic Internet Applications30
Geographic structure Top-level domains are US-centric Geographic TLDs used for organizations in other countries: Basic Internet Applications31 TLD Country.caCanada.ukUnited Kingdom.frFrance.chSwitzerland.hkHong Kong.cnChina.jpJapan.sgSingapore.au Australia Countries define their own internal hierarchy: ac.uk and.edu.au are used for academic organizations in the United Kingdom and Australia
DNS and client-server computing DNS names are managed by a hierarchy of DNS servers – Translates a name to an IP address, or – Contains information that links to other DNS servers Hierarchy is related to DNS domain hierarchy Root server at top of tree knows about next level servers Next level servers, in turn, know about lower level servers Basic Internet Applications32
Name Servers Partition hierarchy into administrative authority responsible for portion of the hierarchy Basic Internet Applications33 educom princeton … mit csee ux01ux04 physics cisco … yahoonasa … nsfarpa … navyacm … ieee govmilorgnetukfr
Domain Name System (DNS) DNS Name Servers: – maps domain name of a host to its IP address. – hierarchically organized local name servers: – located in the same domain as the host that make the DNS query. authoritative name servers: – often located in the domain where the host that we queried is located. – can perform name/address translation for that host’s name root name servers: – contacted by local name server that can not resolve name – give referral on which authoritative name servers to contact. Basic Internet Applications34
Domain Name System (DNS) host surf.ie.cuhk.edu.hk wants IP address of gaia.cs.umass.edu 1. contacts its local DNS server, dns.ie.cuhk.edu.hk 2. dns.ie.cuhk.edu.hk contacts root name server 3. root name server contacts authoritative name server, dns.umass.edu 4-6. root name server returns the resolved name to local host via local name server. Basic Internet Applications35 requesting host surf.ie.cuhk.edu.hk gaia.cs.umass.edu root name server local name server dns.ie.cuhk.edu.hk authoritative name server dns.umass.edu 3 4
Domain Name System: nslookup Trying out DNS for yourself: – Use nslookup to find the IP address or hostname of a machine: Go to Enter the IP address or hostname that you want to look it up Select the name server: WebSiteSource -ns.websitesource.com – Try to look up - it should give you an IP address. – For popular web sites, such as nslookup may give you multiple IP addresses. This indicates that the website are served by multiple servers. Basic Internet Applications36
Domain Name System: nslookup Sample output of nslookup for : Basic Internet Applications37 Output of: nslookup -q=A ns.websitesource.com Server: ns.websitesource.com Address: Non-authoritative answer: Name: cnn.com Addresses: , , , , , , Aliases:
Domain Name System: nslookup Output of: nslookup -q=A gaia.cs.umass.edu ns.websitesource.com Server: ns1.worldnet.att.net Address: Name: gaia.cs.umass.edu Address: Basic Internet Applications38
DNS Example: sending Basic Internet Applications39 Name server Mail program User TCP IP 2 cs.princeton.edu cs.princeton.edu
DNS Example: sending Basic Internet Applications40 1. User presents domain name of host (eg, cs.princeton.edu) to an application program (eg, a mail program) 2. Application program (mail program in this example) engage the naming system (name server program) to translate the domain name of host into host address (ie IP address). 3. Application (mail program) opens a connection to the host by presenting its IP address to TCP
Telnet Telnet (TErminaL NETwork) – the standard TCP/IP protocol for virtual terminal service by ISO. – enables the establishment of a connection to a remote system in such a way that the local terminal appears to be a terminal at the remote system. – uses TCP service on the well-known port 23. – Cf. Rlogin - remote login protocol by BSD UNIX. Basic Internet Applications41
Telnet: How Remote Login Works Remote login follows the client- server paradigm. The client: – Is the application that uses TCP/IP for making connection – transforms the characters typed by users to a universal character set called Network Virtual Terminal (NVT) characters. – e.g. End of file in DOS (Ctrl+z), UNIX (Ctrl+d) The server: – Allows the user to interact with the remote computer – Sends output to the client Basic Internet Applications42
FTP FTP (File Transfer Protocol) – the standard application for copying a file from one host to another. – uses the client-server approach Basic Internet Applications43
FTP: Retrieve and Store Files Retrieve A File – Contacts a remote computer – Obtains a copy of a file – get: receive one file, eg, get filename1 – mget: get multiple files, eg, mget filename1 filename2 Store A File – Contacts a remote computer – Sends a copy of a file – put: send one file, eg, put filename1 – mput: send multiple files, eg, mput filename1 filename2 open: connect to a remote computer – FTP Prompts for a login identifier – FTP Prompts for a password bye: terminate a connection and leave FTP program Two FTP file formats: text(ascii) & binary Basic Internet Applications44
FTP: Making Connections needs two TCP connections. – well-known port 21 for control connection. – well-known port 20 for data connection. Basic Internet Applications45
FTP: Making Connections Basic Internet Applications46
How Works systems follow the client server approach In sender’s computer, an program becomes a client – contacts an server program on the recipient’s computer – transfer a copy of the message When the server receives a message, it – stores the message in the recipient’s mailbox – informs the recipient Basic Internet Applications47
SMTP SMTP (Simple Mail Transfer Protocol) – the standard TCP/IP protocol for supporting electronic mail on the Internet – uses the TCP well-known port 25. – SMTP client/server has two components: UA (User Agent) - prepares the message, creates the envelope and puts the message in the envelope. MTA (Mail Transfer Agent) - transfers the mail across the Internet. Basic Internet Applications48
SMTP Relay MTAs Basic Internet Applications49
SMTP format: – Envelope: contains the sender address, receiver address and other information – Message: contains the headers and the body. Address format: – me – local_part defines the name of user mailbox Basic Internet Applications50
SMTP Mail transfer phases: – connection establishment client made a TCP connection to the well- known port 25 – message transfer client sends a single message the message can be to more than one recipients – connection termination client terminate the connection. Connection establishment Basic Internet Applications51
SMTP Message transfer Connection termination Basic Internet Applications52
Gopher The Gopher protocol is a TCP/IP application layer protocol designed for distributing, searching, and retrieving documents over the Internet. Strongly oriented towards a menu-document design, the Gopher protocol presented an alternative to the World Wide Web in its early stages, but ultimately HTTP became the dominant protocol. The Gopher ecosystem is often regarded as the effective predecessor of the World Wide Web. Basic Internet Applications53
Internet Relay Chat (IRC) Internet Relay Chat (IRC) is a protocol for real-time Internet text messaging (chat) or synchronous conferencing. It is mainly designed for group communication in discussion forums, called channels, but also allows one-to-one communication via private message as well as chat and data transfer, including file sharing. Basic Internet Applications54