Introd To Internet Protocol
Introd To Internet Protocol
Introd To Internet Protocol
Winter 1999
Introduction to
Industrial Ethernet, Part 2.
Part 1 was featured in Issue 3,
Fall 1999. If you would like a copy,
please send your request to
info@ccontrol.com
EXTENSION
the
INTRODUCTION
The push to incorporate Industrial
Ethernet or even plain vanilla
Ethernet into control networks
implies that by making that choice
completes the selection process. As
mentioned in a previous article,
Ethernet II and IEEE 802.3 are
strictly data link layer technologies
which do not guarantee the delivery of messages over a network or
between networks. Protocol stacks
such as TCP/IP or SPX/IPX provide
that functionality and without them
Ethernet would be useless. With
the immense interest in the
Internet and the potential of attaching control networks to the
Internet, the protocol stack of
choice is TCP/IP because it provides the foundation for the
Internet. This article addresses
issues related to the IP portion of
the TCP/IP stack as it applies to
control networks.
Application
Presentation
Session
Transport
TELNET
FTP
SMTP
DNS
SNMP
DHCP
RIP
RTP
RTCP
Transmission
Control Protocol
User Diagram
Protocol
OSPF
ICMP
IGMP
Internet Protocol
Network
ARP
Data Link
Physical
Ethernet
ARCNET
to guarantee the delivery of messages. Above TCP is the application layer. The services of the
presentation and session layers of
the OSI Reference Model are incorporated into the application
layer. Therefore, the reference
model for TCP/IP-based systems
actually consists of only five
layers. Technologies such as
Ethernet II and IEEE 802.3 reside
at the lower data link and physical
layers of the same model.
DATA ENCAPSULATION
The data sent over wires is represented as frames. An Ethernet II
frame consists of a preamble,
source and destination addresses,
type field, data field and a frame
sequence check field. You can
Token Ring
FDDI
USER DATA
APPLICATION
APPL
HEADER
USER DATA
TCP
TCP
HEADER
APPLICATION DATA
TCP SEGMENT
IP
HEADER
TCP
HEADER
IP
APPLICATION DATA
ETHERNET
DRIVER
IP DATAGRAM
ETHERNET
HEADER
IP
HEADER
TCP
HEADER
APPLICATION DATA
ETHERNET
TRAILER
ETHERNET
ETHERNET FRAME
46 TO 1500 BYTES
IP ADDRESSING
The IP is responsible for source
and destination addresses and its
structure is defined in RFC 761.
IPv4 is the most common version
of addressing and it uses 32-bit ad-
Address
Identifier
Network Address
Host Address
First byte
Class A
0
Class B
10
Class C
110
Class D
1110
Class E
11110
Class A :
1-127
Class B :
128-191
Class C :
192-223
Class D :
224-239
Class E :
240-254
IP HEADER
IP transmits and receives datagrams. Within the datagram is a
header and the data portion of the
datagram. The minimum size of
the IP header is 20 bytes consisting of five 32-bit words. The first
three words provide control information while the remaining two
words provide address information. An optional field can follow
the address information. The information in the header is as follows:
Version: A four-bit field identifies
the IP version. A 4 identifies IPv4
while a 6 identifies IPv6.
three other bits to indicate precedence. These bits are set at higher
layers of the protocol stack and
are suggestions given the router.
This looks like a nice feature for
control networks since control networks require low delay and high
reliability. However, it is not clear
that routers even look at these
bits. It appears that this was a
feature with great promise but
never really implemented. This is
to be rectified in IPv6.
Total Length: The total length of
the datagram including the header
cannot exceed 65,535 bytes. This
16-bit field is for the datagram
itself and not the packet length in
the data link layer. If this datagram
is larger than the maximum packet
length that can be sent, the datagram will need to be fragmented
into manageable successive
packets. In this case the total
length field will represent the
length of the fragment sent and not
the length of the original datagram.
Datagram Identification: A
unique 16-bit identifier assigned by
the host will accompany the datagram. This is necessary in order for
the receiving host to reassemble
fragmented datagrams. All frag-
Vers
Hlen
Service Type
Identification
Time to Live
Flags
Protocol
Fragment Offset
Header Checksum
Source IP address
Destination IP address
IP Options (may be null)
Padding
DA
SA
Type
0800
CRC
ARP
As mentioned before, the IP routes
datagrams between source and
destination addresses in the form
of packets over a data link layer.
The data link does not understand
datagrams nor does it understand
IP addresses. It does know,
however, its own MAC address
and knows how to communicate
to other MAC addresses when told
to do so. Somehow we need to
inform each host what IP address
its MAC address or physical
address has been assigned and we
need to inform the same host all
the other physical address assignments on the local network in
order to have communication.
Usually the host IP address-physical address assignment is stored in
non-volatile memory or in a file.
Using a 32-bit DIP switch for assignment is not practical.
Sometimes a serial port on the
device is used for programming
the IP address but once programmed all other hosts on the
local network must still need to
learn the assignment.
The Address Resolution Protocol
(ARP) is used for learning physical
address assignments. ARP has its
own structure and does not use
that of IP. ARP directly communicates to the data link layer and,
therefore, must be aware of the
various types of network adapters
that are available.
www.ccontrol.com
6
SUMMARY
The IP is responsible for the endto-end delivery of datagrams over
an internet. It also provides host
and network addressing and the
means for fragmenting datagrams
into manageable packets. IP is a
routable protocol and much of its
REFERENCES
Illustrated TCP/IP, Matthew Naugle, 1998, Wiley Computer Publishing
Practical Networking With Ethernet, Charles E. Spurgeon, 1997,
International Thomsom Computer Press
International Standard ISO/IEC 8802-3 ANSI/IEEE std 802.3, 1996,
The Institute of Electrical and Electronic Engineers, Inc.
TCP/IP Clearly Explained, Pete Loshin, 1997, Academic Press
TCP/IP Illustrated, Volume 1, The Protocols, W. Richard Stevens, 1994,
Addison-Wesley Publishing Company