Is Modbus compliant with the OSI Levels?

M

Thread Starter

Monica Calderon

Does anybody know if Modbus is compliant with the OSI Levels?
Thanks,

Monica

 
K

Kelvin Proctor

Modbus is sort of compatible with the OSI network model. The actual Modbus protocol (ignore the encapsulation on serial or over TCP) sould proabably be considered to be a transport layer protocol. It provides an error checked, handshake layer to trasport data.

In still not sure what you mean by the question and why you might want to know this.

Kelvin
 
L

Lynn A Linse

This is really a fuzzy question - is there anything working which is OSI compliant? Even TCP/IP can only be 'roughly' matched to ISO/OSI levels - and no doubt boxing matches would break out if the 'experts' tried to really define 'OSI Compliance'.

Modbus Application Message (the function code + parameters) would be an application level protocol which would be ABOVE the OSI App layer, so it really doesn't apply.

If you are asking about Modbus/RTU or other media-specific extensions to the basic app message, then this question applies more, but still doesn't have a very useful answer.
 
R

Ranjan Acharya

If you mean Modbus over Ethernet TCP/IP, then yes. It is just another application layer (as are PROFInet and EtherNet/IP). Ethernet TCP/IP,
however, requires a little bit of bending to meet the ISO OSI 7498. I have read lots of articles recently calling for an update of OSI since it was
originally drafted with older networking standards in mind. Layer 5 is particularly questionable as perhaps is Layer 6.

I have not really seen a bus yet that cannot be massaged into ISO OSI.

RA
 
C

Curt Wuollet

I agree that this adjustment is overdue. Since the meteoric rise of Ethernet, this has served only as a source of confusion and division. I remember great debates and even calls for Ethernet to be redone to match the standard. While standards are great, I see this as fairly unlikely in our lifetime. And since there are several orders of magnitude more "non-standard" installations than "standard" installations, perhaps it's time to reconcile the standard to reality. I have on several occasions heard folks remark that they were taught the seven layer model and have never really seen one since. That's not to say that the model isn't the more logical division of function merely that the de facto standard is doing better than the Ivory Tower standard and it helps if people are educated in the one that's in use. One is more than adequate to confuse those who don't live there every day. It's difficult to find a networking book that doesn't apologize for the success of Ethernet and explain why that shouldn't be. Any ubiquitous standard is better than a theoretical standard, rovided it's workable and universal and especially immutable and beyond manipulation. It's the only instance I've seen where entities have actually given up on trying to ruin it for their own puroposes. I would hope the various entites in this market follow suit.

Regards

cww
 
R

Ralph Mackiewicz

<p>The short answer to this question is: Yes, Modbus (in all its flavors) is compliant with the ISO Open Systems Interconnection (OSI) model. In fact, ALL data communications would be in compliance with this model. The confusion people seem to be having comes from a misunderstanding about what the OSI model is.

<p>The OSI model describes the functions that must be performed in order for application to application communications to take place. The
model breaks down all the functions of networking into 7 layers. The model does not dictate that you have separate protocols for each and every layer. It says (essentially), that if you don't have a separate protocol for each function then one of the other layers will have to do the function or the user of the system will have to do it.

<p>Does Modbus have a Presentation Layer?

<p>The answer: Modbus uses a NULL presentation layer.

<p>The functions performed by the presentation layer (data format translations) are not implemented in a Modbus protocol stack. Therefore, the user of the Modbus protocol must do their own data format translations. The lack of a presentation layer contributes to some of the difficulties that people have getting different Modbus implementations to work. Most people have said that these difficulties are an acceptable trade-off in view of the other benefits and functions that Modbus delivers.

<p>The same is true for the Session Layer (dialog management). User applications must be aware of dialog management when using Modbus. Any experienced Modbus developer is doing dialog management probably without realizing it.

<p>The point is that the functions are being performed one way or another. If the protocol stack does not implement the function directly, then some other mechanism is needed. Typically, these functions are done either in the application layer or by the user of the application layer.

<p>&gt; I agree that this adjustment is overdue. Since the meteoric rise of Ethernet, this has served only as a source of confusion and division. I remember great debates and even calls for Ethernet to be redone to match the standard. &lt;

<p>There is no need to change either standard. Ethernet fits into the OSI model perfectly at layer 2 (data link).

<p>&gt; I have on several occasions heard folks remark that they were taught the seven layer model and have never really seen one since. &lt;

<p>Then these folks weren't taught the seven layer model very well. I have yet to see a data comm system that does not fit into the 7 layer model. Here is the 7 layer model for Modbus/TCP and Modbus serial:

<pre>
Layer Modbus/TCP Modbus Serial
----- ---------- -------------
Physical 10/100BaseT RS-232C
DataLink 802.3/802.2 NULL
Network IP NULL
Transport TCP NULL
Session NULL NULL
Present. NULL NULL
Applic. Modbus/TCP Modbus
</pre>

<p>The lack of transport (reliable message delivery) is of particular note to Modbus serial link users. The applications have to take responsibility for ensuring proper end-to-end communications because there is no transport protocol doing it. That is why there are checksums in the application protocol.

<p>&gt; That's not to say that the model isn't the more logical division of function merely that the de facto standard is doing better than the Ivory Tower standard and it helps if people are educated in the one that's in use. &lt;

<p>In this case, the defacto standard and the Ivory Tower standard are one and the same.

<p>&gt; &gt; If you mean Modbus over Ethernet TCP/IP, then yes. It is just another application layer (as are PROFInet and EtherNet/IP). Ethernet TCP/IP, however, requires a little bit of bending to meet the ISO OSI 7498. I have read lots of articles recently calling for an update of OSI since it was originally drafted with older networking standards in mind. Layer 5 is particularly questionable as perhaps is Layer 6. &lt; &lt;

<p>Nothing questionable about them at all. The standard practice in the IA industry is that these functions are not normally codified into a
distinct protocol. These functions are normally put into the application layer or are assumed as a burden on the user of the application layer.

<p>Regards,<br>
Ralph Mackiewicz<br>
SISCO, Inc.
 
G

Greg Goodman

> In fact, ALL data communications would be in compliance with this model. The confusion people seem to be having comes from a misunderstanding about what the OSI model is. <

Yay, Ralph! Beautifully stated and elucidated.

The OSI 7-layer model is a model, not a specification. It provides a universally applicable vocabulary for discussing the functionality of a network implementation, without specifying how those functions are implemented. A particular protocol is neither "in compliance" or "not in compliance" with the model; it can simply be discussed in terms of the model.

The appropriate question with respect to Modbus and OSI (which Ralph and others have addressed) is "What layers of the OSI model does Modbus implement, and who/what is responsible for the layers it doesn't implement?"

Greg Goodman
Chiron Consulting
 
S

SOMOGYI Tibor

Thank you Ralph, it is very clear. My only notice is with regard to the above table: my understanding is that the CRC in version you call MODBUS Serial is a Data Link Layer element, thus I wouldn't say that in that case the Data Link Layer is NULL.

Best Regards
SOMOGYI Tibor
 
R

Ralph Mackiewicz

The Data Link Layer IS null for Modbus. Given that Modbus was developed about 10 years prior to the release of the ISO/OSI reference model I think it is safe to assume that the designers of
the Modbus protocol were not too worried about functional grouping of protocol elements and, therefore, stuck everything into a single
protocol. The chart above does not necessarily mean that none of these functions exist. It could mean that the functions are either done in the application layer or by the user of the application layer. Otherwise, the function cannot be implemented at all (such as the network layer function of interconnection of segments using only Modbus/RTU).

The important point to consider when evaluating protocols is that missing functions need to be provided somewhere. While it is not critical that data link functions be done independently from the other layers (the layer approach is just a model after all, not a specification for an implementation) it is critical that the function
be done somewhere (such as putting CRCs into the application layer protocol like Modbus). Typically, stuff is loaded into the application protocol or left to the user to deal with. There are subjective and objective reasons why it might be good or bad to have everything needed for end-to-end communications jammed into the application layer.

Regards,
Ralph Mackiewicz
SISCO, Inc.
 
P

Peter Whalley

Hi all,
TCP/IP (as defined by IETF) does not include any layer 1 protocols at all AFAIK. MAC and LLC are part of the ISO 8802 protocol suit and have no
direct relationship to TCP/IP. TCP/IP can run over the protocols within this suit but does not specifically need to. eg PPP over a dial up modem
link does not involve any 8802 suit protocols and has nothing to do with LLC and MAC.

Some examples of TCP/IP protocols at "unusual" layers are:

Layer 2: PPP - Point to Point Protocol

Layer 5: SSL - Secure Socket Layer

Layer 6: CMOT-CMIP Common Management Information Protocol over TCP/IP

Regards
Peter Whalley
Magenta Communications Pty Ltd
Melbourne, VIC, Australia
e-mail: peter*no-spam*@magentacomm.com.au
delete *no-spam* before sending
 
R

Ranjan Acharya

I think we went through this one before.

>From what I have read, the ISO OSI model needs a thorough re-working
>just to keep up with plain TCP/IP. I have never bothered to think
>about
it with Modbus.

TCP/IP is better handled as a 4 or 5-layer model (here is 5, some sources suggest that Physical and Network be handled as one layer):

Layer Example

5 Application <----------------> Application FTP, HTTP

4 Transport <----------------> Transport TCP/UDP

3 Internet <----------------> Internet IP
Network
2 Network <-------> <------> Network

1 Physical <-------> <-------> Physical Same as OSI

Host A Host B

Rather than the OSI seven layer model.

TCP/IP has problems with the Session Layer 5 and Presentation Layer 6 amongst other things. The datalink layer in the OSI model does not properly explain the role of MAC and LLC - it should be split in two. There are lots of web sites with detailed explanations of the shortcomings of OSI for TCP/IP.

I personally do not think the OSI model is of much use other than a teaching tool.

RA
 
P

Peter Whalley

Hi all,
TCP/IP (as defined by IETF) does not include any layer 1 protocols at all AFAIK. MAC and LLC are part of the ISO 8802 protocol suit and have no direct relationship to TCP/IP. TCP/IP can run over the protocols within this suit but does not specifically need to. eg PPP over a dial up modem link does not involve any 8802 suit protocols and has nothing to do with LLC and MAC.

Some examples of TCP/IP protocols at "unusual" layers are:

Layer 2: PPP - Point to Point Protocol

Layer 5: SSL - Secure Socket Layer

Layer 6: CMOT-CMIP Common Management Information Protocol over TCP/IP


Regards
Peter Whalley
Magenta Communications Pty Ltd
Melbourne, VIC, Australia
e-mail: peter*no-spam*@magentacomm.com.au
delete *no-spam* before sending
 
R

Ralph Mackiewicz

> TCP/IP is better handled as a 4 or 5-layer model (here is 5, some
> sources suggest that Physical and Network be handled as one layer):

I'm not sure that combining the physical and network layers into one layer that somehow then surrounds the data link layer is a very good
idea. The physical and network layers are so completely different in function and purpose.

I suppose you might have meant transport and network, not physical and network. I think that this defeats the purpose of having the model in the first place: to illustrate the functionality needed for end-to-end communications. Reliable message transfer (the purpose of transport) is quite different than the routing of messages to
interconnect segments (the purpose of network). Combining them into a single layer would not help clarify what is going on.

> The datalink layer in the OSI model does not properly explain the
> role of MAC and LLC - it should be split in two.

The predominant data link standard that is used is the IEEE 802 standards. These standards do split the datalink layer into 2 layers for a very good reason: to isolate the subfunction (logical link control - LLC) that the network layer has to deal with from the subfunctions (media access control - MAC) that are necessary for interfacing with physical media. This enables the IEEE 802.2 LLC to be used over several different MAC layers (802.3, 802.4, 802.5, etc.) without affecting the network layer. That was why it was split during
the development of these standards.

I think the model is detailed enough without specifying even more detail as evidenced by the fact that the IETF standards essentially put the presentation and session layer functionality into the application or user layers as it is.

> TCP/IP has problems with the Session Layer 5 and Presentation
> Layer 6 amongst other things...There are lots of web sites with
> detailed explanations of the shortcomings of OSI for TCP/IP.

TCP/IP doesn't really have "problems" with layers 5 (session) and 6 (presentation). TCP/IP ignores session and presentation and assumes that these function are either handled by the application layer, the user of the application layer, or can be ignored. The justification for this now is complex (given that TCP/IP was developed prior to the OSI model). I have seen the argument that presentation functionality is more appropriate as a natural byproduct of the implementation of
the application layer protocol (translating between the network representation of data and the local representation of data) and that the dialog management functions of session are better handled by the user of the application layer because they need to deal with dialog issues anyway.

Again, the model is useful to illustrate how the functions for end-to-end communications are constructed for a given implementation of a
protocol stack.

> I personally do not think the OSI model is of much use other than a
> teaching tool.

Exactly. That is its purpose. It is a model to illustrate how networks work and to assist in understanding how the differences in network architectures that utilize different protocols for the different layers can affect a system.

Regards,
Ralph Mackiewicz
SISCO, Inc.
 
Top