关于路由器的策略路由问题
问题描述:
内网有两个vlan,分别为vlan10和vlan20,然后我想让vlan10是通过外网链路100.0.0.0/24去访问1.1.1.1;让vlan20是通过外网链路200.0.0.0/24去访问1.1.1.1,配置如下,麻烦帮你看一下是否可行,好像没有做成功。
[H3C]dis cu
vlan 1
#
vlan 10
#
vlan 20
#
policy-based-route 1 permit node 10
if-match acl 3000
apply next-hop 100.0.0.2
#
policy-based-route 2 permit node 10
if-match acl 3001
apply next-hop 200.0.0.2
#
interface Vlan-interface10
ip address 192.168.10.1 255.255.255.0
ip policy-based-route 1
#
interface Vlan-interface20
ip address 192.168.20.1 255.255.255.0
ip policy-based-route 2
#
interface GigabitEthernet0/1
port link-mode route
combo enable copper
ip address 100.0.0.1 255.255.255.0
nat outbound
#
interface GigabitEthernet0/2
port link-mode route
combo enable copper
ip address 200.0.0.1 255.255.255.0
nat outbound
#
interface GigabitEthernet6/0
port link-mode bridge
port access vlan 10
combo enable copper
#
interface GigabitEthernet6/1
port link-mode bridge
port access vlan 20
combo enable copper
#
ip route-static 0.0.0.0 0 100.0.0.2
ip route-static 0.0.0.0 0 200.0.0.2
#
acl advanced 3000
rule 0 permit ip source 192.168.10.0 0.0.0.255
#
acl advanced 3001
rule 0 permit ip source 192.168.20.0 0.0.0.255
#
return
[H3C]
组网及组网描述:
(0)
最佳答案
已采纳 战五渣 战五渣 九段 粉丝:12人 关注:7人
光看上面贴的配置木有问题哦,当然前提是两条链路本身正常;可以debug ip policy-based-route/terminal monitor/terminal debugging确认。
(0)
回复xxx [x] 2应该配置是正确的 你是怎么测试的 tracert吗?
(0)
模拟器无法测试的,之前在真实的环境配置测试了一次
zhiliao_71001 发表时间:
把MSR3620-2的默认路由删除,MSR3620-1的明细路由写到相应的出接口试试
(0)
回复xxx [x],关于路由器的策略路由问题