|
R1和R2通过S1/0口相连,R1上两个LOOPBACK接口分别配置未1.1.1.0/24和5.5.5.0/24,两台路由器间运行OSPF协议。实验目的是不重分发5.5.5.0/24这个网段给R2,用的是route-map,但是实际运行后发现没有起作用,请问是哪里错了?附上配置,请知道的告诉下谢谢了
R1配置:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
ip address 5.5.5.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 10.12.0.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
ip address 10.14.0.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
redistribute connected subnets route-map 1
network 10.12.0.0 0.0.0.255 area 0
network 10.14.0.0 0.0.0.255 area 0
!
!
no ip http server
no ip http secure-server
!
!
!
ip prefix-list 1 seq 5 deny 5.5.5.0/24
!
route-map 1 permit 10
match ip address prefix-list 1
!
route-map 1 permit 20
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
!
end
R1#
R2配置:
interface Loopback0
ip address 2.2.2.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 10.12.0.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 10.23.0.1 255.255.255.0
ip policy route-map 1
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 2.2.2.1
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 10.12.0.0 0.0.0.255 area 0
network 10.23.0.0 0.0.0.255 area 0
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
!
end
|
|