Port Address Translation atau yang biasa disebut Dynamic NAT Overload adalah tipe NAT yang paling populer. Tipe NAT ini bekerja dengan mentranslasikan IP Private menjadi IP public dengan hanya menggunakan satu IP Public.
Topologi :
Konfigurasi :
Pertama setting IP Address beserta netmask di seluruh device yang sesuai topologi.
INTERNET(config)#interface fa0/0
INTERNET(configif)#no shutdown
INTERNET(configif)#ip address 11.11.11.2 255.255.255.0
INTERNET(configif)#exit
INTERNET(config)#interface loopback 1
INTERNET(configif)#ip address 8.8.8.8 255.255.255.255
INTERNET(configif)#
SaktiR1(config)#interface fa0/0
SaktiR1(configif)#no shutdown
SaktiR1(configif)#ip address 11.11.11.1 255.255.255.0
SaktiR1(configif)#exit
SaktiR1(config)#interface fa0/1
SaktiR1(configif)#no shutdown
SaktiR1(configif)#ip address 192.168.2.1 255.255.255.0
SaktiR1(configif)#exit
SaktiR1(config)#
Selanjutnya, kita konfigurasi routing agar kedua router dapat terhubung. Ingat, karena network 192.168.2.0/24 akan kita konfigurasi NAT. Maka tidak kita sertakan dalam routing.
INTERNET(config)#router ospf 1
INTERNET(configrouter)#network 8.8.8.0 0.0.0.255 area 0
INTERNET(configrouter)#network 11.11.11.0 0.0.0.255 area 0
INTERNET(configrouter)#exit
INTERNET(config)#
Cek tabel routing INTERNET :
INTERNET#show ip route
Codes: C connected, S static, I IGRP, R RIP, M
mobile, B BGP
D EIGRP, EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i ISIS, L1 ISIS level1, L2 ISIS level2, ia ISIS
inter area
candidate default, U peruser static route, o ODR
P periodic downloaded static route
Gateway of last resort is not set
8.0.0.0/32 is subnetted, 1 subnets
C 8.8.8.8 is directly connected, Loopback1
11.0.0.0/24 is subnetted, 1 subnets
C 11.11.11.0 is directly connected, FastEthernet0/0
INTERNET#
SaktiR1(config)#router ospf 1
SaktiR1(configrouter)#network 11.11.11.0 0.0.0.255 area 0
SaktiR1(configrouter)#
02:31:10: %OSPF5ADJCHG: Process 1, Nbr 8.8.8.8 on
FastEthernet0/0 from LOADING to FULL, Loading Done
SaktiR1(configrouter)#exit
SaktiR1(config)#
Cek tabel routing Sakti-R1 :
SaktiR1#show ip route
Codes: C connected, S static, I IGRP, R RIP, M
mobile, B BGP
D EIGRP, EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i ISIS, L1 ISIS level1, L2 ISIS level2, ia ISIS
inter area candidate default, U peruser static route, o ODR
P periodic downloaded static route
Gateway of last resort is not set
8.0.0.0/32 is subnetted, 1 subnets
O 8.8.8.8 [110/2] via 11.11.11.2, 00:38:34, FastEthernet0/0
11.0.0.0/24 is subnetted, 1 subnets
C 11.11.11.0 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
SaktiR1#
Sebelum konfigurasi NAT. Cek ping Sakti-PC2 ke INTERNET :
Packet Tracer PC Command Line 1.0
C:>pinG 8.8.8.8
Pinging 10.10.10.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.10.10.2:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:>
Selanjutnya, kita konfigurasi NAT di Sakti-R1 agar Sakti-PC2 dapat terhubung ke
INTERNET.
Pertama, tentukan interface Outside dan Inside NAT.
SaktiR1(config)#interface fa0/0
SaktiR1(configif)#ip nat outside
SaktiR1(configif)#exit
SaktiR1(config)#interface fa0/1
SaktiR1(configif)#ip nat inside
SaktiR1(configif)#exit
SaktiR1(config)#
Selanjutnya, kita buat rule acess-list dengan permit network 192.168.2.0/24 . Dan buat konfigurasi NAT Overload.
SaktiR1(config)#accesslist 1 permit 192.168.2.0 0.0.0.255
SaktiR1(config)#ip nat inside source list 1 interface fa0/0
overload
SaktiR1(config)#
Terakhir, cek ping lagi dari Sakti-PC2 ke INTERNET.
C:>ping 8.8.8.8
Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=14ms TTL=254
Reply from 8.8.8.8: bytes=32 time=49ms TTL=254
Reply from 8.8.8.8: bytes=32 time=25ms TTL=254
Reply from 8.8.8.8: bytes=32 time=22ms TTL=254
Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milliseconds:
Minimum = 14ms, Maximum = 49ms, Average = 27ms
C:>
Bisa dicek output translasi NAT di Sakti-R2
SaktiR1#show ip nat translations
Pro Inside global Inside local Outside local
Outside global
icmp 11.11.11.1:37 192.168.2.100:37 8.8.8.8:37 8.8.8.8:37
icmp 11.11.11.1:38 192.168.2.100:38 8.8.8.8:38 8.8.8.8:38
icmp 11.11.11.1:39 192.168.2.100:39 8.8.8.8:39 8.8.8.8:39
icmp 11.11.11.1:40 192.168.2.100:40 8.8.8.8:40 8.8.8.8:40
SaktiR1#
Note :
Konfigurasi NAT Overload diatas adalah konfigurasi NAT menggunakan Exit-Interface. Untuk konfigurasi NAT Dynamic Overload dengan pool bisa menggunakan :
SaktiR1(config)#ip nat pool SAKTI 11.11.11.11 11.11.11.11 netmask 255.255.255.0
SaktiR1(config)#ip nat inside source list 1 pool SAKTI overload
SaktiR1(config)#
Keterangan :
Untuk penentuan interface NAT Inside dan Outside serta Access-list adalah sama.
Post a Comment