networking:cisco:static-nat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:cisco:static-nat [2026/02/04 23:45] – [Topologi] ilyasanetworking:cisco:static-nat [2026/02/04 23:51] (current) ilyasa
Line 73: Line 73:
 </hidden> </hidden>
 ===== Konfigurasi ===== ===== Konfigurasi =====
-  * **Step 1 : Pembuatan VLANs**+ 
 +  * **R1 : Menset Interface inside dan outsite** 
 + 
 +<code js> 
 +R1(config)#interface fastEthernet 0/0 
 +R1(config-if)#ip nat outside 
 +R1(config)#interface fastEthernet 0/1 
 +R1(config-if)#ip nat inside 
 +</code> 
 + 
 +  * **R1 : Mempetakan ip 100.0.0.x/24 ke ip private kita** 
 + 
 +<code js> 
 +R1(config)#ip nat inside source static 192.168.1.1 100.0.0.1 
 +R1(config)#ip nat inside source static 192.168.1.2 100.0.0.2 
 +R1(config)#ip nat inside source static 192.168.1.3 100.0.0.3 
 +</code> 
 + 
 +===== Testing ===== 
 +* **PC1 Test ping dan hasil capture**
 <code> <code>
-Switch(config)#vlan 10 +PC1> ip dhcp 
-Switch(config-vlan)#name BIRU +DORA IP 192.168.1.1/24 GW 192.168.1.254
-Switch(config-vlan)#exit+
  
-Switch(config)#vlan 20 +PC1> ping google.com 
-Switch(config-vlan)#name MAGENTA +google.com resolved to 142.251.175.113 
-Switch(config-vlan)#exit+ 
 +84 bytes from 142.251.175.113 icmp_seq=1 ttl=254 time=19.694 ms 
 +84 bytes from 142.251.175.113 icmp_seq=2 ttl=254 time=20.258 ms 
 +84 bytes from 142.251.175.113 icmp_seq=3 ttl=254 time=15.912 ms 
 +84 bytes from 142.251.175.113 icmp_seq=4 ttl=254 time=16.214 ms 
 +^c
 </code> </code>
-  * **Step 2 Assign VLANs ke Ports**+{{ :networking:cisco:cisco_natstatic-test03.png?nolink |}} 
 + 
 +* **PC2 Test ping dan hasil capture**
 <code> <code>
-Switch(config)#interface f0/+PC2> ping google.com -c 
-Switch(config-if)#switchport mode access  +google.com resolved to 142.251.175.113
-Switch(config-if)#switchport access vlan 10 +
-Switch(config-if)#exit+
  
-Switch(config)#interface f0/2 +84 bytes from 142.251.175.113 icmp_seq=1 ttl=254 time=30.073 ms
-Switch(config-if)#switchport mode access  +
-Switch(config-if)#switchport access vlan 10 +
-Switch(config-if)#exit+
 </code> </code>
  
-===== Testing =====+{{ :networking:cisco:cisco_natstatic-test02.png?nolink |}} 
 + 
 +* **PC3 : Test ping dan hasil capture** 
 + 
 +<code> 
 +PC3> ping google.com -c 1 
 +google.com resolved to 142.251.175.113 
 + 
 +84 bytes from 142.251.175.113 icmp_seq=1 ttl=254 time=20.609 ms 
 +</code> 
 +{{ :networking:cisco:cisco_natstatic-test01.png?nolink |}} 
 + 
 +* **R1 : logs nat translations** 
 +<code js> 
 +R1#show ip nat translations 
 +Pro Inside global      Inside local       Outside local      Outside global 
 +icmp 100.0.0.1:49363   192.168.1.1:49363  8.8.8.8:49363      8.8.8.8:49363 
 +icmp 100.0.0.1:49619   192.168.1.1:49619  8.8.8.8:49619      8.8.8.8:49619 
 +icmp 100.0.0.1:49875   192.168.1.1:49875  8.8.8.8:49875      8.8.8.8:49875 
 +icmp 100.0.0.1:50131   192.168.1.1:50131  8.8.8.8:50131      8.8.8.8:50131 
 +icmp 100.0.0.1:50387   192.168.1.1:50387  8.8.8.8:50387      8.8.8.8:50387 
 +--- 100.0.0.1          192.168.1.1        ---                --- 
 +icmp 100.0.0.2:54227   192.168.1.2:54227  8.8.8.8:54227      8.8.8.8:54227 
 +--- 100.0.0.2          192.168.1.2        ---                --- 
 +icmp 100.0.0.3:57043   192.168.1.3:57043  8.8.8.8:57043      8.8.8.8:57043 
 +--- 100.0.0.3          192.168.1.3        ---                --- 
 +</code>
  • networking/cisco/static-nat.1770223551.txt.gz
  • Last modified: 2026/02/04 23:45
  • by ilyasa