- 积分
- 152
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 注册时间
- 2017-12-11
- 最后登录
- 1970-1-1
- 阅读权限
- 20
- 听众
- 收听
助理工程师
|
3鸿鹄币
用route-map修改重分发路由的值不成功,重分发也不成功,不知道为什么,望高手指点
配置如下
R1
Router#show runn
Building configuration...
Current configuration : 985 bytes
!
! Last configuration change at 17:23:48 EET Tue Aug 20 2019
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
!
no aaa new-model
clock timezone EET 2 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
ip address 12.1.1.1 255.255.255.0
!
interface Ethernet0/1
no ip address
shutdown
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
router rip
version 2
network 12.0.0.0
no auto-summary
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
end
R2
Router#show runn
Building configuration...
Current configuration : 1336 bytes
!
! Last configuration change at 01:20:07 EET Wed Aug 21 2019
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
!
no aaa new-model
clock timezone EET 2 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
ip address 12.1.1.2 255.255.255.0
!
interface Ethernet0/1
ip address 23.1.1.2 255.255.255.0
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 110
no auto-cost
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
!
router rip
version 2
redistribute ospf 110 route-map test
network 12.0.0.0
network 23.0.0.0
no auto-summary
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
route-map test permit 10
match ip address 1
set metric 2
!
route-map test permit 20
match ip address 2
set metric 3
!
!
access-list 1 permit 3.3.3.0
access-list 2 permit 33.33.33.0
!
control-plane
!
!
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
end
R3
Router#show runn
Building configuration...
Current configuration : 1181 bytes
!
! Last configuration change at 17:25:53 EET Tue Aug 20 2019
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EET 2 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Loopback1
ip address 33.33.33.33 255.255.255.0
!
interface Ethernet0/0
no ip address
shutdown
!
interface Ethernet0/1
ip address 23.1.1.3 255.255.255.0
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 110
redistribute connected subnets
network 3.3.3.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
network 33.33.33.0 0.0.0.255 area 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
end
路由表如下
R1
Gateway of last resort is not set
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.1.1.0/24 is directly connected, Ethernet0/0
L 12.1.1.1/32 is directly connected, Ethernet0/0
23.0.0.0/24 is subnetted, 1 subnets
R 23.1.1.0 [120/1] via 12.1.1.2, 00:00:02, Ethernet0/0
R2
Gateway of last resort is not set
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/11] via 23.1.1.3, 08:40:16, Ethernet0/1
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.1.1.0/24 is directly connected, Ethernet0/0
L 12.1.1.2/32 is directly connected, Ethernet0/0
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 23.1.1.0/24 is directly connected, Ethernet0/1
L 23.1.1.2/32 is directly connected, Ethernet0/1
33.0.0.0/32 is subnetted, 1 subnets
O 33.33.33.33 [110/11] via 23.1.1.3, 08:40:16, Ethernet0/1
R3
Gateway of last resort is not set
3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 3.3.3.0/24 is directly connected, Loopback0
L 3.3.3.3/32 is directly connected, Loopback0
12.0.0.0/24 is subnetted, 1 subnets
O 12.1.1.0 [110/20] via 23.1.1.2, 08:41:13, Ethernet0/1
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 23.1.1.0/24 is directly connected, Ethernet0/1
L 23.1.1.3/32 is directly connected, Ethernet0/1
33.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 33.33.33.0/24 is directly connected, Loopback1
L 33.33.33.33/32 is directly connected, Loopback1
不知道哪里配的不对,造成用route-map重分发不成功,望高手指点,谢谢
|
最佳答案
查看完整内容
R2 学到的OSPF路由是3.3.3.3/32,33.33.33.33/32这两个IP地址
access-list 1 permit 3.3.3.0 只是匹配3.3.3.0/32这一个地址,并没有匹配3.3.3.3/32
改成access-list 1 permit 3.3.3.3 就匹配了 3.3.3.3/32 这条从OSPF学到的路由
access-list 1 permit 3.3.3.0 0.0.0.255 匹配3.3.3.0-3.3.3.255即3.3.3.0/24
3.3.3.0/24里包含3.3.3.3/32 所以被匹配了
r2#show access-lists
Standard IP access list 1
20 ...
|