Jump to content

Cisco: Konfigurasi NAT: Difference between revisions

From Wiki
Created page with "* FastEthernet1 (f0/0) dengan IP 192.168.1.0. Interface ini terhubung ke jaringan yang akan di NAT * Serial 0/0/0 dengan IP 200.200.200.1. Interface ini terhubung ke internet. Masuk ke mode privileged config t <syntaxhighlight lang="bash" line="1"> Router# configure terminal Router(config)# interface fa0/0 (IP Private) Router(config-if)# ip add 192.168.0.1 255.255.255.0 Router(config)# interface s0/0/0 (IP Public) Router(config-if)# ip add 200.200.200.1 255.255.255.0 </..."
Tag: visualeditor
 
No edit summary
Tag: visualeditor
Line 67: Line 67:
S*  0.0.0.0/0 [1/0] via 12.12.12.2
S*  0.0.0.0/0 [1/0] via 12.12.12.2
</syntaxhighlight>
</syntaxhighlight>
== Terkait ==
* [[NAT (Network Address Translation)|NAT]]
* [[Komunikasi Data dan Jaringan:Paket Tracer Cisco|Installasi Packet Tracer Cisco]]


== Source ==
== Source ==

Revision as of 09:23, 31 March 2023

  • FastEthernet1 (f0/0) dengan IP 192.168.1.0. Interface ini terhubung ke jaringan yang akan di NAT
  • Serial 0/0/0 dengan IP 200.200.200.1. Interface ini terhubung ke internet. Masuk ke mode privileged config t

<syntaxhighlight lang="bash" line="1"> Router# configure terminal Router(config)# interface fa0/0 (IP Private) Router(config-if)# ip add 192.168.0.1 255.255.255.0 Router(config)# interface s0/0/0 (IP Public) Router(config-if)# ip add 200.200.200.1 255.255.255.0 </syntaxhighlight>

  • Interface tadi harus terhubung ke jaringan yang akan di NAT.
  • Konfigurasi access list untuk nantinya berguna dalam proses NAT

<syntaxhighlight lang="bash" line="1" start="6"> HQ(config)# access-list 1 permit 192.168.1.0 0.0.0.255 </syntaxhighlight>

  • Konfigurasi router supaya NAT semua paket dari IP Private 192.168.1.0 ke dalam IP Public 200.200.200.2 – 6

<syntaxhighlight lang="bash" line="1" start="7"> HQ(config)# ip nat pool INTERNET 200.200.200.2 200.200.200.6 netmask 255.255.255.248 HQ(config)# ip nat inside source list 1 pool INTERNET overload </syntaxhighlight>

  • Selanjutnya pilih saja interface yang langsung terhubung dengan NAT, dan definisikan network pada jaringan ini sebagai network yang akan di NAT.

<syntaxhighlight lang="bash" line="1" start="9"> HQ(config)# int f0/0 HQ(config)# ip nat inside HQ(config)# ip s0/0/0 HQ(config)# ip nat outside </syntaxhighlight>

  • Konfigurasi selesai. Cek apakah host pada jaringan 192.168.1.0 dapat terhubung ke dunia maya. Cek juga konfigurasi NAT pada router dengan instruksi show ip nat translation.

<syntaxhighlight lang="bash"> Router1#sh ip nat statistics

Total translations: 1 (1 static, 0 dynamic, 0 extended)

Outside Interfaces: FastEthernet0/1

Inside Interfaces: FastEthernet0/0

Hits: 10 Misses: 36

Expired translations: 19

Dynamic mappings:

Router1#sh ip nat translations

Pro Inside global Inside local Outside local Outside global

— 12.12.12.12 10.10.10.2 —

Router1#sh ip route

Gateway of last resort is 12.12.12.2 to network 0.0.0.0


    10.0.0.0/24 is subnetted, 1 subnets

C 10.10.10.0 is directly connected, FastEthernet0/0

    12.0.0.0/24 is subnetted, 1 subnets

C 12.12.12.0 is directly connected, FastEthernet0/1

S* 0.0.0.0/0 [1/0] via 12.12.12.2 </syntaxhighlight>

Terkait

Source