- Количество слайдов: 16
Computer Networks Chapter 2: Applications and Layered Architectures
Introduction: ● ● Variety of services provided and possibly many more in the future. 70 s proprietary networking protocols. Divide-and-conquer. . . subdivide the task => Instead of complex monolithic problem, smaller more manageable ones: Layering Changing one function does not make everything else obsolete.
HTTP example ● ● Request HTTP client Res pon se HTTP server ● ● ● Hyper. Text Transfer Protocol (HTTP) Client queries DNS Client sets up a TCP connection Document is requested to server Document is delivered
HTTP example: HTTP server HTTP client Ephemeral Port 80 Port # GET 80, # TCP #, 80 STATUS
HTTP running on TCP 1. Users selects document 2. Network software of client locates the server host and establishes two-way connection. 3. HTTP client sends message requesting GET/infocom/index. html HTTP/1. 0 document. 4. HTTP daemon listening on TCP port 80 interprets message. 5. HTTP daemon sends a result code and HTTP/1. 1 200 OK SERVER: Apache/1. 2. 5 a description of the information. Content-Length: 414 Content- Type: text/html 6. HTTP daemon reads the file and sends the requested file through the TCP port. 7. HTTP daemon disconnects the connection 8. Text is displayed by client browser, which interprets the HTML format.
DNS Query 1. Application requests name to address translation. 2. Resolver composes query message. Header: OPCODE=SQUERY Question: QNAME=tesla. comm. toronto. edu. , QCLASS=IN, QTYPE=A 3. Resolver sends UDP datagram encapsulating the query message. 4. DNS server looks up address and prepares response. RESPONSE, AA Question: QNAME=tesla. comm. toronto. edu. , QCLASS=IN, QTYPE=A Header: OPCODE=SQUERY,
OSI Reference model ● ● ● Open Systems Interconnection put in place by the International Organization for Standardization. ISO It is a reference model to facilitate creation of computer communication standards. Partitions overall communication into functions carried by layers. Each layer conducts peer-to-peer communication The packet exchanged between the equivalent layer is called a PDU which
OSI reference model ● ● To reach it's peer layer, each layer communicates with next layer through SAP uniquely identified. Except for last layer none of intermediate layer makes use of SDUs. Services provided by underlying layer is either connection-oriented/connectionless, confirmed/ unconfirmed. Possibly segmentation (numbering) reassembly and blocking/unblocking.
Seven-Layer Model Application A Application B Application Layer Presentation Layer Session Layer Transport Layer Communication Network Layer Network Layer Data Link Layer Physical Layer Electrical and/or Optical Signals
Application A data Application Layer data Transport Layer data Network Layer Physical Layer data dt Presentation Layer ph data Session Layer Application Layer ah data Presentation Layer Data Link Layer Application B data bits sh Session Layer th Transport Layer Network Layer nh dh Data Link Layer Physical Layer Figure 2. 9
TCP/IP: Overview ● ● ● To the contrary of OSI model, the TCP/IP suite of protocoles has emerged from real networks 4 layers: Application, TCP/UDP, IP, Network interface. Reliable and un-acknowledged services are both possible: TCP, UDP TCP: end-to-end packet transmission IP: transfer of packet through multiple networks Network Interface: Allows us to run over
TCP/IP over networks Machine B Machine A Application Transport Router/Gateway Internet Network Interface Network 1 Network 2
Hour-shaped glass HTT P SMTP TCP RTP DNS UDP
TCP/IP: Example (a) (1, 1) (2, 2) s Ethernet PPP (1, 3) r w (1, 2) (b) Server HTTP TCP Router IP IP IP Net Interface Ethernet TCP PPP PC
Berkeley API for Sockets programming ● You need to read about the Sockets programming part using Berkeley API.
Networking utilities ● Telnet ● FTP ● Ping ● Traceroute ● Netstat ● TCPDump