TCP/IP Refresher - PowerPoint PPT Presentation

tcp ip refresher n.
Skip this Video
Loading SlideShow in 5 Seconds..
TCP/IP Refresher PowerPoint Presentation
Download Presentation
TCP/IP Refresher

play fullscreen
1 / 96
Download Presentation
TCP/IP Refresher
Download Presentation

TCP/IP Refresher

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. TCP/IP Refresher Prabhaker Mateti (ack: Many many sources …)

  2. TCP/IP ? • TCP = Transmission Control Protocol • IP = Internet Protocol • Almost always includes other protocols: • UDP, User (Unreliable) Datagram • ICMP, Internet Control Message • ARP, Address Resolution Mateti, TCP/IP Refresher

  3. What’s a Protocol? • An agreed upon convention for communication. • Protocols must be formally defined and unambiguous Mateti, TCP/IP Refresher

  4. Layers The relative heights indicate the level of functionality. Mateti, TCP/IP Refresher

  5. Unix is a Layered System Applications Libraries System Calls Kernel Mateti, TCP/IP Refresher

  6. Layers • The routines/methods of Layer N will not call Layer N+1. • The routines/methods of Layer N typically do call the same layer methods. • The routines/methods of Layer N typically do call Layer N-1 methods. Mateti, TCP/IP Refresher

  7. DoD model: Four Layers • Network Access Layer: Delivery over physical media in use. • Internet Layer: Delivery across different physical networks that connect source and destination machines. • Host-to-Host Layer: Connection rendezvous, flow control, retransmission of lost data, etc. TCP and UDP protocols are in this layer. • Process Layer: User-level functions, such as SMTP, FTP and rlogin. Mateti, TCP/IP Refresher

  8. OSI Reference Model Seven Layers 7. Application 6. Presentation 5. Session 4. Transport 3. Network 2. Data Link 1. Physical Mateti, TCP/IP Refresher

  9. TCP/IP & OSI • In OSI reference model terminology -the TCP/IP protocol suite covers the network and transport layers. • TCP/IP can be used on many data-link layers (can support many network hardware implementations). Mateti, TCP/IP Refresher

  10. Process Process Process Layer TCP UDP Transport Layer ICMP, ARP & RARP IP Network Layer 802.3 Data-Link Layer Mateti, TCP/IP Refresher

  11. Physical Layer • Responsibility: • transmission of raw bits over a communication channel. • Issues: • mechanical and electrical interfaces • time per bit • distances Mateti, TCP/IP Refresher

  12. Data Link Layer - Data Link Control • Responsibility: • provide an error-free communication link • Issues: • framing (dividing data into chunks) • header & trailer bits • addressing 10110110101 01100010011 10110000001 Mateti, TCP/IP Refresher

  13. The Data Link Layer - The MAC sub layer • Medium Access Control (MAC) - needed by multi-access networks. • MAC provides DLC with “virtual wires” on multi-access networks. Mateti, TCP/IP Refresher

  14. Ethernet: A Data-Link Layer • IEEE 802.3 • Variety of physical layers. • Multi-access (shared medium). • Interface has a unique 6-byte hardware address. (E.g. 00-D0-09-E8-08-61) • The broadcast address is all 1’s. • Addresses are assigned to vendors by a central authority. Mateti, TCP/IP Refresher

  15. Preamble Destination Address Source Address Len DATA CRC An Ethernet Frame • Preamble is a sequence of alternating 1’s and 0’s used for synchronization. • CRC is Cyclic Redundancy Check 8 bytes 6 6 2 0-1500 4 Mateti, TCP/IP Refresher

  16. Ethernet Addressing • Each NIC looks at every frame and inspects the destination address. If the address does not match the hardware address of the interface or the broadcast address, the frame is discarded. • Some NICs can be programmed to recognize multicast addresses. Mateti, TCP/IP Refresher

  17. The Network Layer • Responsibilities: • path selection between systems (routing). • subnet flow control. • fragmentation & reassembly • translation between different network types. • Issues: • packet headers • virtual circuits Mateti, TCP/IP Refresher

  18. The Transport Layer • Responsibilities: • provides virtual end-to-end links between peer processes. • end-to-end flow control • Issues: • headers • error detection • reliable communication Mateti, TCP/IP Refresher

  19. The Session Layer • Responsibilities: • establishes, manages, and terminates sessions between applications. • service location lookup • Many protocol suites do not include a session layer. Mateti, TCP/IP Refresher

  20. The Presentation Layer • Responsibilities: • data encryption • data compression • data conversion • Many protocol suites do not include a Presentation Layer. Mateti, TCP/IP Refresher

  21. The Application Layer • Responsibilities: • anything not provided by any of the other layers • Issues: • application level protocols • appropriate selection of “type of service” Mateti, TCP/IP Refresher

  22. Layering & Headers • Each layer needs to add control information. • Typically prefixed to the data before passing on to the lower layer. Mateti, TCP/IP Refresher

  23. Headers DATA Process Process Transport H DATA Transport H H DATA Network Network Data Link H H H DATA Data Link Mateti, TCP/IP Refresher

  24. Example Headers • Physical: no header • Data Link: • address of the receiving endpoints • address of the sending endpoint • length of the data • checksum Mateti, TCP/IP Refresher

  25. protocol suite version type of service length of the data packet identifier fragment number time to live Network layer header - examples • protocol • header checksum • source network address • destination network address Mateti, TCP/IP Refresher

  26. Connecting Networks • Repeater: physical layer • Bridge: data link layer • Router: network layer • Gateway: network layer and above. Mateti, TCP/IP Refresher

  27. Repeater • Copies bits from one network to another • Does not look at any bits • Allows the extension of a network beyond physical length limitations REPEATER Mateti, TCP/IP Refresher

  28. Bridge • Copies frames from one network to another • Can operate selectively - does not copy all frames (looks at data-link headers). • Extends the network beyond physical length limitations. BRIDGE Mateti, TCP/IP Refresher

  29. ROUTER Router • Copies packets from one network to another. • Makes decisions about what route a packet should take (looks at network headers). Mateti, TCP/IP Refresher

  30. Gateway • Operates as a router • Data conversions above the network layer. • Conversions: • encapsulation - use an intermediate network • translation - connect different application protocols • encryption - could be done by a gateway Mateti, TCP/IP Refresher

  31. Encapsulation Example • Provides service connectivity even though intermediate network does not support protocols. Gateway Gateway Mateti, TCP/IP Refresher

  32. Translation • Translate from green protocol to brown protocol Gateway Mateti, TCP/IP Refresher

  33. Secure Network Secure Network Encryption/Decryption Gateways ? GW GW ? ? InsecureNetwork Encryption gateway Mateti, TCP/IP Refresher

  34. Hardware v. Software • Repeaters are typically hardware devices. • Bridges can be implemented in hardware or software. • Routers and gateways are typically implemented in software so that they can be extended to handle new protocols. • Many workstations can operate as routers or gateways. Mateti, TCP/IP Refresher

  35. Modes of Service • connection-oriented vs. connectionless • sequencing • error-control • flow-control • byte stream vs. message based • full-duplex vs. half-duplex. Mateti, TCP/IP Refresher

  36. Connection-Oriented Service • establishment of a logical connection between two processes. • transfer data • terminate connection. Mateti, TCP/IP Refresher

  37. Connectionless Service • Sends independent messages. Mateti, TCP/IP Refresher

  38. Sequencing • Sequencing provides support for an order to communications. • A service that includes sequencing requires that messages (or bytes) are received in the same order they are sent. Mateti, TCP/IP Refresher

  39. Error Control • Some services require error detection. • Checksums provide a simple error detection mechanism. • Error control sometimes involves notification and retransmission. Mateti, TCP/IP Refresher

  40. Flow Control • Flow control prevents the sending process from overwhelming the receiving process. • Flow control can be handled in a variety of ways. Mateti, TCP/IP Refresher

  41. Byte Stream vs. Message • Byte stream implies an ordered sequence of bytes with no message boundaries. • Message oriented services provide communication service to chunks of data called datagrams. Mateti, TCP/IP Refresher

  42. Full- v. Half-Duplex • Full-Duplex services support the transfer of data in both directions. • Half-Duplex services support the transfer of data in one direction. Mateti, TCP/IP Refresher

  43. End-to-End v. Hop-to-Hop Service modes, flow control and error control can be • Either between endpoints of the communication. • Or between consecutive nodes on the path between the endpoints. Mateti, TCP/IP Refresher

  44. Process A Process B End-to-End Mateti, TCP/IP Refresher

  45. Process A Process B Hop-by-Hop Mateti, TCP/IP Refresher

  46. Buffering • Buffering can provide more efficient communications. • Buffering is most useful for byte stream services. Process A Send Buffer Recv. Buffer Process B Mateti, TCP/IP Refresher

  47. Addresses • Physical Layer: no address necessary • Data Link Layer: address must be able to select any host on the network. • Network Layer: address must be able to provide information to enable routing. • Transport Layer: address must identify the destination process. Mateti, TCP/IP Refresher

  48. Broadcasts • Broadcast = sending a message from one host to all other hosts on the network. • A special address called the “broadcast address” is created. • Some popular network services are based on broadcasting (YP/NIS, rup, rusers) Mateti, TCP/IP Refresher

  49. The IP in TCP/IP • IP is the network layer • packet delivery service (host-to-host). • translation between different data-link protocols. Mateti, TCP/IP Refresher

  50. IP Datagrams • IP provides connectionless, unreliable delivery of IP datagrams. • Connectionless: each datagram is independent of all others. • Unreliable: there is no guarantee that datagrams are delivered correctly or at all. Mateti, TCP/IP Refresher