CCNA4-NAT (IP Addressing Service)
CCNA4-NAT (IP Addressing Service)
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
PC 1 :
PC>ping google.com
PC>
PC 2 :
PC>ping google.com
PC>