设为首页收藏本站language 语言切换
查看: 1481|回复: 8
收起左侧

[求助] 求助一个策略路由问题

[复制链接]
发表于 2021-6-17 14:48:39 | 显示全部楼层 |阅读模式
3鸿鹄币
写了一个策略路由后,在VLAN端口上调用,然后查看端口配置,没有调用,实际测试也没调用成功,为啥接口上调不起来呢?

最佳答案

查看完整内容

刚试着做了一遍没有问题 应该是你的模拟器或者配置思路有问题 你把拓普发出来然后把所有配置贴一下比较好 下面是我的配置和拓普 R2: R3: R1: 看效果PC PING 1.1.1.1
发表于 2021-6-17 14:48:40 | 显示全部楼层
本帖最后由 leort 于 2021-6-17 19:00 编辑

刚试着做了一遍没有问题 应该是你的模拟器或者配置思路有问题
1.JPG
你把拓普发出来然后把所有配置贴一下比较好
下面是我的配置和拓普
2.JPG
R2:
Router#sh run
Building configuration...

Current configuration : 1025 bytes
!
version 15.7
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 1.1.1.1 255.255.255.0
!
interface Ethernet0/0
no ip address
duplex auto
!
interface Ethernet0/1
ip address 12.1.1.2 255.255.255.0
duplex auto
!
interface Ethernet0/2
no ip address
shutdown
duplex auto
!
interface Ethernet0/3
no ip address
shutdown
duplex auto
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 12.1.1.1
!
ipv6 ioam timestamp
!
!
!
control-plane
!
!
!
!
!
!
!
!         
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
end

R3:
Router#sh run
Building configuration...

Current configuration : 1027 bytes
!
version 15.7
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 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
no ip address
duplex auto
!
interface Ethernet0/1
ip address 13.1.1.3 255.255.255.0
duplex auto
!
interface Ethernet0/2
no ip address
shutdown
duplex auto
!
interface Ethernet0/3
no ip address
shutdown
duplex auto
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 13.1.1.1
!
ipv6 ioam timestamp
!
!
!
control-plane
!
!
!
!
!
!
!
!         
line con 0
logging synchronous
line aux 0
line vty 0 4
login
transport input none
!
!
end

R1:
Switch(config-if)#do sh run
Building configuration...

Current configuration : 1294 bytes
!
! Last configuration change at 12:23:20 EET Thu Jun 17 2021
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EET 2 0
!
!
!
!         
!
!
!
ip dhcp pool on9
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!         
!
!
!
!
!
!
!
interface Ethernet0/0
switchport access vlan 6
switchport mode access
!
interface Ethernet0/1
!
interface Ethernet0/2
no switchport
ip address 13.1.1.1 255.255.255.0
!
interface Ethernet0/3
no switchport
ip address 12.1.1.1 255.255.255.0
!
interface Vlan6
ip address 192.168.1.254 255.255.255.0
ip policy route-map to_line
!
ip forward-protocol nd
!
ip http server
ip http secure-server
!
ip ssh server algorithm encryption aes128-ctr aes192-ctr aes256-ctr
ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr
!
!
access-list 102 permit ip 192.168.1.0 0.0.0.255 host 1.1.1.1
!
route-map to_line permit 10
match ip address 102
set ip next-hop 13.1.1.3
!
!
!
control-plane
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
!
end

看效果PC PING 1.1.1.1
pc.JPG
R3.JPG




沙发 2021-6-17 14:48:40 回复 收起回复
回复

使用道具 举报

发表于 2021-6-17 14:55:29 | 显示全部楼层
把配置贴出来看看 你的VLAN端口是交换机吗还是路由器的子接口?
板凳 2021-6-17 14:55:29 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2021-6-17 15:04:59 | 显示全部楼层
leort 发表于 2021-6-17 14:55
把配置贴出来看看 你的VLAN端口是交换机吗还是路由器的子接口?

是交换机VLAN端口,route-map to_line permit 10,match ip address 2,set ip default next-hop 192.168.253.15
地板 2021-6-17 15:04:59 回复 收起回复
回复

使用道具 举报

发表于 2021-6-17 16:28:46 | 显示全部楼层
把ACL和接口调用的命令都发来看下 直接SH RUN吧
5# 2021-6-17 16:28:46 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2021-6-17 17:32:34 | 显示全部楼层
leort 发表于 2021-6-17 16:28
把ACL和接口调用的命令都发来看下 直接SH RUN吧

access-list 2 permit 192.168.6.111

interface Vlan6
ip address 192.168.6.253 255.255.255.0
ip policy route-map to_line
6# 2021-6-17 17:32:34 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2021-6-18 09:35:03 | 显示全部楼层
leort 发表于 2021-6-17 18:30
刚试着做了一遍没有问题 应该是你的模拟器或者配置思路有问题

你把拓普发出来然后把所有配置贴一下比较 ...

执行下一跳加了default就不行,不加就可以,好奇怪
7# 2021-6-18 09:35:03 回复 收起回复
回复

使用道具 举报

发表于 2021-6-18 10:05:52 | 显示全部楼层
learnCC 发表于 2021-6-18 09:35
执行下一跳加了default就不行,不加就可以,好奇怪

我听过几个老师的课也是不加default的 你看哪个讲师的课程
8# 2021-6-18 10:05:52 回复 收起回复
回复

使用道具 举报

发表于 2021-6-22 04:55:29 | 显示全部楼层
楼主你把完整的config跟托扑发上来看一下
9# 2021-6-22 04:55:29 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-2 22:43 , Processed in 0.124360 second(s), 15 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表