Connectivity:Overview
Understanding TCP/IP
TCP/IP, the ubiquitous network protocol, is actually a four layer suite of protocols and is well
worth gaining an understanding of. This month we explain UDP and TCP, the two protocols
used by applications. Continuing our four part article.
By Julian Moss
T
he link layer and network layer
other to some extent, though the pro
address will not be passed by a router
protocols of the TCP/IP suite,
tocol field is not available to the higher
on to the Internet.
which are concerned with the
level protocols. IP uses the protocol
Broadcasts can be targeted at spe
basic mechanics of transferring blocks
field to determine whether data should
cific networks. A UDP datagram with
of data across and between networks,
be passed to the UDP or TCP module.
the host and subnet part of the IP ad
are the foundations of TCP/IP. They
UDP or TCP use the port number to
dress set to all binary ones is broadcast
are used by the protocol stack itself, but
determine which application layer
to all the hosts on all the subnets of the
they are not used directly by applica
protocol should receive the data.
network which matches the net part of
tions that run over TCP/IP.
Although UDP isn't reliable, it is
the IP address. If only the host part (in
Now we'll look at the two protocols
still an appropriate choice for many
other words, all the bits that are zero in
that are used by applications: User
applications. It is used in real time ap
the subnet mask) is set to binary ones,
Datagram Protocol (UDP) and Trans
plications like Net audio and video
then the broadcast is restricted to all
mission Control Protocol (TCP).
where, if data is lost, it's better to do
the hosts on the subnet that matches
without it than send it again out of
the rest of the address.
User Datagram Protocol
sequence. It is also used by protocols
Multicasting is used to send data to
like the Simple Network Management
a group of hosts that choose to receive
The User Datagram Protocol is a
Protocol (SNMP).
it. A multicast UDP datagram has a
very simple protocol. It adds little to
destination IP address in which the
the basic functionality of IP. Like IP, it
Broadcasting
first four bits are 1110, giving ad
is an unreliable, connectionless proto
dresses in the range 224.x.x.x to
col. You do not need to establish a
UDP is suitable for broadcasting in
239.x.x.x. The remaining bits of the ad
connection with a host before exchang
formation, since it doesn't require a
dress are used to designate a multicast
ing data with it using UDP, and there
connection to be open before commu
group. This is rather like a radio or
is no mechanism for ensuring that data
nication can take place. On a network,
television
channel.
For
example,
sent is received.
receiving a broadcast is something
224.0.1.1 is used for the Network Time
A unit of data sent using UDP is
over which you have no choice. The
Protocol. If a TCP/IP application
called a datagram. UDP adds four 16
targets of a broadcast message are de
wants to receive multicast messages, it
bit header fields (8 bytes) to whatever
termined by the sender, and specified
must join the appropriate multicast
data is sent. These fields are: a length
in the destination IP address. A UDP
group, which it does by passing the
field, a checksum field, and source and
datagram with a destination IP ad
address of the group to the protocol
destination
port
numbers.
Port
dress
of
all
binary
ones
stack.
number , in this context, represents a
(255.255.255.255) will be received by
Multicasts are, in effect, filtered
software port, not a hardware port.
every host on the local network. Note
broadcasts. The multicaster does not
The concept of port numbers is
the word local: a datagram with this
address individual messages to each
common to both UDP and TCP. The
port numbers identify which protocol
module sent (or is to receive) the data.
Most protocols have standard ports
Once a connection has been made,
that are generally used for this. For
example, the Telnet protocol generally
data can be sent. TCP is a sliding window
uses port 23. The Simple Mail Transfer
Protocol (SMTP) uses port 25. The use
protocol, so there is no need to wait for
of standard port numbers makes it
possible for clients to communicate
one segment to be acknowledged before
with a server without first having to
establish which port to use.
another can be sent.
The port number and the protocol
field in the IP header duplicate each
Issue 88 (October 1997) page 13
File: C04100.5
PC Network Advisor
Next page >
New! The best sites for quality inkjet printer cartridges and the best sites for cheap inkjet cartridges