A network is a collection of connected devices with a set of agreed upon rules for communication. The individual computers within a network are called hosts and the connections between the hosts are called links.
The set of rules that regulate information exchange on a network is called a protocol. Some common protocols used on the Web are TCP/IP, HTTP, and FTP.
Protocols are crucial to the successful operation of a network because they provide a series of steps for the devices involved to follow. Protocols also specify the format of the data that is exchanged.
Some examples of rules provided in Internet protocols allow a sending or receiving device to answer questions such as:
- What device sent this message?
- What is the overall size of the message?
- Is the transmission of the message complete or is there more information coming?
An example of an exchange:
telnet paprika.umw.edu 25
Trying 199.111.89.50...
Connected to paprika.umw.edu.
Escape character is '^]'.
220 paprika.umw.edu ESMTP Sendmail 8.9.3/8.9.3; Mon, 26 Jan 2004 06:26:57 -0500
(EST)
HELO webliminal.com
250 paprika.umw.edu Hello duranodic.propagation.net [66.221.148.1], pleased to m
eet you
MAIL FROM: <ernie@webliminal.com>
250 <ernie@webliminal.com>... Sender ok
RCPT TO:ernie@paprika.umw.edu
250 ernie@paprika.umw.edu... Recipient OK
DATA
354 Enter mail, end with "." on a line by itself
Hi ernie -
I thought I'd send you a line.
.
250 GAA07414 Message accepted for delivery
QUIT
221 paprika.umw.edu closing connection
Connection closed by foreign host.
Messages are broken into smaller pieces called packets which include a portion of the original message. Each packet also includes important information that the receiver requires in order to reconstruct the original message after all packets within the message are received and to respond to the communication.
See Figure 3.1
The maximum size, information included, and format of a packet depend on the protocol being used during the data communication.
Protocols used to transmit packets in a network must determine how to direct the packets from the source machine to the destination machine. Finding an appropriate path for a packet from the source to destination is called routing because software is used to select a route, a sequence of links through the network. In conjunction with routing, there are two fundamental approaches to coordinating packet transmission through the network: the circuit switching approach and the packet switching approach.
For circuit switching see Figure 3.2
Packet switching on the other hand does not require all packets within a message to travel along the same path and does not reserve resources for the duration of the communication.
The dynamic nature of routes using the packet switching approach allows the packet to always take advantage of the most efficient links available at the time of data transmission.
For an example of packet switching take a look at Figure 3.3
Because the Internet is a very dynamic network with a wide variety of communication demands, packet switching is used to provide a best effort delivery scheme. This means that the Internet makes the best effort possible to deliver all communication in a timely fashion, but makes no guarantees about speed or reliability.
Requests are initiated by a client application when triggered by a user. The request is not always directly triggered by a user action. For example, the loading of a Web page that includes an image may prompt a request from the client to the server to transmit the image. The user did not do anything to directly prompt the request, but by clicking the link or typing the URL of the page with the associated image, she indirectly prompted the request for the image.
The server application must handle requests from potentially many client applications. As such, the server application must run continually and must always be listening for new requests. The server's role is to listen for and fulfill requests.
Devices are uniquely identified within the Internet using an IP address, which is a unique number that identifies the device relative to the Internet. Currently the Internet uses Internetworking Protocol, version 4 (IPv4) and we will begin by examining IPv4 addresses. An IPv4 address is always a 32-bit number divided into four parts called octets. Each octet has a value between 0 and 255 and is separated from the other octets by a period. An IPv4 address is usually written in a format like, 192.65.245.11, where the number in each octet is the decimal equivalent of the binary digits within that octet.
Class A: A very large network capable of supporting up to 16,777,214 hosts.
Class B: A medium sized network capable of supporting up to 65,534 hosts.
Class C: A small network capable of supporting up to 254 hosts.
IPv6 coming into use.
The Domain Name Server (DNS) system was created to translate names into IP addresses. DNS is a huge database listing all registered IP addresses and their corresponding domain name.
Every time that you type a domain name in a URL or email address, the software on your computer sends a request to a DNS to translate the domain name into an IP address.
Not every DNS stores every DNS table entry; instead a distributed system is used involving local domain name servers, root domain name servers, and master domain name servers.
A local domain name server stores a table based of recent lookup request results and also stores the IP addresses of all of the root domain name servers.
A root domain name server stores references to master domain name servers for a single domain (like the .com domain or the .net domain). Multiple root domain name servers exist for each single domain, so if one server ever crashes or is unreachable, the other servers that handle the same domain will be able to handle the lookup requests.
Master domain name servers store detailed information about the hosts in a specific domain.
These domain name servers work together to resolve DNS lookup requests.
Take a look at Figure 3.8.
A packet can include a port number to identify the service at the destination that will handle the packet.
In order to uniquely identify a client or server application running on a host, you must specify the IP address of the host and the port number of the application or you must specify the domain name of the host and the port number of the application.
The reason that multiple protocols are used is tied to the fact that modern computer networks use a layered architecture. The layered architecture allows different hardware and software components to handle different aspects of network communication. This allows the individual components to be more specialized and easier to maintain or change based on new technology. The layered architecture also supports abstraction and ensures that all application software uses common standards. If you have a computer that uses the Linux operating system and you send a request to a device using Windows or another operating system, the communication can occur without platform compatibility problems. It also allows the layers that are more likely to come in contact with a human to use more English-like syntax and layers that are more likely to be implemented with hardware components to use electronic signals. Internet architecture has five layers.
See Figure 3.9 for a representation of the interaction of the layers.
You may also want to look at TCP/IP abc's at TechWeb.
Internet Protocol (IP) is the network layer portion of the of the TCP/IP suite of protocols used on the Internet. IP is a connectionless protocol , meaning that there is no continuing connection between the source and destination and packets travel on potentially different routes.
One of the main concerns of the network layer is routing , the process of finding a sequence of links from source to destination on which to transmit a packet or sequence of packets. IP uses dynamic routing , which means that routes are determined automatically at periodic intervals by software found in routing devices.
You may want to take a look at TechWeb's article on routing protocol.
IP Version
IP Header Length
Type of Service
Total Length in Bytes
Identification Number for Sequencing
Flags
Fragmentation Offset
Time to Live Counter
Protocol
Header Checksum
Source IP Address
Destination IP Address
Options
The Data
An IP Packet
Transport Control Protocol (TCP) is the protocol used at the transport layer of the Internet. Recall that the transport layer is responsible for ensuring source to destination delivery of an entire message. TCP offers two guarantees about delivery:
- All packets will be received at the destination.
- All packets will be correctly ordered before the message is passed on to the receiver's application layer.
Source Port Number
Destination Port Number
Sequence Number
Acknowledgment Number
Header Length
Reserved Flags
Window Size (Buffer Space of Receiver)
Checksum for Error Detection
Urgent Pointer
Options
The Data
TCP PACKET
Like all protocols, HTTP transmits information in a specified format. The HTTP message format is much more readable than the format of TCP/IP packets. Because HTTP is an upper layer protocol, it uses English-like syntax rather than binary numbers. An HTTP message has the following format:
- A line containing information about the request or response.
- For requests this includes the method of information request (which can be GET or POST), the filename of the resource, and the HTTP Version number.
- For responses this includes the HTTP version number and a response status code.
- A header line that can include information such as the name of the program making the request/response, date and time information, or format of the resource. Many header fields are described within the HTTP protocol. HTTP doesn't require that all header fields be included in a request or response message so the actual contents and length of the header will vary.
- Because the fields used within the header line vary with HTTP software, a blank line is required to signal the end of the header information
- The final portion of the HTTP message is the optional message body. This portion is usually blank in requests and includes the requested resource in a response message.
Use tenet to port 80 to demonstrate some of this.
or take a look using Web-Sniffer
Take a look at http://people.umw.edu/~ernie/cpsc104/planets.html
Dave Raggett's Introduction to HTML
take a look at http://people.umw.edu/~ernie/cpsc370k/style1.html
HTML has been the language standard for Web page creation since the early 1990s. It is a language composed of special symbols called tags that mark various text elements on a page and influence the way that the elements are interpreted or displayed. For example, the HTML tag <p>…</p> when applied to text causes a blank line to be displayed before and after the text when it is rendered by a browser. HTML is non-proprietary which means that it can be processed and rendered by browsers and tools by any vendor who chooses to create such a tool. Various aspects of HTML have changed over the years and the World Wide Web Consortium (W3C) sets standards for HTML use. The current W3C HTML specification is version 4.01 which was recommended in December 1997.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head>
<title> Trierra.org – Supporting Island Ecologies </title>
</head>
<body>
</body>
</html>
Delimit logical paragraphs by providing whitespace surrounding the block |
<p> … </p> |
Create a bulleted list of items |
<ul> …</ul> |
Create an ordered (numbered) list of items |
<ol> …</ol> |
Create a list of definitions |
<dl> …</dl> |
Delimit a block of preformatted text; the text will be rendered exactly as it is typed within the document |
<pre> … </pre> |
Insert a line break |
<br /> |
Create a division within the page |
<div> …. </div> |
Heading |
Markup |
h1 |
<h1>Here’s an H1 Heading</h1> |
h2 |
<h2>Here’s an H1 Heading</h2> |
h3 |
<h3>Here’s an H1 Heading</h3> |
h4 |
<h4>Here’s an H1 Heading</h4> |
h5 |
<h5>Here’s an H1 Heading</h5> |
h6 |
<h6>Here’s an H1 Heading</h6> |
Look at the source for the page with URL http://trierra.org
The <div>…</div> tags are used to create logical divisions within a page. Used on it’s own, the div tag does not alter the appearance of the text on the screen. However, it allows us to group text, images and links together into a logical division within the page. We can use the id tag (discussed below) and style sheets as (discussed later in this chapter) in conjunction with the div tag to control the appearance of various areas on a page.
Note that this tag is not split into two parts; the beginning and end of the tag appear within the same set of angle brackets. Because of this, the symbol / appears before the closing angle bracket. While not strictly required in XHTML, Web developers are encouraged to place a space before the / symbol; this helps older browsers to render the markup correctly.
width
The width of the image expressed as a number of pixels or a percentage of the screen width.
width= “35%”
height
The height of the image expressed as a number of pixels or a percentage of the screen height.
height=300
alt
Specify text that will be rendered in place of the image in the event that the page is viewed in a browser that does not display images. In many browsers, this text is also displayed in a small pop-up label when a user holds her mouse over the image for a few seconds.
alt= “Image of a river”
longdesc
The location of a separate page containing a lengthy description of the image that will be displayed if the page is viewed on a browser that does not display images.
longdesc= “anotherpage.html”
A specific example of an image tag with options is:
<img src = “island.jpeg” width= “100%” alt= “Image of an island.” />
Attribute |
Example Useage |
Effect |
border |
<table border= “2”> … </table> |
Create a border around the table as well as a border around each individual cell in the table. Setting the border to “0” creates a table with no visible border. |
cellpadding |
<table cellpadding= “10”> … </table> |
Control the amount of space within each cell of the table. |
cellspacing |
<table cellspacing= “15”> … </table> |
Control the amount of space between the cell borders. |
width |
<table width= “50%”>…</table> |
Control the width of the table on the page. The value can be expressed as a percentage of the total width of the page as shown or can be expressed in pixels as <table width = “200”> … </table> |
caption |
<caption> … </caption> |
Creates a caption (or title) associated with a table. The caption tag must immediately follow the opening table tag. |
Example Markup |
Effect |
<a href= “fileLocation”> link text </a> |
Create a link to the file at “fileLocation” using the text “link text” and open the file in the same browser window |
<a href= “fileLocation” target= “_blank”> link text </a> |
Create a link to a file at “fileLocation” with the text “link text” and open the new file in a separate browser window. This attribute is valid in XHTML Transitional and Frameset but not in XHTML Strict. |
<a href= “fileLocation”> <img src= “graphicFileName” alt= “text description”> </a> |
Create a link to a file at “fileLocation” and use the image found at “graphicFileName” as the link. |
