首页 实验四、静态路由与动态路由的配置

实验四、静态路由与动态路由的配置

举报
开通vip

实验四、静态路由与动态路由的配置实验四、静态路由与动态路由的配置 实验四、静态路由与动态路由的配置 2.1实验目的 1.掌握静态路由的配置方法; 2. 掌握动态路由(RIP与OSPF)的配置方法。 2.2 设备需求 (1) 2台路由器; (2) 2台PC机; (3) 2根Console控制台电缆(一端接交换机或路由器的Console端口,一端接PC机串口)。 2.3实验环境 图4-1静态路由和动态路由的配置 2.4实验内容和步骤 1.静态路由的配置 路由器A的配置: 进入超级终端,进入用户视图。 sys 进入系统视图 [MSR3040]sysn...

实验四、静态路由与动态路由的配置
实验四、静态路由与动态路由的配置 实验四、静态路由与动态路由的配置 2.1实验目的 1.掌握静态路由的配置方法; 2. 掌握动态路由(RIP与OSPF)的配置方法。 2.2 设备需求 (1) 2台路由器; (2) 2台PC机; (3) 2根Console控制台电缆(一端接交换机或路由器的Console端口,一端接PC机串口)。 2.3实验环境 图4-1静态路由和动态路由的配置 2.4实验内容和步骤 1.静态路由的配置 路由器A的配置: 进入超级终端,进入用户视图。 < MSR3040> sys 进入系统视图 [MSR3040]sysname RTA [RTA] display current-configuration 查看当前配置,看以太网接口与广域网接口(串口) ...... # interface Serial5/0 link-protocol ppp # interface Serial5/1 link-protocol ppp # interface Serial5/2 link-protocol ppp # interface Serial5/3 link-protocol ppp ...... interface GigabitEthernet0/0 port link-mode route # interface GigabitEthernet0/1 port link-mode route 说明:本次实验中连线如下: 1. V.35电缆是连接在Serial5/0 2. PC机的网线连接在GigabitEthernet0/0 [RTA] [RTA] interface GigabitEthernet0/0 可能简写:int g5/0 进入以太网接口0 [RTA- GigabitEthernet0/0] ip address 202.101.1.1 255.255.255.0 [RTA-GigabitEthernet0/0] interface Serial0 [RTA-Serial5/0] ip address 192.168.0.1 255.255.255.0 [RTA-Serial5/0] quit [RTA] ip route-static 202.101.5.0 255.255.255.0 192.168.0.2 [RTA] 路由器B的配置: [RTB]interface GigabitEthernet0/0 [RTB-GigabitEthernet0/0] ip address 202.101.5.1 255.255.255.0 [RTB-GigabitEthernet0/0] interface Serial5/0 [RTB-Serial5/0] ip address 192.168.0.2 255.255.255.0 [RTB-Serial5/0] quit [RTB] ip route-static 202.101.1.0 255.255.255.0 192.168.0.1 [RTB] dis ip rout (显示路由表) Routing Tables: Destination/Mask Proto Pref Metric Nexthop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0 127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 192.168.0.0/24 Direct 0 0 192.168.0.1 Serial5/0 192.168.0.1/32 Direct 0 0 192.168.0.1 Serial5/0 192.168.0.2/32 Direct 0 0 127.0.0.1 LoopBack0 202.101.1.0/24 Static 60 0 192.168.0.1 Serial5/0 (静态路由表项) 202.101.5.0/24 Direct 0 0 202.101.5.1 GigabitEthernet0/0 202.101.5.1/32 Direct 0 0 127.0.0.1 LoopBack0 [RTB] 在PCA机的命令窗口ping PCB:ping 202.101.5.2,显示结果如下: 图4-2 PCA机的命令窗口ping PCB 从图4-2中,可知PCA与PCB是连通的,实验成功。 2.RIP动态路由的配置 路由器A的配置: [RTA] undo ip rout 202.101.5.0 24 192.168.0.2 (取消静态路由) [RTA] rip [RTA - rip-1] network 192.168.0.0 [RTA - rip-1] network 202.101.1.0 [RTA - rip-1]quit [RTA] display ip routing-table 显示路由表 Routing Tables: Public Destinations : 8 Routes : 8 Destination/Mask Proto Pre Cost NextHop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.0.0/24 Direct 0 0 192.168.0.1 S5/0 192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.0.2/32 Direct 0 0 192.168.0.2 S5/0 202.101.1.0/24 Direct 0 0 202.101.1.1 GE0/0 202.101.1.1/32 Direct 0 0 127.0.0.1 InLoop0 202.101.5.0/24 RIP 100 1 192.168.0.2 S5/0 路由器B的配置: [RTB] rip [RTB - rip-1] network 192.168.0.0 [RTB - rip-1] network 202.101.5.0 [RTB - rip-1] quit [RTB] display ip routing-table Routing Tables: Public Destinations : 8 Routes : 8 Destination/Mask Proto Pre Cost NextHop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.0.0/24 Direct 0 0 192.168.0.2 S5/0 192.168.0.1/32 Direct 0 0 192.168.0.1 S5/0 192.168.0.2/32 Direct 0 0 127.0.0.1 InLoop0 202.101.1.0/24 RIP 100 1 192.168.0.1 S5/0 202.101.5.0/24 Direct 0 0 202.101.5.1 GE0/0 202.101.5.1/32 Direct 0 0 127.0.0.1 InLoop0 3.OSPF动态路由的配置 路由器A的配置: [RTA] undo rip (取消RIP路由) Warning : Undo RIP process? [Y/N]: y [RTA] interface loopback 0 [RTA-LoopBack0] ip address 1.1.1.1 255.255.255.255 [RTA-LoopBack0] quit [RTA] route ID 1.1.1.1 [RTA] ospf 1 [RTA-ospf-1] area 0 [RTA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0 [RTA-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255 [RTA-ospf-1-area-0.0.0.0] network 202.101.1.0 0.0.0.255 [RTA-ospf-1-area-0.0.0.0] quit [RTA-ospf-1] quit [RTA] [RTA] display ip routing-table 路由器RTB配置好后再执行该命令 Routing Tables: Public Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost NextHop Interface 1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0 2.2.2.2/32 OSPF 10 1562 192.168.0.2 S5/0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.0.0/24 Direct 0 0 192.168.0.1 S5/0 192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.0.2/32 Direct 0 0 192.168.0.2 S5/0 202.101.1.0/24 Direct 0 0 202.101.1.1 GE0/0 202.101.1.1/32 Direct 0 0 127.0.0.1 InLoop0 202.101.5.0/24 OSPF 10 1563 192.168.0.2 S5/0 路由器B的配置: [RTB] undo rip (取消RIP路由) [RTB] interface loopback 0 [RTB-LoopBack0] ip address 2.2.2.2 255.255.255.255 [RTB-LoopBack0] quit [RTB] route id 2.2.2.2 [RTB] ospf 1 [RTB-ospf-1] area 0 [RTB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0 [RTB-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255 [RTB-ospf-1-area-0.0.0.0] network 202.101.5.0 0.0.0.255 [RTB-ospf-1-area-0.0.0.0] quit [RTB-ospf-1] quit [RTB] [RTB]display ip routing-table Routing Tables: Public Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost NextHop Interface 1.1.1.1/32 OSPF 10 1562 192.168.0.1 S5/0 2.2.2.2/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.0.0/24 Direct 0 0 192.168.0.2 S5/0 192.168.0.1/32 Direct 0 0 192.168.0.1 S5/0 192.168.0.2/32 Direct 0 0 127.0.0.1 InLoop0 202.101.1.0/24 OSPF 10 1563 192.168.0.1 S5/0 202.101.5.0/24 Direct 0 0 202.101.5.1 GE0/0 202.101.5.1/32 Direct 0 0 127.0.0.1 InLoop0
本文档为【实验四、静态路由与动态路由的配置】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_375793
暂无简介~
格式:doc
大小:2MB
软件:Word
页数:6
分类:互联网
上传时间:2011-10-22
浏览量:39