A Big Test Result - Knowledge Systems Institute
A Big Test Result - Knowledge Systems Institute
Introduction to Computer
This lesson examines the TCP/IP protocol and its
relationship to the OSI reference model.
Introduction to TCP/IP
• Transmission Control Protocol/Internet Protocol
(TCP/IP) is an industry-standard suite of protocols
that provide communications in a heterogeneous
• TCP/IP provides a routable, enterprise networking
protocol and access to the Internet and its
• TCP/IP has become the de facto standard for
what's known as internetworking,
Introduction to TCP/IP (2)
• Other protocols written specifically for the TCP/IP
• SMTP (Simple Mail Transfer Protocol) E-mail.
• FTP (File Transfer Protocol) For exchanging files
• SNMP (Simple Network Management Protocol)
For network management.
• TCP/IP was developed by the United States
Department of Defense as a set of wide area
network (WAN) protocols.
Advantages of Using TCP/IP
• Using TCP/IP offers several advantages; it:
• Is an industry standard
• Contains a set of utilities for connecting
dissimilar operating systems
• Uses scalable, cross-platform client-server
• TCP/IP standards are published in a series of
documents called Requests for Comment (RFC).
• The Internet Architecture Board (IAB) is the
committee responsible for managing and
publishing RFCs for the Internet.
• The InterNIC Directory and Database provided by
AT&T is a service that furnishes sources of
information about the Internet to the public.
• The Directory and Database includes the RFCs.
This service can be found at www.internic.net
TCP/IP and OSI
• TCP/IP is broken
into the following
• Network interface
Network Interface Layer
• The network interface layer, corresponding to the
physical and data-link layers of the OSI model,
• It communicates directly with the network.
• It provides the interface between the network
architecture (such as token ring, Ethernet) and the
• The Internet layer, corresponds to the network layer
of the OSI reference model.
• It uses several protocols for routing and delivering
• Routers, are protocol dependent. They function at
this layer and are used to forward packets from
one network or segment to another.
• Several protocols work within the Internet layer:
IP, ARP, RARP, ICMP
Internet Protocol (IP)
• Internet Protocol (IP) is a packet-switched protocol
that performs addressing and route selection.
• IP is a connectionless protocol and sends packets
without expecting the receiving host to acknowledge
• IP is responsible for packet assembly and
• Each IP packet is made up of a source and a
destination address, protocol identifier, checksum
(CRC), and a TTL.
Time To Live (TTL)
• The TTL tells each router on the network between
the source and the destination how long the packet
has to remain on the network.
• It works like a countdown counter or clock.
• As the packet passes through the router, the router
deducts the larger of one unit (hop), or the time
that the packet was queued for delivery.
• The purpose of the TTL is to prevent lost or
damaged data packets from endlessly wandering.
• When the TTL counts down to zero, the packet is
eliminated from the network.
• The purpose of ANDing is to determine whether the
address is a local or a remote site.
• If the address is local, IP will ask the ARP for the
hardware address of the destination machine.
• If the address is remote, the IP checks its local
routing table for a route to the destination.
• If a route exists, the packet is sent on its way.
• If no route exists, the packet is sent to the local
default gateway and then on its way.
Address Resolution Protocol (ARP)
• Before an IP packet can be forwarded to another
host, the hardware address of the receiving
machine must be known.
• The ARP determines hardware address (MAC
addresses) that correspond to an IP address.
• If ARP does not contain the address in its own
cache, it broadcasts a request for the address.
• All hosts on the network process the request and,
if they contain a map to that address, pass the
address back to the requestor.
Reverse Address Resolution Protocol
• A RARP server maintains a database of machine
numbers in the form of an ARP table (or cache)
which is created by the system administrator.
• the RARP protocol provides an IP number to a
requesting hardware address.
• When the RARP server receives a request for an IP
number, it checks its routing table for the machine
number of the requesting node, and then sends
the IP number back to the requesting node.
Internet Control Message Protocol
• The ICMP is used by IP and higher-level protocols
to send and receive status reports about
information being transmitted.
• Routers commonly use ICMP to control the flow, or
speed, of data between themselves.
• If the flow of data is too fast for a router, it
requests that other routers slow down.
• The two basic categories of ICMP messages are
reporting errors and sending queries.
• The transport layer is responsible for establishing
and maintaining end-to-end communication
between two hosts.
• It provides acknowledgment of receipt, flow
control, and sequencing of packets.
• It also handles retransmissions of packets.
• The transport layer can use either TCP or UDP
protocols depending on the requirements of the
Transmission Control Protocol (TCP)
• The TCP is responsible for the reliable transmission
of data from one node to another.
• It is a connection-based protocol and establishes a
connection between two machines before any data
• To establish a reliable connection, TCP uses what is
known as a "three-way handshake."
• This establishes the port number and beginning
sequence numbers from both sides of the
• 1.The requestor sends a packet specifying the port
number it plans to use and its initial sequence
number (ISN) to the server.
• 2.The server acknowledges with its ISN, which
consists of the requestor's ISN, plus 1.
• 3.The requestor acknowledges the
acknowledgement with the server's ISN, plus 1.
• To maintain a reliable connection, each packet
• A source and destination TCP port number.
• A sequence number for messages that must be
broken into smaller pieces.
• A checksum to ensure that information is sent
• An acknowledgement number that tells the
sending machine which pieces of the message
• TCP Sliding Windows.
• Protocol port numbers are used to reference the
location of a particular application or process on
• Applications and services can configure up to
• TCP/IP applications and services typically use the
first 1023 ports.
• The Internet Assigned Numbers Authority (IANA)
has assigned these as standard, or default, ports.
• Any client applications dynamically assign port
• A port and a node address together make up a
• Services and applications use sockets to establish
connections with another host.
• If applications need to guarantee the delivery of
data, the socket chooses the connection-oriented
• If the applications do not need to guarantee data
delivery, the socket chooses the connectionless
• A sliding window is used by TCP for transferring
data between hosts.
• It regulates how much information can be passed
over a TCP connection before the receiving host
must send an acknowledgement.
• A sliding window allows the sending computer to
transmit data in a stream without having to wait
for each packet to be acknowledged.
• This allows the receiving machine to receive
packets out of order and reorganize them while it
waits for more packets.
User Datagram Protocol (UDP)
• The UDP is a connectionless protocol.
• UDP is responsible for end-to-end transmission of
• It attempts to send the data and to verify that the
destination host actually receives the data.
• UDP is best used to send small amounts of data
for which guaranteed delivery is not required.
• While UDP uses ports, they are different from TCP
ports; therefore, they can use the same numbers
• Application layer connects applications to the
• It corresponds to the session, presentation, and
application layers of the OSI reference model
• Two application programming interfaces (APIs)
provide access to the TCP/IP transport protocols:
• Windows Sockets, and
Windows Sockets Interface
• Windows Sockets (WinSock) is a networking API
designed to facilitate communication among
different TCP/IP applications and protocol stacks.
• It was established so that applications using
TCP/IP could write to a standard interface.
• WinSock provides a common interface for the
applications and protocols that exist near the top
of the TCP/IP reference model.
• Any program written using the WinSock API can
communicate with any TCP/IP protocol and vice