Applet class - Websupport1
Download
Report
Transcript Applet class - Websupport1
What Is TCP/IP?
The large collection of networking protocols and services
called TCP/IP denotes far more than the combination of the
two key protocols that gives this collection its name
These protocols deserve an initial introduction:
Transmission Control Protocol, or TCP, handles reliable
delivery for messages of arbitrary size, and defines a
robust delivery mechanism for all kinds of data across a
network
The Internet Protocol, or IP, manages the routing of
network transmissions from sender to receiver, along with
issues related to network and computer addresses, and
much more
OSI Network
Reference Model Overview
This model is a network reference model, but is
formally known as the International Standards
Organization Open Systems Interconnection
network reference model, sometimes called the
ISO/OSI network reference model
Governed by ISO standard 7498, the ISO/OSI
network reference model, or reference model was
developed as part of an international standards
initiative in the 1980s that was supposed to usher
in a new and improved suite of protocols
specifically designed to replace TCP/IP
Models Break Networking into
Layers
The reference model’s value lies in its ability to
break a big technical problem into a series of
interconnected and interrelated sub-problems, and
then solve each sub-problem individually
Computer scientists call this approach divide and
conquer
A divide and conquer approach permits concerns
related to networking hardware to be completely
separated from those related to networking
software
The ISO/OSI Network Reference
Model
The reference
model described
in OSI Standard
7498 breaks
network
communication
into seven
layers, as
follows (named
from the top
down, as
illustrated in
Figure 1-1
How Protocol Layers Behave
Because this stack-like structure so accurately depicts how
many networking protocol suites are implemented—
including TCP/IP—it is common to talk about the
components of hardware and software that map into this
model as a protocol stack when implemented on a specific
computer
On a Windows computer, the network interface card (NIC),
the driver that permits the operating system to “talk” to the
NIC, and the various software components that make up
TCP/IP’s other layers, may be called a protocol stack, or
more accurately, the TCP/IP protocol stack for that
machine
IPv4: Internet Protocol, version 4.
We often denote just as IP.
It has been the workhorse protocol of the
internet protocol suite since the early 1980s
It uses 32-bit addresses
IPv4 provides the packet delivery service
ftp, TCP, UDP, ICMP and IGMP
IPv6: Internet protocol, version 6
Designed in the mid-1990s as replacement
for Ipv4
Major change is a larger address to deal
with the explosive growth of the internet in
the 1990s.
Provides packet delivery service for TCP,
UDP, and ICMPv6
Socket structure
IPv6
IPv4
sockaddr_in
sockaddr_in6
length AF_INET
16 bit port #
length AF_INET
16 bit port #
32-bit
IPv4 address
32-bit
Flow label
unused
128-bit
IPv6 address
Port numbers
At any given time, multiple processes can
use either UDP or TCP. Both TCP and UDP
use 16-bit integer port numbers to
differentiate between these processes.
When client want to contact a server, the
client must identify the server with which it
wants to communicate.
Well-known ports
0 through 1023
These port numbers are controlled and
assigned by the INAN(Internet assigned
Numbers Authority)
For example, port 80 is assigned for web
server, 21 is assigned for ftp server
Registered ports:
1024 through 49151
These are not controlled by IANA, but
IANA registeres and lists the uses of these
ports as a convenience to the community
For example 6000 through 6063 are
assigned for an X window server
Dynamic or private
49152 through 65535
IANA say nothing about these ports
We call these ports ephemeral ports
That is short lived port. These port numbers are
normally assigned automatically by TCP or UDP
to the client
Clients normally do not care about the value
It just need to be unique that YCP and UDP codes
guarantee this uniqueness
Client Server Model and
Software Design
TCP/IP allows a programmer to establish
communication between two application
and to pass data back and forth.
Application can execute on the same
machine or on different machines.
One organizational method dominates the
use of TCP/IP is known as the client-server
paradigm.
Terminology and concept
Client: an application that initiates peer-topeer communication is called client
Each time a client application executes, it
contacts a server, sends a request, and
awaits a response.
Clients are often easier to build than
servers, and usually require no special
system privileges to operate
Server: is any program that waits for incoming
communication requests from a client. The server
receives a client’s request, performs the necessary
computation, and returns the result to the client.
Privilege and complexity
Servers must contain code that handles the issues
of: Authentication, Authorization, data security,
privacy and protection
Parameterization of Clients
Some client software provides more
generality than others. In particular, some
client software allows the user to specify
both remote machine on which a server
operates and the protocol port number at
which the server is listening.
Connectionless vs. connection-oriented servers
When programmers design client-server software,
they must choose between two types of
interaction: a connectionless or a connectionoriented style.
TCP – connection-oriented. It provides all the
reliability needed to communicate across an
internet.
Verifies data arrives, automatically retransmits
Compute checksum over data.
Automatically delete duplicated package
UDP – User datagram protocol.connectionless. No
guarantees about reliable delivery.