我需要在ISP路由器后面放置一个Cisco路由器。
(ISP不允许我们仅使用其调制解调器。)

我打电话给ISP技术服务,他们与我建立了连接。
他们的路由器将用作Cisco路由器的网关。
我用正确的IP地址配置了vlan20并将其链接到与ISP路由器连接的Ge0 。我可以从该VLAN ping Internet。

我还为内部网络创建了vlan10,它将连接到Ge1。
从该vlan,我无法ping通Internet。 。

我尝试配置不得已的网关,但没有用。

下面是设置/配置的概述:


interface GigabitEthernet0
 switchport access vlan 20
 no ip address

interface GigabitEthernet1
 switchport access vlan 10
 no ip address

interface Vlan10
 ip address 192.9.200.253 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
 ip tcp adjust-mss 1412

interface Vlan20
 ip address 81.246.66.67 255.255.255.

ip route 0.0.0.0 0.0.0.0 81.246.66.66


我认为它可以用于通向ISP路由器的路由,但似乎不起作用:

有人可以提供我吗有一些帮助吗?

编辑:按要求进行完整配置:
仅隐藏一些密码并更改了公共IP。 >更新:现在可以正常工作,故障确实是NAT配置错误。
这是我已经完成的额外配置:

R1#show run
Building configuration...

Current configuration : 11179 bytes
!
! Last configuration change at 19:24:21 GMT Thu Jul 12 2018
! NVRAM config last updated at 19:39:43 GMT Thu Jul 12 2018
! NVRAM config last updated at 19:39:43 GMT Thu Jul 12 2018
version 15.3
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
logging buffered 51200 warnings
enable secret 5 --hash hidden--.
!
no aaa new-model
wan mode ethernet
clock timezone GMT 1 0
!
!
!
ip dhcp excluded-address 10.10.10.1
ip dhcp excluded-address 192.9.200.253
ip dhcp excluded-address 192.9.200.0 192.9.200.130
ip dhcp excluded-address 192.9.200.169 192.9.200.210
ip dhcp excluded-address 192.9.200.250 192.9.200.255
!
ip dhcp pool ccp-pool
 import all
 network 10.10.10.0 255.255.255.128
 default-router 10.10.10.1
 dns-server 8.8.8.8 195.238.2.21
 lease 0 2
!
ip dhcp pool companyname_dhcp_pool
 import all
 network 192.9.200.0 255.255.255.0
 default-router 192.9.200.253
 dns-server 192.9.200.253
 domain-name dw
 lease 0 2
!
!
!
ip domain name companyname.be
ip host kassa1.companyname.be 192.9.200.40
ip host kassa2.companyname.be 192.9.200.41
ip host www.companyname.be. 81.246.66.67
ip host bkhserv.companyname.be. 192.9.200.3
ip host pcroland.companyname.be. 192.9.200.4
ip host pckarel.companyname.be. 192.9.200.6
ip host achtertoog.companyname.be. 192.9.200.9
ip host verkopersbalie2.companyname.be. 192.9.200.11
ip host voortoog1.companyname.be. 192.9.200.12
ip host voortoog2.companyname.be. 192.9.200.13
ip host geertje.companyname.be. 192.9.200.14
ip host verkopersbalie.companyname.be. 192.9.200.15
ip host hobbytoog.companyname.be. 192.9.200.17
ip host houtenvloer.companyname.be. 192.9.200.25
ip host pinnerij.companyname.be. 192.9.200.26
ip host annmarina.companyname.be. 192.9.200.27
ip host pp1.companyname.be. 192.9.200.28
ip host ppuitsnij.companyname.be. 192.9.200.29
ip host pcglas.companyname.be. 192.9.200.32
ip host pczagerij.companyname.be. 192.9.200.36
ip host kassa1.companyname.be. 192.9.200.40
ip host kassa2.companyname.be. 192.9.200.41
ip host kassa3.companyname.be. 192.9.200.42
ip host kassa4.companyname.be. 192.9.200.43
ip host metapacekassa1.companyname.be. 192.9.200.50
ip host metapacekassa2.companyname.be. 192.9.200.51
ip host metapacekassa3.companyname.be. 192.9.200.52
ip host bijdoen.companyname.be. 192.9.200.57
ip host wim.companyname.be. 192.9.200.61
ip host erwin.companyname.be. 192.9.200.62
ip host christiane.companyname.be. 192.9.200.63
ip host anna.companyname.be. 192.9.200.64
ip host afplak.companyname.be. 192.9.200.65
ip host christine.companyname.be. 192.9.200.66
ip host alu.companyname.be. 192.9.200.67
ip host peter.companyname.be. 192.9.200.68
ip host herman.companyname.be. 192.9.200.69
ip host iomegaix2.companyname.be. 192.9.200.85
ip host pcguy.companyname.be. 192.9.200.87
ip host pc-jan.companyname.be. 192.9.200.88
ip host mailserver.companyname.be. 192.9.200.90
ip host pcjan.companyname.be. 192.9.200.91
ip host TerminalServer.companyname.be. 192.9.200.94
ip host scovmwar.companyname.be. 192.9.200.95
ip host scovm2.companyname.be. 192.9.200.96
ip host linksyswap54g.companyname.be. 192.9.200.98
ip host supmicro.companyname.be. 192.9.200.100
ip host hpnet.companyname.be. 192.9.200.96
ip host faxverkoop.companyname.be. 192.9.200.101
ip host faxjan.companyname.be. 192.9.200.102
ip host hpc6180.companyname.be. 192.9.200.103
ip host hpclj4600.companyname.be. 192.9.200.104
ip host hp4000.companyname.be. 192.9.200.106
ip host hp4achttoog.companyname.be. 192.9.200.107
ip host hp4voortoog.companyname.be. 192.9.200.108
ip host hp4chret.companyname.be. 192.9.200.109
ip host hp4karel.companyname.be. 192.9.200.110
ip host hp4verkoop.companyname.be. 192.9.200.111
ip host hp4kassa3.companyname.be. 192.9.200.112
ip host hp4posters.companyname.be. 192.9.200.113
ip host hp4prod1.companyname.be. 192.9.200.114
ip host hp4prod2.companyname.be. 192.9.200.115
ip host hp4repros.companyname.be. 192.9.200.116
ip host hp4kassa1.companyname.be. 192.9.200.117
ip host hp4aankoop.companyname.be. 192.9.200.120
ip host hp4klaarpak.companyname.be. 192.9.200.121
ip host hp4kassa2.companyname.be. 192.9.200.122
ip host hp4infopapier.companyname.be. 192.9.200.124
ip host hp4infoverf.companyname.be. 192.9.200.125
ip host bkhservdw.companyname.be. 192.9.200.170
ip host dell.companyname.be. 192.9.200.170
ip host companynamets.companyname.be. 192.9.200.200
ip host firewall.companyname.be. 192.9.200.253
ip host houtenvloer2.companyname.be. 192.9.200.24
ip host wegzet.companyname.be. 192.9.200.49
ip host linksyswap54g2.companyname.be. 192.9.200.97
ip host telcentrale1.companyname.be. 192.9.200.75
ip host telcentrale2.companyname.be. 192.9.200.76
ip host zebra01.companyname.be. 192.9.200.118
ip host esxtest.companyname.be. 192.9.200.167
ip host xenserver.companyname.be. 192.9.200.174
ip host odooserver-xen.companyname.be. 192.9.200.168
ip name-server 8.8.8.8
ip name-server 195.238.2.21
ip name-server 4.4.4.4
ip name-server 195.238.2.22
ip cef
no ipv6 cef
!
!
!
flow record nbar-appmon
 match ipv4 source address
 match ipv4 destination address
 match application name
 collect interface output
 collect counter bytes
 collect counter packets
 collect timestamp absolute first
 collect timestamp absolute last
!
!
flow monitor application-mon
 cache timeout active 60
 record nbar-appmon
!
!
!
!
!
!
!
!
!
!
object-group network local_lan_subnets
 10.10.10.0 255.255.255.128
 192.9.200.0 255.255.255.0
!
username companyname privilege 15 secret 5 --hash hidden--
!
!
controller VDSL 0
 shutdown
!
zone security LAN
zone security WAN
zone security VPN
zone security DMZ
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface ATM0
 no ip address
 shutdown
 no atm ilmi-keepalive
!
interface Ethernet0
 no ip address
 shutdown
!
interface FastEthernet0
 no ip address
!
interface FastEthernet1
 no ip address
!
interface FastEthernet2
 no ip address
!
interface GigabitEthernet0
 switchport access vlan 20
 no ip address
!
interface GigabitEthernet1
 switchport access vlan 10
 no ip address
!
interface GigabitEthernet2
 no ip address
 duplex auto
 speed auto
!
interface Wlan-GigabitEthernet0
 description Internal switch interface connecting to the embedded AP
 no ip address
!
interface Vlan1
 description $ETH_LAN$
 ip address 10.10.10.1 255.255.255.128
 ip nat inside
 ip virtual-reassembly in
 ip tcp adjust-mss 1412
!
interface Vlan10
 ip address 192.9.200.253 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
 ip tcp adjust-mss 1412
!
interface Vlan20
 ip address 81.246.66.67 255.255.255.248
!
ip forward-protocol nd
ip http server
ip http access-class 23
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
!
!
ip dns server
ip nat inside source list nat-list interface GigabitEthernet2 overload
ip nat inside source static tcp 192.9.200.90 25 81.246.66.67 25 extendable
ip nat inside source static tcp 192.9.200.175 80 81.246.66.67 80 extendable
ip nat inside source static tcp 192.9.200.90 110 81.246.66.67 110 extendable
ip nat inside source static tcp 192.9.200.90 143 81.246.66.67 143 extendable
ip nat inside source static udp 192.9.200.90 143 81.246.66.67 143 extendable
ip nat inside source static tcp 192.9.200.90 25 81.246.66.67 587 extendable
ip nat inside source static tcp 192.9.200.94 6666 81.246.66.67 3389 extendable
ip nat inside source static tcp 192.9.200.90 80 81.246.66.68 80 extendable
ip route 0.0.0.0 0.0.0.0 GigabitEthernet2
ip route 0.0.0.0 0.0.0.0 81.246.66.66
!
dialer-list 1 protocol ip permit
!
access-list 23 permit 10.10.10.0 0.0.0.127
access-list 23 permit 192.9.200.0 0.0.0.255
!
banner exec ^C
% Password expiration warning.
-----------------------------------------------------------------------

Cisco Configuration Professional (Cisco CP) is installed on this device
and it provides the default username "cisco" for  one-time use. If you have
already used the username "cisco" to login to the router and your IOS image
supports the "one-time" user option, then this username has already expired.
You will not be able to login to the router with this username after you exit
this session.

It is strongly suggested that you create a new username with a privilege level
of 15 using the following command.

username <myuser> privilege 15 secret 0 <mypassword>

Replace <myuser> and <mypassword> with the username and password you
want to use.

-----------------------------------------------------------------------
^C
banner login ^C
-----------------------------------------------------------------------
Cisco Configuration Professional (Cisco CP) is installed on this device.
This feature requires the one-time use of the username "cisco" with the
password "cisco". These default credentials have a privilege level of 15.

YOU MUST USE CISCO CP or the CISCO IOS CLI TO CHANGE THESE
PUBLICLY-KNOWN CREDENTIALS

Here are the Cisco IOS commands.

username <myuser>  privilege 15 secret 0 <mypassword>
no username cisco

Replace <myuser> and <mypassword> with the username and password you want
to use.

IF YOU DO NOT CHANGE THE PUBLICLY-KNOWN CREDENTIALS, YOU WILL
NOT BE ABLE TO LOG INTO THE DEVICE AGAIN AFTER YOU HAVE LOGGED OFF.

For more information about Cisco CP please follow the instructions in the
QUICK START GUIDE for your router or go to http://www.cisco.com/go/ciscocp
-----------------------------------------------------------------------
^C
!
line con 0
 password -- PW hidden --
 login
 no modem enable
line aux 0
line 2
 no activation-character
 no exec
 transport preferred none
 transport input all
 stopbits 1
line vty 0 4
 access-class 23 in
 privilege level 15
 password -- PW hidden --
 login local
 transport input ssh
!
scheduler allocate 60000 1000
ntp master
ntp server europe.pool.ntp.org
!
end


评论

请编辑您的问题以包括完整的路由器配置。您所拥有的还不完整,我们看不到您的NAT配置或您可能会出错的任何配置。

#1 楼

问题是您尚未定义告诉路由器要转换的地址的ACL。

您具有:没有配置nat-list。您需要使用以下命令:

ip nat inside source list nat-list interface GigabitEthernet2 overload


-或-

使用为NAT定义的ACL(23):

access-list nat-list permit 10.10.10.0 0.0.0.127
access-list nat-list permit 192.9.200.0 0.0.0.255


-and-

正如Ron Trunk指出的那样,将ip nat outside命令放在WAN接口上。

评论


谢谢,配置NAT确实有意义。稍后再试,让您知道它是否有效。

–RobbeM
18年7月17日在13:03

我正在准备修改,并且已经有这个问题。如果我将ACL 23用于NAT,则允许192.9.200.0/24中的任何内容。我已经配置的其他静态NAT规则仍然有效吗?还是我需要在ACL中明确拒绝它们?

–RobbeM
18年7月17日在13:16

这些规则应该起作用;它们以另一种方式用于NAT。基本上,它们是静态NAT表条目,但是从内部采购流量将创建动态NAT表条目。

–罗恩·莫潘♦
18年7月17日在14:13



#2 楼

您没有启用NAT(在Vl 20上没有ip nat outside)。

没有NAT,ISP不知道如何路由回到您的192.9.200.0网络。如果您将NAT转换为VLan 20地址,则ISP将能够路由回您。

#3 楼

您的要求很简单,但是您的配置缺少NAT重载规则。用于将私有IP地址转换为公共IP地址,所有Internet出站流量都将使用此NAT转换配置
/> Router(config)# access-list 10 permit ip 192.9.200.0 255.25&.255.0 Any
Router(config) # ip nat inside source list 10 interface Ge0 0verlaod
Router(config) int Ge0 Router(config) # ip address 81.246.66.67 255.255.255 Router(config) # ip nat outside Router(config)# no shutdown
** NAT转换规则,适用于内部到外部**的NAT转换NAT