Transport services and protocols: provide communication between app processes running on different hosts. Send side: breaks app messages into segments, passes to network layer. RCV side: reassembles segments into messages, passes to app layer. Network layer: logical communication between host. Transport layer: local communication between processes -relies on enhances, network layer services. TCP: congestion control, flow control, connection setup.Multiplexing(sender): handle data from multiple sockets, add transport header. Demultiplexing(receiver): use header info to deliver received segments to correct socket. Demultiplexing(works): host receives datagrams, host uses IP addresses & ports to direct segment to appropriate socket. Created socket has host-local port. Creating datagram to send into UDP socket, must specify IP/Port. Connection-oriented demux: TCP socket identified by 4-tuple. source IP, port, dest IP, Port. demux: receiver uses all four vlaues to direct segment to appropriate socket. Server host may support many TCP sockets. UDP: User data prot:connectionless. no handshaking between UDP sender, receiver. Each UDP segment handled independently of others. Why is there UDP?: no connection establishment. Simple: no conneciton state at sender, receiver. small header size. Reliable data transfer: consider only unidirectional data transfer (flow both directions). Use FSM to specify sender, receiver. //3
//2 P2P-arch: arbitrary end systems directly comunicate. Peer request service from other peers, provide service in return to other peers. self scalability: new peers bring new service capacity. Process: program running within a host. Client process: process that initiates communication. Server process: process that waits to be contacted. Sockets: process sends/receives messages to/from. Identifier: receive messages. Includes both IP and port. App-layer prot: types of messages exchanged, message syntax, message semantics, rules, open protocols. Transport service: data integrity, timing, throughput, security. TCP service: reliable transport, flow control, congestion control, does not provide timing minimum throughput. connection oriented. UDP service: unreliable data transfer. does not provide what TCP has. HTTP(TCP) client initiates TCP connection to server, server accpets TCP, HTTP message, TCP connection closed. HTTP is “stateless”-server maintains no information about past client requests. RTT: time for a small packet to travel from client to server and back. HTTP response time(non): One RTT to initate TCP connection. HTTP(P): requests 2 RTTs per object. Post method: web page often includes form input. Input is uploaded to server. URL method: uses GET, whole path can be bookmarked. Cookies(uses): authorization, shopping carts, recommendations. How to keep state: protocol endpoints:maintain state at sender,receiver over multiple transcactions. http messages carry state. Web caches: satisfy client request without involving origin server. Reduce response time to client. SMTP: uses persistent connections, requires message to be 7bit. Comparison to HTTP: HTTP – pull, SMTP-push, both have ASCII command.response, HTTP: each object encapsulated in its own response message. SMTP – multiple objects sent in multipart message. Domain name system: distributed database implemented in heirarchy of many name servers. Application layer protocol- hosts, name servers communicate to resolve names.
//1 Packet switching: hosts break app-layer messages into packets. Store and forward: entire packet ust arrive at router before it can be transmitted on next link. Queuing and loss: if arrive rate(bits) to link exceeds transmission rate of link for a period of time. Routing: determines source-destination route taken by packets. Forwarding: move packets from router’s input to appropriate router output. Packet loss: queue (buffer) preceding link in buffer has finite capacity. packet arriving at full queue dropped. Throughput: rate (bits/time unit) at which bits transferred between sender/receiver. Instantaneous: rate at given point in time. Why layering: explicit structure allows identification, relationship of complex system’s pieces. Modularation eases maintenance, updating of system. Internet prot. stack: application – supporting network applications, transport – process-process data transfer, network – routing of datagras from source to destination, link-data transfer between neighboring elements, physical- bits on wire. Presentaiton: allow applications to interpret meaning of data. Session: synchronizaiton, checkpointing, reocvery of data exchange. Communication: peers assume that they are communicating horizontally.