实验:OSPF高级配置(一)连通性目标实现

简介:
实验拓扑图如下:
拓扑连接详情:
Router1 F0/0 <----> Router2 F0/0 
Router2 F1/0 <----> Router3 F0/0 
Router3 F1/0 <----> Router4 F0/0 
Router1 F1/0 <----> Router5 F0/0 
Router5 F1/0 <----> Router6 F0/0 
Router6 F1/0 <----> Router7 F0/0 
根据拓扑图,设置接口IP。
拓扑图中有两个变量——X Y
一、当X=0,Y=1时,Area X为中转区域,Area Y为常规区域。
1.路由器设置
R1:
!
interface FastEthernet0/0
 ip address 192.168.10.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.10.0 0.0.0.255 area 0
!
R2:
!
interface FastEthernet0/0
 ip address 192.168.10.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.17.1 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 192.168.10.0 0.0.0.255 area 0
 network 192.168.17.0 0.0.0.255 area 1
!
R3:
!
interface FastEthernet0/0
 ip address 192.168.17.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.30.1 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 192.168.17.0 0.0.0.255 area 1
 network 192.168.30.0 0.0.0.255 area 1
!
R4:
!
interface FastEthernet0/0
 ip address 192.168.30.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 192.168.30.0 0.0.0.255 area 1
!
R5:
!
interface FastEthernet0/0
 ip address 192.168.1.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.66.1 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 redistribute rip metric 20
 network 192.168.1.0 0.0.0.255 area 0
!
router rip
 version 2
 redistribute ospf 1 metric 3
 network 192.168.66.0
 no auto-summary
!
R6:
!
interface FastEthernet0/0
 ip address 192.168.66.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.70.1 255.255.255.0
 duplex auto
 speed auto
!
router rip
 version 2
 network 192.168.66.0
 network 192.168.70.0
 no auto-summary
!
R7:
!
interface FastEthernet0/0
 ip address 192.168.70.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
router rip
 version 2
 network 192.168.70.0
 no auto-summary
!
1.1查看路由表信息
R4#sh ip route 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C    192.168.30.0/24 is directly connected, FastEthernet0/0
O IA 192.168.10.0/24 [110/3] via 192.168.30.1, 00:10:56, FastEthernet0/0
O E2 192.168.66.0/24 [110/20] via 192.168.30.1, 00:08:13, FastEthernet0/0
O    192.168.17.0/24 [110/2] via 192.168.30.1, 00:10:56, FastEthernet0/0
O IA 192.168.1.0/24 [110/4] via 192.168.30.1, 00:10:56, FastEthernet0/0
O E2 192.168.70.0/24 [110/20] via 192.168.30.1, 00:08:13, FastEthernet0/0
R7#sh ip route 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
R    192.168.30.0/24 [120/4] via 192.168.70.1, 00:00:07, FastEthernet0/0
R    192.168.10.0/24 [120/4] via 192.168.70.1, 00:00:07, FastEthernet0/0
R    192.168.66.0/24 [120/1] via 192.168.70.1, 00:00:07, FastEthernet0/0
R    192.168.17.0/24 [120/4] via 192.168.70.1, 00:00:07, FastEthernet0/0
R    192.168.1.0/24 [120/4] via 192.168.70.1, 00:00:07, FastEthernet0/0
C    192.168.70.0/24 is directly connected, FastEthernet0/0
1.2查看OSPF LSDB
R1# sh ip ospf database
            OSPF Router with ID (192.168.10.1) (Process ID 1)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.10.1    192.168.10.1    736         0x80000004 0x008AEB 2
192.168.17.1    192.168.17.1    789         0x80000003 0x00B19C 1
192.168.66.1    192.168.66.1    573         0x80000003 0x006E8F 1
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     192.168.10.1    735         0x80000001 0x000B2E
192.168.10.2    192.168.17.1    789         0x80000001 0x00D088
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.17.0    192.168.17.1    816         0x80000001 0x009CA9
192.168.30.0    192.168.17.1    753         0x80000001 0x001721
                Type-5 AS External Link States
          
Link ID         ADV Router      Age         Seq#       Checksum Tag
192.168.66.0    192.168.66.1    573         0x80000001 0x007BCC 0
192.168.70.0    192.168.66.1    574         0x80000001 0x004FF4 0
R2#sh ip ospf database
            OSPF Router with ID (192.168.17.1) (Process ID 1)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.10.1    192.168.10.1    762         0x80000004 0x008AEB 2
192.168.17.1    192.168.17.1    813         0x80000003 0x00B19C 1
192.168.66.1    192.168.66.1    599         0x80000003 0x006E8F 1
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     192.168.10.1    761         0x80000001 0x000B2E
192.168.10.2    192.168.17.1    813         0x80000001 0x00D088
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.17.0    192.168.17.1    840         0x80000001 0x009CA9
192.168.30.0    192.168.17.1    778         0x80000001 0x001721
                Router Link States (Area 1)
          
Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.17.1    192.168.17.1    782         0x80000002 0x004002 1
192.168.30.1    192.168.30.1    757         0x80000004 0x00ED16 2
192.168.30.2    192.168.30.2    757         0x80000002 0x006F9C 1
                Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.17.2    192.168.30.1    784         0x80000001 0x00F838
192.168.30.2    192.168.30.2    758         0x80000001 0x0017FD
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.0     192.168.17.1    809         0x80000001 0x0057FD
192.168.10.0    192.168.17.1    846         0x80000001 0x00E963
                Summary ASB Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.66.1    192.168.17.1    593         0x80000001 0x0071A0
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
192.168.66.0    192.168.66.1    600         0x80000001 0x007BCC 0
192.168.70.0    192.168.66.1    601         0x80000001 0x004FF4 0
R5#sh ip ospf database
            OSPF Router with ID (192.168.66.1) (Process ID 1)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.10.1    192.168.10.1    802         0x80000004 0x008AEB 2
192.168.17.1    192.168.17.1    855         0x80000003 0x00B19C 1
192.168.66.1    192.168.66.1    638         0x80000003 0x006E8F 1
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     192.168.10.1    802         0x80000001 0x000B2E
192.168.10.2    192.168.17.1    855         0x80000001 0x00D088
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.17.0    192.168.17.1    881         0x80000001 0x009CA9
192.168.30.0    192.168.17.1    819         0x80000001 0x001721
                Type-5 AS External Link States
          
Link ID         ADV Router      Age         Seq#       Checksum Tag
192.168.66.0    192.168.66.1    637         0x80000001 0x007BCC 0
192.168.70.0    192.168.66.1    638         0x80000001 0x004FF4 0
R4# sh ip ospf database
            OSPF Router with ID (192.168.30.2) (Process ID 1)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.17.1    192.168.17.1    854         0x80000002 0x004002 1
192.168.30.1    192.168.30.1    826         0x80000004 0x00ED16 2
192.168.30.2    192.168.30.2    825         0x80000002 0x006F9C 1
                Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.17.2    192.168.30.1    853         0x80000001 0x00F838
192.168.30.2    192.168.30.2    825         0x80000001 0x0017FD
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.0     192.168.17.1    880         0x80000001 0x0057FD
192.168.10.0    192.168.17.1    917         0x80000001 0x00E963
                Summary ASB Link States (Area 1)
          
Link ID         ADV Router      Age         Seq#       Checksum
192.168.66.1    192.168.17.1    665         0x80000001 0x0071A0
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
192.168.66.0    192.168.66.1    672         0x80000001 0x007BCC 0
192.168.70.0    192.168.66.1    672         0x80000001 0x004FF4 0




本文转自 tiger506 51CTO博客,原文链接:http://blog.51cto.com/tiger506/169918,如需转载请自行联系原作者

目录
相关文章
|
6月前
|
网络协议 数据库 vr&ar
1. OSPF 基础实验(一):单区域
1. OSPF 基础实验(一):单区域
|
2月前
|
网络架构
静态路由 网络实验
本文介绍了如何通过配置静态路由实现不同网络设备间的通信,包括网络拓扑图、设备IP配置、查看路由表信息、配置静态路由和测试步骤。通过在路由器上设置静态路由,使得不同子网内的设备能够互相通信。
静态路由 网络实验
|
6月前
|
消息中间件 网络协议 网络架构
3. BGP 实验(一):基础实验
3. BGP 实验(一):基础实验
|
6月前
|
负载均衡 网络协议 网络架构
静态路由 及其 实验操作
静态路由 及其 实验操作
|
6月前
配置STP功能实验
在一个复杂的网络中,网络规划者由于冗余备份的需要,一般都倾向于在设备之间部署多条物理链路,其中一条作主用链路,其他链路作备份。这样就难免会形成环形网络,若网络中存在环路,可能会引起广播风暴和MAC表项被破坏。 网络规划者规划好网络后,可以在网络中部署STP协议预防环路。当网络中存在环路,STP通过阻塞某个端口以达到破除环路的目的。如图1所示,当前网络中存在环路,SwitchA、SwitchB、SwitchC和SwitchD都运行STP,通过彼此交互信息发现网络中的环路,并有选择的对某个端口进行阻塞,最终将环形网络结构修剪成无环路的树形网络结构,从而防止报文在环形网络中不断循环,避免设备由于重复
配置STP功能实验
|
6月前
|
网络协议 vr&ar 网络架构
1. OSPF 基础实验(二):多区域
1. OSPF 基础实验(二):多区域