How Internet Works

Textbook Chapter 1: The Internet and the World Wide Web

This chapter will describe how domain names, IP addresses, domain name servers, Web servers, and various Internet protocols are joined together to for the World Wide Web. We'll also learn how to locate and select a Web hosting service provider, and how to create basic Web pages using HTML.

Computers connected to the Internet use a suite of protocols known as TCP/IP to communicate. TCP/IP includes a variety of other protocols, including TCP, IP, telnet, FTP, HTTP, Simple Mail Transfer Protocol (SMTP), and Network News Transfer Protocol (NNTP). Other network protocols such as NetBEUI and IPX/SPX establish rules to communicate within private networks, called intranets. These network protocols  do not allow computer to communicate over the Internet - ALL computers that connect to the Internet MUST use the  TCP/IP protocol.

Transmission Control Protocol (TCP)

TCP controls the physical transmission of the Internet data. It splits the transmission into small packets, which are sent over the Internet to a destination computer where the the packets are reassembled into the original transmission. On the way to the destination computer, each data packet makes several stops, called hops, at one or more computers along the way. The computer at each stop is called a gateway computer, because it plots the next leg of the journey and sends the packet on its way. This process is repeated until the packet reaches its destination.

Internet Protocol (IP)

The IP uses an addressing scheme to manage the addressing of each packet. Gateway computers use the IP address to determine how to plot where the packet should go next. Each packet may take a different route through the Internet, but they all end up at the same place. All Internet travels via this IP routing model.

IP Address

Every computer connected to the Internet has an IP address associated with it. This IP address is a unique 32 bit numeric number - written in decimal dot notation as four numbers (octets), separated by periods. Each number is between zero and 255. For example, the IP address for my computer is 107.222.140.1  (See Understanding IP Addressing)

You can type the following URL into the address bar of a browser to view my web site: http://107.222.140.1

An Internet Service Provider (ISP) assigns either a static or a dynamic IP address to each customer that connects to the Internet. Most ISPs assign a dynamic IP address, one that changes each time a client connects to the Internet. A static IP address is assigned to a specific computer and does not change. A Web server must have a static IP address so that the routing servers on the Internet will always know the IP address for the web site. The IP address assigned follows the IP addressing scheme that is defined in the IP protocol version 4.0. Since there is a limited number of IP addresses, the IP protocol is being upgraded to a newer version (version 6.0) which can support many more IP addresses. See IPv6.

The Internet Corporation for Assigned Names and Numbers (ICANN) is the non-profit corporation that was formed to assume responsibility for the IP address space allocation, protocol parameter assignment, domain name system management, and root server system management functions previously performed under U.S. Government contract by IANA and other entities.

A few IP addresses are reserved for special purposes. For example, the IP address 127.0.0.1 is not assigned to any computer on the Internet. It is known as the localhost, and is used to route packets to the local computer. This IP address is often used to test whether TCP/IP is installed and working correctly.

Internet programmers use the localhost IP address to represent the local web server during development. Typing http://127.0.0.1 or http://localhost into the browser's address bar will direct the user to the Web server located on the local computer. This allows programmers to view their web site locally and get the server response just as a web visitor would receive - including scripts run on the server.

HTTP Protocol

The HTTP protocol is used to send HTML documents through the Internet. The HTTP protocol sends documents in packets, using TCP/IP. With each packet, the HTTP protocol attaches a header, which contains information such as the name and the location of the page being requested, the name and IP address of the remote server that contains the Web page, the IP address of the local client, the HTTP version number, and the URL of the referring page. This information is known as the SERVER VARIABLES. Later, we will learn how to retrieve these values from the header.

HTTP version 1.0 is a stateless protocol. This means that when a client requests a document from a web server, the server returns the page to the client, then, ends all communication with the client. When the client requests a second page, the server has no way knowing that the client just requested a previous page.

By using cookies, session variables, text files, and databases the server can maintain state - recognize the client over multiple transactions, and thereby remember information from previous transactions.

In version HTTP 1.1, the Web server and the client can maintain their connection across Web pages. The Microsoft web server known as Internet Information Server (IIS) can be configured to support this "keep alive" HTTP 1.1 feature.