Facebook SDK

 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(config­if)#no shutdown
INTERNET(config­if)#ip address 11.11.11.2 255.255.255.0
INTERNET(config­if)#exit
INTERNET(config)#interface loopback 1
INTERNET(config­if)#ip address 8.8.8.8 255.255.255.255
INTERNET(config­if)#
Sakti­R1(config)#interface fa0/0
Sakti­R1(config­if)#no shutdown
Sakti­R1(config­if)#ip address 11.11.11.1 255.255.255.0
Sakti­R1(config­if)#exit
Sakti­R1(config)#interface fa0/1
Sakti­R1(config­if)#no shutdown
Sakti­R1(config­if)#ip address 192.168.2.1 255.255.255.0
Sakti­R1(config­if)#exit
Sakti­R1(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(config­router)#network 8.8.8.0 0.0.0.255 area 0
INTERNET(config­router)#network 11.11.11.0 0.0.0.255 area 0
INTERNET(config­router)#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 ­ IS­IS, L1 ­ IS­IS level­1, L2 ­ IS­IS level­2, ia ­ IS­IS
inter area­
candidate default, U ­ per­user 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#
Sakti­R1(config)#router ospf 1
Sakti­R1(config­router)#network 11.11.11.0 0.0.0.255 area 0
Sakti­R1(config­router)#
02:31:10: %OSPF­5­ADJCHG: Process 1, Nbr 8.8.8.8 on
FastEthernet0/0 from LOADING to FULL, Loading Done
Sakti­R1(config­router)#exit
Sakti­R1(config)#

Cek tabel routing Sakti-R1 :

Sakti­R1#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 ­ IS­IS, L1 ­ IS­IS level­1, L2 ­ IS­IS level­2, ia ­ IS­IS
inter area­ candidate default, U ­ per­user 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
Sakti­R1#

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.

Sakti­R1(config)#interface fa0/0
Sakti­R1(config­if)#ip nat outside
Sakti­R1(config­if)#exit
Sakti­R1(config)#interface fa0/1
Sakti­R1(config­if)#ip nat inside
Sakti­R1(config­if)#exit
Sakti­R1(config)#

Selanjutnya, kita buat rule acess-list dengan permit network 192.168.2.0/24 . Dan buat konfigurasi NAT Overload.

Sakti­R1(config)#access­list 1 permit 192.168.2.0 0.0.0.255
Sakti­R1(config)#ip nat inside source list 1 interface fa0/0
overload
Sakti­R1(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 milli­seconds:
Minimum = 14ms, Maximum = 49ms, Average = 27ms
C:>

Bisa dicek output translasi NAT di Sakti-R2

Sakti­R1#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
Sakti­R1#

Note :

Konfigurasi NAT Overload diatas adalah konfigurasi NAT menggunakan Exit-Interface. Untuk konfigurasi NAT Dynamic Overload dengan pool bisa menggunakan :

Sakti­R1(config)#ip nat pool SAKTI 11.11.11.11 11.11.11.11 netmask 255.255.255.0
Sakti­R1(config)#ip nat inside source list 1 pool SAKTI overload
Sakti­R1(config)#

Keterangan :
Untuk penentuan interface NAT Inside dan Outside serta Access-list adalah sama.

Post a Comment

Previous Post Next Post