一、192.168.1.1在area 1里面
1.实验拓扑图
2.路由器配置
(1)IP地址配置
R1:
#
interface Ethernet0/0/0
ip address 10.1.1.1 255.255.255.192
#
interface LoopBack0
ip address 192.168.1.1 255.255.255.255
#
R2:
#
interface Ethernet0/0/0
ip address 10.1.1.2 255.255.255.192
#
interface Ethernet0/0/1
ip address 10.1.1.65 255.255.255.224
#
R3:
#
interface Ethernet0/0/0
ip address 10.1.1.66 255.255.255.224
#
interface Ethernet0/0/1
ip address 10.1.1.97 255.255.255.240
#
R4:
#
interface Ethernet0/0/0
ip address 10.1.1.98 255.255.255.240
#
interface LoopBack0
ip address 192.168.3.1 255.255.255.255
#
R5:
#
interface Ethernet0/0/0
ip address 10.1.1.99 255.255.255.240
#
interface LoopBack0
ip address 192.168.2.1 255.255.255.255
#
(2)区域配置
R1:
#
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 10.1.1.0 0.0.0.63
network 192.168.1.1 0.0.0.0
#
R2:
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 10.1.1.64 0.0.0.31
area 0.0.0.1
network 10.1.1.0 0.0.0.63
#
R3:
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.1.1.64 0.0.0.31
area 0.0.0.2
network 10.1.1.96 0.0.0.15
#
R4:
#
ospf 1 router-id 4.4.4.4
area 0.0.0.2
network 10.1.1.96 0.0.0.15
network 192.168.3.1 0.0.0.0
#
R5:
#
ospf 1 router-id 5.5.5.5
import-route direct //引入直连路由192.168.2.1/32
area 0.0.0.2
network 10.1.1.96 0.0.0.15
#
3.验证
查看R1的lsdb表:
查看R5的lsdb表:
Dis ospf lsdb router/network/summary/ase/asbr //查看路由通告详细信息