csc123_W7.pdf
Document Details

Uploaded by WarmerMemphis
Full Transcript
CSC123 (INTRO TO PROGRAMMING II) Usman Aslam | Computer Science OBJECTIVES Learn the following fundamental concepts of network communication: Protocols Client and Server processes IP addresses, port numbers, and sockets DNS service and FQDNs An overview of Application Layer protocols NETWORK COMMUNI...
CSC123 (INTRO TO PROGRAMMING II) Usman Aslam | Computer Science OBJECTIVES Learn the following fundamental concepts of network communication: Protocols Client and Server processes IP addresses, port numbers, and sockets DNS service and FQDNs An overview of Application Layer protocols NETWORK COMMUNICATION Two computers (processes) can communicate with each other over the network in a similar way that two humans communicate over the phone Three phases of communication: Initiate connection: TCP three-way handshake protocol Communicate using a pre-defined protocol: e.g. access web page (HTTP), send email (SMTP) Close connection: TCP three-way tear down COMMUNICATION PROTOCOL A protocol defines the rules of communication between entities. It includes: Rules of communication Syntax Semantics Synchronization Error correction NETWORK LAYER PROTOCOLS Network Layer protocol defines how: Connection is established between the two systems Data is delivered from A to B Errors are corrected and data loss mitigated The connection closed at the end of the communication The most common network layer protocol is a stack of two protocols commonly known as TCP/IP TCP stands for Transport Control Protocol IP stands for Internet Protocol APPLICATION LAYER PROTOCOLS Application Layer Protocol is specific to individual applications and the programmers/designers decide how their applications should talk to each other Consider the Network Protocol as a service provided by your cell phone company to dial a number and have the call connected and the Application Layer Protocol is largely up to you and the other party what you want to say to each other and in what manners Hypertext Transfer Protocol (HTTP) and Simple Message Transfer Protocols (SMTP) are two of the most widely used application layer protocols in existence COMMON NETWORKING TERMS IP Address: It is a 32-bit number that is presented as a decimal number with four segments separated by a ”.” e.g. 192.168.0.1 Every computer that is connected to the network has an IP address assigned to it The computer was a house then this number is the street address Port Number: It is a 16-bit number that ranges from 0-65535 Each process that either sends or receives data is allocated a port number COMMON NETWORKING TERMS Socket: A socket is a virtual construct, made up of an IP address and a port number. 192.168.0.1:80 It is a unique address (not just to a host but to a process running on the host) FQDN: Fully Qualified Domain Name, a friendly name that is mapped to an IP address The service that provides this mapping is called DNS (Domain Name Service) COMMON NETWORKING TERMS Client Process: Is the process that requires some service, the client initializes the connection to the server process and sends its request, and waits to get a response Server Process: The server process ”listens” for the client connections. It accepts connections from the clients, receives and processes their requests, and returns the response. A server typically is able to service multiple clients at a time NETWORK TOOLS PING (Packet Internet Groper): Used to test connectivity between two hosts NSLOOKUP: Used to lookup IP addresses of hosts using their FQDN TELNET: Used to connect to remote hosts (servers), send arbitrary requests, and receive responses. EXERCISE Demonstrate HTTP protocol using Telnet Demonstrate SMTP protocol using Telnet ADDITIONAL RESOURCES Please consult these resources before the next class so that you are comfortable with the basics of network communication. https://www.youtube.com/watch?v=eesqK59rhGA (HTTP) https://www.youtube.com/watch?v=iYM2zFP3Zn0 (HTTP) https://www.youtube.com/watch?v=PJo5yOtu7o8 (SMTP INTRO) https://www.youtube.com/watch?v=lfYtz3uRPYc (SMTP commands)