konfigurasi static nat dan dynamic nat

STATIC NAT

Pertama kita buat topologinya dulu:
jika sudah membuat topologi,selanjutnya kita masukan ip ke server dan pc secara static seperti gambar dibawah:


*perintah dibawah dikonfigurasi dirouter 0
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip add 8.8.8.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#do wr

*perintah dibawah dikonfigurasi dirouter 0
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip add 20.20.20.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#do wr



*perintah dibawah dikonfigurasi dirouter 1
Router>en
Router#conf t
Router(config)#int fa0/0
Router(config-if)#ip add 20.20.20.2 255.255.255.0
Router(config-if)#no sh



*perintah dibawah dikonfigurasi dirouter 1
Router>en
Router#conf t
Router(config)#int fa0/1
Router(config-if)#ip add 192.168.10.1 255.255.255.0
Router(config-if)#no sh

*perintah dibawah untuk mengaktifkan NAT STATIC nya;

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip nat inside source static 192.168.10.5 20.20.20.50
Router(config)#int fa0/1
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#int fa0/0
Router(config-if)#ip nat inside
Router(config-if)#exit

*perintah dibawah untuk membuat routing static:
router 0
ip route 0.0.0.0 0.0.0.0 20.20.20.2

router 1
ip route 0.0.0.0 0.0.0.0 20.20.20.1


DYNAMIC NAT

Keterangan : 

Router1 : Gig0/0 200.200.10.1/30
                Gig0/1 10.10.10.1/24

Router2 : Gig0/0 192.168.10.1/24
                Gig0/1 10.10.10.2/24

Server   : 200.200.10.2/30
PC0       : 192.168.10.2/24
PC1       : 192.168.10.3/24



Konfigurasi pada Router1 :

Router1>enable
Router1#conf ter
Router1(config)#int
Router1(config)#interface gi
Router1(config)#interface gigabitEthernet 0/0
Router1(config-if)#ip ad
Router1(config-if)#ip address 200.200.10.1 255.255.255.252
Router1(config-if)#no sh

Router1>enable
Router1#conf ter
Router1(config)#int
Router1(config)#interface gi
Router1(config)#interface gigabitEthernet 0/1
Router1(config-if)#ip ad
Router1(config-if)#ip address 10.10.10.1 255.255.255.0
Router1(config-if)#no sh
Router1(config-if)#exit
Router(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.2
Router(config)#


Konfigurasi pada Router2 :

Router2>enable
Router2#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Router2(config)#int
Router2(config)#interface gi
Router2(config)#interface gigabitEthernet 0/0
Router2(config-if)#ip ad
Router2(config-if)#ip address 192.168.10.1 255.255.255.0
Router2(config-if)#no sh

Router2>enable
Router2#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Router2(config)#int
Router2(config)#interface gi
Router2(config)#interface gigabitEthernet 0/1
Router2(config-if)#ip ad
Router2(config-if)#ip address 10.10.10.2 255.255.255.0
Router2(config-if)#no sh
Router2(config-if)#exit
Router2(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.1
Router2(config)#

Konfigurasi NAT Dynamic :

Router2(config)#int
Router2(config)#interface gi 0/0 
Router2(config-if)#ip na
Router2(config-if)#ip nat ins
Router2(config-if)#ip nat inside 

Router2(config-if)#exit

Router2(config)#interface gig 0/1
Router2(config-if)#ip na
Router2(config-if)#ip nat outs
Router2(config-if)#ip nat outside 
Router2(config-if)#ex
Router2(config)#ac
Router2(config)#access-list 1 per
Router2(config)#access-list 1 permit 192.168.10.0 0.0.0.255
Router2(config)#ip na
Router2(config)#ip nat poo
Router2(config)#ip nat pool poolR2 10.10.10.10 10.10.10.50 net
Router2(config)#ip nat pool poolR2 10.10.10.10 10.10.10.50 netmask 255.255.255.0 
Router2(config)#ip na
Router2(config)#ip nat ins
Router2(config)#ip nat inside sour
Router2(config)#ip nat inside source lis
Router2(config)#ip nat inside source list 1 pool poolR2
Router2(config)#


Hasil Ping PC0 ke SERVER 200.200.10.2 :


Hasil Ping PC1 ke SERVER 200.200.10.2 :


Show ip NAT Translation :


Konfigurasi NAT Dynamic Overloading :

Router>en
Router#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ip na
Router(config)#ip nat ins
Router(config)#ip nat inside sour
Router(config)#ip nat inside source lis
Router(config)#ip nat inside source list 1 pool poolR2 overl
Router(config)#ip nat inside source list 1 pool poolR2 overload 
Router(config)#

Hasil Ping PC0 ke SERVER 200.200.10.2 :


 Show ip NAT Translation :


Hasil Ping PC1 ke SERVER 200.200.10.2 :


 Show ip NAT Translation :


link video part 1 : https://youtu.be/ONu1IH7IZ6o
link video part 2https://youtu.be/bc2t-UlL8Do
silahkan tonton videonya  karena ada hubungannya dengan Routing OSPF. linknya di atas 
terima kasih

Komentar

Postingan populer dari blog ini

PERTEMUAN X : Set Instruksi

Konfigurasi Rapid Spanning Tree PVST+ Load balancing