CHAPTER V THE INTERNET PART II HIGHLEVEL PROTOCOLS

  • Slides: 35
Download presentation
CHAPTER V THE INTERNET PART II

CHAPTER V THE INTERNET PART II

HIGH-LEVEL PROTOCOLS ØIn chapter 4, we presented OSI networking model and its seven layers

HIGH-LEVEL PROTOCOLS ØIn chapter 4, we presented OSI networking model and its seven layers protocols. ØThe suite of protocols that work with TCP/IP can be compared with the OSI layers. ØTCP and IP span the Session, Transport, and Network layers. ØSMTP, HTTP, FTP, and Telnet are called “high-level protocols” because they’re “above” TCP and IP in the networking model.

HIGH-LEVEL PROTOCOLS (CONT…) ØHigh-level protocols use TCP/IP over the Internet to accomplish their tasks.

HIGH-LEVEL PROTOCOLS (CONT…) ØHigh-level protocols use TCP/IP over the Internet to accomplish their tasks. ØMessages are passed from a high-level protocol to the TCP layer, which splits them into packets (if necessary), adds TCP headers, and forwards them down to the IP layer for addressing. ØFrom there, packets are sent down to the Data Link and Physical layers for transmission across the communication medium. ØThese high-level protocols can also be used in environments other than the Internet. ØIn that case, messages from these protocols are passed down to a lower protocol for transmission and error detection and correction.

SIMPLE MAIL TRANSFER PROTOCOL ØSMTP is used to send e-mail messages over the Internet.

SIMPLE MAIL TRANSFER PROTOCOL ØSMTP is used to send e-mail messages over the Internet. ØThis protocol establishes a link from an e-mail client, such as Microsoft Outlook, to a mail server, such as Microsoft Exchange, and then transfers a message according to the protocol’s rules. ØHere, exchanging a series of messages, handshaking, is done to establish the parameters of the intended communication of data. ØReceipt of e-mail is handled by another protocol, POP 3 (Post Office Protocol version 3) or IMAP (Internet Message Access Protocol).

FILE TRANSFER PROTOCOL q FTP ØFile Transfer Protocol is used for reliable and efficient

FILE TRANSFER PROTOCOL q FTP ØFile Transfer Protocol is used for reliable and efficient transmission of data files, especially large files. ØFTP has been in use for many years. As with SMTP, it requires both a client program and a server program to transfer files. ØMost operating systems include a default command-line FTP client. v. In Windows, you can get to the command-line client by opening a command prompt window and typing FTP at the prompt. v. You can also use a Web browser to connect to an FTP server by entering the server’s address in the address bar. v. For example, ftp: //ftp. swfwmd. state. fl. us URL is used for connecting to the Southwest Florida Water Management District FTP site.

FILE TRANSFER PROTOCOL (CONT…)

FILE TRANSFER PROTOCOL (CONT…)

SECURE SHELL PROTOCOL ØSecure Shell (SSH) is another network protocol used primarily with Linux

SECURE SHELL PROTOCOL ØSecure Shell (SSH) is another network protocol used primarily with Linux and UNIX operating systems. ØIt was designed as a secure replacement for Telnet, an early data exchange protocol. ØSSH enables users to connect to a remote host computer to issue commands and transfer data. ØNumerous SSH clients are available for download or purchase.

HYPERTEXT TRANSFER PROTOCOL Ø HTTP, one of the most widely used protocols, is the

HYPERTEXT TRANSFER PROTOCOL Ø HTTP, one of the most widely used protocols, is the protocol that makes the Web possible. Ø In the early days of the Internet, files were transferred between computers by using FTP and other older protocols. Ø Researchers and scientists wanted a better way to transmit data. Ø In 1990, Tim Berners-Lee came up with the idea of the World Wide Web and built the first rudimentary browser program. Ø Central to the idea of the World Wide Web was a Web server, a Web browser, and a protocol that allowed the two to communicate. Ø HTTP is the protocol that allows Web browsers and Web servers to “talk” to each other (also written by Tim). Ø When you type in a Web address, such as http: //www. firat. edu. tr, the http tells the browser you’re using Hypertext Transfer Protocol to get the Web page you’re looking for.

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM ØTrying to remember the IP address of

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM ØTrying to remember the IP address of every Website you would like to visit is difficult. Ø When there were only a few computers on the Internet, Web pages were accessed by IP addresses. ØAs the Internet grew, the problem of having to remember IP addresses was solved by allowing Web servers to have domain names and by developing Domain Name System (DNS). ØTo locate a Web page or send an e-mail message, you use a Uniform Resource Locator (URL), which consists of the domain name followed by specific folder names and filenames.

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØDomain names are mapped to IP

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØDomain names are mapped to IP addresses by a special computer called a DNS server. ØThis computer’s job is to translate domain names from URLs into IP addresses.

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØIf there were only one DNS

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØIf there were only one DNS server for the entire Internet, it would get overwhelmed quickly. ØInstead, there are many thousands of DNS servers distributed throughout the Internet. ØISP maintains a DNS server, to contain every domain in the world. but it doesn’t have ØInstead, each DNS server is responsible for just a portion of the world’s domains. ØA domain has levels. You’re probably familiar with the original top-level domains (TLDs) of. com, . edu, . gov, . net, . org, and. mil.

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØYou might have also heard of

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØYou might have also heard of some newer ones, such as. biz and. info. ØThere also top-level, twocharacter domains for every country and a top-level DNS server for each top-level domain. ØEach of these servers has information about all the DNS servers in that domain.

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØA top-level. edu server has information

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØA top-level. edu server has information on the IP addresses of all the lower-level servers managing domains within. edu. ØAn educational institution, such as Firat University, has a domain server containing information on all domains under firat. edu. tr ØThere might be additional servers under this domain, such as tek. firat. edu. tr ØThe server at each level has knowledge of a lower-level server that might have better knowledge of the IP address you’re looking for. ØWhen you type a URL in a browser’s address bar, you send a DNS lookup request to the DNS server at your ISP.

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØIf the URL is outside your

UNIFORM RESOURCE LOCATOR AND DOMAIN NAME SYSTEM (CONT…) ØIf the URL is outside your ISP’s domain, the DNS server contacts a top-level DNS server. ØThis server might then give the address of another DNS server, and that server might give another address, until your ISP’s DNS server has contacted the DNS server that knows the correct IP address and can return it to your browser. ØAfter the DNS server at your ISP has located an IP address for a URL, it saves, or caches, the address in case there’s another request for the same URL. ØDNS servers are smart, in that they can communicate (using a protocol, of course) with other DNS servers and stay updated with the correct IP address for any URL. ØEach DNS server is maintained by the network administrators of that domain. ØThis is another example of how people acting for their own purposes on the Internet actually benefit all.

PORT NUMBERS ØAnother problem in the early days of the Internet was that one

PORT NUMBERS ØAnother problem in the early days of the Internet was that one computer with one IP address needed to be able to use multiple protocols at the same time. ØIn addition, people wanted to be able to have multiple browsers open simultaneously, much like having multiple chat windows open so that you can chat with a dozen of your closest friends at once. ØTo solve this problem, the concept of a port number was established. ØWith TCP, you can go beyond specifying an IP address by specifying a unique port number (sometimes just called a port) for each application and for the sending and receiving computers in the TCP header.

PORT NUMBERS (CONT…) ØThe combination of IP address and port number is much like

PORT NUMBERS (CONT…) ØThe combination of IP address and port number is much like a street address and apartment number. ØThe street address gets you to the building, and the apartment number takes you to the correct apartment. ØSimilarly, the IP address gets you to the computer, and the port number gets you to the specific program or window. ØMost protocols have a standard port number. ØThe standard port number for HTTP is 80, and for FTP, it’s 21. ØThere are 65, 636 possible port numbers that can be used with each IP address.

PORT NUMBERS (CONT…) ØYou can specify a port by appending a colon and port

PORT NUMBERS (CONT…) ØYou can specify a port by appending a colon and port number following the domain or IP address. ØFor example, http: //192. 168. 2. 33: 8080 specifies the IP address 192. 168. 2. 33 and the port number 8080. ØOnly the specific program set to “listen” on port 8080 can respond to the IP packets coming in to this address.

NETWORK ADDRESS TRANSLATION ØNAT is method used for translating an inside IP address to

NETWORK ADDRESS TRANSLATION ØNAT is method used for translating an inside IP address to an outside IP address. ØNAT is often used to allow multiple computers to share one Internet connection. ØNAT depends on DHCP and port numbers. ØA range of IP addresses reserved for internal LAN use is 192. 168. 0. 0 to 192. 168. 255 (subnet mask 255. 0. 0). ØThis IP address range is often used for internal LANs connected to a DHCP router. ØOn the Internet side of a router, one IP address is presented to the Internet.

NETWORK ADDRESS TRANSLATION (CONT…) Ø That way, many computers can share one IP address.

NETWORK ADDRESS TRANSLATION (CONT…) Ø That way, many computers can share one IP address. ØBecause the 192. 168 subnet is never presented to the outside Internet, all LANs can use the same addresses if they are behind a DHCP NAT router. ØAll computers using DHCP-assigned IP addresses can share the same Internet connection through one IP address because of ports. ØEach internal IP address is assigned a port number to be used with the main IP address. ØWhen HTTP or other messages come to the router from the Internet, TCP routes them to the computer with the corresponding port number.

HYPERTEXT MARKUP LANGUAGE ØWhen a request for an HTTP Webpage is initiated, first the

HYPERTEXT MARKUP LANGUAGE ØWhen a request for an HTTP Webpage is initiated, first the URL is sent to the ISP’s DNS server, and DNS replies with the actual IP address corresponding to the requested domain. ØThe browser then sends an HTTP request to this IP address. ØWhen the HTTP request gets through all the routers to the Web server you addressed, the Web server, which is just a computer programmed to respond to HTTP requests, sends back the requested Webpage. ØIf only a domain is specified, then the server sends back a default page. Default pages typically have names such as index. htm or default. htm. ØThe person responsible for the Web server, sometimes referred to as the Webmaster, can specify the default Webpage.

HYPERTEXT MARKUP LANGUAGE (CONT…) ØMost Webpages are simply text files containing the page’s text

HYPERTEXT MARKUP LANGUAGE (CONT…) ØMost Webpages are simply text files containing the page’s text information and HTML (Hypertext Markup Language) tags. ØHTML tags are formatting commands that enable the browser to display the page content in a graphical, easy-to-read format.

HYPERTEXT MARKUP LANGUAGE (CONT…)

HYPERTEXT MARKUP LANGUAGE (CONT…)

HYPERTEXT MARKUP LANGUAGE (CONT…)

HYPERTEXT MARKUP LANGUAGE (CONT…)

HYPERTEXT MARKUP LANGUAGE (CONT…) q. Creating a simple Webpage using HTML ØHTML is a

HYPERTEXT MARKUP LANGUAGE (CONT…) q. Creating a simple Webpage using HTML ØHTML is a very convenient programming language and you can create a simple Webpage using the tags provided in previous tables. ØStart the Notepad and type the followings: <html> <head> <title>My First Page</title> </head> <body> <p>My First Page </p> </body> </html>

HYPERTEXT MARKUP LANGUAGE (CONT…) You can add more details to your page

HYPERTEXT MARKUP LANGUAGE (CONT…) You can add more details to your page

HYPERTEXT MARKUP LANGUAGE (CONT…)

HYPERTEXT MARKUP LANGUAGE (CONT…)

HYPERTEXT MARKUP LANGUAGE (CONT…) ØCreating a simple Webpage using HTML is not that hard.

HYPERTEXT MARKUP LANGUAGE (CONT…) ØCreating a simple Webpage using HTML is not that hard. However, currently, Webpages are very complicated and have a lot of details which make them difficult to be implemented by HTML. ØDesigners create pages visually with a Web design tool. ØYet, HTML knowledge is still needed as Web design tools may not exactly interpret the needed feature. ØIn this case, the issue can be fixed by editing the design from the HTML source.

HYPERTEXT MARKUP LANGUAGE (CONT…) q. Hyperlinks ØOne of the most powerful aspects of the

HYPERTEXT MARKUP LANGUAGE (CONT…) q. Hyperlinks ØOne of the most powerful aspects of the Web and HTML is the ability to provide links to other pages. ØThe HTML <A></A>. tags are used for this purpose. ØTo understand how it works, try to insert this line in the body of your first page: <a href = "www. firat. edu. tr">Firat University</a><br/>

WEB SERVER PROGRAMS ØHTML is the language Web browsers use to display Web pages.

WEB SERVER PROGRAMS ØHTML is the language Web browsers use to display Web pages. ØHTML pages are generally static; they never change from one request to another. ØTo make information on a Webpage dynamic, you need a technology with more programming capabilities than simple formatting available in the standard HTML. ØWeb browsers allow dynamic Web pages in the form of DHTML (Dynamic HTML), which provides Webpage animation and more responsive user interactions. ØHTML and DHTML allow including scripting code, such as Java. Script or VBScript.

WEB SERVER PROGRAMS (CONT…) ØDHTML (Dynamic HTML): An extension to HTML tags and options

WEB SERVER PROGRAMS (CONT…) ØDHTML (Dynamic HTML): An extension to HTML tags and options for producing Web pages that are responsive to user interaction. ØVBScript: An interpreted script language from Microsoft that’s a subset of the Visual Basic programming language; often used by Web browsers and Active Server Pages (ASP) servers. ØJava. Script: An interpreted programming or script language from Netscape; somewhat similar in capability to Microsoft VBScript. ØWith these scripting languages, Webpage developers can include dynamic properties, such as changes to an area of the Webpage based on keystrokes, mouse movement or clicks, and timers.

WEB SERVER PROGRAMS (CONT…) ØThe Webpage is still static, but when it’s displayed in

WEB SERVER PROGRAMS (CONT…) ØThe Webpage is still static, but when it’s displayed in the browser, items can be altered dynamically in response to various events. ØFor a Webpage to be completely dynamic, it has to be created at the time it’s accessed. ØThere are Web server technologies that allow this capability. Ø CGI (Common Gateway Interface) is an older technology that allows using older programming languages, such as Perl, to create Webpages dynamically as they’re requested. ØCGI/Perl is being replaced by newer technologies, such as ASP, JSP, PHP, and Python.

WEB SERVER PROGRAMS (CONT…) ØThese new technologies perform the same function. ØThey are used

WEB SERVER PROGRAMS (CONT…) ØThese new technologies perform the same function. ØThey are used to create programs stored on a Web server, and when they’re accessed via HTTP and a browser, they create an HTML or DHTML Webpage dynamically and return it to the browser as though it were a static page. ØServer-side Web technologies are used heavily on the Internet now for everything from Internet banking and shopping to television program guides. ØIf you choose a career in web-programming, you’ll probably be doing server-side dynamic Webpage programming.

WEB SERVICES ØA Web service is a server-based Web program containing data to be

WEB SERVICES ØA Web service is a server-based Web program containing data to be used by other programs or Webpages, instead of being viewed. ØWeb services are becoming popular in business to provide information, such as stock quotes, to other programs. ØFor example, Amazon. com provides Web services that allow other Web sites to include information from Amazon. com. ØWeb services have expanded to include “cloud computing, ” which is used to provide entire applications as a service on the Web.

USING THE INTERNET – SEARCH ENGINES ØApart from E-mail, Social Media, and Web surfing,

USING THE INTERNET – SEARCH ENGINES ØApart from E-mail, Social Media, and Web surfing, the most common use of the Internet belongs to search engines. Ø Search engine is a program, usually accessed on the Web, that gathers and reports information available on the Internet. ØSearch engines use many different methods to build a database of Websites that people can search, but probably the most widely used method is “crawling. ” ØCrawling makes use of a special program called a bot (for robot) or a spider. ØA bot starts with a few Webpages that have been submitted for indexing, and then scans these pages for links to other Webpages.

USING THE INTERNET – SEARCH ENGINES ØThe program then follows the links to these

USING THE INTERNET – SEARCH ENGINES ØThe program then follows the links to these Webpages and repeats the process for every page it finds. ØAs the program identifies each page, it retrieves relevant words on the page and uses them to create an index to each page, based on words on the page and a special section of the HTML header called the <META> tag. ØThis tag contains keywords that describe the Webpage’s content. ØSome search engines, such as Dogpile. com, aren’t actually search engines but compilations of results from other search engines in a relevant format.