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

路由器nat的配置

2024-01-24提问
  • 0关注
  • 0收藏,380浏览
粉丝:0人 关注:0人

问题描述:

 

路由器的接口做了nat调用address-group组,这个组内的IP地址在路由器根本没有,而且路由器接口下的地址掩码还是三十位的,为什么这条线路还是正常的呢,请教各位大佬

 

最佳答案

已采纳
粉丝:1人 关注:0人

nat地址和子接口地址没有必然联系,nat之后的地址只要公网有路由就可通信

比如路由器的接口地址是1.1.1.2/30 对端是1.1.1.3/30 ,路由器接口下nat调用的地址组内的地址是2.2.2.2,这怎么正常通信呢

zhiliao_PhYGUq 发表时间:2024-01-24

牛逼大佬,模拟器上做确实可以通

zhiliao_PhYGUq 发表时间:2024-01-24

取决对端是否是有路由回到2.2.2.2,没有的话通信不了

zhiliao_G04Inq 发表时间:2024-01-24

通了一会,我再试又不通了,这咋回事

zhiliao_PhYGUq 发表时间:2024-01-24

啥也没动就又不通了

zhiliao_PhYGUq 发表时间:2024-01-24

模拟器可能不准吧

zhiliao_G04Inq 发表时间:2024-01-24
3 个回答
粉丝:101人 关注:8人

配置上来看下  看下nat会话

login as: htxx ┌────────────────────────────────────────────────────────────────────┐ │ ? MobaXterm 20.0 ? │ │ (SSH client, X-server and networking tools) │ │ │ │ ? SSH session to htxx@192.168.200.2 │ │ ? SSH compression : ? │ │ ? SSH-browser : ? (disabled for Cisco compatibility) │ │ ? X11-forwarding : ? (disabled for Cisco compatibility) │ │ ? DISPLAY : 192.168.0.221:1.0 │ │ │ │ ? For more info, ctrl+click on help or visit our website │ └────────────────────────────────────────────────────────────────────┘ Last successfully login time: Tue Jan 23 16:02:49 2024 ****************************************************************************** * Copyright (c) 2004-2019 New H3C Technologies Co., Ltd. All rights reserved.* * Without the owner's prior written consent, * * no decompiling or reverse-engineering shall be allowed. * ****************************************************************************** <A8-28 H3C MSR3620> <A8-28 H3C MSR3620> <A8-28 H3C MSR3620>dis cu # version 7.1.064, Release 0707P15 # sysname A8-28 H3C MSR3620 # port-security enable # track 1 nqa entry yidong 10.151.1.5 reaction 1 # track 2 nqa entry guangdian 10.17.20.254 reaction 1 # ip ttl-expires enable # nat address-group 0 address 10.63.64.62 10.63.64.62 # nat address-group 1 address 11.40.46.73 11.40.46.78 # nat address-group 2 address 215.29.0.21 215.29.0.21 # dhcp enable dhcp server always-broadcast # dns proxy enable # lldp global enable # password-recovery enable # vlan 1 # dhcp server ip-pool GigabitEthernet0/1 # nqa entry butong 1.1.1.2 type icmp-echo destination ip 1.1.1.2 frequency 100 reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only # nqa entry guangdian 10.17.20.254 type icmp-echo destination ip 10.17.20.254 frequency 100 reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only # nqa entry yidong 10.151.1.5 type icmp-echo destination ip 10.151.1.5 frequency 100 reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only # nqa schedule butong 1.1.1.2 start-time now lifetime forever nqa schedule guangdian 10.17.20.254 start-time now lifetime forever nqa schedule yidong 10.151.1.5 start-time now lifetime forever # controller Cellular0/0 # interface Virtual-Template0 # interface NULL0 # interface GigabitEthernet0/0 port link-mode route description to-yinglian-银联 combo enable copper ip address 11.40.145.18 255.255.255.128 nat outbound 3001 address-group 1 # interface GigabitEthernet0/1 port link-mode route description 20191230 yidong combo enable copper ip address 215.89.0.22 255.255.255.252 nat outbound 3000 address-group 2 nat server protocol tcp global 215.29.0.21 8095 inside 192.168.1.144 8099 # interface GigabitEthernet0/2 port link-mode route description 2019.11.26 guangdian combo enable copper ip address 10.17.20.2 255.255.255.0 nat outbound 3000 address-group 0 # interface GigabitEthernet0/3 port link-mode route combo enable copper ip address 192.168.200.2 255.255.255.0 # interface GigabitEthernet0/4 port link-mode route # interface GigabitEthernet0/5 port link-mode route # security-zone name Local # security-zone name Trust # security-zone name DMZ # security-zone name Untrust # security-zone name Management # scheduler logfile size 16 # line class console user-role network-admin # line class tty user-role network-operator # line class usb user-role network-admin # line class vty user-role network-operator # line con 0 user-role network-admin # line vty 0 4 authentication-mode scheme user-role level-15 user-role network-operator set authentication password hash $h$6$5whgw1bFbogJjkGl$Mt7aPlPk1cMYUz649fjKvPQxNgx8JIuhWA9BcuGj8yNJkRnjj0ZwvApmnMLldmy4rwBd7ylscMiir4eJL+H23g== idle-timeout 5 0 # line vty 5 15 authentication-mode scheme user-role level-15 user-role network-operator set authentication password hash $h$6$5whgw1bFbogJjkGl$Mt7aPlPk1cMYUz649fjKvPQxNgx8JIuhWA9BcuGj8yNJkRnjj0ZwvApmnMLldmy4rwBd7ylscMiir4eJL+H23g== idle-timeout 35791 0 # line vty 16 63 authentication-mode none user-role level-15 user-role network-operator idle-timeout 5 0 # ip route-static 10.10.10.0 24 192.168.200.254 ip route-static 10.62.0.0 16 10.17.20.254 track 2 preference 88 description 20191126 guangdian ip route-static 10.62.0.0 16 10.151.1.5 track 1 preference 99 description 20191230 yidong ip route-static 10.62.0.0 16 215.89.0.21 preference 77 ip route-static 10.63.0.0 16 10.17.20.254 track 2 preference 88 description 20191126 guangdian ip route-static 10.63.0.0 16 10.151.1.5 track 1 preference 99 description 20191230 yidong ip route-static 10.63.0.0 16 215.89.0.21 preference 77 ip route-static 10.75.25.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 10.75.25.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 10.75.25.0 24 215.89.0.21 preference 77 ip route-static 10.75.26.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 10.75.26.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 10.75.26.0 24 215.89.0.21 preference 77 ip route-static 10.75.27.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 10.75.27.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 10.75.27.0 24 215.89.0.21 preference 77 ip route-static 10.75.28.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 10.75.28.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 10.75.28.0 24 215.89.0.21 preference 77 ip route-static 10.75.29.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 10.75.29.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 10.75.29.0 24 215.89.0.21 preference 77 ip route-static 10.87.0.0 16 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 10.87.0.0 16 215.89.0.21 preference 77 ip route-static 10.172.0.0 24 10.17.20.254 track 2 preference 88 description gugan-20220108 guangdian ip route-static 10.172.0.0 24 10.151.1.5 track 1 preference 99 description gugan-20220108 yidong ip route-static 10.172.0.0 24 215.89.0.21 preference 77 ip route-static 10.175.0.0 16 192.168.200.254 ip route-static 10.249.64.0 21 10.17.20.254 track 2 preference 88 description EIP-20220108 guangdian ip route-static 10.249.64.0 21 10.151.1.5 track 1 preference 99 description EIP-20220108 yidong ip route-static 10.249.64.0 21 215.89.0.21 preference 77 ip route-static 10.249.72.0 21 10.17.20.254 track 2 preference 88 description NAT-20220108 guangdian ip route-static 10.249.72.0 21 10.151.1.5 track 1 preference 99 description NAT-20220108 yidong ip route-static 10.249.72.0 21 215.89.0.21 preference 77 ip route-static 10.249.80.0 21 10.17.20.254 track 2 preference 88 description SLB-20220108 guangdian ip route-static 10.249.80.0 21 10.151.1.5 track 1 preference 99 description SLB-20220108 yidong ip route-static 10.249.80.0 21 215.89.0.21 preference 77 ip route-static 10.249.96.0 20 10.17.20.254 track 2 preference 88 description SLB-20220108 guangdian ip route-static 10.249.96.0 20 10.151.1.5 track 1 preference 99 description SLB-20220108 yidong ip route-static 10.249.96.0 20 215.89.0.21 preference 77 ip route-static 10.249.112.0 21 10.17.20.254 track 2 preference 88 description SLB-20220108 guangdian ip route-static 10.249.112.0 21 10.151.1.5 track 1 preference 99 description SLB-20220108 yidong ip route-static 10.249.112.0 21 215.89.0.21 preference 7 ip route-static 11.40.0.0 16 11.40.145.1 ip route-static 112.130.0.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 112.130.0.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 112.130.0.0 24 215.89.0.21 preference 77 ip route-static 119.10.10.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 119.10.10.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 119.10.10.0 24 215.89.0.21 preference 77 ip route-static 119.10.100.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 119.10.100.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 119.10.100.0 24 215.89.0.21 preference 77 ip route-static 172.16.68.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 172.16.68.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 172.16.68.0 24 215.89.0.21 preference 77 ip route-static 172.16.96.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 172.16.96.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 172.16.96.0 24 215.89.0.21 preference 77 ip route-static 172.23.30.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 172.23.30.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 172.23.30.0 24 215.89.0.21 preference 77 ip route-static 172.23.31.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 172.23.31.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 172.23.31.0 24 215.89.0.21 preference 77 ip route-static 172.23.32.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 172.23.32.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 172.23.32.0 24 215.89.0.21 preference 77 ip route-static 172.23.33.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 172.23.33.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 172.23.33.0 24 215.89.0.21 preference 77 ip route-static 172.23.34.0 24 10.17.20.254 track 2 preference 88 description 20210828 guangdian ip route-static 172.23.34.0 24 10.151.1.5 track 1 preference 99 description 20210828 yidong ip route-static 172.23.34.0 24 215.89.0.21 preference 77 ip route-static 172.23.35.0 24 10.17.20.254 track 2 preference 88 description 20191126 guangdian ip route-static 172.23.35.0 24 10.151.1.5 track 1 preference 99 description 20191230 yidong ip route-static 172.23.35.0 24 215.89.0.21 preference 77 ip route-static 172.23.36.0 24 10.17.20.254 track 2 preference 88 description 20191126 guangdian ip route-static 172.23.36.0 24 10.151.1.5 track 1 preference 99 description 20191230 yidong ip route-static 172.23.36.0 24 215.89.0.21 preference 77 ip route-static 172.23.89.128 26 10.17.20.254 track 2 preference 88 description guangdian ip route-static 172.23.89.128 26 10.151.1.5 track 1 preference 99 description 20201223 yidong ip route-static 172.23.89.128 26 215.89.0.21 preference 77 ip route-static 192.168.0.0 16 192.168.200.254 ip route-static 193.0.0.0 8 192.168.200.254 description canganyuanqu ip route-static 215.251.0.0 16 215.89.0.21 preference 77 ip route-static 215.255.0.0 16 215.89.0.21 preference 77 # info-center security-logfile enable info-center loghost 10.10.10.118 # snmp-agent snmp-agent local-engineid 800063A28080E455D133F400000001 snmp-agent community read slyy snmp-agent sys-info version all # ssh server enable # acl advanced 3000 description 2019.11.26.guangdian rule 5 deny udp destination-port eq dns rule 6 deny tcp destination-port eq dns rule 50 permit ip source 192.168.0.0 0.0.255.255 rule 51 permit ip source 193.168.0.0 0.0.255.255 # acl advanced 3001 rule 5 deny tcp destination-port eq 445 rule 6 deny udp destination-port eq dns rule 7 deny tcp destination-port eq dns rule 15 permit ip destination 11.40.0.0 0.0.255.255 # acl advanced 3002 # 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 update-interval 0 password-control login idle-time 0 password-control complexity user-name check # domain system # domain default enable system # role name level-0 description Predefined level-0 role # role name level-1 description Predefined level-1 role # role name level-2 description Predefined level-2 role # role name level-3 description Predefined level-3 role # role name level-4 description Predefined level-4 role # role name level-5 description Predefined level-5 role # role name level-6 description Predefined level-6 role # role name level-7 description Predefined level-7 role # role name level-8 description Predefined level-8 role # role name level-9 description Predefined level-9 role # role name level-10 description Predefined level-10 role # role name level-11 description Predefined level-11 role # role name level-12 description Predefined level-12 role # role name level-13 description Predefined level-13 role # role name level-14 description Predefined level-14 role # user-group system # local-user 15068508125 class manage service-type ssh telnet terminal https authorization-attribute user-role level-15 authorization-attribute user-role network-operator # local-user admin class manage access-limit 16 service-type ssh telnet terminal http https authorization-attribute user-role network-admin # local-user admincz class manage service-type ssh telnet terminal https authorization-attribute user-role level-10 authorization-attribute user-role network-operator # local-user adminsj class manage service-type ssh telnet terminal https authorization-attribute user-role level-5 authorization-attribute user-role network-operator # local-user adminsxswsj class manage service-type ssh telnet terminal https authorization-attribute user-role level-5 authorization-attribute user-role network-operator # local-user htxx class manage service-type ssh telnet terminal http https authorization-attribute user-role level-15 authorization-attribute user-role network-operator # local-user slyy class manage service-type ssh telnet terminal http https authorization-attribute user-role level-15 authorization-attribute user-role network-operator # local-user sxey class manage service-type ssh telnet terminal http https authorization-attribute user-role level-15 authorization-attribute user-role network-operator # local-user sxfb class manage service-type ssh telnet terminal http https authorization-attribute user-role level-15 authorization-attribute user-role network-operator # local-user szwsj class manage service-type ssh telnet terminal http https authorization-attribute user-role level-15 authorization-attribute user-role network-operator # ip https enable # wlan global-configuration # wlan ap-group default-group vlan 1 # return <A8-28 H3C MSR3620>

zhiliao_PhYGUq 发表时间:2024-01-24
粉丝:19人 关注:9人

您好,请知:

NAT不生效,以下是排查要点,请参考:

1、检查外网接口调用的NAT是否有问题。

2、检查是否配置了默认路由指向到外网。

3、检查出口设备的上网接入配置是否有问题。


zhiliao_Ikmrnc 知了小白
粉丝:0人 关注:0人

nat其实重新封装了一个源ip地址,一般我们nat后源地址是公网口同网段,因为外网上要返回数据包需要路由,所以只要你nat后的源地址,外网要有路由可以返回就可以通

编辑答案

你正在编辑答案

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

分享扩散:

提出建议

    +

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

确定

亲~检测到您登陆的账号未在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. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

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

不规范转载

×

举报说明