A Comparison of the OSI and TCP/IP Reference Models

来源:互联网 发布:新网域名怎么样 编辑:程序博客网 时间:2024/05/01 09:48
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.
0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 淘宝打假师打了我的店铺怎么办 收藏品公司关门跑路员工怎么办 客户快递签收后说货物短缺怎么办 京东商城买东西商家不换货怎么办 在商场买东西过几天就降价了怎么办 天猫买东西不退货不退款怎么办 买买8p美版的怎么办 京东金条银行卡被冻结还不了怎么办 在瑞士刚买的浪琴手表不走了怎么办 刚买的手表表镜有划痕 怎么办 唯品会上买的手表有质量问题怎么办 我买的对方材料没开票给我怎么办 给对方修完车车主不给发票怎么办 买苹果手机花呗额度不够怎么办 苹果手机用别人的手机卡激活怎么办 小米商城花呗分期额度不够怎么办 淘宝已经形成订单商家不发货怎么办 小米商城退款后又想买了怎么办 淘宝退货退款后不想退了怎么办 在转转的商品被屏了怎么办 不懂如何挑选适合自己的衣服怎么办 淘宝购买商品给顾客造成损失怎么办 微信购物地址写错了怎么办 微信购物后一直不发货怎么办 微信购物不发货也不退款怎么办 淘宝退货不小心点了确认收货怎么办 外卖不小心点了确认收货怎么办 圆通快递单号查不到物流信息怎么办 在京东买东西没收到退回去了怎么办 我的东西没收到退回去了怎么办 快递丢了快件丢失了快递公司怎么办 在天猫超市买东西订单关闭了怎么办 淘宝上退货店家收到货不理怎么办 淘宝申请退货退款卖家拒绝怎么办 闲鱼退货卖家拒绝退款怎么办 淘宝退货店家收到货不退款怎么办 卖家拒绝申请我退货了怎么办 衣服洗了卖家拒绝退货怎么办 在京东买的小米手机屏摔碎了怎么办 取消流量漫游后省内不限量怎么办 在淘宝买东西不发货也不退款怎么办