• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

策略路由设置问题。

2024-09-02提问
  • 0关注
  • 0收藏,198浏览
008xm 零段
粉丝:0人 关注:0人

问题描述:

[H3C-pbr-aaa-5]display acl all

Advanced ACL 3101, named -none-, 1 rule,

ACL's step is 5

rule 5 permit ip source 10.0.0.0 0.255.255.255

[H3C-pbr-aaa-5]display policy-based-route

Policy based routing configuration information:

policy-based-route : aaa

Node 5 permit :

if-match acl 3101

apply ip-address next-hop 192.168.1.1

apply output-interface GigabitEthernet0/1

我想要设置成10.0.0.0开头的网页从 GigabitEthernet0/1出去,其它的从GigabitEthernet0/0出去.

这是我设置的,但是ping 10.2.10.96丢包,ping baidu.com丢包。不知道是什么回事。

4 个回答
已采纳
粉丝:3人 关注:0人

在策略路由加一条空的

policy-based-route pbr6 permit node 200


在acl 加一句禁止

rule 2000 deny ip


搞好了,用最笨的办证,再建一个0.0.0.0的静态路由,出口选GigabitEthernet0/0,优先级65。静态路由网络地址:10.0.0.0 子网掩码:255.0.0.0 下一跳192.168.1.1 优先级60.这样就正常了。谢谢您。

008xm 发表时间:2024-09-02 更多>>

]rule 2000 deny ip这里的ip填什么。

008xm 发表时间:2024-09-02

不用填,禁止所有其它的源IP通过

有飞不起的鸟 发表时间:2024-09-02

[H3C]display acl all Advanced ACL 3101, named -none-, 2 rules, ACL's step is 5 rule 5 permit ip source 10.0.0.0 0.255.255.255 rule 10 deny ip (1320 times matched)

008xm 发表时间:2024-09-02

好像也不行,40%丢包率。

008xm 发表时间:2024-09-02

(1320 times matched)这个是它自动生成的

008xm 发表时间:2024-09-02

policy-based-route pbr6 permit node 200这句我删除了,不然ping不通

008xm 发表时间:2024-09-02

policy-based-route pbr6 permit node 200 这条加没有呢

有飞不起的鸟 发表时间:2024-09-02

这条需要的,将不需要的策略过滤掉。

有飞不起的鸟 发表时间:2024-09-02

[H3C]display policy-based-route Policy based routing configuration information: policy-based-route : aaa Node 5 permit : if-match acl 3101 apply ip-address next-hop 192.168.1.1 apply output-interface GigabitEthernet0/1 policy-based-route : pbr6 Node 200 permit :

008xm 发表时间:2024-09-02

[H3C]display policy-based-route Policy based routing configuration information: policy-based-route : aaa Node 5 permit : if-match acl 3101 apply ip-address next-hop 192.168.1.1 apply output-interface GigabitEthernet0/1 policy-based-route : pbr6 Node 200 permit :

008xm 发表时间:2024-09-02

[H3C]display policy-based-route Policy based routing configuration information: policy-based-route : aaa Node 5 permit : if-match acl 3101 apply ip-address next-hop 192.168.1.1 apply output-interface GigabitEthernet0/1 policy-based-route : pbr6 Node 200 permit :

008xm 发表时间:2024-09-02

这样吗

008xm 发表时间:2024-09-02

disp cur 显示的命令发来,个不好年

有飞不起的鸟 发表时间:2024-09-02

你看我的路由表在下面的图。

008xm 发表时间:2024-09-02

disp cur 显示的命令发来,不好看display policy-based-route Policy based routing configuration information

有飞不起的鸟 发表时间:2024-09-02

[H3C]disp cur # version 5.20, Release 2516P28 # sysname H3C # clock timezone Beijing add 08:00:00 # password-control enable undo password-control aging enable undo password-control history enable password-control length 6 password-control login-attempt 3 exceed lock-time 10 password-control password update interval 0 password-control login idle-time 0 password-control complexity user-name check # ftp server enable # ip local policy-based-route aaa # domain default enable system # telnet server enable # dar p2p signature-file flash:/p2p_default.mtd # port-security enable # web idle-timeout 60 # password-recovery enable # acl number 3101 rule 5 permit ip source 10.0.0.0 0.255.255.255 rule 10 deny ip # vlan 1 # domain system access-limit disable state active idle-cut disable self-service-url disable # dhcp server ip-pool nas static-bind ip-address 192.168.123.111 mask 255.255.255.0 static-bind mac-address f44d-30a6-7e41 gateway-list 192.168.123.1 dns-list 114.114.114.114 114.114.115.115 # dhcp server ip-pool vlan1 extended network ip range 192.168.8.2 192.168.8.254 network mask 255.255.255.0 gateway-list 192.168.8.1 dns-list 114.114.114.114 8.8.8.8 # dhcp server ip-pool ywg static-bind ip-address 192.168.123.188 mask 255.255.255.0 static-bind mac-address 309c-239b-4b7b gateway-list 192.168.123.1 dns-list 114.114.114.114 114.114.115.115 # policy-based-route aaa permit node 5 if-match acl 3101 apply ip-address next-hop 192.168.1.1 apply output-interface GigabitEthernet0/1 # policy-based-route pbr6 permit node 200 # user-group system group-attribute allow-guest # local-user admin authorization-attribute level 3 service-type telnet terminal service-type ftp service-type web # cwmp undo cwmp enable # interface Aux0 async mode flow link-protocol ppp # interface Cellular0/0 async mode protocol link-protocol ppp # interface NULL0 # interface Vlan-interface1 ip address 192.168.8.1 255.255.255.0 dhcp server apply ip-pool vlan1 ip flow-ordering internal # interface GigabitEthernet0/0 port link-mode route nat outbound ip address dhcp-alloc ip flow-ordering external # interface GigabitEthernet0/1 port link-mode route nat outbound ip address dhcp-alloc ip flow-ordering external # interface GigabitEthernet0/2 port link-mode bridge # interface GigabitEthernet0/3 port link-mode bridge # interface GigabitEthernet0/4 port link-mode bridge # interface GigabitEthernet0/5 port link-mode bridge # interface GigabitEthernet0/6 port link-mode bridge # interface GigabitEthernet0/7 port link-mode bridge # interface GigabitEthernet0/8 port link-mode bridge # interface GigabitEthernet0/9 port link-mode bridge # dhcp enable # ntp-service unicast-server 203.107.6.88 # ssh server enable sftp server enable # nms primary monitor-interface GigabitEthernet0/0 # ip flow-ordering stat-interval 10 # load xml-configuration # load tr069-configuration # user-interface tty 12 user-interface aux 0 user-interface vty 0 4 authentication-mode scheme # return

008xm 发表时间:2024-09-02

不会换行,不好看

008xm 发表时间:2024-09-02

静态路由网络地址:10.0.0.0 子网掩码:255.0.0.0 下一跳192.168.1.1 这样设置ping10.2.10.96正常,ping baidu.com丢包。

008xm 发表时间:2024-09-02

tracert baidu.com 发现出口没有192.168.2.1的连接。

008xm 发表时间:2024-09-02

搞好了,用最笨的办证,再建一个0.0.0.0的静态路由,出口选GigabitEthernet0/0,优先级65。静态路由网络地址:10.0.0.0 子网掩码:255.0.0.0 下一跳192.168.1.1 优先级60.这样就正常了。谢谢您。

008xm 发表时间:2024-09-02
粉丝:4人 关注:0人

tracert看下结果,有可能是对端没给回包

1 * * * 请求超时。 2 1 ms * 1 ms 192.168.2.1 3 * 1 ms * 10.57.144.254 4 8 ms * 7 ms 218.64.207.201 5 * * * 请求超时。 6 * 7 ms * 59.205.192.130 7 * * * 请求超时。 8 * * * 请求超时。 9 41 ms 15 ms * 192.168.2.30 10 15 ms * * 10.2.10.96 11 * * * 请求超时。 12 15 ms * * 10.2.10.96 13 14 ms * 15 ms 10.2.10.96

008xm 发表时间:2024-09-02 更多>>

1 * * * 请求超时。 2 1 ms * 1 ms 192.168.2.1 3 * 1 ms * 10.57.144.254 4 8 ms * 7 ms 218.64.207.201 5 * * * 请求超时。 6 * 7 ms * 59.205.192.130 7 * * * 请求超时。 8 * * * 请求超时。 9 41 ms 15 ms * 192.168.2.30 10 15 ms * * 10.2.10.96 11 * * * 请求超时。 12 15 ms * * 10.2.10.96 13 14 ms * 15 ms 10.2.10.96

008xm 发表时间:2024-09-02

1 * * * 请求超时。 2 1 ms * 1 ms 192.168.2.1 3 * 1 ms * 10.57.144.254 4 8 ms * 7 ms 218.64.207.201 5 * * * 请求超时。 6 * 7 ms * 59.205.192.130 7 * * * 请求超时。 8 * * * 请求超时。 9 41 ms 15 ms * 192.168.2.30 10 15 ms * * 10.2.10.96 11 * * * 请求超时。 12 15 ms * * 10.2.10.96 13 14 ms * 15 ms 10.2.10.96

008xm 发表时间:2024-09-02
粉丝:15人 关注:0人

192.168.1.1是GigabitEthernet0/1的地址,还是对端的地址?

回复008xm:

ip local policy-based-route aaa 这句要改,改到内网口下:ip policy-based-route aaa

落啦耳朵 发表时间:2024-09-02 更多>>

192.168.1.1是GigabitEthernet0/1的地址。

008xm 发表时间:2024-09-02
回复008xm:

需要改成对端的地址

落啦耳朵 发表时间:2024-09-02
回复008xm:

192.168.1.36

落啦耳朵 发表时间:2024-09-02

GigabitEthernet0/1的地址是动态的,网关是192.168.1.1.

008xm 发表时间:2024-09-02

apply ip-address next-hop 192.168.1.0

008xm 发表时间:2024-09-02

改成这样

008xm 发表时间:2024-09-02
回复008xm:

不能改成192.168.1.0

落啦耳朵 发表时间:2024-09-02

摘自说明书: 若无特殊需求,建议用户不要对本地报文应用策略。否则,有可能会对本地报文的发送造成不必要的影响(如ping、telnet服务的失效)

落啦耳朵 发表时间:2024-09-02
回复008xm:

ip local policy-based-route aaa 这句要改,改到内网口下:ip policy-based-route aaa

落啦耳朵 发表时间:2024-09-02
008xm 知了小白
粉丝:0人 关注:0人

路由表



编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明