Communication Network Protocols. Qiong Cheng CSC 8320 (Fall 2007). Outline. Network Protocols OSI Protocol Suite TCP/IP Protocol Suite Protocol Examples in Internet Network and Ad Hoc Network References. Network protocols are sets of rules : To regulate the exchange of messages
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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Communication Network Protocols Qiong Cheng CSC 8320 (Fall 2007)
Outline • Network Protocols • OSI Protocol Suite • TCP/IP Protocol Suite • Protocol Examples in Internet Network and Ad Hoc Network • References
Network protocols are sets of rules : To regulate the exchange of messages To provide a reliable communication Human protocol vs network protocol: Hi TCP connection req. TCP connection reply. Hi Get http://www.rpi.edu/index.htm Got the time? 2:00 <file> time Network protocols Network protocols are organized into a bunch of layers!
Protocol Suit & Protocol Implementation • Layers for a standardized network architecture and the associated protocols are referred as protocol suite. • Each protocol object has function specification and two different interfaces • service interface: defines operations on this protocol • peer-to-peer interface: defines messages exchanged with peer Li+1 Li+1 service interface Li Li peer interface Abstraction and transparency are the keys of protocol design
Physical Layer R. Chow and T. Johnson.Distributed Operating Systems & Algorithms. 1997 • Specify the electrical and mechanical characteristics of physical communication link between a pair of nodes. • Provide a reliable logical bit pipe • Bit synchronization • Coding method, the modulation technique, and wire and connector specification. • Interface standards for data link layer.
Data Link Layer • Ensure reliable transfer of groups of bits (called frames) • Handle configuration setup, error controls, sequencing and flow control of frames • Full duplex vs. Half duplex • Errors • Sequencing • Flow control
Data Link Layer (cont.) “link”
Network Layer Send packets across the network through several link segments • Routing • Packet-by-packet / datagram-by-datagram • Static routing decision / dynamic routing decision • Centralized routing decision / decentralized one • Multiple path routing • Maintain the quality of service requested by the transport layer • Error and flow control
Transport Layer • Only interface between the communication sub network and the higher network-independent layers • Reliable end-to-end communication; • Transparency of network-dependent faults or problems; • Carry communication sessions; • Break message into packets; • The OSI protocol suite implements two types of services at the transport layer: connection-oriented transport service and connectionless transport service.
Session Layer • The session layer adds additional dialog and synchronization services to transport layer • Dialog : to facilitate the establishment of sessions • Synchronization : to allow processes to insert checkpoints for efficient recovery from system crashes.
Presentation Layer Provide data encryption, compression, and code conversion for messages that use different coding schemes.
Application Layer Peer-to-peer Client - Server The application layer is the OSI layer closest to the end user, which means that both the OSI application layer and the user interact directly with the software application. Some examples : Telnet, File Transfer Protocol (FTP), and Simple Mail Transfer Protocol (SMTP), DNS, Web/Http.
Application Presentation Session Transport Network Datalink Physical Reference Models for Layering TCP/IP Model TCP/IP Protocols OSI Ref Model Application FTP Telnet HTTP Transport TCP UDP Internetwork IP Host to Network Ethernet PacketRadio Point-to-Point “Bottom-up” approach & “Top-down” approach
network link application transport network link application transport network link application transport network link application transport network link data data M M H H H H H H H H H H H H t t t n n l l t n t t n M M M M M M Layering: logical and physicalcommunication
http: hypertext transfer protocol Web’s application layer protocol client/server model client: browser that requests, receives, “displays” Web objects server: Web server sends objects in response to requests http1.0: RFC 1945 http1.1: RFC 2068 The Web: the http protocol http request PC running Explorer http response http request Server running Apache Web server http response Mac running Navigator
Suppose user enters URL www.gsu.edu/College/index.html 1a.http client initiates TCP connection. Port 80. http example 1b.http server waits at port 80. “accepts” connection, notifying client 2.http client sends http request message into TCP connection socket 3.http server receives request message, forms response message, sends message into socket time
5.http client receives response message, displays html. Parsing html file, finds 10 referenced jpeg objects http example (cont.) 4. http server closes TCP connection. time 6. Steps 1-5 repeated for each of 10 jpeg objects
request line (GET, POST, HEAD commands) GET www.gsu.edu/College/index.htmlHTTP/1.0 User-agent: Mozilla/4.0 Accept: text/html, image/gif, image/jpeg Accept-language : fr (extra carriage return, line feed) header lines Carriage return, line feed indicates end of message http request message: general format
status line (protocol status code status phrase) HTTP/1.0 200 OK Date: Thu, 06 Aug 1998 12:00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data ... header lines data, e.g., requested html file http message format: response
Client sends all http requests to web cache if object at web cache, web cache returns object else requests object from origin server, then returns http response to client Web Caches (proxy server) Goal: satisfy client request without involving origin server origin server Proxy server http request http request client http response http response http request http request http response http response client origin server
Two parallel TCP connections opened: Control: exchange commands, responses between client and server. Data: file data to/from server ftp server maintains “state”: current directory, earlier authentication ftp: RFC 959 ftp server: port 21 FTP user interface FTP client FTP server local file system ftp: the file transfer protocol TCP control connection port 21 TCP data connection port 20 user at host remote file system
process process TCP with buffers, variables TCP with buffers, variables socket socket TCP sockets Socket: a door between application process and end-to-end-transport protocol (UCP or TCP) TCP service: reliable transfer of bytes from one process to another controlled by application developer controlled by application developer controlled by operating system controlled by operating system internet host or server host or server
create socket, connect to hostid, port=x create socket, port=x, for incoming request: clientSocket = Socket() welcomeSocket = ServerSocket() TCP connection setup wait for incoming connection request connectionSocket = welcomeSocket.accept() send request using clientSocket read request from connectionSocket write reply to connectionSocket read reply from clientSocket close connectionSocket close clientSocket Client/server socket interaction: TCP Server (running on hostid) Client
Node mobility in Ad Hoc networks has had a great effect in the designing of routing protocols Node mobility creates a dynamic topology, i.e., changes in the connectivity between the nodes as a direct function of the distance between each other Ad Hoc Networks Dynamic Topology R. Rajaraman. Topology control and routing in ad hoc networks: a survey. ACM SIGACT News [Volume 33 , Issue 2 (June 2002) ]
Mobility (proactive vs. reactive) S S D D Proactive Reactive Timer Based On Demand Must wait for the updates to be transmitted, processed and new routing tables be built A new route request is sent and a new route is found
Destination Sequenced Distance Vector (DSDV) • Routing tables define the number of hops for every network destination • Nodes communicate their routing table to their neighbors periodically and when there is a significant new information available • Routing information is normally transmitting using a broadcasting or multicasting mode C. Perkins and P.Bhagwat. Highly Dynamic Destination Sequenced Distance Vector Routing (DSDV) for Mobile Computers. ACM Sigcomm 94
D F E B D’s Routing Table G C H A DSDV Operation - Example
DSDV Operation – Example (A moves) D F E B G C H A A • When A moves and it is detected by G and H • G and H advertise their updated routing information • All neighbor nodes update routing table • These neighbor nodes advertise to their neighbors • Termination when destination is reached
Dynamic Source Routing (DSR) • If the sender doesn’t have a route to a destination it then attempts to find out by using a routing discovery process • While waiting for the routing discovery to complete the sender continues sending and receiving packets with other hosts • Each host uses a route maintenance procedure to monitor the correct operation of a route D. Johnson, Y. Hu and D. Maltz. The Dynamic Source Routing Protocol (DSR) for Mobile Ad Hoc Networks for IPv4 [Feb. 2007]
A-D A A A A-B A-C H H H H H H DSR – Route Discovery Source broadcasts a route packet with the address of the source and destination s A B D A neighbor that receives the request looks up its route cache to look for a route to destination. If not found it appends its address into the packet and re-broadcasts it H C G D F E node discards packets having been seen
A-B-E-F A-B-E A-B-G H H H DSR – Route Discovery s A B D H C G D node discards packets having been seen F E
DSR – Route maintenance Reply packet follows the reverse path of the route request packet recorded in broadcast packet s A B A-B-G-H D H A-B-G-H C A-B-G-H G D F E
Lookup Cache for route A to G Route found? Start Route Discovery Protocol no Buffer packet yes Continue normal processing wait yes Write route in packet header Packet in buffer? Route Discovery finished Send packet to next-hop no done Route Discovery: at source A A need to send to G
Accept route request packet Discard route request yes yes Discard route request Appendmy-Addr to partial route no Store <src-id> in list Send route reply packet Broadcast packet Route Discovery: At an intermediate node <src-id> in recently seen requests list? no Host address already in partial route? no my-Addr =target? yes done
Reference • [RFC 4728] D. Johnson, Y. Hu and D. Maltz. The Dynamic Source Routing Protocol (DSR) for Mobile Ad Hoc Networks for IPv4 [Feb. 2007] • R. Rajaraman. Topology control and routing in ad hoc networks: a survey. ACM SIGACT News [Volume 33 , Issue 2 (June 2002) ] • C. Perkins and P.Bhagwat. Highly Dynamic Destination Sequenced Distance Vector Routing (DSDV) for Mobile Computers. ACM Sigcomm 94 • D. B. Johnson and D. A. Maltz, “Dynamic Source Routing in Ad-Hoc Wireless Networks,” In Mobile Computing, edited by T. Imielinski and H. Korth, Chapter 5, pages 153-181, Kluwer Academic Publishers, 1996. • Andrew S. Tanenbaum. Computer Networks • C. Pomalaza-Ráez. Ad Hoc Networks Routing • R. Chow and T. Johnson.Distributed Operating Systems & Algorithms. 1997