1、上机报告姓名 学号专业班级计科1101 课程名称路由交换技术指导教师机房名称 上机日期2013 年10月 14 日上机项目名称上机步骤及内容:一、 实验目的掌握ospf协议的stub区域配置方法 掌握ospf协议的nssa区域配置方法二、 实验仪器设备和材料清单 器材:路由器4台,交换机2台,导线若干三、 实验内容掌握ospf协议的stub区域配置方法 掌握ospf协议的nssa区域配置方法四、 实验步骤任务一 stub区域配置图1.1 实验拓扑图一、 配置stub区域1、 R1的配置代码R1dis cu# version 5.20, Release 1808, Standard# sysna
2、me R1# domain default enable system#interface Ethernet0/0 port link-mode route ip address 192.168.2.1 255.255.255.0#interface Ethernet0/0.1 vlan-type dot1q vid 1 ip address 202.168.0.1 255.255.255.0#interface Ethernet0/0.2 vlan-type dot1q vid 2 ip address 202.168.1.1 255.255.255.0#interface Ethernet
3、0/0.3 vlan-type dot1q vid 3 ip address 202.168.2.1 255.255.255.0#interface Ethernet0/0.4 vlan-type dot1q vid 4 ip address 202.168.3.1 255.255.255.0#interface Ethernet0/1 port link-mode route ip address 10.0.0.1 255.255.255.0#interface Serial1/0 link-protocol ppp#interface Serial2/0 link-protocol ppp
4、#interface NULL0#interface LoopBack0 ip address 1.1.1.1 255.255.255.255#ospf 1 router-id 1.1.1.1 import-route direct area 0.0.0.1 network 10.0.0.0 0.0.0.255 network 1.1.1.0 0.0.0.255#R12、 R2的配置代码R2dis cur# version 5.20, Release 1808, Standard# dar p2p signature-file cfa0:/p2p_default.mtd# port-secur
5、ity enable#vlan 1#domain system#interface Aux0 async mode flow link-protocol ppp#interface Ethernet0/0 port link-mode route ip address 10.0.0.2 255.255.255.0#interface Ethernet0/1 port link-mode route ip address 20.0.0.1 255.255.255.0#interface Serial1/0 link-protocol ppp#interface Serial2/0 link-pr
6、otocol ppp#interface NULL0#interface LoopBack0 ip address 2.2.2.2 255.255.255.255#ospf 1 router-id 2.2.2.2 area 0.0.0.0 network 20.0.0.0 0.0.0.255 network 2.2.2.0 0.0.0.255 area 0.0.0.1 network 10.0.0.0 0.0.0.255#R2 3、 R3的配置代码R3dis cur# #interface Ethernet0/0 port link-mode route ip address 20.0.0.2
7、 255.255.255.0#interface Ethernet0/1 port link-mode route ip address 30.0.0.1 255.255.255.0#interface Serial1/0 link-protocol ppp#interface Serial2/0 link-protocol ppp#interface NULL0#interface LoopBack0 ip address 3.3.3.3 255.255.255.255#ospf 1 router-id 3.3.3.3 area 0.0.0.0 network 20.0.0.0 0.0.0.
8、255 network 3.3.3.0 0.0.0.255 area 0.0.0.2 network 30.0.0.0 0.0.0.255 stub#R3 4、 R4的配置代码R4dis cur# sysname R4#interface Ethernet0/0 port link-mode route ip address 40.0.0.1 255.255.255.0#interface Ethernet0/1 port link-mode route ip address 30.0.0.2 255.255.255.0#interface Serial1/0 link-protocol pp
9、p#interface Serial2/0 link-protocol ppp#interface NULL0#interface LoopBack0 ip address 4.4.4.4 255.255.255.255#ospf 1 router-id 4.4.4.4 area 0.0.0.2 network 30.0.0.0 0.0.0.255 network 40.0.0.0 0.0.0.255 network 4.4.4.0 0.0.0.255 stub#R4 5、 查看R1中的路由表信息图 1.2 R1的路由信息查看R4上面未配置和配置特殊区域对比: 图1.3 未配置时的状态 图1.
10、4 配置后的状态任务二、配置totally stub区域1、R3中的配置代码#ospf 1 area 0.0.0.1 network 20.0.0.0 0.0.0.255 area 0.0.0.2 network 30.0.0.0.0.0.0.255 stub no-summary#2、 R4中的配置代码#ospf 1 area 0.0.0.2 network 30.0.0.0 0.0.0.255 network 40.0.0.0 0.0.0.255 stub no-summary #3、R4的路由信息图 3.1 R1中的路由信息任务2 Nssa区域配置图1.1 实验拓扑图一、 ospf的配置
11、注:ospf的配置中,只有R1的配置代码不一样,所以只需要改写R1的代码即可。1、R1的配置代码#interface Ethernet0/0 port link-mode route ip address 192.169.5.1 255.255.255.0#interface Ethernet0/0.1 vlan-type dot1q vid 1 ip address 192.169.6.1 255.255.255.0#interface Ethernet0/0.2 ip address 192.169.7.1 255.255.255.0#interface Ethernet0/0.3 vla
12、n-type dot1q vid 3 ip address 192.169.8.1 255.255.255.0#interface Ethernet0/0.4 ip address 192.169.9.1 255.255.255.0#interface Ethernet0/1 port link-mode route#interface Serial1/0 link-protocol ppp ip address 10.0.3.2 255.255.255.0#interface LoopBack0 ip address 1.1.1.1 255.255.255.255#ospf 1 area 0
13、.0.0.2 network 10.0.3.0 0.0.0.255 network 192.169.5.0 0.0.0.255 network 192.169.6.0 0.0.0.255 network 192.169.7.0 0.0.0.255 network 192.169.8.0 0.0.0.255 network 192.169.9.0 0.0.0.255#2、 R1的路由信息图 2.1 R1的路由信息二、 配置NSSA区域R3上面的配置信息:R3dis cur# version 5.20, Release 1808, Standard#interface Ethernet0/0 po
14、rt link-mode route ip address 20.0.0.2 255.255.255.0#interface Ethernet0/1 port link-mode route ip address 30.0.0.1 255.255.255.0#interface Serial1/0 link-protocol ppp#interface Serial2/0 link-protocol ppp#interface NULL0#interface LoopBack0 ip address 3.3.3.3 255.255.255.255#ospf 1 router-id 3.3.3.
15、3 area 0.0.0.0 network 20.0.0.0 0.0.0.255 network 3.3.3.0 0.0.0.255 area 0.0.0.2 network 30.0.0.0 0.0.0.255 nssa default-route-advertise#returnR3R4上面的配置信息:R4dis cur#interface Ethernet0/0.1 vlan-type dot1q vid 1 ip address 202.168.4.1 255.255.255.0#interface Ethernet0/0.2 vlan-type dot1q vid 2 ip add
16、ress 202.168.5.1 255.255.255.0#interface Ethernet0/0.3 vlan-type dot1q vid 3 ip address 202.168.6.1 255.255.255.0#interface Ethernet0/0.4 vlan-type dot1q vid 4 ip address 202.168.7.1 255.255.255.0#interface Ethernet0/1 port link-mode route ip address 30.0.0.2 255.255.255.0#interface Serial1/0 link-p
17、rotocol ppp#interface Serial2/0 link-protocol ppp#interface NULL0#interface LoopBack0 ip address 4.4.4.4 255.255.255.255#ospf 1 router-id 4.4.4.4 import-route direct area 0.0.0.2 network 30.0.0.0 0.0.0.255 network 4.4.4.0 0.0.0.255 nssa #returnR4R4上面的特殊区域LSDB链路状态数据库 图2.1 R4上面的LSDB表图2.2 R4的路由信息总结: 通过这次实验,我发现问题不仅仅是从书本上获得的,更多的问题是在做实验的过程中,反反复复实验后,才发现的。同时,在对实验代码配置中的顺序问题,也是一个深刻的教训,以后得记住。上机成绩、评语指导教师签名批改日期 (注:专业文档是经验性极强的领域,无法思考和涵盖全面,素材和资料部分来自网络,供参考。可复制、编制,期待你的好评与关注)