Professional Documents
Culture Documents
OVERVIEW OF TCP/IP
TCP/IP and the Internet
Data Communications Model
NETWORKING
Most computers are used more for communication
than computation.
At many sites— perhaps even the majority— we
b and email access are the primary uses of com
puters.
As of 2010, internetworldstats.com estimates t
he Internet to have nearly 1.5 billion users,
or more than 21% of the world’s population.
INTERNET
In 1983, the old ARPAnet was divided into MIL
NET, part of the Defense Data Network (DDN); a
nd a new, smaller ARPAnet.
"Internet" was used to refer to the entire net
work: MILNET plus ARPAnet.
NSFNET
In 1985, the National Science Foundation (NSF)
created NSFNet and connected it to the then-ex
isting Internet.
NSF wanted to extend the network to every scie
ntist and engineer in the United States.
To accomplish this, in 1987, NSF created a new
, faster backbone and a three-tiered network t
opology that included the backbone, regional n
etworks, and local networks.
In 1990, the ARPAnet formally faded out of ex
istence, and in 1995, the NSFNet ceased its ro
le as a primary Internet backbone network.
INTRANETS
Growth of the Internet spurred interest in TC
P/IP.
The Internet protocols are often used for loca
l area networking even when the local network
is not connected to the Internet.
TCP/IP is also widely used to build enterpris
e networks.
TCP/IP-based enterprise networks that use Int
ernet techniques and web tools to disseminate
internal corporate information are called intr
anets.
TCP/IP FEATURES
1. Open protocol standards, freely availabl
e and developed independently from any s
pecific computer hardware or operating s
ystem.
2. Independent from specific physical netwo
rk hardware
This allows TCP/IP to integrate many differen
t kinds of networks.
TCP/IP can be run over an Ethernet, a DSL con
nection, a dial-up line, an optical network,
and virtually any other kind of physical tran
smission medium.
Introduction to TCPIP Networking under Linux
Topic 02,p.12
©VTC 2012
Technical Support Fundamentals (ITP 4107)
TCP/IP FEATURES
3. A common addressing scheme - allows any TCP/
IP device to uniquely address any other devi
ce in the entire network, even if the networ
k is as large as the worldwide Internet.
4. Standardized high-level protocols for consis
tent, widely available user services.
PROTOCOL
Protocol is a set of formal rules of behavior.
Diplomatic protocols aim to minimize misunderstan
dings.
When computers communicate, it is necessary to de
fine a set of rules to govern their communication
s.
In data communications, a set of rules for a spec
ific communication (e.g. email) is called a proto
col.
TCP/IP is a protocol “suite,” a set of network
protocols designed to work smoothly together. It
includes several components, each defined by a st
andards-track RFC or series of RFCs.
Introduction to TCPIP Networking under Linux
Topic 02,p.14
©VTC 2012
Technical Support Fundamentals (ITP 4107)
ENCAPSULATION
Data is passed down the TCP/IP stack when it is
being sent to the network, and up the stack whe
n it is being received from the network.
Each layer in the stack adds control informatio
n to ensure proper delivery.
This control information is called a header bec
ause it is placed in front of the data to be tr
ansmitted.
Each layer treats all the information it receiv
es from the layer above as data, and places its
own header in front of that information.
The addition of delivery information at every l
ayer is called encapsulation.
Introduction to TCPIP Networking under Linux
Topic 02,p.21
©VTC 2012
Technical Support Fundamentals (ITP 4107)
ENCAPSULATION
2. INTERNET LAYER
Internet Protocol (IP) is the most important protocol
in this layer.
The release of IP used in the current Internet is IP
version 4 (IPv4), which is defined in RFC 791.
More recent versions of IP
IP version 5 is an experimental Stream Transport (ST)
protocol used for real-time data delivery.
IPv5 never came into operational use.
IPv6 is an IP standard that provides greatly expanded
addressing capacity.
Because IPv6 uses a completely different address structur
e, it is not interoperable with IPv4.
While IPv6 is a standard version of IP, it is not yet wid
ely used in operational, commercial networks.
Since our focus is on practical, operational networks
, we only concentrate on IPv4.
CHARACTERISTICS OF IP
IP is a connectionless protocol.
This means that it does not exchange control info
rmation (called a "handshake") to establish an en
d-to-end connection before transmitting data.
In contrast, a connection-oriented protocol excha
nges control information with the remote system t
o verify that it is ready to receive data before
any data is sent. When the handshaking is success
ful, the systems are said to have established a c
onnection.
Internet Protocol relies on protocols in oth
er layers above to establish the connection
if they require connection-oriented service.
CHARACTERISTICS OF IP
IP also relies on protocols in the other layers
to provide error detection and error recovery.
Internet Protocol is sometimes called an unreli
able protocol because it contains no error dete
ction and recovery code.
This is not to say that the protocol cannot be relied
on; quite the contrary, IP can be relied upon to accu
rately deliver data to the connected network, but it
doesn't check whether that data was correctly receive
d at the remote host.
Protocols in other layers of the TCP/IP archite
cture provide this checking when it is required
.
DATAGRAM
The TCP/IP protocols were built to transmit data
over the ARPAnet, which was a packet-switching n
etwork.
A packet is a block of data that carries with it
the control information necessary to deliver it,
similar to a postal letter, which has an address
written on its envelope.
A packet-switching network uses the addressing i
nformation in the packets to switch packets from
one physical network to another, moving them tow
ard their final destination. Each packet travels
the network independently of any other packet.
IP DATAGRAM FORMAT
Header Length, this is the length of the IP header in multiples of 4 bytes.
DELIVERY OF DATAGRAMS
If the Destination Address is the address of a
host on the local network, the packet is delive
red directly to the destination.
If the Destination Address is not on the local
network, the packet is passed to a gateway for
delivery.
Gateways are devices that switch packets betwee
n different physical networks.
Deciding which gateway to use is called routing
.
IP makes the routing decision for each individu
al packet.
ROUTERS VS GATEWAYS
Internet gateways are commonly (and perhaps m
ore accurately) referred to as IP routers bec
ause they use Internet Protocol to route pack
ets between networks.
Strictly speaking, a gateway moves data betwe
en different protocols, and a router moves da
ta between different networks.
So a system that moves email between TCP/IP a
nd X.400 is a gateway, but a traditional IP g
ateway is a router.
At one time X.400 was expected to be the predominant form of email, bu
t this role has been taken by the SMTP-based Internet e-mail .
Introduction to TCPIP Networking under Linux
Topic 02,p.33
©VTC 2012
Technical Support Fundamentals (ITP 4107)
The hosts (or end systems) process packets through all four protocol layers, while
the gateways (or intermediate systems) process the packets only up to the Internet
Layer where the routing decisions are made.
FRAGMENTATION OF DATAGRAMS
As a datagram is routed through different networ
ks, it may be necessary to divide the datagram i
nto smaller pieces.
A datagram received from one network may be too lar
ge to be transmitted in a single packet on a differ
ent network.
The size of packets on a network may be limited bot
h by hardware specifications and by protocol conven
tions.
This condition occurs only when a gateway or rou
ter interconnects dissimilar physical networks o
r protocols
Introduction to TCPIP Networking under Linux
Topic 02,p.36
©VTC 2012
Technical Support Fundamentals (ITP 4107)
DATAGRAM FRAGMENT
has a "More Fragments" bit that tells tells which piece of
identifies
IP if it has assembled all of the the datagram is this
which
datagram fragments fragment
datagram
that this
fragment
belongs to
ICMP FUNCTIONS
1. Flow control
When datagrams arrive too fast for processing,
the destination host or an intermediate gateway
sends an ICMP Source Quench Message back to the
sender. This tells the source to stop sending d
atagrams temporarily.
host
(1) IP datagram
(2) IP datagram
R1 R2
Final
Introduction to TCPIP Networking under Linux
destination
Topic 02,p.42
©VTC 2012
Technical Support Fundamentals (ITP 4107)
“Echo messages"
type=8 : ICMP echo request
messages,
type=0 : ICMP echo reply
message
3. TRANSPORT LAYER
The two most important protocols in the Transport L
ayer are Transmission Control Protocol (TCP) and Us
er Datagram Protocol (UDP).
TCP provides reliable data delivery service with en
d-to-end error detection and correction.
UDP provides low-overhead, connectionless datagram
delivery service.
Both protocols deliver data between the Application
Layer and the Internet Layer.
Applications programmers can choose whichever servi
ce is more appropriate for their specific applicati
ons.
Introduction to TCPIP Networking under Linux
Topic 02,p.45
©VTC 2012
Technical Support Fundamentals (ITP 4107)
Indicate control
functions
HANDSHAKE IN TCP
TCP is connection-oriented. It establish
es a logical end-to-end connection betwe
en the two communicating hosts.
Control information, called a handshake, is e
xchanged between the two endpoints to establi
sh a channel before data is transmitted.
TCP indicates the control function of a
segment by setting the appropriate bit i
n the Flags field in word 4 of the segme
nt header.
THREE-WAY HANDSHAKE
Host A begins the connection
by sending host B a segment w
ith the "Synchronize sequence
numbers" (SYN) bit set.
This segment tells host B tha
t A wishes to set up a connec
tion, and it tells B what seq
uence number host A will use
as a starting number for its
segments. (Sequence numbers a
re used to keep data in the p
roper order.)
Host B responds to A with a s
egment that has the "Acknowle
dgment" (ACK) and SYN bits se
t.
B's segment acknowledges the
receipt of A's segment, and i
nforms A which sequence numbe
r host B will start with.
Finally, host A sends a segme
nt that acknowledges receipt
of B's segment, and transfers
the first actual data.
WINDOW IN TCP
The Window field contains the window, or the num
ber of bytes the remote end is able to accept.
If the receiver is capable of accepting 6000 mor
e bytes, the window would be 6000.
The window indicates to the sender that it can c
ontinue sending segments as long as the total nu
mber of bytes that it sends is smaller than the
window of bytes that the receiver can accept.
The receiver controls the flow of bytes from the
sender by changing the size of the window. A zer
o window tells the sender to cease transmission
until it receives a non-zero window value.
The sender has received no acknowledgment for the bytes from 2001 on, but
continues sending data as long as it is within the window. If the sender fills the
window and receives no acknowledgment of the data previously sent, it will, after an
appropriate timeout, send the data again starting from the first unacknowledged byte.
That is, re-transmission would start from byte 2001 if no further acknowledgments
are received. This procedure ensures that data is reliably received at the far end of
the network.
PORT NUMBER
TCP is also responsible for delivering data rec
eived from IP to the correct application.
The application that the data is bound for is i
dentified by a 16-bit number called the port nu
mber.
The Source Port and Destination Port are contai
ned in the first word of the segment header.
Correctly passing data to and from the Applicat
ion Layer is an important part of what the Tran
sport Layer services do.
4. APPLICATION LAYER
The most widely known and implemented applications protoc
ols are:
TELNET (23)
The Network Terminal Protocol, which provides remote lo
gin over the network.
FTP (20-data, 21-control)
The File Transfer Protocol, which is used for interacti
ve file transfer.
SMTP (25)
The Simple Mail Transfer Protocol, which delivers elect
ronic mail.
HTTP (80)
The Hypertext Transfer Protocol, which delivers web pag
es over the network.
Introduction to TCPIP Networking under Linux
Topic 02,p.59
©VTC 2012
Technical Support Fundamentals (ITP 4107)
SUMMARY
In this overview, we discussed the struct
ure of TCP/IP, the protocol suite upon wh
ich the Internet is built.
We have seen that TCP/IP is a hierarchy o
f four layers: Applications, Transport, I
nternet, and Network Access.
We have examined the function of each of
these layers.