当前位置:文档之家› 计算机网络实训5

计算机网络实训5

计算机网络实训5任务一(1)动态路由协议RIP及OSPF假设北京联合大学与安格利亚鲁斯金大学的网络如下图所示,请在仿真软件中仿真路由协议的使用方法。

具体学习步骤如下。

(画好拓扑结构,并配置好各个接口和计算机的IP地址,请复制两份。

)拓扑图:1.For each router perform the following tasks:对每个路由器都完成以下任务:Determine the current state of the router’s routing table - Router# show ip route测试当前的路由表状态。

Router# show ip routeWrite down the routes it knows about.记录路由表信息(拷屏并解释路由信息)路由器只知道直接连接的路由,C代表直接连接,R代表RIP协议。

2.Apply the RIP routing protocol to each router, thus:在每个路由器上使用RIP路由协议Router(config)# router ripRouter(config-router)# (note the change in mode 注意模式上的变化)e RIP to advertise its routing table out of all connected networks, thus:使用RIP要发送它的路由表到所有相邻网络,因此需要如下配置:Example for the Beijing router(使用Beijing 路由器举例)Beijing(config-router)# network 192.168.1.0Beijing(config-router)# network 192.168.2.0Beijing(config-router)# network 192.168.4.0Repeat for NewYork and Chelmsford routers but use the appropriate networkstatements在NewYork和Chelmsford 路由器上重复上述操作,但要注意使用相应的相邻网络号。

拷屏:三个路由器的RIP配置(要求用命令行方式)4.For each router record the contents of its routing table.记录每个路由器中路由表的内容。

拷屏并解释路由信息:Type(模式):C代表直接连接,R代表RIP协议Network:目的网络Port:接口Next Hop IP:下一跳地址Metric:量度5.What route does the packet from Beijing PC1 take to reach ARU_PC1?Beijing PC1发出的分组从什么路由到达ARU_PC1?请回答:经路由器BeiJing和路由器Chelmsford到达PC16.Enter simulation mode by clicking on the Simulation tab.单击Simulation项,进入仿真模式7.Click on Edit filters and deselect all filters leaving RIP on. (this will only show RIPtraffic)单击Edit filters,只留下RIP,其他协议都不选。

8.Activate the simulation by clicking on the PLAY tab.单击PLAY 激活仿真。

9.Wait for a number of RIP updates to occur then STOP the simulation and examine thepackets RIP data.等待产生了几个RIP更新信息后,停止仿真,检查RIP数据包。

You should note that each router is broadcasting its own routing table and receiving similar packets from its neighbours.你将发现每个路由器都广播自己的路由表到相邻路由器,并接收相邻路由器发的路由表。

The received packets will show the distance (metric) to each network it knows about. Each router will then choose the lowest cost to a particular network and add it to its routing table.接收到的分组里有它知道的到每个网络的距离。

每个路由器将选择到每个网络的最低开销,然后将其加入到路由表中。

拷屏 检查RIP 的信息10.You should observe that that during the simulation RIP packets were not only sent toneighbouring routers but also sent to their respective LANs. This is because packets are broadcast out of all networks even though none of the end devices on the LAN can interpret these messages. You can prevent updates being sent to these interfaces by using the passive-interface command, thus:你会观察到在仿真RIP分组期间,这些分组不仅送到相邻路由器,而且也发送到它们各自的局域网,这是因为这些分组是广播到所有相邻网络甚至局域网的终端设备。

你可以阻止在这些端口上发送路由更新信息,用assive-interface 命令。

router(config-router)# passive-interface fa0/0If you simulate the network again you should now see these packets being blocked.如果你再仿真,你就发现这些分组被阻止了。

单击Simulation项,进入仿真模式拷屏11.在路由器上使用debug ip rip 命令,可以进一步查看路由器接收到的路由更新信息和发送出去的路由更新信息。

router# debug ip rip删除该命令方法:router# no debug ip ripAlthough RIP works well in small networks, it is limited in that it uses hop count as a metric and has poor scalability due to its use of timed updates (every 30 seconds in RIP). A much better, although more difficult to configure, protocol is Open Shortest Path First (OSPF).虽然在小规模网络中RIP工作的不错,但是由于它使用跳数作为距离,并且收敛差(每30秒更新)。

更好的路由协议是放式最短路径优先协议(OSPF),虽然配置起来复杂点。

In the next part of the exercise we will remove the RIP algorithm and replace with OSPF.在下面的实验中,我们将删除RIP协议,使用OSPF协议。

1.Remove the RIP routing protocol on each router, thus:在每个路由器上删除RIP路由协议Router(config)# no router ripThis will remove all RIP components including network statements and passiveinterfaces.这将删除所有RIP 部分,包括相邻网络和被阻止的接口。

2.Applying OSPF is similar but more complex as it uses VLSM addressing and theconcept of routing areas.使用OSPF设置是类似的。

但是当使用VLSM地址和路由区域的概念时就复杂一些。

For each router perform the following steps:在每个路由器上执行以下步骤:router(config)# router ospf 1router(config-router)network 192.168.x.0 0.0.0.255 area 0例如在Beijing的路由器上需要设置:router(config)# router ospf 1router(config-router)network 192.168.1.0 0.0.0.255 area 0router(config-router)network 192.168.2.0 0.0.0.255 area 0router(config-router)network 192.168.4.0 0.0.0.255 area 0拷屏:三个路由器的OSPF配置(要求用命令行方式)3.where x represents each directly connected network. The 0.0.0.255 represents thesubnet mask for this particular network (/24) but in wildcard format where theNETWORK part of the address is represented by zeros.这里x 每个直接连接的网络。

0.0.0.255 表示这个指定网络的子网掩码,但是用通配符掩码格式,这里网络部分用“0”表示。

4.For each router record the contents of its routing table.每个路由器记录路由表的内容。

相关主题