R1#sh run
Building configuration...
Current configuration : 1080 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524NHN4-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback1
ip address 172.16.10.1 255.255.255.255
!
interface Loopback2
ip address 172.31.10.1 255.255.255.255
!
interface Loopback100
no ip address
!
interface GigabitEthernet0/0
ip address 11.10.10.1 255.255.255.252
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 12.10.10.1 255.255.255.252
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router ospf 100
router-id 1.1.1.1
log-adjacency-changes
network 172.16.10.0 0.0.0.0 area 0
network 172.31.10.0 0.0.0.0 area 0
network 11.10.10.0 0.0.0.3 area 0
network 12.10.10.0 0.0.0.3 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
ASBR1#sh run
Building configuration...
Current configuration : 1080 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524NHN4-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 12.10.10.2 255.255.255.252
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 192.168.20.0 0.0.0.255 area 20
network 12.10.10.0 0.0.0.3 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
R1#sh run
Building configuration...
Current configuration : 1080 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524NHN4-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback1
ip address 172.16.10.1 255.255.255.255
!
interface Loopback2
ip address 172.31.10.1 255.255.255.255
!
interface Loopback100
no ip address
!
interface GigabitEthernet0/0
ip address 11.10.10.2 255.255.255.252
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
network 11.10.10.0 0.0.0.3 area 0
network 192.168.10.0 0.0.0.255 area 10
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end发布于 2022-06-23 12:48:44
OSPF将不构成地址,因此两个网络语句:
network 172.16.10.0 0.0.0.0 area 0
network 172.31.10.0 0.0.0.0 area 0正在尝试使用路由器上不存在的接口(172.16.10.0和172.31.10.0)。您的回环是172.16.10.1和172.31.10.1。
请记住,OSPF网络语句用于告诉OSPF哪些接口正在参与OSPF过程,而不是广告哪些网络。
您可以采取多种方法,例如:
network 172.16.10.1 0.0.0.0 area 0
network 172.31.10.1 0.0.0.0 area 0
network 11.10.10.0 0.0.0.3 area 0
network 12.10.10.0 0.0.0.3 area 0-或者-
network 172.0.0.0 0.255.255.255 area 0
network 11.10.10.0 0.0.0.3 area 0
network 12.10.10.0 0.0.0.3 area 0-or甚至类似于-
network 0.0.0.0 255.255.255.255 area 0这将匹配所有的接口。
由于您没有在任何路由器上将路由重新分配到OSPF,所以您实际上没有ASBR,这是一个将外部路由重新分配到OSPF的OSPF路由器。ABR将不同区域连接到区域0,而ASBR将外部路由重新分配到OSPF (E1或E2路由)。
https://networkengineering.stackexchange.com/questions/79218
复制相似问题