Chapter 3 Networks

Basic Network Concepts

Network Protocols: Rules for Information Exchange

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:

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.

Packets

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.

Circuit Switching and Packet Switching

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.

Internet Overview

The Client/Server Model

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.

IP addresses

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.

Domain Name servers

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.

Ports

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.

Common Internet Protocols

Layered Network Architecture

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.

IP

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

 

TCP

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:

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

 

Application Layer Protocols on the Internet

HTTP

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:

Use tenet to port 80 to demonstrate some of this.

or take a look using Web-Sniffer

HTML, XHTML, & CSS

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

 

Introduction to HTML, XHTML, and CSS

XHTML Document Structure

Common Tags

Adding Images & Graphics

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.” />

Creating Tables

Adding links

Cascading Style Sheets

Trierra Example Site

 


Creative Commons License
This work is licensed under a Creative Commons License.
Ernest Ackermann Department of Computer Science, Mary Washington College
CPSC 104 | CPSC 220 | CPSC 321
This page was last modified on .