A Comparison of the OSI and TCP/IP Reference Models
2014-01-02 19:35
441 查看
The OSI and TCP/IP reference models have much in common. Both are based on the concept of a stack of independent protocols. Also, the functionality of the layers is
roughly similar. Despite these fundamental similarities, the two models also have many differences. It is important to note that we comparing the reference models here, not the corresponding
protocols stacks.
Three concepts are central to the OSI model:
1. Services.
2. Interfaces.
3. Protocols.
Probably the biggest contribution of the OSI model is that it makes the distinction between these three concepts explicit. Each layer performs some services for the layer
above it. The service definition tells what the layer does, not how entities above it access it or how the layer works. It defines the layer's semantics. A layer's interface tells the processes above it how to access it. It specifies what the parameters are
and what results to expect. It, too, says nothing about how the layer works inside. Finally, the peer protocols used in a layer are the layer's own business. It can use any protocols it wants to, as long as it gets the job done (i.e., provides the offered
services). It can also change them at will without affecting software in higher layers.
These ideas fit very nicely with modern ideas about object-oriented programming. An object, like a layer, has a set of methods (operations) that processes outside
the object can invoke. The semantics of the methods define the set of services that the object offers. The methods' parameters and results form the object's interface. The code internal to the object is its protocol and is not visible or of any concern outside
the object.
The TCP/IP model did not originally clearly distinguish between services, interfaces, and protocols, although people have tried to retrofit it after the fact to
make it more OSI-like. For example, the only real services offered by the internet layer are SEND IP PACKET and RECEIVE IP PACKET. As a consequence, the protocols in the OSI model are better hidden than in the TCP/IP model and can be replaced easily as the
technology changes. Being able to make such changes transparently is one of the main purpose of having layered protocols in the first place.
The OSI reference model was devised before the corresponding protocols were invented. This ordering meant that the model was not biased toward one particular set
of protocols, a fact that made it quite general. The downside of this ordering was that the designers did not have much experience with the subject and did not have a good idea of which functionality to put in which layer. Although the protocols associated
with the OSI model are not used any more, the model itself is actually quite general and still valid, and the features at each layer are still very important.
With TCP/IP the reverse was true: the protocols came first, and the model was really just a description the existing protocols. There was no problem with the protocols
fitting the model. The only trouble was that the model did not fit any other protocol stacks. Thus, the TCP/IP has the opposite properties: the model itself is not of much use but the protocols are widely used.
Turning from philosophical matters to more specific ones, an obvious difference between the two models is the number of layers: the OSI model has seven layers and
the TCP/IP model has four. Both have (inter)networks, transport, and application layers, but the other layers are different.
Another difference is in the area of connectionless versus connection-oriented communication. The OSI model supports both connectionless and connection-oriented
communication in the network layer, but only connection-oriented communication in the transport layer. The TCP/IP model supports only one mode in the network layer (connectionless) but both in the transport layer, giving the users a choice. This choice is
especially important for simple request-response protocols.
roughly similar. Despite these fundamental similarities, the two models also have many differences. It is important to note that we comparing the reference models here, not the corresponding
protocols stacks.
Three concepts are central to the OSI model:
1. Services.
2. Interfaces.
3. Protocols.
Probably the biggest contribution of the OSI model is that it makes the distinction between these three concepts explicit. Each layer performs some services for the layer
above it. The service definition tells what the layer does, not how entities above it access it or how the layer works. It defines the layer's semantics. A layer's interface tells the processes above it how to access it. It specifies what the parameters are
and what results to expect. It, too, says nothing about how the layer works inside. Finally, the peer protocols used in a layer are the layer's own business. It can use any protocols it wants to, as long as it gets the job done (i.e., provides the offered
services). It can also change them at will without affecting software in higher layers.
These ideas fit very nicely with modern ideas about object-oriented programming. An object, like a layer, has a set of methods (operations) that processes outside
the object can invoke. The semantics of the methods define the set of services that the object offers. The methods' parameters and results form the object's interface. The code internal to the object is its protocol and is not visible or of any concern outside
the object.
The TCP/IP model did not originally clearly distinguish between services, interfaces, and protocols, although people have tried to retrofit it after the fact to
make it more OSI-like. For example, the only real services offered by the internet layer are SEND IP PACKET and RECEIVE IP PACKET. As a consequence, the protocols in the OSI model are better hidden than in the TCP/IP model and can be replaced easily as the
technology changes. Being able to make such changes transparently is one of the main purpose of having layered protocols in the first place.
The OSI reference model was devised before the corresponding protocols were invented. This ordering meant that the model was not biased toward one particular set
of protocols, a fact that made it quite general. The downside of this ordering was that the designers did not have much experience with the subject and did not have a good idea of which functionality to put in which layer. Although the protocols associated
with the OSI model are not used any more, the model itself is actually quite general and still valid, and the features at each layer are still very important.
With TCP/IP the reverse was true: the protocols came first, and the model was really just a description the existing protocols. There was no problem with the protocols
fitting the model. The only trouble was that the model did not fit any other protocol stacks. Thus, the TCP/IP has the opposite properties: the model itself is not of much use but the protocols are widely used.
Turning from philosophical matters to more specific ones, an obvious difference between the two models is the number of layers: the OSI model has seven layers and
the TCP/IP model has four. Both have (inter)networks, transport, and application layers, but the other layers are different.
Another difference is in the area of connectionless versus connection-oriented communication. The OSI model supports both connectionless and connection-oriented
communication in the network layer, but only connection-oriented communication in the transport layer. The TCP/IP model supports only one mode in the network layer (connectionless) but both in the transport layer, giving the users a choice. This choice is
especially important for simple request-response protocols.
相关文章推荐
- NDK 下第一个boost asio 网络程序测试成功
- 网络电话pjsip Getting Started: Building for Apple iPhone, iPad and iPod Touch
- cocos2d-x2.2的TestCpp在IOS 7.0 模拟器上有内存泄露,只能降级到IOS6.1(如何拷贝目录安装模拟器)
- 家庭网络连接的一些知识点
- QT按键背景图片 LineEdit Label网络
- 如何保护系统免受slow HTTP attacks
- XMLHttpRequest对象
- 在cacti中使用ATS的stats_over_http模块进行监控部分性能
- 2013年北京师范大学新生程序设计竞赛网络赛--I. nonodog
- 2013年北京师范大学新生程序设计竞赛网络赛-- F、 Araleii & Bill的冠名权争夺战
- Introduction to the TCP/IP Reference Model
- http://technet.microsoft.com/zh-cn/library
- DHCP在企业网中的应用
- 2013年北京师范大学新生程序设计竞赛网络赛--E. 干了这桶冰红茶!
- 2013年北京师范大学新生程序设计竞赛网络赛--D. Number theory
- socket选项自带的TCP异常断开检测
- VisualNet广电网络资源管理使用经验
- ServiceMetadataBehavior 的 HttpsGetEnabled 属性设置为 True,而 HttpsGetUrl 属性是相对地址,但没有 https 基址
- python 发送http post请求
- RedHat 5.5使用Centos的网络yum源