and a data portion that contains the message that the source
wants to transmit to the destination. In a local network, an IP
datagram can travel in the data field of an Ethernet frame.
Many Internet communications also use TCP. An
important feature of TCP is support for the handshaking
that enables the sender to verify that the destination has
received a message. TCP also enables the sending
computer to provide an error-checking value for the message
and to name a port that will receive the message on the
destination computer. Applications that don’t require
TCP’s handshaking may use UDP — a simpler protocol
that can be useful for systems with limited resources.
A TCP segment or UDP datagram travels in the data
portion of an IP datagram. The data area of the TCP
segment or UDP datagram contains the message the
source wants to pass to the destination.
To use a PC to communicate with a device that uses
TCP or UDP, you can use just about any programming
language. In Visual Basic .NET, you can use the
System.Net.Sockets namespace or the UdpClient or
TcpClient classes. Listing 1 shows some example code for
TCP communications. Visual Basic 6 supports TCP and
The Internet Protocol Gets an Upgrade
For a couple of decades, Version 4 of Internet Protocol (IPv4)
has been the workhorse that has helped get messages to their
destinations on the Internet, but Version 6 (IPv6) is now making its
way into networking components and will eventually replace IPv4.
Probably the biggest motivation for change was the need for more IP
addresses, but IPv6 has other useful enhancements, as well, including
support for auto-configuring, the ability to request real time data
transfers, and improved security options.
Where to Find IPv6
In the world of desktop computers, recent versions of
Windows, OS X, and Linux all support IPv6. For microcontrollers,
Dallas Semiconductor’s runtime environment for TINI modules
supports IPv6 addressing.
If you don’t need IPv6’s benefits, upgrading isn’t likely to be
required any time soon. For the near future, routers that support
IPv6 will continue to support IPv4, converting between protocols as
Increasing the Address Space
IPv6 vastly increases the number of IP addresses available to
computers on the Internet.
An IPv4 address is 32 bits. IPv6 addresses are 128 bits, allowing
over 300,000,000,000,000,000,000,000 (that’s 300 sextillion) values.
Using this many bits may seem like overkill, bit IPv6’s creators
wanted to be very, very sure that the Internet wouldn’t run out of
addresses for a very long time. Having plenty of bits to work with
also makes it easier to create routing domains, which enable a router
to store a value that indicates where to send traffic destined for
addresses in a defined group. Routing domains allow simpler routing
tables and more efficient traffic routing.
An IPv4 address is usually expressed as four decimal numbers
separated by periods:
Each decimal number represents one of the four bytes in the
IPv6 addresses are written as 16-bit hexadecimal values,
separated by colons. The IPv4 address above translates to this:
A double colon can replace a series of 16-bit zero values:
(An address can have no more than one double colon.)
It’s also acceptable to express an IPv4 address converted to
IPv6 using decimal values instead of hexadecimal:
Even if you don’t need IPv6’s addressing, other additions to the
protocol can make a switch worthwhile.
Stateless Autoconfiguration frees users and administrators from
having to enter IP addresses manually. A computer can generate
its own IP address and discover the address of a router without
requiring a human to enter the information or requiring the computer
to request the information from a server.
Autoconfiguring is especially handy for mobile devices that
move around, possibly connecting to a different network each time
the device powers up.
IPv6 also adds security features. Two new headers are the
Authentication header and the Encapsulating Security Payload (ESP)
header. The Authentication header enables a computer to verify who
sent a packet, find out if data was modified in transit, and protect
against replay attacks, where a hacker gains access to a system by
capturing and resending packets. The ESP header and trailer provide
security for the data payload, including support for encryption.
Every IPv6 header also includes a Flow Label that can help real
time data get to its destination on time.A value in the Flow Label can
indicate that a packet is one in a sequence of packets traveling
between a source and destination. A source can request priority or
other special handling for packets in a flow as they pass through intermediate routers. To find out more about IPv6, some good sources are:
Internet Protocol,Version 6 (IPv6) Specification
The document that defines IPv6.
Information and links.
IP Version 6 (IPv6)
An introduction to IPv6 and many links.