Ken Pembleton
Telecommunications
Lab #2 - Network Connections
10/21/15

Network Connections Lab

1. Connect a local server and client via socket connection in terminal windows. When connected, in the client window ask the the server to send something. Example, "What color is the sky on a typical sunny day?". Response within the server window back to the client window. Examine both the client and server windows and explain the exchange that took place.

When the server is started it creates an open socket with a name. When the client is started it then connects to the socket. When the client sends a question, like "What color is the sky on a typical sunny day?", the server receives the request and is given the opportunity to respond with "Blue".

2. Connect a local server and client via port connection in terminal windows. When connected, in the client window ask the the server to send something. Example, "What color is the sky on a typical sunny day?". Respond within the server window back to the client window. Examine both the client and server windows and explain the exchange that took place.

When the server is started it opens a port on the server and reports the number of the port that was opened. When the client is started it then connects to that open port by entering the port number during connection. When the client sends a question, like "What color is the sky on a typical sunny day?", the server receives the request and is given the opportunity to respond with "Blue".

3. Connect a local server and client via web connection in terminal windows. When connected, in the server window supply the HTML code that is to be displayed when the client connects to the server via browser. Example, "Hello World!". Observe what happens in the browser.

When the server is started it opens a port on the server and binds it to specified hostname/IP and reports the number of the port that was opened. When the client visits the hostname/IP binded with the port number the HTML code that was supplied is read and displayed to the client. In this case "Hello World!" is displayed.

Contact: kpemblet@oswego.edu