组网说明:
本案例采用思科模拟器的路由器来实现OSPF STUB的典型组网需求,在该网络中,R1、R2属于区域0、R3与R2属于区域1,通过配置OSPF实现PC之间的业务互通。同时将区域1配置为STUB,实现对路由的优化。
知识穿插:
当配置OSPF Stub区域后,Stub区域中的路由器会增加一条至ABR的默认路由条目,当在ABR上配置了完全末梢区域后,末梢区域的其他路由器的路由条目除了直连的路由条目外,只有一条到达ABR的路由条目默认路由,不会学习其他区域的路由条目,到其他区域的数据包通过ABR转发。这样减少了末梢区域其他路由器的路由条目和路由传递的数量,提高路由器的性能。
1、按照网络拓扑图配置IP地址。
2、分别配置R1、R2、R3的OSPF,同时将区域1配置为STUB区域,在R3配置为最终的STUB区域。
3、PC之间进行相互PING测试。
R1:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos R1
R1(config)#int f 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int f 0/1
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 10.0.0.0 0.0.0.3 area 0
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#exit
R1(config)#do wr
Building configuration...
[OK]
R1(config)#
R2:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos R2
R2(config)#int f 0/0
R2(config-if)#ip address 10.0.0.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int f 0/1
R2(config-if)#ip address 10.1.1.1 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 10.0.0.0 0.0.0.3 area 0
R2(config-router)#network 10.1.1.0 0.0.0.3 area 1
R2(config-router)#area 1 stub
R2(config-router)#exit
R2(config)#do wr
Building configuration...
[OK]
R3:
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos R3
R3(config)#int f 0/0
R3(config-if)#ip address 192.168.2.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#int f 0/1
R3(config-if)#ip address 10.1.1.2 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#router ospf 1
R3(config-router)#network 10.1.1.0 0.0.0.3 area 1
R3(config-router)#network 192.168.2.0 0.0.0.255 area 1
R3(config-router)#area 1 stub no-summary
R3(config-router)#exit
R3(config)#do wr
Building configuration...
[OK]
分别查看R1、R2、R3的OSPF邻居建立情况,均已经完成建立。
分别查看R1、R2、R3的路由表,均已经学习到对端传递过来的路由。
PC分别填写IP地址,且能相互PING通。
至此,思科路由器OSPF STUB典型组网配置案例已完成!
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作