1Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.©2001,CiscoSystems,Inc.Allrightsreserved.©2001,CiscoSystems,Inc.Allrightsreserved.第十一讲IP路由Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.2Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.2Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.2课程内容•IP路由基础•一个路由过程•静态路由配置•默认路由配置Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.3Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.3Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.3路由基础•何为路由源到目的主机之间的路径。在网络中路径的确定是由路由器完成的。•为了确定路由,路由器需要知道的信息目的地址相邻路由器,并可以从那里获得远程网络的信息到所有远程网络的可能路由到达每个远程网络的最住路由如何维护并验证路由信息见下一页Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.4Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.4Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.4路由——看图,有何结论Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.5Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.5Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.5路由基础•路由•1、路由是可变的。源到目的的路径可以有多条。路由器可以使用其中的任何一条。•2、数据传输由路由器完成。Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.6Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.6Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.6主动路由协议(routingprotocol)•主动路由协议是路由器在互联网络上动态地找寻所有网络,并确保所有路由器拥有相同路由表的协议。主动路由协议基本上就是决定数据包通过互联网络最优路径的协议。主动路由协议的典型例子是RIP、IGRP、EIGRP和OSPF协议。Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.7Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.7Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.7被动路由协议(routedprotocol)•被动路由协议可用来发送用户数据(数据包)通过互联网络。被动路由协议被分派到接口上并决定数据包的传送方式。被动路由协议的典型示例是IP和IPX协议。Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.8Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.8Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.8路由基础ping过程实例一13由AB方向的数据传输分为三部分1、AE02、路由器路由决定3、E1B2Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.9Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.9Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.9ping过程实例二——主机AICMP协议生成数据网络层数据链路层物理层1主机A目的IP主机B源IP主机AICMP数据pingICMP数据主机A接受数据包解封装ICMP数据pingPresentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.10Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.10Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.10ping过程实例二——数据由主机A封装网络层数据链路层物理层1主机A目的IP主机B源IP主机AICMP数据ping目的IP主机B源IP主机AICMP数据ping源MAC主机AFCS目的MACE00111000010101001010101010101111110010101001010010000000主机AICMP使用IP自上而下生成数据包、帧、比特流数据封装Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.11Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.11Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.11ping过程实例二——数据由路由器解封装网络层数据链路层物理层1路由器E0目的IP主机B源IP主机AICMP数据pingICMP数据目的IP主机B源IP主机AICMP数据ping源MAC主机AFCS目的MACE00111000010101001010101010101111110010101001010010000000路由器E0端口接受数据包自下而上解封装Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.12Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.12Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.12ping过程实例二——数据包路由决定网络层数据链路层物理层1路由器目的IP主机B源IP主机AICMP数据pingICMP数据路由器也存在三层结构,在网络层根据目的IP地址即主机B的地址决定路由,即数据包从路由器的E1端口送出。Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.13Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.13Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.13ping过程实例二——数据由路由器再封装网络层数据链路层物理层1路由器E1目的IP主机B源IP主机AICMP数据ping目的IP主机B源IP主机AICMP数据ping源MAC主机E1FCS目的MACB0111000010101001010101010101111110010101001010010000000路由器网络层再将数据包封装,并由E1端口送出,并被主机B接收。数据封装Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.14Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.14Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.14ping过程实例二——数据由主机B再解封装网络层数据链路层物理层1主机B目的IP主机B源IP主机AICMP数据pingICMP数据目的IP主机B源IP主机AICMP数据ping源MAC主机AFCS目的MACE00111000010101001010101010101111110010101001010010000000主机B接受数据包解封装Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.15Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.15Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.15ping过程实例二——主机BICMP协议得到数据网络层数据链路层物理层1主机B目的IP主机B源IP主机AICMP数据pingICMP数据主机B接受数据包解封装ICMP数据pingPresentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.16Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.16Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.16包在路由器中传输的另一复杂实例Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.17Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.17Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.17测试你对IP路由选择的认识•1.Thedestinationaddressofaframe,fromHostA,willbetheMACaddressoftheF0/0interfaceoftheRouterArouter.•2.ThedestinationaddressofapacketwillbetheIPaddressofthenetworkinterfacecard(NIC)oftheHTTPserver.•3.Thedestinationportnumberinthesegmentheaderwillhaveavalueof80.Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.18Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.18Presentation_ID©2001,CiscoSystems,Inc.Allrightsreserved.18测试你对IP路由选择的认识•1.Thedestinationaddressofaframe,fromHostA,willbetheMACaddressoftheF0/0interfaceoftheRouterArouter