Cara Setting Static NAT di Cisco
- NAT digunakan untuk menterjemahkan suatu IP ke IP lainnya, misalnya dari IP Private ke IP Public
- NAT Static merupakan one to one mapping, jadi 1 IP Private diterjemahkan menjadi 1 IP Public
- Kebutuhannya bila ada server lokal yang ingin diakses dari internet (Public Network)
PC 10.10.10.2 ingin diakses dari PC Server
IP Private 10.10.10.2 diNAT menjadi IP Public 12.12.12.12
Routing yang digunakan pada Router1 menggunakan Default Route
Konfigurasi Router1
1 2 3 4 5 6 7 | Router1(config)#ip route 0.0.0.0 0.0.0.0 12.12.12.2 Router1(config)#ip nat inside source static 10.10.10.2 12.12.12.12 Router1(config)#int fa0/0 Router1(config-if)#ip nat inside Router1(config-if)#exit Router1(config)#int fa0/1 Router1(config-if)#ip nat outside |
Verifikasi :
1 2 3 | SERVER>ping 10.10.10.2 Pinging 10.10.10.2 with 32 bytes of data: Reply from 20.20.20.1: Destination host unreachable. |
1 2 3 | SERVER>ping 12.12.12.12 Pinging 12.12.12.12 with 32 bytes of data: Reply from 12.12.12.12: bytes=32 time=60ms TTL=126 |
1 2 3 4 5 6 7 | 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: |
1 2 3 | Router1#sh ip nat translations Pro Inside global Inside local Outside local Outside global --- 12.12.12.12 10.10.10.2 --- |
1 2 3 4 5 6 7 8 | 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 |
selamat mencoba 🙂
Referensi :
Buku Panduan Cisco – ID Networkers