#LinuxTips Setting IP Address Ubuntu

0
1450
Halaman:
Sertakan sumber dengan jelas jika ingin mencopy. Selalu cek tanggal, karena mungkin ada beberapa artikel lama yang belum disesuaikan dengan fakta terbaru

Setting IP Address Ubuntu Kahayan - 4 Ramadhan 1423 H Menunggu datangnya adzan maghrib. Setting IP Address Ubuntu Via Command Line

  1. Edit file /etc/network/interfaces

#nano /etc/networks/interfaces

  1. Change to IP you want.

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# eth1 saya gunankan ether primer
# eth0 saya gunakan untuk ip publik
auto eth1 eth0




#It's for Dynamic IP Address

iface eth0 inet dhcp

# It's for static IP Address

iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.248
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

  1. Setting DNS server

#nano /etc/resolv.conf

# isi dengan DNS server
# penulis menggunakan DNS Nawala
nameserver  180.131.144.144

  1. Restart networking

#/etc/init.d/networking restart

* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces...

  1. Cek konfigurasi

#ifconfig

eth0  Link encap:Ethernet  HWaddr 00:15:17:49:06:5f
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx  Mask:255.255.255.252
inet6 addr: fe80::215:17ff:fe49:65f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:234 errors:0 dropped:0 overruns:0 frame:0
TX packets:122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22136 (22.1 KB)  TX bytes:18777 (18.7 KB)
Interrupt:17 Memory:88180000-881a0000

eth1      Link encap:Ethernet  HWaddr 00:15:17:49:06:60
inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.248
inet6 addr: fe80::215:17ff:fe49:660/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:5654 errors:0 dropped:0 overruns:0 frame:0
TX packets:4490 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:980163 (980.1 KB)  TX bytes:950227 (950.2 KB)

6.  Tes ping ke gateway, tes ping ke DNS server, tes ping ke google.com atau web lain

Artikel Terkait :  #SysAdm Install Wordpress pada Debian dan Permasalahannya

Allhamdulillah. Konfigurasi IP Adress sudah selesaiKahayan - 4 Ramadhan 1423 H
Menunggu datangnya adzan maghrib

Setting IP Address Ubuntu Via Command Line

  1. Edit file /etc/network/interfaces

#nano /etc/networks/interfaces

  1. Edit dan sesuaikan dengan IP yang akan dipakai.

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# eth1 saya gunankan ether primer
# eth0 saya gunakan untuk ip publik
auto eth1 eth0

# ini untuk IP dynamic

iface eth0 inet dhc

#ini untuk IP static

iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.248
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

  1. Setting DNS server

#nano /etc/resolv.conf

# isi dengan DNS server
# penulis menggunakan DNS Nawala
nameserver  180.131.144.144

  1. Restart networking

#/etc/init.d/networking restart

* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces...

  1. Cek konfigurasi

#ifconfig

eth0  Link encap:Ethernet  HWaddr 00:15:17:49:06:5f
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx  Mask:255.255.255.252
inet6 addr: fe80::215:17ff:fe49:65f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:234 errors:0 dropped:0 overruns:0 frame:0
TX packets:122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22136 (22.1 KB)  TX bytes:18777 (18.7 KB)
Interrupt:17 Memory:88180000-881a0000

eth1      Link encap:Ethernet  HWaddr 00:15:17:49:06:60
inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.248
inet6 addr: fe80::215:17ff:fe49:660/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:5654 errors:0 dropped:0 overruns:0 frame:0
TX packets:4490 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:980163 (980.1 KB)  TX bytes:950227 (950.2 KB)

6.  Tes ping ke gateway, tes ping ke DNS server, tes ping ke google.com atau web lain

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.