A Big Test Result - Knowledge Systems Institute

download report

Transcript A Big Test Result - Knowledge Systems Institute

Introduction to Computer
Networks
TCP/IP
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
environment.
• TCP/IP provides a routable, enterprise networking
protocol and access to the Internet and its
resources.
• 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
suite include:
• 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
architecture
TCP/IP Standards
• 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
four layers:
• Application
• Transport
• Internet
• Network interface
(Link)
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
Internet layer.
Internet Layer
• The Internet layer, corresponds to the network layer
of the OSI reference model.
• It uses several protocols for routing and delivering
packets.
• 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
receipt.
• IP is responsible for packet assembly and
disassembly
• 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.
ANDing
• 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
(RARP)
• 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
(ICMP)
• 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.
Transport Layer
• 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.
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
is transferred.
• 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
transmission.
Three-way Handshake.
• 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.
Reliable Connection
• To maintain a reliable connection, each packet
must contain:
• 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
without error.
• An acknowledgement number that tells the
sending machine which pieces of the message
have arrived.
• TCP Sliding Windows.
Ports
• Protocol port numbers are used to reference the
location of a particular application or process on
each machine
• Applications and services can configure up to
65,536 ports.
• 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
Sockets
• A port and a node address together make up a
socket.
• 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
service (TCP).
• If the applications do not need to guarantee data
delivery, the socket chooses the connectionless
service (UDP).
Sliding Windows
• 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
data.
• 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
without interference.
Application Layer
• Application layer connects applications to the
network.
• 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
• NetBIOS.
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
versa.