CCNA4-NAT (IP Addressing Service)

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

CCNA4 – NAT (IP Addressing Service)

Konfigurasi R1 :

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int f0/0
R1(config-if)#description to.PUBLIC
R1(config-if)#ip add dhcp
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int f0/1
R1(config-if)#description to.PRIVATE
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#ip dhcp pool PRIVATE
R1(dhcp-config)#network 192.168.1.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.1.1
R1(dhcp-config)#dns-server 222.124.22.18
R1(dhcp-config)#exit
R1(config)#ip access-list standard NAT
R1(config-std-nacl)#permit 192.168.1.0 0.0.0.255
R1(config-std-nacl)#exit
R1(config)#ip nat inside source list NAT interface f0/0
R1(config)#int f0/0
R1(config-if)#ip nat outside
R1(config-if)#exit
R1(config)#int f0/1
R1(config-if)#ip nat inside
R1(config-if)#exit
R1(config)#ip route 0.0.0.0 0.0.0.0 222.124.22.17
R1(config)#ip name-server 222.124.22.18

Konfigurasi R2 :

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int f0/0
R2(config-if)#description to.PUBLIC
R2(config-if)#ip add dhcp
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int f0/1
R2(config-if)#description to.PRIVATE
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#ip dhcp pool PRIVATE
R2(dhcp-config)#network 192.168.2.0 255.255.255.0
R2(dhcp-config)#default-router 192.168.2.1
R2(dhcp-config)#dns-server 222.124.22.18
R2(dhcp-config)#exit
R2(config)#ip access-list standard NAT
R2(config-std-nacl)#permit 192.168.2.0 0.0.0.255
R2(config-std-nacl)#exit
R2(config)#ip nat inside source list NAT interface f0/0
R2(config)#int f0/0
R2(config-if)#ip nat outside
R2(config-if)#int f0/1
R2(config-if)#ip nat inside
R2(config-if)#exit
R2(config)#ip route 0.0.0.0 0.0.0.0 222.124.22.17
R2(config)#ip name-server 222.124.22.18

Hasil Uji coba dengan melakukan ping ke domain internet : google.com

PC 1 :
PC>ping google.com

Pinging 222.124.22.18 with 32 bytes of data:

Reply from 222.124.22.18: bytes=32 time=93ms TTL=127


Reply from 222.124.22.18: bytes=32 time=63ms TTL=127
Reply from 222.124.22.18: bytes=32 time=94ms TTL=127
Reply from 222.124.22.18: bytes=32 time=78ms TTL=127

Ping statistics for 222.124.22.18:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 63ms, Maximum = 94ms, Average = 82ms

PC>

PC 2 :
PC>ping google.com

Pinging 222.124.22.18 with 32 bytes of data:

Reply from 222.124.22.18: bytes=32 time=109ms TTL=127


Reply from 222.124.22.18: bytes=32 time=94ms TTL=127
Reply from 222.124.22.18: bytes=32 time=94ms TTL=127
Reply from 222.124.22.18: bytes=32 time=94ms TTL=127

Ping statistics for 222.124.22.18:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 94ms, Maximum = 109ms, Average = 97ms

PC>

You might also like