Routing antar vlan tidak berfungsi

8

Saya perlu meletakkan router Cisco di belakang router ISP. (ISP tidak mengizinkan kami untuk menggunakan modem saja.)

Saya telah menghubungi layanan teknis ISP dan mereka telah mengatur koneksi dengan saya. Router mereka akan digunakan sebagai gateway untuk router Cisco. Saya mengkonfigurasi vlan20 dengan alamat IP yang benar dan menautkannya ke Ge0, yang terhubung ke router ISP. Saya bisa ping internet dari VLAN itu.

Saya juga membuat vlan10 untuk jaringan internal, yang akan terhubung ke Ge1. Dari vlan itu, saya tidak bisa melakukan ping internet.

Saya mencoba mengkonfigurasi gateway pilihan terakhir tetapi itu tidak berhasil.

Di bawah ini adalah ikhtisar pengaturan / konfigurasi: masukkan deskripsi gambar di sini

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

Saya pikir itu akan bekerja dengan rute itu ke router ISP, tetapi tampaknya itu tidak berhasil: masukkan deskripsi gambar di sini Adakah yang bisa membantu saya dengan ini?

Sunting: konfigurasi penuh seperti yang diminta: Hanya menyembunyikan beberapa kata sandi dan mengubah IP publik.

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

Pembaruan: Sekarang berfungsi, kesalahannya adalah kesalahan konfigurasi NAT. Ini adalah konfigurasi tambahan yang telah saya lakukan:

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
RobbeM
sumber
Harap edit pertanyaan Anda untuk memasukkan konfigurasi router lengkap. Apa yang Anda miliki tidak lengkap, dan kami tidak dapat melihat konfigurasi NAT Anda atau konfigurasi di mana Anda mungkin telah melakukan kesalahan.
Ron Maupin

Jawaban:

8

Masalahnya adalah Anda belum mendefinisikan ACL yang memberi tahu router alamat yang akan diterjemahkan.

Kamu punya:

ip nat inside source list nat-list interface GigabitEthernet2 overload

tetapi Anda belum nat-listmengkonfigurasi. Anda membutuhkan sesuatu seperti:

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

-atau-

gunakan ACL (23) yang Anda tentukan untuk NAT:

ip nat inside source list 23 interface GigabitEthernet2 overload

-dan-

Seperti yang ditunjukkan Ron Trunk, tempatkan ip nat outsideperintah pada antarmuka WAN.

Ron Maupin
sumber
Terima kasih, memang masuk akal untuk mengkonfigurasi NAT. Saya akan mencobanya nanti dan memberi tahu Anda jika itu berhasil.
RobbeM
Saya sedang mempersiapkan modifikasi dan sudah memiliki pertanyaan ini. Jika saya menggunakan ACL 23 untuk NAT, yang mengizinkan apa pun di 192.9.200.0/24. Apakah aturan NAT statis lain yang sudah saya konfigurasi masih berfungsi? Atau apakah saya perlu secara eksplisit menolaknya di ACL?
RobbeM
Aturan-aturan itu harus bekerja; mereka untuk NAT sebaliknya. Pada dasarnya, mereka entri tabel NAT statis, tetapi sumber lalu lintas dari dalam akan membuat entri tabel NAT dinamis.
Ron Maupin
12

Anda tidak memiliki NAT yang diaktifkan (Anda tidak memiliki ip nat outsidepada Vl 20).

Tanpa NAT, ISP tidak tahu bagaimana merutekan kembali ke jaringan 192.9.200.0 Anda. Jika Anda NAT ke alamat VLan 20, ISP akan dapat merutekan kembali ke Anda.

Ron Trunk
sumber