1、RTA的OSPF主要配置:
sysname RTA
#
interface Ethernet0/1/0
port link-mode route
description link_to_RTB-eth0/1/0
ip address 192.168.0.1 255.255.255.252
#
interface Ethernet0/1/1
port link-mode route
description link_to_RTC-eth0/1/1
ip address 192.168.0.5 255.255.255.252
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.3
network 1.1.1.1 0.0.0.0
area 0.0.0.1
network 192.168.0.4 0.0.0.3
#
interface Ethernet0/1/0
port link-mode route
description link_to_RTB-eth0/1/0
ip address 192.168.0.1 255.255.255.252
#
interface Ethernet0/1/1
port link-mode route
description link_to_RTC-eth0/1/1
ip address 192.168.0.5 255.255.255.252
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.3
network 1.1.1.1 0.0.0.0
area 0.0.0.1
network 192.168.0.4 0.0.0.3
2、RTB 的OSPF主要配置:
sysname RTB
router id 2.2.2.2
interface Ethernet0/1/0
port link-mode route
description link_to_RTA-eth0/1/0
ip address 192.168.0.2 255.255.255.252
interface Ethernet0/1/1
port link-mode route
description link_to_RTD-eth0/1/1
ip address 192.168.0.9 255.255.255.252
interface LoopBack0
description router-id
ip address 2.2.2.2 255.255.255.255
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 192.168.0.0 0.0.0.3
area 0.0.0.2
network 192.168.0.8 0.0.0.3
router id 2.2.2.2
interface Ethernet0/1/0
port link-mode route
description link_to_RTA-eth0/1/0
ip address 192.168.0.2 255.255.255.252
interface Ethernet0/1/1
port link-mode route
description link_to_RTD-eth0/1/1
ip address 192.168.0.9 255.255.255.252
interface LoopBack0
description router-id
ip address 2.2.2.2 255.255.255.255
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 192.168.0.0 0.0.0.3
area 0.0.0.2
network 192.168.0.8 0.0.0.3
3、RTC的OSPF主要配置
sysname RTC
router id 3.3.3.3
interface Ethernet0/1/0
port link-mode route
description link_to_RTE-eth0/1/0
ip address 172.16.1.1 255.255.255.0
#
interface Ethernet0/1/1
port link-mode route
description link_to_RTA-eth0/1/1
ip address 192.168.0.6 255.255.255.252
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
ospf 1
area 0.0.0.1
network 192.168.0.4 0.0.0.3
network 172.16.1.0 0.0.0.255
network 3.3.3.3 0.0.0.0
4、RTD的OSPF的主要配置:
router id 3.3.3.3
interface Ethernet0/1/0
port link-mode route
description link_to_RTE-eth0/1/0
ip address 172.16.1.1 255.255.255.0
#
interface Ethernet0/1/1
port link-mode route
description link_to_RTA-eth0/1/1
ip address 192.168.0.6 255.255.255.252
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
ospf 1
area 0.0.0.1
network 192.168.0.4 0.0.0.3
network 172.16.1.0 0.0.0.255
network 3.3.3.3 0.0.0.0
4、RTD的OSPF的主要配置:
sysname RTD
interface Ethernet0/1/0
port link-mode route
description link_to_RTF-eth0/1/0
ip address 172.16.2.1 255.255.255.0
#
interface Ethernet0/1/1
port link-mode route
description link_to-RTB-eth0/1/1
ip address 192.168.0.10 255.255.255.252
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
ospf 1
area 0.0.0.2
network 4.4.4.4 0.0.0.0
network 182.168.0.8 0.0.0.3
network 172.16.2.0 0.0.0.255
network 192.168.0.8 0.0.0.3
interface Ethernet0/1/0
port link-mode route
description link_to_RTF-eth0/1/0
ip address 172.16.2.1 255.255.255.0
#
interface Ethernet0/1/1
port link-mode route
description link_to-RTB-eth0/1/1
ip address 192.168.0.10 255.255.255.252
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
ospf 1
area 0.0.0.2
network 4.4.4.4 0.0.0.0
network 182.168.0.8 0.0.0.3
network 172.16.2.0 0.0.0.255
network 192.168.0.8 0.0.0.3
5、RTE的OSPF主要配置:
version 5.20, Alpha 1011
#
sysname RTE
router id 5.5.5.5
interface Ethernet0/1/0
port link-mode route
description link_to_RTC-eth0/1/0
ip address 172.16.1.2 255.255.255.0
interface LoopBack9
ip address 5.5.5.5 255.255.255.255
ospf 1
area 0.0.0.1
network 172.16.1.0 0.0.0.255
network 5.5.5.5 0.0.0.0
6、RTF的OSPF主要配置:
#
sysname RTE
router id 5.5.5.5
interface Ethernet0/1/0
port link-mode route
description link_to_RTC-eth0/1/0
ip address 172.16.1.2 255.255.255.0
interface LoopBack9
ip address 5.5.5.5 255.255.255.255
ospf 1
area 0.0.0.1
network 172.16.1.0 0.0.0.255
network 5.5.5.5 0.0.0.0
6、RTF的OSPF主要配置:
sysname RTF
router id 6.6.6.6
interface Ethernet0/1/0
port link-mode route
description link_to-RTD-eth0/1/0
ip address 172.16.2.2 255.255.255.0
#
interface NULL0
#
interface LoopBack0
description router-id
ip address 6.6.6.6 255.255.255.255
ospf 1
area 0.0.0.2
network 172.16.2.0 0.0.0.255
router id 6.6.6.6
interface Ethernet0/1/0
port link-mode route
description link_to-RTD-eth0/1/0
ip address 172.16.2.2 255.255.255.0
#
interface NULL0
#
interface LoopBack0
description router-id
ip address 6.6.6.6 255.255.255.255
ospf 1
area 0.0.0.2
network 172.16.2.0 0.0.0.255
7、 各路由器上的OSPF路由信息及邻居:
RTA:
<RTA>dis ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbor Brief Information
Neighbor Brief Information
Area: 0.0.0.0
Router ID Address Pri Dead-Time Interface State
2.2.2.2 192.168.0.2 1 31 Eth0/1/0 Full/BDR
Router ID Address Pri Dead-Time Interface State
2.2.2.2 192.168.0.2 1 31 Eth0/1/0 Full/BDR
Area: 0.0.0.1
Router ID Address Pri Dead-Time Interface State
3.3.3.3 192.168.0.6 1 39 Eth0/1/1 Full/BDR
Router ID Address Pri Dead-Time Interface State
3.3.3.3 192.168.0.6 1 39 Eth0/1/1 Full/BDR
dis ospf routing
OSPF Process 1 with Router ID 1.1.1.1
Routing Tables
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
5.5.5.5/32 20 Stub 192.168.0.6 5.5.5.5 0.0.0.1
4.4.4.4/32 20 Inter 192.168.0.2 2.2.2.2 0.0.0.0
172.16.1.0/24 20 Transit 192.168.0.6 5.5.5.5 0.0.0.1
172.16.2.0/24 30 Inter 192.168.0.2 2.2.2.2 0.0.0.0
3.3.3.3/32 10 Stub 192.168.0.6 3.3.3.3 0.0.0.1
2.2.2.2/32 10 Stub 192.168.0.2 2.2.2.2 0.0.0.0
192.168.0.0/30 10 Transit 192.168.0.1 1.1.1.1 0.0.0.0
192.168.0.4/30 10 Transit 192.168.0.5 1.1.1.1 0.0.0.1
192.168.0.8/30 20 Inter 192.168.0.2 2.2.2.2 0.0.0.0
1.1.1.1/32 0 Stub 1.1.1.1 1.1.1.1 0.0.0.0
Destination Cost Type NextHop AdvRouter Area
5.5.5.5/32 20 Stub 192.168.0.6 5.5.5.5 0.0.0.1
4.4.4.4/32 20 Inter 192.168.0.2 2.2.2.2 0.0.0.0
172.16.1.0/24 20 Transit 192.168.0.6 5.5.5.5 0.0.0.1
172.16.2.0/24 30 Inter 192.168.0.2 2.2.2.2 0.0.0.0
3.3.3.3/32 10 Stub 192.168.0.6 3.3.3.3 0.0.0.1
2.2.2.2/32 10 Stub 192.168.0.2 2.2.2.2 0.0.0.0
192.168.0.0/30 10 Transit 192.168.0.1 1.1.1.1 0.0.0.0
192.168.0.4/30 10 Transit 192.168.0.5 1.1.1.1 0.0.0.1
192.168.0.8/30 20 Inter 192.168.0.2 2.2.2.2 0.0.0.0
1.1.1.1/32 0 Stub 1.1.1.1 1.1.1.1 0.0.0.0
Total Nets: 10
Intra Area: 7 Inter Area: 3 ASE: 0 NSSA: 0
Intra Area: 7 Inter Area: 3 ASE: 0 NSSA: 0
转载于:https://blog.51cto.com/h3cie/88641