configurationCisco路由器过载NAT(IOS 15)

我正在尝试使用IOS 15configurationCisco 2901路由器,以正确执行LAN和Internet连接之间的NAT / PAT转换。 我已经为本地接口configuration了DHCP池,可以正常工作(即使使用额外的交换机,无线接入点…)。 同样,WAN接口configuration为通过DHCP从ISP获取自己的IP。 我可以在LAN计算机上工作,并且可以直接从路由器访问Internet(例如,使用telnet和路由器的ping命令)。 问题是,NAT无法正常工作,并且LAN接口(GigabitEthernet0 / 1)的连接没有到达WAN接口(GigabitEthernet0 / 0)。

我在这个问题上跟踪了几个指导 ,但似乎不pipe我做什么,NAT似乎都不起作用。 我已经尝试了源列表中的interface GigabitEthernet0/0 overload NAT和指南中描述的NAT池源列表(是当前的ISP分配的IP)。

附件是完整的configuration,希望有人发现我错过的问题。

 Current configuration : 2007 bytes ! ! Last configuration change at 19:59:30 UTC Wed Jul 6 2011 ! version 15.0 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname odin ! boot-start-marker boot-end-marker ! enable secret 5 enablesecret enable password enablepassword ! no aaa new-model ! ! ! ! no ipv6 cef ip source-route no ip routing no ip cef ! ! ip dhcp excluded-address 10.1.1.1 10.1.1.10 ! ip dhcp pool lan import all network 10.1.1.0 255.255.255.0 default-router 10.1.1.1 dns-server 8.8.8.8 ! ! ! multilink bundle-name authenticated ! ! ! ! ! ! ! voice-card 0 ! ! ! ! ! ! license udi pid licensepid sn licensesn ! ! ! redundancy ! ! ! ! ! ! ! ! ! interface GigabitEthernet0/0 ip address dhcp ip nat outside ip virtual-reassembly no ip route-cache duplex auto speed auto no cdp enable no mop enabled ! ! interface ISM0/0 no ip address no ip route-cache shutdown service-module fail-open no cdp enable ! hold-queue 60 out ! interface ISM0/1 no ip address no ip route-cache shutdown no cdp enable ! ! interface GigabitEthernet0/1 ip address 10.1.1.1 255.255.255.0 ip nat inside ip virtual-reassembly no ip route-cache duplex auto speed auto no cdp enable ! ! ip forward-protocol nd ! no ip http server no ip http secure-server ! ip nat inside source list 1 interface GigabitEthernet0/0 overload ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 ! access-list 1 permit 10.1.1.0 0.0.0.255 ! ! ! ! ! snmp-server community snmp_lan RO ! control-plane ! ! ! ! ! ! ! ! ! gatekeeper shutdown ! ! line con 0 exec-timeout 0 0 line aux 0 line 67 no activation-character no exec transport preferred none transport input all transport output pad telnet rlogin lapb-ta mop udptn v120 ssh stopbits 1 flowcontrol software line vty 0 4 password password login ! scheduler allocate 20000 1000 no process cpu extended no process cpu autoprofile hog end 

更新1:

尝试通过添加指定出站规则

 interface GigabitEthernet0/0 ip access-group lan_out out ! ip access-list extended la_out permit ip any any 

但无济于事。

之后,还试图利用NAT池和路线图,导致

 ip nat pool lan_np 1.2.3.135 1.2.3.135 prefix-length 24 ip nat inside source route-map natmap pool lan_np overload ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 permanent ! ip access-list extended lan_out permit ip any any ! access-list 101 permit ip 10.1.1.0 0.0.0.255 any ! ! ! ! route-map natmap permit 10 match ip address lan_out 

无论是否有ip route 0.0.0.0 0.0.0.0interface GigabitEthernet0/0或ISP默认网关IP的任何组合。 结果在一个

 offblast_odin#sh ip nat st Total active translations: 0 (0 static, 0 dynamic; 0 extended) Peak translations: 0, occurred 02:58:27 ago Outside interfaces: GigabitEthernet0/0 Inside interfaces: GigabitEthernet0/1 Hits: 0 Misses: 0 CEF Translated packets: 0, CEF Punted packets: 0 Expired translations: 0 Dynamic mappings: -- Inside Source [Id: 2] route-map natmap pool offblast_lan_np refcount 0 pool offblast_lan_np: netmask 255.255.255.0 start 1.2.3.135 end 1.2.3.135 type generic, total addresses 1, allocated 0 (0%), misses 0 Appl doors: 0 Normal doors: 0 Queued Packets: 0 

可悲的是,迄今没有任何工作。 完整的最终configuration 。

你能显示'sh ip nat stat'和'sh ip nat tran'的输出吗?

我认为configuration看起来是正确的,你是否尝试在外部接口上应用ACL来专门允许stream量?

接口GigabitEthernet0 / 0
  ip access-group OUTBOUND out
 !
 IP访问列表扩展OUTBOUND
 允许ip任何任何

这里是1800系列的一个实例:

接口FastEthernet0
 描述$ FW_OUTSIDE $
 带宽34000
  IP地址1.2.3.141 255.255.255.240
  ip access-group OUTBOUND out
  ipvalidation单播反向path
 没有IPredirect
 没有ip unreachables
 没有IP代理ARP
  ip nat外面
  IP虚拟重组
 装载间隔60
 双面自动
 速度自动
 !
接口FastEthernet1
 描述$ FW_INSIDE $
 带宽34000
  IP地址192.168.0.254 255.255.255.0
 没有IPredirect
 没有ip unreachables
 没有IP代理ARP
  ip nat里面
  IP虚拟重组
 装载间隔60
 双面自动
 速度自动
 !
 ip nat pool GLOBAL_IP_POOL 1.2.3.139 1.2.3.141 prefix-length 24
 ip nat内源路由映射natmap池GLOBAL_IP_POOL重载
 !
 ip访问列表扩展natrules
 拒绝IP 192.168.0.0 0.0.0.255 10.180.3.0 0.0.0.255
 允许ip 192.168.0.0 0.0.255.255任意
 !
 route-map natmap permit 10
 匹配ip地址natrules

希望这可以帮助。

编辑:

我不能发现任何奇怪的configuration。 由于您在翻译表中似乎没有任何匹配,因此客户端上的连接或configuration必须存在问题,或者仅仅是拒绝访问列表的访问列表。

你可以吗:

1)从路由器ping,确保你从正确的接口input:

ping 8.8.8.8源码10.1.1.1

2)显示访问列表

显示访问列表

我在实验室里设置了三台路由器,并configuration了rip + nat,它就像现在这样工作。 有问题的路由器和特别拒绝“有问题的路由器”的内部networking的远程路由器 。

由于这个问题现在已经超过了1000个视图( whoah ),我会发布准确的答案:从我后来被告知的(在使用由@ 3molo发布的一些configuration之后),行

 no ip routing 

对于NAT工作不正常(后见之明,很明显)。