用原来的NAT端口映射成功,更改公网IP后,映射就不成功了
原来的配置:
interface GigabitEthernet0/1
ip address 222.217.88.65 255.255.255.0
nat outbound 2001
nat server protocol tcp global 222.* * * 81 inside 10.56.* * 81
nat server protocol tcp global 222.* * * 4000 inside 192.168.* * 4000
nat server protocol tcp global 222.* * * 8086 inside 10.56.* * 8086
ip route-static 0.0.0.0 0 222.* *.1
更改之前是可以正常端口映射的
更改后就不行了,但是下面的网络正常,唯独端口映射不成功:
interface GigabitEthernet0/1
ip address 218.* * * 255.255.255.240
nat server protocol tcp global 218.* * * 81 inside 10. * * * 81
nat server protocol tcp global 218.* * * 4000 inside 192. * * * 4000
nat server protocol tcp global 218.* * * 8086 inside 10. * * * 8086
# ip route-static 0.0.0.0 0 218.* * * 1
服务器网关就在路由器,问题,映射不成功,改回原来的IP就映射成功,麻烦大神解答以下,在线等!!!
运营商没有端口限制,我用笔记本放公网IP,测端口是通的。
路由器------二层交换机------PC
(0)
最佳答案
#
interface GigabitEthernet0/1
port link-mode route
description dianxin_link
ip address 222.217.88.65 255.255.255.0
nat outbound 2001
nat server protocol tcp global 222.217.88.65 81 inside 10.56.170.106 81
nat server protocol tcp global 222.217.88.65 4000 inside 192.168.70.251 4000
nat server protocol tcp global 222.217.88.65 8086 inside 10.56.170.230 8086
有ACL,不过是出去的,我做端口映射,要什么ACL
(0)
我这里测试映射是成功的哟、你是怎么测试的呢?
我评论放的配置,是原来的配置,我把公网地址和缺省路由以及NAT SEVER 这三条改了,其他没动。就映射不成功了。
计划把原来的公网IP替换掉,然后改成新IP后,映射就不成功了。改回去又正常了。需要我重新发下完整配置吗
# sysname H3C # telnet server enable # dhcp enable # password-recovery enable # vlan 1 # controller Cellular0/0 # controller Cellular0/1 # interface Aux0 # interface NULL0 # interface GigabitEthernet0/0 port link-mode route combo enable copper ip address 192.168.70.1 255.255.255.0 # interface GigabitEthernet0/0.2 ip address 10.56.170.1 255.255.255.224 vlan-type dot1q vid 2 # interface GigabitEthernet0/0.3 ip address 10.56.170.33 255.255.255.224 vlan-type dot1q vid 3 # interface GigabitEthernet0/0.4 ip address 10.56.170.65 255.255.255.224 vlan-type dot1q vid 4 # interface GigabitEthernet0/0.5 ip address 10.56.170.97 255.255.255.224 vlan-type dot1q vid 5 # interface GigabitEthernet0/0.6 ip address 10.56.170.129 255.255.255.128 vlan-type dot1q vid 6 # interface GigabitEthernet0/1 port link-mode route description dianxin_link ip address 222.217.88.65 255.255.255.0 nat outbound 2001 nat server protocol tcp global 222.217.88.65 81 inside 10.56.170.106 81 nat server protocol tcp global 222.217.88.65 4000 inside 192.168.70.251 4000 nat server protocol tcp global 222.217.88.65 8086 inside 10.56.170.230 8086 # interface GigabitEthernet0/2 port link-mode route description liantong_link ip address 10.227.173.2 255.255.255.0 nat outbound 2001 nat server protocol tcp global 10.227.173.2 81 inside 10.56.170.106 81 nat server protocol tcp global 10.227.173.2 4000 inside 192.168.70.251 4000 nat server protocol tcp global 10.227.173.2 8086 inside 10.56.170.230 8086 # scheduler logfile size 16 # line class aux user-role network-admin # line class tty user-role network-operator # line class vty user-role network-operator # line aux 0 user-role network-admin # line vty 0 4 authentication-mode scheme user-role level-15 user-role network-operator # line vty 5 63 user-role network-operator # ip route-static 0.0.0.0 0 10.227.173.254 preference 70 ip route-static 0.0.0.0 0 222.217.88.1 # acl basic 2001 rule 0 permit #
已经解决,原因如下:在用老地址的时候,采用IP方式映射。更换公网IP后,采用原来的IP映射方式不生效。 用接口方式映射才生效,也不知是什么原理,换IP配置就得变
你还没引用ACL啊、还是说你没贴出来
(0)
# interface GigabitEthernet0/1 port link-mode route description dianxin_link ip address 222.217.88.65 255.255.255.0 nat outbound 2001 nat server protocol tcp global 222.217.88.65 81 inside 10.56.170.106 81 nat server protocol tcp global 222.217.88.65 4000 inside 192.168.70.251 4000 nat server protocol tcp global 222.217.88.65 8086 inside 10.56.170.230 8086 有ACL,不过是出去的,我做端口映射,要什么ACL
# interface GigabitEthernet0/1 port link-mode route description dianxin_link ip address 222.217.88.65 255.255.255.0 nat outbound 2001 nat server protocol tcp global 222.217.88.65 81 inside 10.56.170.106 81 nat server protocol tcp global 222.217.88.65 4000 inside 192.168.70.251 4000 nat server protocol tcp global 222.217.88.65 8086 inside 10.56.170.230 8086 有ACL,不过是出去的,我做端口映射,要什么ACL
你好请知:
(0)
能给个完整命令吗,nat DEBUG, 我做的是端口映射,源地址转换正常的
能给个完整命令吗,nat DEBUG, 我做的是端口映射,源地址转换正常的
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
已经解决,原因如下:在用老地址的时候,采用IP方式映射。更换公网IP后,采用原来的IP映射方式不生效。 用接口方式映射才生效,也不知是什么原理,换IP配置就得变