networking fundamentals
play

Networking Fundamentals 2 Lab Schedule Activities Assignments - PowerPoint PPT Presentation

Computer Systems and Networks ECPE 170 Jeff Shafer University of the Pacific Networking Fundamentals 2 Lab Schedule Activities Assignments Due This Week Lab 7 Due by Mar 19 th 5:00am Python introduction


  1. ì Computer Systems and Networks ECPE 170 – Jeff Shafer – University of the Pacific Networking Fundamentals

  2. 2 Lab Schedule Activities Assignments Due This Week Lab 7 ì ì Due by Mar 19 th 5:00am Python introduction ì ì Networking introduction ì Lab 8 ì Endianness (Thursday) ì Due by Mar 26 th 5:00am ì Lab 8 (HTTP, TCP sockets) ì Computer Systems and Networks Spring 2019

  3. 3 Persons of the Day: Vint Cerf / Bob Kahn Co-designers of TCP/IP ì protocol suite Enables reliable ì communication across unreliable network Foundation of Internet ì 2004 ACM Turing Award ì winners (shared) 2005 Presidential Medal of ì Freedom winners (shared) Computer Systems and Networks Spring 2019

  4. 4 Person of the Day: Tim Berners-Lee Inventor of “World Wide ì Web” First implementation of ì HTTP (HyperText Transfer Protocol) to communicate between client and server Knighted by Queen Elizabeth ì II in 2004 Computer Systems and Networks Spring 2019

  5. 5 ì Computer Networks Computer Systems and Networks Spring 2019

  6. 6 Disclaimer ì These topics take an entire semester of COMP 177 (Computer Networking) to explore! ì A few days (most of which is lab time) is only sufficient for the briefest of overviews… Computer Systems and Networks Spring 2019

  7. 7 Network Model Application Layer (Myriad examples: Web browser, web server, etc…) Transport Layer (Reliability – e.g. TCP) Network Layer (Global Network – e.g. IP) Link Layer (Local Area Network – e.g. Ethernet) Physical Layer (“Bit on a Wire”) Computer Systems and Networks Spring 2019

  8. 8 Application Layer Application Layer HTTP DNS IMAP Skype BitTorrent RDP SSH NTP NFS Sockets … and many more! Transport Layer Network Layer Link Layer Physical Layer Computer Systems and Networks Spring 2019

  9. 9 Application Layer The application layer programmer can make many ì (fantastic) assumptions about the network The network is reliable ì ì Messages are not lost ì Messages are received in the order they are sent The network can transfer data of infinite length ì (you can send as much data as desired) You can deliver messages directly to a specific application ì on a specific computer anywhere on the planet The lower layers (transport, network, link, …) do all the ì heavy-lifting to make these assumptions true Computer Systems and Networks Spring 2019

  10. 10 Client-Server Architecture Server Client Communicate with server Always-on host ì ì May be intermittently ì Always has a known IP ì connected address May have dynamic IP addresses ì Lots of bandwidth ì Do not communicate directly ì Server process : process that with each other ì waits to be contacted Client process : process that ì initiates communication Computer Systems and Networks Spring 2019

  11. 11 Why Do We Have Sockets? ì Challenge – Inter-process communication ì A process is an independent program running on a host Separate memory space ì ì How do processes communicate with other processes On the same host? ì On different hosts? ì ì Send messages between each other Computer Systems and Networks Spring 2019

  12. 12 What is a Socket? ì An interface between process (application) and network The application creates a socket ì The socket type dictates the style of communication ì ì Reliable vs. best effort ì Connection-oriented vs. connectionless ì Once configured the application can Pass data to the socket for network transmission ì Receive data from the socket (transmitted through ì the network by some other host) Computer Systems and Networks Spring 2019

  13. 13 What is a Socket? Process sends/receives messages ì host or host or to/from its socket server server Socket analogous to door ì controlled by Sending process shoves message ì app developer out door process process Transport infrastructure on other ì socket socket side of door carries message to TCP with TCP with socket at receiving process Internet buffers, buffers, Imagine you are just writing to a ì variables variables file… API allow customization of socket controlled ì by OS Choose transport protocol ì Choose parameters of protocol ì Computer Systems and Networks Spring 2019

  14. 14 Addressing Processes ì To receive messages, each process on a host must have an identifier IP addresses are unique ì Is this sufficient? ì ì No, there can thousands of processes running on a single machine (with one IP address) ì Identifier must include IP address ì and port number (example: 80 for web) ì Computer Systems and Networks Spring 2019

  15. 15 Ports ì Each host has Port 0 65,536 ports Port 1 ì Some ports are reserved for Port 65535 specific apps FTP (20, 21), Telnet (23), HTTP (80), etc… ì ì Outgoing ports (on clients) can be dynamically assigned by OS in upper region (above 49,152) – called ephemeral ports ì See http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers Computer Systems and Networks Spring 2019

  16. 16 Socket Usage: Client Program ì Basic socket functions for connection-oriented (TCP) clients create the socket descriptor 1. socket() connect to the remote server 2. connect() 3. send(),recv() communicate with the server end communication by closing 4. close() socket descriptor Computer Systems and Networks Spring 2019

  17. 17 Application-Layer Protocol ì Sockets just allow us to send raw messages between processes on different hosts Transport service takes care of moving the data ì ì What exactly is sent is up to the application An application-layer protocol ì HTTP, NTP, IMAP, SFTP, Skype, etc… ì Computer Systems and Networks Spring 2019

  18. 18 Application-Layer Protocol Both the client and server speaking the protocol must ì agree on Types of messages exchanged ì ì e.g., request, response Message syntax ì ì What fields are in messages ì How fields are delineated Message semantics ì ì Meaning of information in fields Rules for when and how processes send and respond to ì messages Computer Systems and Networks Spring 2019

  19. 19 Hypertext Transfer Protocol Overview ì HTTP is the application layer protocol for the web HTTP request ì It is how the client and PC running H T T P r e Chrome s p server communicate o n s e ì Client/server model HTTP request Client : browser that HTTP response Server ì running requests, receives, Apache Web “displays” Web objects server Server : Web server ì sends objects in Mac running response to requests Safari Computer Systems and Networks Spring 2019

  20. 20 Web and HTTP ì Web page consists of base HTML file and (potentially) many referenced objects HTML file, PNG image, Flash video, … ì ì Each object is addressable by a URL ì Example URL: www.somecompany.com/someDept/image.png path name host name Computer Systems and Networks Spring 2019

  21. 21 HTTP Request Message (Client->Server) request line (GET, POST, GET /about/ HTTP/1.1 HEAD commands) Host: www.google.com User-agent: Mozilla/13.0 header Connection: close lines Accept-language:en <line with only \r\n> Carriage return, line feed indicates end of message HTTP is a text-based protocol. The client sends ASCII bytes in the request, and the server responds with ASCII bytes in the reply. Computer Systems and Networks Spring 2019

  22. 22 HTTP Response Message (Server -> Client) status line (protocol HTTP/1.1 200 OK status code, Vary: Accept-Encoding status phrase) Content-Type: text/html Last-Modified: Tue, 10 Apr 2012 09:33:47 header Date: Tue, 10 Apr 2012 17:50:51 GMT lines Expires: Tue, 10 Apr 2012 17:50:51 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff Server: sffe X-XSS-Protection: 1; mode=block data, e.g., Transfer-Encoding: chunked requested <line with only \r\n> HTML file <Data begins here...> Computer Systems and Networks Spring 2019

  23. 23 HTTP Response Status Codes 200 OK Request succeeded, requested object later in this message ì 301 Moved Permanently A few Requested object moved, new location specified later in this ì examples message (Location:) out of 400 Bad Request many! Request message not understood by server ì 404 Not Found Requested document not found on this server ì 505 HTTP Version Not Supported Computer Systems and Networks Spring 2019

  24. 24 ì Other Layers Computer Systems and Networks Spring 2019

  25. 25 Link Layer Application Layer Transport Layer Network Layer Transfer Link Layer between neighbors Ethernet! Hubs & Switches Framing MAC addresses Physical Layer Computer Systems and Networks Spring 2019

  26. 26 Network Layer Application Layer Transport Layer End-to-End Network Layer packet transfer IP – Internet Protocol! Routers IP Addresses Routing Protocols Link Layer Physical Layer Computer Systems and Networks Spring 2019

  27. 27 IP Properties Datagram Unreliable ì ì Each packet is individually No guarantee of delivery ì ì routed No guarantee of integrity ì Packets may be of data ì fragmented or duplicated Best effort by underlying networks ì Only drop packets when ì Connectionless ì necessary No guarantee of delivery in ì No time guarantee for ì sequence delivery Ethernet networks provide the same “guarantees” Computer Systems and Networks Spring 2019

Recommend


More recommend