il routing tra i Vlan non funziona


8

Devo mettere un router Cisco dietro un router ISP. (L'ISP non ci consente di utilizzare solo il proprio modem.)

Ho chiamato il servizio tecnico ISP e hanno impostato la connessione con me. Il loro router verrà utilizzato come gateway per il router Cisco. Ho configurato vlan20 con l'indirizzo IP corretto e l'ho collegato a Ge0, che è collegato al router ISP. Posso eseguire il ping di Internet da quella VLAN.

Ho anche creato vlan10 per la rete interna, che sarà connessa a Ge1. Da quel vlan, non sono in grado di eseguire il ping di Internet.

Ho provato a configurare un gateway di ultima istanza ma non ha funzionato.

Di seguito una panoramica della configurazione / configurazione: inserisci qui la descrizione dell'immagine

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

Pensavo che avrebbe funzionato con quella rotta verso il router ISP, ma sembra che non funzioni: inserisci qui la descrizione dell'immagine qualcuno potrebbe darmi un aiuto?

Modifica: configurazione completa come richiesto: nascosto solo alcune password e modificato gli IP pubblici.

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

Aggiornamento: ora funziona, la colpa è stata la configurazione errata di NAT. Questa è la configurazione aggiuntiva che ho fatto:

ip nat inside source list nat-list interface Vlan20 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 81.246.66.67 143 extendable
ip nat inside source static udp 192.9.200.90 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 81.246.66.66
!
ip access-list extended nat-list
 deny   ip 192.9.200.0 0.0.0.255 host 192.9.200.90
 deny   ip 192.9.200.0 0.0.0.255 host 192.9.200.175
 deny   ip 192.9.200.0 0.0.0.255 host 192.9.200.94
 permit tcp any any
 permit udp any any
 permit icmp any any

Modifica la domanda per includere la configurazione completa del router. Quello che hai è incompleto e non possiamo vedere la tua configurazione NAT o eventuali configurazioni in cui potresti aver commesso un errore.
Ron Maupin

Risposte:


8

Il problema è che non hai definito l'ACL che dice al router quali indirizzi tradurre.

Hai:

ip nat inside source list nat-list interface GigabitEthernet2 overload

ma non hai nat-listconfigurato. Hai bisogno di qualcosa come:

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

-o-

usa l'ACL (23) che hai definito per NAT:

ip nat inside source list 23 interface GigabitEthernet2 overload

-e-

Come ha sottolineato Ron Trunk, posizionare il ip nat outsidecomando sull'interfaccia WAN.


Grazie, ha davvero senso configurare NAT. Ci proverò più tardi e ti farò sapere se ha funzionato.
RobbeM,

Sto preparando le modifiche e ho già questa domanda. Se uso ACL 23 per NAT, che consente qualsiasi cosa in 192.9.200.0/24. Le altre regole NAT statiche che ho già configurato funzioneranno ancora? O devo negarli esplicitamente nell'ACL?
RobbeM,

Tali regole dovrebbero funzionare; sono per NAT dall'altra parte. Fondamentalmente, sono voci di tabella NAT statiche, ma l'approvvigionamento di traffico dall'interno creerà voci di tabella NAT dinamiche.
Ron Maupin

12

NAT non è abilitato (non è disponibile ip nat outsidesu Vl 20).

Senza NAT, l'ISP non sa come tornare alla rete 192.9.200.0. Se si NAT all'indirizzo VLan 20, l'ISP sarà in grado di tornare a te.

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.