200 likes | 302 Views
Internet Servers. IN500. Topic. This session looks at the most common model used by computers on the internet to communicate. What is client/server?. A model used in every day life For example when you go to Borders to buy a book a staff person serves you
E N D
Internet Servers IN500
Topic • This session looks at the most common model used by computers on the internet to communicate
What is client/server? • A model used in every day life • For example when you go to Borders to buy a book a staff person serves you • You make a request, they respond (or service) your request • Rules govern whether or not your request is fulfilled (can pay, have the requested item, etc)
What is client/server in networking? • Client/server is a model where one computer services requests from other computers • The computer that services request is often referred to a server • Client makes a request • Serverresponds to (or services) the request Request Response
Types of servers • User-oriented servers • users utilize a client application to connect to server • Common types: Web, Mail, Messaging, File Transfer • Uncommon/older types: IRC (Chat), Shell, Remote Desktop • System-oriented servers • Your computer/application automatically connects to server to perform a necessary function • Common types: DHCP, DNS, Database
Protocols • For clients and servers to successfully communicate they need to use agreed procedures, we refer to these as protocols • The IETF often manage the protocols developed for use on the Internet • Software developers (and hardware manufacturers) use these protocols to ensure that their products will work with other vendor solutions Firefox Hypertext Transfer Protocol Apache Web Server Internet Explorer Microsoft Internet Information Server Chrome Google Web Server
Client/Server Connection • Clients on the Internet use the TCP/IP protocol suite (version 4) to create connections to servers • For a client to connect to a service on a computer the client needs to know the following information • Internet Protocol Address (IP Address) • Port • Services are typically on a known port (so clients can use a default) • A computer can run multiple services
Addressing TCP/IP services • Just like a house can have multiple occupants … Bob Brown123 Sesame Street CTW, USA
Addressing TCP/IP services • … a computer can offer multiple services
TCP/IP Services • In TCP/IP services are referred to by number (and are called ports), common services are
Connections • When a client connects to the service a socket is created so that the client can send information to the service • The connect is IP address + port number • e.g. 140.66.4.124:80 • But this connection only allows data to be sent to the service Connect to 140.66.4.124:80
Connections • When the client connects to the service it gives the service a port that can be uses to send data back to the client (the port provided will be higher than 1023) Connect to 140.66.4.124:80 Connect to 34.66.78.119:44321
Connections • Together the two connections create a socket • Now clients can send requests and receive data from the service socket Request data Response data
Client/Server Interaction • Now that a socket is created, a client can communicate with a service • Typically the client starts with a request the service then tries to satisfy the request • The next set of slides looks at the connection and transfer of request/response a web browser and server, requesting the home page of google.com
Examining HTTP • User types in the URL • Browser breaks down request
Examining HTTP • Browser uses the DNS to get the IP address for the site (www.google.com = 66.249.89.147) • Browser creates socket using the default port for the HTTP protocol (port 80) socket 66.249.89.147:80 34.66.78.119:3221
Examining HTTP • With the socket created the browser makes a request for the resource The / is the resource the client wants GET means the client wants a resource The protocol version used by the client Host is used to indicate which web site this request is for GET / HTTP/1.1 host: www.google.com Accept: */* Accept-language: en-nz accept and accept-language modify the client request and are optional
Examining HTTP • The web service sends a response The status code of 200 means that the request is ok and the requested resource will be send to the client The protocol version used by the client Headers describe the returned resource (like length and type of data returned HTTP/1.0 200 Ok Content-length: 3345 Content-type: text/html ... <html><title>Google</title> ... The actual resource
Examining HTTP • Once the client receives the resource the client renders the data for display
In Conclusion • Most interactions users perform on the Internet use the Client/Server model (and most use HTTP!) • Client/Server interactions are initiated by the client using protocol to control those interactions • On the Internet Client/Server operations typically occur using an established TCP/IP socket • For a client to connect to a service it needs to know the IP address and the port (default ports are defined on the protocol and assigned by IANA)