• Internet; addressing, protocols, formats, etc.
• To understand the Internet topics related to shop floor monitoring and control
8.1.1 Mail Transfer Protocols
Sending and receiving email involves different protocols. Mail is sent using a protocol called Simple Mail Transfer Protocol (SMTP). Mail is retrieved with Post Office Protocol (POP) or Internet Mail Access Protocol (IMAP). All of these protocols are handled with programs listening on different ports on the server.
8.1.2 FTP - File Transfer Protocol
File Transfer Protocol (FTP) is a very old and well supported method for transferring files between computers. Advanced users will often use it with typed commands, but there are also hundreds of graphical clients that hide the typed commands.
8.1.3 HTTP - Hypertext Transfer Protocol
Hypertext Transfer Protocol (HTTP) is used for retrieving web pages from remote sites. It uses simple commands to get text files from the remote computer.
8.1.4 Firewalls and IP Masquerading
A firewall is a single computer that acts as a point of contact between an untrusted network (the Internet) and a secure network. The firewall computer will have two or more network cards that it will monitor differently. Generally it is set up to allow traffic to pass from the internal network to the outside world with greater freedom than it allows network traffic to enter the secure network. This allows computers behind a firewall to get access to outside computers. Any requests they make are mirrored to outside computers, who may then respond to the requests. Requests from computers behind the firewall all seem to come from the firewall itself. There is no way for an outside computer to access a computer behind the firewall.
Formats are different from protocols, although they are often confused. Protocols are used for transferring information, but formats define the information format. For example, http is a protocol often used for transferring files. The most common file format transferred with http is html, although it can transfer other types of files.
Hyper Text Markup Language (HTML) is the defacto standard format for information on the World Wide Web (WWW). It basically allows text to be generally formatted with embedded images. When viewed, the display is adjusted to suit the browser. These documents also include hypertext links that allow a user to go to another HTML page, or download a file by ’clicking’ on linked text. Recently there have been many additions that allow more control over the ’look-and-feel’, but result in larger files and less portability. HTML files can be created with programs, or edited by hand.
A simple HTML file is shown in Figure X.X. It uses tags to define the beginning and end of definitions. The entire document begins and ends with the tags ’<HTML>’ and ’</HTML>’. The body of the document begins and ends with ’<BODY>’ and ’</BODY>’. Highlighted text is between ’<Hx>’ and ’</Hx>’, where ’x’ varies from ’1’ for the boldest to ’5’ to the lightest. Lists can be defined with the tags ’<UL>’ and ’</UL>’, and each point in the list begins with ’<LI>’.
Figure X.X - A Simple HTML File and The Output
The file in Figure X.X add a few features to the previous example. The first part is a header section that defines a title of the document. This title will appear on the top bar of the browser window. An image will appear after the heading and before the list, the image displayed is called ’test.gif’. The two items in the list now have hypertext links. The first is to a file called ’other.html’, the second is to another web site ’www.cnn.com’.
Figure X.X - A More Advanced HTML File
• In HTML documents we need to refer to resources. To do this we use a label to identify the type of resource, followed by a location.
• Universal Resource Locators (URLs)
• Allows some degree of privacy, but this is not guaranteed.
• Basically, if you have something you don’t want seen, don’t do it on the computer.
8.3 Clients and Servers
• Some computers are set up to serve others as centers of activity, sort of like a campus library. Other computers are set up only as users, like bookshelves in a closed office. The server is open to all, while the private bookshelf has very limited access.
• A computer server will answer requests from other computers. These requests may be,
• A client does not answer requests.
• Both clients and servers can generate requests.
• Any computer that is connected to the network Client or Server must be able to generate requests. You can see this as the Servers have more capabilities than the Clients.
• Microsoft and Apple computers have limited server capabilities, while unix and other computer types generally have more.
Windows 3.1 - No client or server support without special software
Windows 95 - No server support without special software
Windows NT - Limited server support with special versions
MacOS - Some server support with special software
Unix - Both client and server models built in
• In general you are best advised to use the main campus servers. But in some cases the extra effort to set up and maintain your own server may also be useful.
• To set up your own server machine you might,
1. Purchase a computer and network card. A Pentium class machine will actually provide more than enough power for a small web site.
2. Purchase of copy of Windows NT server version.
3. Choose a name for your computer that is easy to remember. An example is ‘artsite’.
4. Call the Information technology people on campus, and request an IP address. Also ask for the gateway number, netmask, and nameserver numbers. They will add your machine to the campus DNS so that others may find it by name (the number will always work if chosen properly).
5. Connect the computer to the network, then turn it on.
6. Install Windows NT, and when asked provide the network information. Indicate that web serving will be permitted.
7. Modify web pages as required.
• This is a programming language that is supported on most Internet based computers.
• These programs will run on any computer - there is no need for a Mac, PC and Unix version.
• Most users don’t need to program in Java, but the results can be used in your web pages
• Simple programs can be written as part of an html file that will add abilities to the HTML page.
• CGI (Common Gateway Interface) is a very popular technique to allow the html page on the client to run programs on the server.
• Typical examples of these include,
1. Enter the program below and compile it with the provided makefile.
2. Move the program to the main cgi-bin directory for the computer (possibly /var/www/cgi-bin). If not surewhere the directory is located try the command ’locate cgi-bin’.
3. Enter the HTML program below that uses a CGI form. Put the file in the main html directory (probably /var/www/html).
4. Use a browser to open the HTML page just created with ’http://127.0.0.1/test.html’. Fill out the form and observe the results.
5. Write a CGI program that will allow a user to request information from the previously created database.
6. Write a program that uses a CGI form to enter information into the customer database created previously.