您好,欢迎来到飒榕旅游知识分享网。
搜索
您的当前位置:首页实验 OSPF虚链路配置

实验 OSPF虚链路配置

来源:飒榕旅游知识分享网
实验 OSPF虚链路配置

【实验名称】

OSPF虚链路配置

【实验目的】

OSPF虚链路技术。

【背景描述】

你是一名高级技术支持工程师,你的朋友向你请教网络拓展的问题,朋友的公司采用OSPF路由协议把网络互联起来,由于业务的增长,最近又加了一个区域,由于骨干网络已经没有接口,被迫把该区域连接到与骨干直连的非骨干区域上,由于急于使用,请教你一个暂时解决和骨干通信的办法,请你给予支持。下图,area2没有与area0直连。

【实现功能】 实现不能与骨干网络直连的ospf区域与骨干网络交互信息。

R2(config-router)#area 1 virtual-link 192.168.34.3 !配置虚链路穿越area 1 R3(config-router)#area 1 virtual-link 192.168.23.2 !配置虚链路穿越area 1

【实验拓扑】

【实验设备】 R2624路由器(4台)、V35DCE(3根)、V35DTE(3根)

【实验步骤】

第一步:基本配置

Red-Giant(config)#hostname R4 R4(config)#int s0

R4(config-if)#ip add 192.168.34.4 255.255.255.0 R4(config-if)#no sh

R4(config-if)#end

R4(config)#interface loopback 1

R4(config-if)#ip add 4.4.4.4 255.255.255.0 Red-Giant(config)#hostname R3 R3(config)#int s0

R3(config-if)#ip add 192.168.34.3 255.255.255.0 R3(config-if)#cloclk rate 000 R3(config-if)#no sh R3(config)#int s1

R3(config-if)#ip add 192.168.23.3 255.255.255.0 R3(config-if)#no sh

Red-Giant (config)#hos R2

R2(config)#int s1

R2(config-if)#ip add 192.168.23.2 255.255.255.0 R2(config-if)#cl ra 000 R2(config-if)#no sh R2(config)#int s0

R2(config-if)#ip add 192.168.12.2 255.255.255.0 R2(config-if)#no sh

Red-Giant#conf t

Enter configuration commands, one per line. End with CNTL/Z. Red-Giant(config)#hos

Red-Giant(config)#hostname R1 R1(config)#int s0

R1(config-if)#ip add 192.168.12.1 255.255.255.0 R1(config-if)#cl ra 000 R1(config-if)#no sh R1(config-if)#end

第二步:配置OSPF路由协议 R4(config)#router os 1

R4(config-router)#network 192.168. 34.0 0.0.0.255 area 2 R4(config-router)#net 4.4.4.0 0.0.0.255 aera 2

R4(config-router)#end R3(config)#router ospf 1

R3(config-router)#net work 192.168.34.0 0.0.0.255 area 2 R3(config-router)# end

R2(config)#router ospf 1

R2(config-router)#network 192.168.23.0 0.0.0.255 area 1 R2(config-router)#network 192.168.12.0 0.0.0.255 area 0 R1(config)#router os 1

R1(config-router)#net 192.168.12.0 0.0.0.255 area 0 R1(config-router)#end

验证测试:R1#sh ip rou

Codes: C - connected, S - static, R - RIP

O - OSPF, IA - OSPF inter area

E1 - OSPF external type 1, E2 - OSPF external type 2

Gateway of last resort is not set

C 192.168.12.0/24 is directly connected, Serial0

O IA 192.168.23.0/24 [110/96] via 192.168.12.2, 00:00:42, Serial0 ! R1没有收到来自区域2的路由

第三步:配置虚链路

R2(config-router)#area 1 virtual-link 192.168.34.3 !配置虚链路穿越area 1 R3(config-router)#area 1 virtual-link 192.168.23.2 !配置虚链路穿越area 1

验证测试:R3#sh ip os virtual-links

Virtual Link to router 192.168.23.2 is up

Transit area 1, via interface Serial1, Cost of using 48 Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:05

Adjacency State FULL R1#sh ip ro

Codes: C - connected, S - static, R - RIP

O - OSPF, IA - OSPF inter area

E1 - OSPF external type 1, E2 - OSPF external type 2

Gateway of last resort is not set

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/145] via 192.168.12.2, 00:00:47, Serial0 O IA 192.168.34.0/24 [110/144] via 192.168.12.2, 00:03:17, Serial0 C 192.168.12.0/24 is directly connected, Serial0

O IA 192.168.23.0/24 [110/96] via 192.168.12.2, 00:03:17, Serial0 ! 已经收到了来自于区域2的路由

【注意事项】

 

注意连接骨干和非直连区域的中间区域的区域号;

注意连接骨干和非直连区域的中间区域的邻居建立的ROUTER_ID 。

【参考配置】 (

R4#sh run

Building configuration...

Current configuration: !

hostname \"R4\" !

ip subnet-zero !

interface Loopback1

ip address 4.4.4.4 255.255.255.0 !

interface FastEthernet0 no ip address

shutdown

!

interface FastEthernet1 no ip address !

interface FastEthernet2 no ip address shutdown !

interface FastEthernet3 no ip address shutdown !

interface Serial0

ip address 192.168.34.4 255.255.255.0 !

interface Serial1 no ip address shutdown !

router ospf 1

network 192.168.34.0 0.0.0.255 area 2 network 4.4.4.0 0.0.0.255 area 2 !

ip classless !

line con 0 line aux 0 line vty 0 4 login ! end

R3#sh run

Building configuration...

Current configuration: !

hostname \"R3\" !

ip subnet-zero !

interface FastEthernet0 no ip address !

interface FastEthernet1 no ip address !

interface FastEthernet2 no ip address !

interface FastEthernet3 no ip address shutdown !

interface Serial0

ip address 192.168.34.3 255.255.255.0 clock rate 000 !

interface Serial1

ip address 192.168.23.3 255.255.255.0 !

router ospf 1

network 192.168.34.0 0.0.0.255 area 2 network 192.168.23.0 0.0.0.255 area 1 area 1 virtual-link 192.168.23.2 !

ip classless !

line con 0 line aux 0 line vty 0 4 login ! end

R2#sh run

Building configuration...

Current configuration: !

hostname \"R2\" !

ip subnet-zero !

interface FastEthernet0 no ip address shutdown !

interface FastEthernet1

no ip address shutdown !

interface FastEthernet2 no ip address !

interface FastEthernet3 no ip address shutdown !

interface Serial0

ip address 192.168.12.2 255.255.255.0 !

interface Serial1

ip address 192.168.23.2 255.255.255.0 clock rate 000

!

router ospf 1

network 192.168.23.0 0.0.0.255 area 1 network 192.168.12.0 0.0.0.255 area 0 area 1 virtual-link 192.168.34.3 !

ip classless !

line con 0 line aux 0 line vty 0 4 login ! end

R1#sh run

Building configuration...

Current configuration: !

hostname \"R1\" !

ip subnet-zero !

interface FastEthernet0 no ip address shutdown !

interface FastEthernet1

no ip address shutdown !

interface FastEthernet2 no ip address shutdown !

interface FastEthernet3 no ip address shutdown !

interface Serial0

ip address 192.168.12.1 255.255.255.0 clock rate 000 !

interface Serial1 no ip address shutdown !

router ospf 1

network 192.168.12.0 0.0.0.255 area 0 !

ip classless !

line con 0 line aux 0 line vty 0 4 login ! end

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- sarr.cn 版权所有 赣ICP备2024042794号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务