思科家庭实验室路由器不NATing

我希望有一个人可以帮助我。 我有一个AT&T 2wire网关,连接到AT&T 2线3端口的Cisco路由器。 我使用CISCO作为一个独立的networking和实验室。 下面是我的networking草图和路由器的show run config输出。 我的问题是,我试图使用NAT从思科路由器通过AT&T电线上网。 另外,当我做一个显示NAT翻译没有什么东西在表中显示,就好像没有任何被翻译,我不能到互联网,但可以ping两个networking,10.1.1.0的一切。 192.168.1.0。 我哪里去错了。

AT&T | | 192.168.1.111 | fa0/0 Outside NAT | CISCO Router fa0/1 10.1.1.1 Inside NAT Router#show running-config Building configuration... {Current configuration : 1039 bytes ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname Router ! boot-start-marker boot-end-marker ! ! no network-clock-participate slot 1 no network-clock-participate wic 0 no aaa new-model ip subnet-zero ip cef ! ! ip dhcp excluded-address 10.1.1.1 10.1.1.10 ! ip dhcp pool Test_Lab import all network 10.1.1.0 255.255.255.0 default-router 10.1.1.1 ! ! ! ! ! ! interface FastEthernet0/0 ip address 192.168.1.111 255.255.255.0 ip nat outside duplex auto speed auto ! interface Serial0/0 no ip address shutdown ! interface FastEthernet0/1 ip address 10.1.1.1 255.255.255.0 ip nat inside duplex auto speed auto ! ip nat inside source list 101 interface FastEthernet0/0 overload ip http server ip classless ip route 0.0.0.0 0.0.0.0 192.168.1.0 ip route 10.1.1.0 255.255.255.0 FastEthernet0/0 ip route 10.1.1.0 255.255.255.0 192.168.1.0 ! ! access-list 101 permit ip 10.1.1.0 0.0.0.255 any ! line con 0 line aux 0 line vty 0 4 login ! ! end Router#show ip route Gateway of last resort is 192.168.1.0 to network 0.0.0.0 10.0.0.0/24 is subnetted, 1 subnets S 10.1.1.0 is directly connected, FastEthernet0/0 [1/0] via 192.168.1.0 C 192.168.1.0/24 is directly connected, FastEthernet0/0 S* 0.0.0.0/0 [1/0] via 192.168.1.0 

将IP路由更改为思科路由器连接到的AT&T端口IP地址

  Gateway of last resort is 192.168.1.93 to network 0.0.0.0 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, FastEthernet0/1 C 192.168.1.0/24 is directly connected, FastEthernet0/0 S* 0.0.0.0/0 [1/0] via 192.168.1.93 

我会假设问题出在你的路由表中。 例如,

 ip route 10.1.1.0 255.255.255.0 FastEthernet0/0 ip route 10.1.1.0 255.255.255.0 192.168.1.0 

根据这些命令,所有到10.1.1.0networking的IP数据包将被redirect到FastEthernet0 / 0(意味着回到192.168.1.111)或192.168.1.0(这可能意味着没有任何地方,因为这是networking的地址,而不是一个网关的地址)。 所以没有IP包可以到达10.1.1.0networking。

但是,我不确定这是否是一个问题,因为10.1.1.0直接连接,它仍然可以正常工作。 你可以请你的路由表添加到问题(输出'sh ip路由')?

我猜测AT&T有一个局域网侧的IP地址,在这种情况下,你需要在思科路由器上创build一个默认路由,将所有stream量都与未知networking的目的地发送到AT&T盒上的LAN侧接口。

IP路由0.0.0.0 0.0.0.0 IPOFAT&TLANINTERFACE

这意味着任何“未知networking”stream量的下一跳(例如到达互联网的stream量)将被引导到AT&T路由器,而AT&T路由器又将stream量传送到其上游网关。

除非您可以在网桥模式下运行AT&T,并将您的公共IP分配给思科接口,否则不需要在思科上执行NAT。

可能是因为我误解了你的问题,但是听起来你甚至不能从你的思科路由器ping上互联网上的目的地,这将是主要的问题,而不是NAT。 由于你可以看到带有“show ip NAT translations”的翻译,这听起来像是configuration的一部分是固定的。

尝试从Fa0 / 0的源接口ping互联网上的目的地。 除了连接到AT&T设备的思科路由器之外,您还有其他设备吗?他们能够访问互联网吗?

编辑:似乎你已经使用了错误的IP默认网关。 要find正确的IP,您可以使用笔记本电脑或Cisco路由器。

在笔记本电脑上:将其连接到networking,并确保它已打开DHCP,而不是静态IP。 使用ipconfig在分配的IP地址旁边显示分配的默认网关。 可能看起来相似,或者它可以显示更多的信息,但不pipe你应该能够在ipconfig的输出中find默认网关的地址。

http://imgur.com/r23wQb3

在Cisco路由器上使用静态路由的默认网关的IP。

备选scheme2:在Cisco路由器上,您可以做同样的事情:

 enable configure terminal interface FastEthernet0/0 ip address dhcp exit no ip route xxxx (make sure to remove every static route in your config just to have a more clean config) end show ip route 

在输出你应该看到Gateway of last resort is xxxx ,这是你的AT&T内部接口的IP

当你发现你的网关是IP时,你可以切换回你的路由器的静态IP地址,并将该IP作为默认路由。

我在接口fa0 / 0上创build了一个到公网IP地址的静态路由。 当我在cisco路由器上做show ip int brief时,我得到一个192.168.1.254的IP地址。

我连接了一台笔记本电脑,接口fa0 / 1在CISCO路由器上从DHCP获得了一个10.1.1.1.11的IP地址,我可以在互联网上下载。 所以看起来像它的工作。