网络协议工程之协议设计概述(powerpoint 35页)

上传人:ahu****ng3 文档编号:289418302 上传时间:2022-05-07 格式:PPTX 页数:36 大小:1.34MB
返回 下载 相关 举报
网络协议工程之协议设计概述(powerpoint 35页)_第1页
第1页 / 共36页
网络协议工程之协议设计概述(powerpoint 35页)_第2页
第2页 / 共36页
网络协议工程之协议设计概述(powerpoint 35页)_第3页
第3页 / 共36页
网络协议工程之协议设计概述(powerpoint 35页)_第4页
第4页 / 共36页
网络协议工程之协议设计概述(powerpoint 35页)_第5页
第5页 / 共36页
点击查看更多>>
资源描述

《网络协议工程之协议设计概述(powerpoint 35页)》由会员分享,可在线阅读,更多相关《网络协议工程之协议设计概述(powerpoint 35页)(36页珍藏版)》请在金锄头文库上搜索。

1、第第5章章 协议验证技术协议验证技术 第第 2 章章 协议设计协议设计(1-协议模型)协议模型)第第2章章 协议设计(协议设计(1协议模型)协议模型) 内容提要内容提要协议设计概述协议设计概述1协议模型协议模型22第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议设计概述协议设计概述v协议设计的含义?协议设计的含义?v协议设计是是一件很困难的事情协议设计是是一件很困难的事情Example: Clayton Tunnel ProtocolExample: 蓝军与白军作战问题蓝军与白军作战问题3第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子协议例子vEngland, 1

2、841, William CookevTelegraph(电报)电报) instead of Optical telegraph for Railway Tunnel Protection, 节省成本(只需节省成本(只需1/10)和提高速度。)和提高速度。vPurpose: avoid that more than one train is in the tunnel at the same timevFirstly used on several lines of the Great Western Railways in England.4第第2章章 协议设计(协议设计(1协议模型)协议模

3、型) 电报电报(Telegraph)v基本原理,基本原理,1753,C.M给给Scots杂志的信中描述了一个使用杂志的信中描述了一个使用一些平行电线来通信的电子电报。一些平行电线来通信的电子电报。v1830,英国,英国Michael Faraday和美国和美国Joseph Henry发现了电发现了电磁感应磁感应v1837,William Cooke利用电流来使处在接收端磁场中的利用电流来使处在接收端磁场中的罗盘指针发生偏转,从而得到信号。罗盘指针发生偏转,从而得到信号。v1837年年6月月12日,第一个电报系统的专利,日,第一个电报系统的专利,“五磁针信号五磁针信号系统系统”。v1842年,年

4、,Cooke“火车可以无所畏惧地行驶,而无论其时间火车可以无所畏惧地行驶,而无论其时间是否正确,也不管其是否在正确的轨道上,因为在使用该是否正确,也不管其是否在正确的轨道上,因为在使用该系统后,其速率总可以及时地降下来,从而避免碰撞系统后,其速率总可以及时地降下来,从而避免碰撞”5第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子协议例子vEngland, 1841, William CookevTelegraph(电报)电报) instead of Optical telegraph for Railway Tunnel Protection, 节省成本(只需节省成本(只需1/

5、10)和提高速度。)和提高速度。vPurpose: avoid that more than one train is in the tunnel at the same timevFirstly used on several lines of the Great Western Railways in England.6第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子协议例子semaphores with block-interval system(空闲空闲/阻塞阻塞信号系统信号系统)turn to red automatically as a train passesse

6、t to green by hand afterwardssignalmen on both ends linked by telegraphic linemalfunction of block-interval system signalled by a bellred and white flags to replace malfunctioning semaphore7第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子:报文协议例子:报文(Messages)vMessage:TT: Train in TunnelTF: Tunnel is FreeTL: Has the

7、Train left the Tunnel?8第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子:差错控制协议例子:差错控制vError Free Functioningtrain enters tunnel, signalman A sends TT to Btrain leaves the tunnel, B sends TF to AA sets semaphore to green by handvUnder Error Situationtrain enters tunnel, A sends TT to Bbell rings, A shows red flag to

8、 next traintrain leaves the tunnel, B sends TF to AA shows white flag to next train9第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子:事故协议例子:事故(Accident)vOne day in August 1861 at Clayton Tunnel.train-1 enters tunnel, block-interval system fails(fails to set the signal to red), so the bell warns signalman A, thenA s

9、ends TT to B, then fetches the red flag to warn the next train.train-2 comes too fast, and could not stop in time, has already passed the green signal. Fortunately, its driver catches a glimpse of the red flag just in time as he enters the tunnel.train-3 sees the red flag and stops before the tunnel

10、 entrance.10第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子:事故(协议例子:事故(Accident)A sends another TT to B (for train-2)B does not understand second TT(because the protocol did not account for this event so the meaning of two sbusequent TT had not been specified.)A sends TL (has the train left the tunnel?)to BB sees

11、train-1 and sends TF11第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子:事故(协议例子:事故(Accident)A thinks train-2 left the tunnel and shows white flag to train-3train-2 had seen red flag before, is afraid and tries to return to position A After some deliberation.12第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子:事故(协议例子:事故(Accident)vRes

12、ulttrain-3 and train-2 crashed: 21 people died and 176 got injuredThe set of instructions given to the signalmen was incomplete, which leads to the accident13第第2章章 协议设计(协议设计(1协议模型)协议模型) 协议例子:协议例子:LessonsvA historian of railway disasters(Nock, 1967 ): “One can almost hear the same comment being made

13、time after time.I could not imagine that could ever happen. Yet bitter experience showed that it could, and gradually the regulations and railway engineering practice were elaborated.”vProtocol: Use Under normal circumstances and that allowed for a safe recovery from unexpected events.14第第2章章 协议设计(协

14、议设计(1协议模型)协议模型) 协议例子:协议例子:Lessons (Cont.)veven the most simple protocols may contain errorsvprotocols must be fully verified before they are put in operationtechniques to structure, design, analyse and verify protocols are necessary15第第2章章 协议设计(协议设计(1协议模型)协议模型) 一个简单的网络协议一个简单的网络协议(蓝军与白军蓝军与白军)v谢希仁教授谢希

15、仁教授计算机网络计算机网络上的一道作业题:上的一道作业题:占据两个山顶的蓝军与驻扎在这两个山之间的山谷的占据两个山顶的蓝军与驻扎在这两个山之间的山谷的白军作战。其力量对比是:一个山顶上的蓝军打不过白军作战。其力量对比是:一个山顶上的蓝军打不过白军,但两个山顶的蓝军协同作战则可战胜白军。一白军,但两个山顶的蓝军协同作战则可战胜白军。一个山顶上的蓝军拟于次日正午向白军发起攻击。于是个山顶上的蓝军拟于次日正午向白军发起攻击。于是发送电文给另一山顶上的友军。但通信线路很不好,发送电文给另一山顶上的友军。但通信线路很不好,电文出错或丢失的可能性较大。因此要求收到电文的电文出错或丢失的可能性较大。因此要求

16、收到电文的友军必须送回一个确认电文。但此确认电文也可能出友军必须送回一个确认电文。但此确认电文也可能出错或丢失。错或丢失。试问能否设计出一种协议使得蓝军能够实现协同作战试问能否设计出一种协议使得蓝军能够实现协同作战因而一定因而一定(即即100 %)取得胜利?取得胜利?16第第2章章 协议设计(协议设计(1协议模型)协议模型) 明日正午进攻明日正午进攻明日正午进攻明日正午进攻如果情况如上所述,次日蓝军 1 和蓝军 2 的协同进攻必定获胜。但情况并非如此简单。因为所发的报文可能会丢失。明日正午进攻明日正午进攻丢失!白军蓝军 1蓝军 2因此蓝军 1 必须在收到蓝军 2 的确认后才能进攻17第第2章章 协议设计(协议设计(1协议模型)协议模型) 明日正午进攻明日正午进攻确认确认明日正午进攻明日正午进攻确认确认因此,收到报文后必须加以确认但这个确认报文也可能丢失:确认确认丢失!白军蓝军 1蓝军 2故蓝军 2 必须要收到蓝军 1 发出的对此“确认”的确认,才能知道发送出的确认是否被蓝军 1 正确收到。18第第2章章 协议设计(协议设计(1协议模型)协议模型) 明日正午进攻明日正午进攻确认确认明日正

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 电子/通信 > 无线电电子学/电信技术

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号