• Like
TCP/IP Basics
Upcoming SlideShare
Loading in...5
×
Uploaded on

Get introduced to the basics of Communication Protocols and understand how TCP/IP works

Get introduced to the basics of Communication Protocols and understand how TCP/IP works

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
25,119
On Slideshare
0
From Embeds
0
Number of Embeds
8

Actions

Shares
Downloads
1,464
Comments
0
Likes
17

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. TCP/IP
    • Objective: Understand the Basic Concepts of Protocols and Get to know the basics of TCP/IP (the building blocks of the Web)
  • 2. Communications Architecture: Introduction
    • Communications functions can be divided into subset activities
        • concept of layered communications
    • Each activity can be looked as a layer
      • A layer provides a specific service (function) to other layers
      • A layer has a specific protocol (control messages) to connect to other systems
    • Two standards:
      • IBM’s proprietary SNA
      • ISO’s Reference Model for Open Systems Interconnection (OSI model)
  • 3. The OSI Model Lower Layer connects one node to another Upper Layer directly assist the user 7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Data Link 1 Physical Layer Function Network Choosing the next node and the link to it Data Link Controls the flow of messages on the chosen link Physical Connecting to the physical medium that provides the link Layer Function Application Provides services directly to an application program Presentation Presentation of information to user in a format that the user will understand Session Controls the user to user dialogue – its direction and synchronization Transport Raises the quality of service provided by the network to the level required by user
  • 4. The Internet Protocol Suite Fiber Telnet DNS UDP TCP IP Ethernet Wi-Fi Co-ax HTTP Radio Application Transport Network Link Physical
  • 5. TCP/IP Transmission Control Protocol/Internet Protocol
    • TCP/IP allows networks of different types to interconnect
  • 6. Inter-net Protocol & Internet Addresses
    • Network layer protocol whose job is to send packets or datagrams to send packets from one point to another
    • Each destination is specified by an IP address
      • IPv4: Each address has 4 8 bit numbers
      • Represented in dotted decimal places
      • A 8 bit number can represent 0-255 in decimal place
      • A typical number therefore looks like 209.176.20.9
      • IPv6 allows a larger number of addresses (among other advantages)
    • IP Addresses: Static or Dynamic
      • Static useful on infrastructure situations
      • Dynamic addresses changes everytime a machine logs on
      • Dynamic addresses are most often assigned by Dynamic Host Configuration Protocol (DHCP)
  • 7. IP Characteristics
    • IP is a connectionless protocol
      • No concept of a job or a session (each packet is treated as an entity in itself)
    • IP is an unreliable protocol
      • It is unconcerned with whether a packet reaches its eventual destination, or whether they arrive in the original order
      • IP cannot tell if packets were lost or whether they were received out of order
    • IP packets are not identified as a part of a sequence or belonging to a particular job.
  • 8. IP Packet Header
    • The protocol field in the header information identifies which higher level TCP/IP protocol sent the data. When data arrives at its destination this field tells IP which protocol module to pass it on to.
    • The time-to-live (TTL) field, specifies how long the packet is allowed to reamin in the internet delivery system and is decremented by by every router that the packet passes through. When it reaches zero the packet is discarded and the sender. This prevents packets from traveling the Internet forever.
    • The checksum is an error detection checksum covering only the fields of the header.
    Version Header length Service type Total length Identification Flags Fragment Offset Time to live Protocol Header checksum Source address Destination address IP Options Padding
  • 9. ARP & ICMP: Accompanying Protocols
    • Address Resolution Protocol (ARP) finds out the physical address corresponding to an IP address
      • When an IP Packet is received, an ARP request is brodcasted on the network. When a host recognizes an ARP request containing its own IP address, it sends an ARP reply containing its hardware address. This address is cached.
      • There is also a Reverse ARP (RARP) protocol. This is used by a host to find out its own IP address if it has no way of doing this except via the network.
    • Internet Control Message Protocol:
      • Defines the format of control messages that are sent to the sender indicating that a problem has occurred
  • 10. TCP Characteristics
    • TCP is a connection-oriented protocol
      • The client & the server must establish a connection before any data can be transferred between them.
    • TCP provides reliability
      • TCP knows that data it sends is received at the other end, and that it is received correctly.
      • TCP uses checksums on both headers and data.
    • TCP ensure Data which arrives out of sequence is put back into order
    • TCP also implements flow control, so a sender cannot overwhelm a receiver with data.
  • 11. TCP Packet Header
    • TCP sends data using IP, in blocks which are called segments .
    • The Port number identifies a particular user within a machine (which is identified by the IP address
    • The sequence number identifies the position in the data stream
    • The acknowledgement number is used to convey back to the sender that data has been received correctly.
    • The window size gives the number of bytes the receiver can accept.
    • The checksum covers both header and data
    • The urgent pointer identifies the start of data in the stream that must be processed urgently.
    Source Port Destination Port Sequence Number Acknowledgement Number Header Length Code Bits Window Checksum Urgent pointer Options Padding
  • 12. What is a Port?
    • Refers in this context a software port
    • Multiple applications or upper layer protocols may use TCP simultaneously
      • Ports are used to map TP data to a specific process
      • The combination of an IP address and a port number is called a socket
      • Sockets can be full duplex (data transmitted in both directions) or half duplex
    • Typical Port numbers:
      • 20/21 FTP
      • 23 Telnet
      • 25 Simple Mail Transfer Protocol
      • 37 Time
      • 53 Domain Name System
      • 80 HTTP
      • 110 POP3
      • 443 HTTPS
  • 13. TCP Communication: Making a Connection
    • A connection must be established before any data is sent
    • Segments are only sent between client and server if there is data to flow.
    • No status polling takes place.
    • To Start:
      • The server listens out for connection requests.
      • The client requests a connection by sending specifying its own port number and the port that it wants to connect to .
      • The SYN (synchronize sequence numbers) flag is set and the client’s initial data sequence number is specified.
    • Next:
      • The server responds with a segment in which the header contains its own initial data sequence number.
    • To complete the connection :
      • the client acknowledges the server’s data sequence number by sending back a segment with the ACK flag set and the acknowledgement field containing the server’s data sequence number plus one.
  • 14. TCP Communication: Data Transmission
    • TCP is a sliding window protocol , and does not wait for acknowledgement
    • To prevent overflow of receiver buffer:
      • An acknowledgement is sent containing the with the window size set to zero.
      • Later a windows update is sent, specifying the new window size.
    • For efficiency:
      • TCP can specify an acknowledgement delay in the hope that within that time some data will need to be sent the other way, and the two can ride together
      • The Nagle algorithm allows a TCP segment containing less data than the receiver’s advertised window size can only be sent if the previous segment has been acknowledged. This allows aggregation of small amounts of data
  • 15. TCP Communication: Error Correction
    • In error situations TCP can:
      • detect whether data has been successfully received at the other end
      • take steps to rectify the situation.
      • inform the sending application of the problem and failure, if all else fails,
    • Data lost or corrupted.
      • TCP keeps track of the acknowledgements for the data it sends.
      • If an acknowledgement is not received within an specified time data is resent
      • Time interval TCP will wait before depends on the connection speed (The protocol monitors the time it normally takes to receive an acknowledgement)
      • Data is resent repeatedly, at ever-increasing intervals, until either a response is received or an application timeout value is exceeded
    • Deadlock of flow
      • a receiver stops the data flow by setting its window size to zero and the window update segment that is meant to start data flowing again is lost.
      • To prevent deadlock from occurring, TCP sends out window probe messages at regular intervals to query the receiver about its window size.
  • 16. TCP Communication: Communication Closure
    • Each direction of data flow must be closed down separately.
    • Steps:
      • One end of the connection sends a segment in which the FIN (finished sending data) flag is set.
      • The receipt of this segment is acknowledged,
      • The receiving end notifies its application that the other end has closed that half of the connection.
  • 17. User Datagram Protocol
    • UDP is a simple protocol
    • UDP is unreliable and connectionless
      • A connection with a host is not necessary before exchanging data
      • No mechanism for ensuring that data sent is received
    • Main function is to specify the upper layer protocols
    • Useful for broadcasting since it does not require a connection
  • 18. UDP Packet Header
    • Two different application one using UDP and another using TCP may use the same port number. The two data streams are distinguished by the protocol field in the IP address header
    • The checksum is optional.
    Source Port Destination Port Message length Checksum
  • 19. Unicast, Broadcast, Multicast Unicast One sender – one receiver Broadcast Sends data to all possible receivers Multicast Sends data to interested receivers Applications of IP Multicast: Pay TV File Transfer Financial Information But is complex to implement