Catatanku: Membuat Multiple IP pada Ubuntu 12.04

Catatan: tanpa network-manager dan network-manager-gnome

A. Kasus:

Komputer server memiliki 2 Ethernet Card

Ethernet card 1:

eth0 terhubung ke Internet dan VPN

Gateway Internet yaitu 192.168.2.1, sedangkan Gatewai VPN : 10.3.2.1, sehingga harus di setting multiple IP

IP: 192.168.2.101 dan 10.3.2.101

Ethernet Card 2

eth1 terhubung ke LAN Lokal (Client)

B. Konfigurasi:

# gedit /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.2.101
netmask 255.255.255.0
gateway 192.168.2.1
network 192.168.2.0
broadcast 192.168.2.255
dns-nameservers 192.168.2.1
dns-search bkpgorontalo.org

auto eth0:1
iface eth0:1 inet static
address 10.3.2.101
netmask 255.0.0.0
gateway 10.3.2.1
broadcast 10.3.2.255

auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

# /etc/init.d/networking restart

C. Cek Hasil Konfigurasi

$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:21:91:e2:01:ed
inet addr:192.168.2.101 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::221:91ff:fee2:1ed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69126 errors:0 dropped:0 overruns:0 frame:0
TX packets:48978 errors:0 dropped:0 overruns:1 carrier:0
collisions:0 txqueuelen:1000
RX bytes:63289765 (63.2 MB) TX bytes:7337113 (7.3 MB)
Interrupt:16 Base address:0x1000

eth0:1 Link encap:Ethernet HWaddr 00:21:91:e2:01:ed
inet addr:10.3.2.101 Bcast:10.3.2.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16 Base address:0x1000

eth1 Link encap:Ethernet HWaddr 00:15:17:17:c9:80
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::215:17ff:fe17:c980/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:96622 errors:0 dropped:1344 overruns:0 frame:0
TX packets:43443 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9693010 (9.6 MB) TX bytes:42112825 (42.1 MB)
Interrupt:18 Memory:b8820000-b8840000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:246 errors:0 dropped:0 overruns:0 frame:0
TX packets:246 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:21401 (21.4 KB) TX bytes:21401 (21.4 KB)

D. Cek Ping

Ping ke Gateway Internet

$ ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_req=1 ttl=255 time=26.2 ms
64 bytes from 192.168.2.1: icmp_req=2 ttl=255 time=0.777 ms
64 bytes from 192.168.2.1: icmp_req=3 ttl=255 time=0.780 ms

Ping ke Gateway VPN

$ ping 10.3.2.1
PING 10.3.2.1 (10.3.2.1) 56(84) bytes of data.
64 bytes from 10.3.2.1: icmp_req=1 ttl=255 time=1.08 ms
64 bytes from 10.3.2.1: icmp_req=2 ttl=255 time=0.993 ms
64 bytes from 10.3.2.1: icmp_req=3 ttl=255 time=0.991 ms

Ping ke Internet

$ ping google.co.id
PING google.co.id (173.194.38.151) 56(84) bytes of data.
64 bytes from google.co.id (173.194.38.151): icmp_req=1 ttl=55 time=336 ms
64 bytes from google.co.id (173.194.38.151): icmp_req=2 ttl=55 time=331 ms
64 bytes from google.co.id (173.194.38.151): icmp_req=3 ttl=55 time=272 ms

Ping VPN

$ ping 10.3.1.1
PING 10.3.1.1 (10.3.1.1) 56(84) bytes of data.
64 bytes from 10.3.1.1: icmp_req=2 ttl=252 time=116 ms
64 bytes from 10.3.1.1: icmp_req=3 ttl=252 time=115 ms
64 bytes from 10.3.1.1: icmp_req=4 ttl=252 time=116 ms

🙂 SELSESAI . . . . .

Lanjutkan dengan:

1. Menjadikan Ubuntu 12.04 Linux sebagai Router dan Setting DHCP Server

2. Setting SQUID pada Ubuntu 12.04 Linux

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s