TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication language or protocol of the Internet. It can also be used as a communications protocol in a private network (either an intranet or an extranet).
Chennai Call Girls Porur Phone đ 8250192130 đ celebrity escorts service
Â
TCP /IP
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
7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical
Lower Layer
connects one node
to another
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
Upper Layer
directly assist the
user
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
Application
Transport
Network
Link
Physical Fiber
Telnet DNS
UDPTCP
IP
Ethernet Wi-Fi
Co-ax
HTTP
Radio
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
Version Header length Service type Total length
Identification Flags Fragment Offset
Time to live Protocol Header checksum
Source address
Destination address
IP Options Padding
âą 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.
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
Source Port Destination Port
Sequence Number
Acknowledgement Number
Header Length Code Bits Window
Checksum Urgent pointer
Options Padding
âą 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.
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
Source Port Destination Port
Message length Checksum
âą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.
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