Professional Documents
Culture Documents
TCP/IP Protocol: Simatic Net
TCP/IP Protocol: Simatic Net
Contents Page
Development of TCP/IP.................................................................................................................. 2
Internet............................................................................................................................................ 4
Internet TCP/IP Documentation...................................................................................................... 8
TCP/IP Protocol Stack..................................................................................................................... 10
Features of IP................................................................................................................................. 15
IP Header Structure......................................................................................................................... 16
Internet Addresses.......................................................................................................................... 18
Fragmentation of an Internet Datagram........................................................................................... 19
ICMP Protocol................................................................................................................................. 21
ARP Protocol................................................................................................................................... 22
TCP Protocol................................................................................................................................... 23
TCP Addressing.............................................................................................................................. 24
TCP Header.................................................................................................................................... 25
Three-Way Handshake when Establishing a Transport Connection.............................................. 27
The TCP Acknowledgement Principle............................................................................................. 28
Flow Control in TCP........................................................................................................................ 29
Clearing Connections in TCP (Soft Release)................................................................................. 30
UDP Protocol................................................................................................................................... 31
UDP Header format......................................................................................................................... 32
RFC 1006........................................................................................................................................ 33
The Data Flow Problem................................................................................................................... 34
User Interfaces................................................................................................................................ 35
Why TCP with RFC 1006 as User Interface? ................................................................................. 36
RFC 1006 in Use............................................................................................................................. 37
ARPANET
ARPANET MILNET
TCP/IP -
Strictly Speaking
not a “Standard”
Development of The reason for the development of the TCP/IP protocols (Transfer Control
TCP/IP Protocol/Internet Protocol) was that for a long time there were no official
standards for integrating different types of computer into a network. At the
beginning of the seventies, the American Department of Defense (DoD)
instructed its Defense Advanced Research Projects Agency (DARPA) to develop
and define a communications protocol for data links and information interchange
in vendor-independent, heterogeneous computer networks.
The experimental platform for initial trials with the TCP/IP communications
protocol was provided by the packet-oriented ARPAnet wide area network. The
protocol specifications were defined in Requests for Comments (RFCs) and
subsequently published. The RFC documents are not official standards, but
because of their widespread acceptance in the world of data communications,
they have the status of an industrial standard.
Since then, TCP/IP has been used as the basis of many public and private
networks.
“UNIX at large”
One of the institutions involved in the development of TCP/IP was the University
of California, where the UNIX operating system was also developed at almost the
same time. An obvious step, therefore, was to integrate the TCP/IP
communications protocol into UNIX.
The fact that TCP/IP is part of the Berkeley UNIX BSD operating system (from
Version V4.2) and of a number of other UNIX implementations has made a large
contribution to the popularity of TCP/IP.
TCP/IP protocols are now extremely widespread in the world of data processing.
Since TCP/IP implementations for a wide variety of operating systems are now
available from many vendors throughout the world, these protocols are
automatically regarded as a communications standard today. The wide
acceptance and availability of the protocols enable the main communications
services (file transfer, mail services and terminal emulation) to be used in a
heterogeneous, vendor-independent environment between PCs, micros, minis
and mainframes.
TCP/IP is, however, most prominent today in the Net, the worldwide Internet
computer network. TCP/IP is used for handling all data communications in this
network.
The same applies to the new internal company Internets known as Intranets.
• Internet interconnection
LAN MAN
WAN Satellite
Problem Cooperation between the hardware and software within the network.
Internet Internet
physical
net
gateway
Hosts Hosts
"Freeway effect"
• E-Mail
Exchange of messages (from simple ASCII text up to multimedia documents) between individual
users.
• FTP
File copying/file transfer
Ideal for software distribution and online updates
• Newsgroups
Exchange of messages in discussion forums
Mailing Lists: Electronic distribution services, i.e. automatic distribution of e-mails between
discussion participants
Usenet Newsgroups: Discussion contributions and messages on electronic “bulletin boards” on
individual Usenet computers.
• Telnet
Remote control of other computers and use of computing power by opening a session on a remote
computer, usually by typing in a login name and a password (remote login).
• WWW
Originally developed at the CERN nuclear research center in Geneva. The WWW is based on
hypertext. Hypertext is a special method of presenting information. Selected words in a text can be
links leading to further texts, files, graphics or even sounds, which give a more detailed
explanation of the original word. You can repeat the process as often as you like and find out more
and more about a subject. By using hypertext links to move from one document to another you
can "surf" through the network.
To read hypertext you need a Web client or hypertext reader. These are also known as Web
browsers. The best known browsers are "Netscape Navigator", "MS-Internet Explorer" and (at
present) "SPRY Mosaic"
• Voice over IP
A single company network for data, voice and fax transmission
• Internet Phone
Making telephone calls and sending faxes via the Internet.
Currently the most controversial technology in the field of telecommunications
Internet
Worldwide computer network in which the TCP/IP protocol family is used
for communication.
Intranet
Use of the established Internet technology for a limited set of users, e.g.
the employees of a company in an internal company network.
An intranet can be connected to the Internet - protected or shielded by a
"firewall".
Extranet
Area of the Internet where access is controlled by a login name and
password, e.g. for customers and field service personnel of a company.
• Protocol specifications
• Articles
• New ideas, suggestions, improvements
MIL-STD Some of the Internet protocols have also become US military standards.
These standards must be adhered to for DoD contracts.
Proposal
Submission to IETF
Experimental or
informal
Proposed Standard
Draft Standard
Full Standard
• Request to the IETF Internet Engineering Task Force to submit proposals on a topic
The proposals are discussed by the IETF
• The discussion is steered by the IESG Internet Engineering Steering Group.
• A proposal that is to be discussed as a Proposed Standard must be consistent, stable, easy to
understand, and, especially, useful.
The majority of those taking part in the discussion must accept the Proposed Standard.
• If at least two implementations using a Proposed Standard exist, it can advance to a Draft
Standard after 6 months.
• If the Draft Standard is accepted in further discussions and in practical tests, it can become a Full
Standard after a further 6 months.
7
TFTP SMTP
6 TELNET
FTP SNMP
5 DNS
4
TCP UDP
3 ICMP
IP
ARP RARP
2
Subnet
1
Standard
Applications
DNS Domain Name Service (RFC 1032, RFC 1034, RFC 1035)
Protocol that assigns the names of addressable objects, e.g. host computers, to
addresses throughout a network. This was preceded by the NSP Name Service
Protocol, described in IEN 116.
7
rcp remsh
6 rlogin
rsh
5
4
TCP UDP
3 ICMP
IP
ARP RARP
2
Subnet
1
Standard Applications
Berkeley r Utilities
7
arp netstat rdist rwho
6
finger ping talk
5 ruptime
4
TCP UDP
3 ICMP
IP
ARP RARP
2
Subnet
1
Information and
Test Programs
finger Display of information on a user, e.g. time last post arrived. No information about
other systems.
netstat Information about the current status of the local TCP/IP system. Important aid for
the network manager.
ruptime Displays a status line for each computer in the local network. Like an extension of
the UNIX uptime command for use in networks.
rwho Like who, but also displays the registered users of remote computers.
talk Communication with another user at a remote computer or on the local computer.
Terminal lines are copied to the partner.
7
TELNET
6
TFTP
5
4
TCP UDP
3 ICMP
IP
ARP RARP
2
Subnet
1
Internet
Protocol Group
7
TELNET
6
TFTP
5
4
TCP UDP
3 ICMP
IP
ARP RARP
2
Subnet
1
Internet
Protocol Group
Note IP does not check for correct data transfer, or provide acknowledgements or error
correction mechanisms.
0 31
Version
Version IHL Type of Service Total Length
Physical Header
Version
Identification Flags Fragment Offset Link Header
Version Data
Options
Version Trailer
Options Padding
Header Structure
Total Length Total length (IP header plus data) of an Internet datagram, in bytes.
Fragment Offset When an Internet datagram is fragmented, the position of the fragment within the
datagram is specified here in 8-byte units. The first fragment, or a non-
fragmented datagram has the offset value 0.
0 31
Version
Version IHL Type of Service Total Length
Physical Header
Version
Identification Flags Fragment Offset Link Header
Version Data
Options
Version Trailer
Options Padding
Time to Live Time to Live specifies the maximum length of the life of a datagram in seconds.
Each time the datagram is processed (e.g. in an Internet gateway) this value
must be decremented by at least one.
Header Checksum IP-specific checksum which explicitly ensures the correctness of the Internet
header.
Example:
The Internet address 220.255.8.209 corresponds to the hexadecimal sequence
H = DC FF 08 D1.
Options Other optional network information can also be specified in the IP header.
Options are identified by the relevant option ID.
Examples of options:
“Loose Source and Record Route”
“Strict Source and Record Route”
etc.
Padding If the list of options does not end at the end of a 32-bit word, the rest of the IP
header is padded with zeros.
b31 b0
Version
10 Subnet Station address
Note The network with the number 127 cannot be used (loopback interface of the IP
implementation).
Host IDs with all the bits set to 0 or 1 are reserved for special functions, e.g.
broadcasting, and must not be used.
Data
Data
Fragmentation
What is the Purpose In some cases, an Internet datagram may be too big to transmit on a subnet.
of Fragmentation?
It must therefore be fragmented, i.e. split into smaller units, before it can be
transmitted any further.
Reassembly The receiver of datagram fragments puts them back together to make one whole
datagram (reassembly).
The entry in the Identification field indicates which fragments belong to which
datagram.
The entry in the Fragment Offset field ensures that the fragments are put
together in the correct order.
+
Ver = 4 IHL = 5 Type of Service Total Length = 216
Identification = 111 FI = 0 Fragment Offset = 32
Time = 119 Protocol = 6 Header Checksum
Source Address
Destination Address
Data
Data
Internet Control In every network errors occur now and again that need to be reported to
Message Protocol those affected or those responsible. This task is performed by ICMP.
(ICMP) ICMP is part of every IP implementation.
ARP With ARP a system-internal table containing the assignment of the physical
addresses (Ethernet addresses) to the IP addresses is dynamically created.
An entry is made in the table with the enquiry above when a communication
request is issued to a partner system for which there is no entry in the ARP table.
To keep the address assignments dynamic, the entries are normally deleted after
a certain length of time.
RARP In addition to ARP there is also RARP (Reverse Address Resolution Protocol),
which, for example, enables a computer with no hard disk of its own, which has
to load its operating system via the network, to find out the IP address for its
Ethernet address.
... installs logical (virtual) full duplex connections between two end
stations
(connection-oriented end to end protocol).
Once established, TCP transport connections always operate in full duplex mode.
Each station at the end of a connection is in principle entitled to send data at any
time.
Flow control and error detection and correction mechanisms ensure optimum,
accurate data transport.
T C P
Internet
addresses
I P
Socket
=
Port
+
Internet address
Addressing Concept
Addressing TCP supports the addressing of different applications in the local system.
Applications are:
- Standard services such as file transfer (e.g.: FTP), electronic mail
(e.g.: SMTP), etc.
- Vendor-specific applications (e.g.: NFS from SUN)
- Other user programs
Port The various applications are addressed using ports. Ports are unique local 16-bit
addresses.
It has become the accepted practice to use the same port number in every
system for certain standard applications (“Well Known Ports”):
Socket The combination of port + Internet address is called a Socket. Each socket is
therefore unique within a network.
b0 b31
Version
Source Port Destination Port
Physical Header
Version
Link Header
Sequence Number
Network Header
Version Transport Header
Acknowledgment Number
Session Header
Version U A P R S F Presentation Header
Data Reserved R C S Y Window
Offset
G K H S N I Application Header
N
Version T
Checksum Urgent Pointer Data
Version Trailer
Options Padding
Header Structure
Sequence Number In TCP each byte to be sent is given a number. The Sequence Number is
normally the number of the first data byte in the TCP segment after the TCP
header.
Caution: The SYN and FIN bits count as bytes if they are set.
Acknowledgement This field contains the next sequence number expected from the partner.
Number
b0 b31
Version
Source Port Destination Port
Physical Header
Version
Link Header
Sequence Number
Network Header
Version Transport Header
Acknowledgment Number
Session Header
Version U A P R S F Presentation Header
Data Reserved R C S Y Window
Offset
G K H S N I Application Header
N
Version T
Checksum Urgent Pointer Data
Version Trailer
Options Padding
Window This field contains the maximum number of bytes the partner can still send.
Urgent Pointer When sending expedited data, it must immediately follow the TCP header.
Time
out
(Seq = 151; Ack = 601; 200 bytes)
..
.
(Seq = 601; Ack = 676; 50 bytes)
UDP Unlike TCP, operation with UDP is connectionless and without integrity
precautions or flow control. UDP does, however, provide the multiplexing
function, like TCP, with port numbers assigned to user processes.
UDP is simple and its protocol overhead is minimal, which makes it highly
suitable for applications where speed is of the essence, e.g. NFS (Network File
System).
The only features UDP offers in addition to those of IP are the port numbers and
a data checksum.
b0 b31
Data
Provides the transport service user with the same interface in a TCP/IP
environment as in an ISO/OSI environment
Model
TS user TS user
100
100bytes
bytes 50
50bytes
bytes
100
100bytes 200 200
200bytes
bytes 200bytes
bytes bytes
200
200bytes 220
220bytes 50 100
100bytes
bytes bytes 50bytes
bytes bytes
50
50bytes
bytes 130
130bytes
bytes
RFC
RFC1006
1006 RFC
RFC1006
1006
TCP/IP
TCP/IP TCP/IP
TCP/IP TCP/IP
TCP/IP TCP/IP
TCP/IP
Ethernet Ethernet
Input blocks = Input blocks =
Output blocks Output blocks
User
Userinterfaces
interfaces Optimized functions
for transparent
access to PLC data
S7
S7functions
functions
Send
Send/ /Receive
Receive
TCP with RFC
UDP: For simple 1006:
data transmission RFC1006 For simple, reliable
without data transmission
acknowledgement UDP TCP via logical links
IP
Data Link Layer
Physical Layer
Advantages:
Open standard (IETF STD 35)
Block transfer in the correct sequence with variable frame
lengths
Identical interface for ISO/OSI and TCP/IP communication!
(S7 functions and SEND/RECEIVE)
Identical handling for ISO/OSI and TCP/IP communication,
handling already familiar!
Requirement:
There must be an RFC 1006 block at both ends of the
communication link