1 / 21

Basic Network Concepts

Basic Network Concepts. What are protocols?. Rules for communicating between two entities (e.g., a client and a server)

evers
Download Presentation

Basic Network Concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Basic Network Concepts

  2. What are protocols? • Rules for communicating between two entities (e.g., a client and a server) • “A protocol definition specifies how distributed system elements interact with one another in order to achieve a specified behavior, and the structure of the information exchanged during this interaction.” [Foster et. al, 2001] Page 2

  3. Network Layers Application (e.g., FTP, HTTP, telnet) Transport (e.g., TCP, UDP) Network (e.g., IP) Data Link (e.g., Ethernet) Physical (e.g., cables, etc.) Page 3 Network Model

  4. When a message is sent • The application constructs a message user data Page 4 Network Model

  5. When a message is sent • The message is packaged (encapsulated) with a header from the transport layer (e.g., TCP) and sent to the network layer TCP user data Page 5 Network Model

  6. An IP packet When a message is sent • The network layer adds a header IP TCP user data Page 6 Network Model

  7. An Ethernet frame When a message is sent • The data link layer adds a header, and the frame is sent out on the network Ethernet IP TCP user data Page 7 Network Model

  8. Message arrives to user memory and the application is notified Message arrives to user memory and the application is notified Message arrives to user memory and the application is notified You only see the communication at THIS LEVEL Message is copied to kernel and TCP/IP and Ethernet headers are added Message is copied to kernel and TCP/IP and Ethernet headers are stripped Message is sent onto network to receiver When a message is sent Application builds message in user memory Page 8 Network Model

  9. Connectionless or connection-oriented • If a protocol is connection-oriented then the client and server must connect before communication takes place – like a telephone call. TCP (Transmission Control Protocol) is connection oriented. • If a protocol is connectionless then there is no connection, just messaging – like sending a letter in the mail. UDP (User Datagram Protocol) is connectionless. Page 9

  10. Client/Server Model Server Client • Starts first • Waits for contact from a client • Responds to requests • Starts second • Contacts a server with a request • Waits for response from server Page 10 Client/Server Model

  11. Types of Servers A server can be: Iterative Concurrent iterative stateful concurrent stateful Stateful iterative stateless concurrent stateless Stateless Page 11 Types of Servers

  12. Stateful Server • Maintains some information between requests • Requires smaller messages, since some information is kept between contacts • May become confused if a connection terminates abnormally (if the design is not fault tolerant) • Example: FTP Page 12 Types of Servers

  13. Stateless Server • Requires larger messages. That is, the message must contain all information about the request since no state information is kept. • Example: HTTP Page 13 Types of Servers

  14. Iterative Server while (1) { accept a connection (or request) from a client service the client close the connection (if necessary) } Page 14 Types of Servers

  15. Concurrent Server while (1) { accept a connection/request from client start a new thread to handle this client /* the thread must close the connection! */ } Page 15 Types of Servers

  16. Internet Addressing • Suppose you type: http://comp.uark.edu/~aapon • This invokes the HTTP protocol (over TCP/IP), and the computer “comp.uark.edu” is sent a message Page 16 Addressing

  17. Internet Addressing Find the home page of user aapon http://comp.uark.edu/~aapon/ • Same as IP address 130.184.252.197 Contact the HTTP server on the computer named comp.uark.edu Page 17 Addressing

  18. Internet Addressing • There are four classes of addresses for IPv4 (the most common version) • Class A for very large networks (up to 224 hosts) • Class B for medium networks (up to 216 hosts) • Class C for small networks (up to 28 hosts) • Class D for broadcast addresses Page 18

  19. Internet Addressing • A Domain Name Server (DNS) may be called to find the IP address of comp.uark.edu • Each IP machine is usually configured with the name of a DNS server. • Some IP names and addresses can also be stored in /etc/hostfile Page 19 Addressing

  20. Internet Addressing “http” says: send the message to port 80 • An http request includes both a host IP address and a port number! • The HTTP server listens to port 80 • The HTTP server responds when a client contacts it Page 20 Addressing

  21. Internet Addressing • You can write a server that listens to any port not already in use! • A port number is a 16-bit integer. Ports below 1024 are reserved for system use. • Well-known ports include FTP, Telnet, SMTP, etc. Page 21 Addressing

More Related