Sabtu, 20 September 2008

Konfigurasi Ethernet di Ubuntu

Untuk mengkonfigurasi eth di ubuntu ada beberapa cara diantaranya :

1. menggunakan perintah ifconfig

root@ubuntu# ifconfig eth0 192.168.0.100 netmask 255.255.255.0

2. mengedit file /etc/network/interface

vi /etc/network/interface


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

lalu setelah selesai diedit kita restart networknya

/etc/init.d/networking restart

kemudian edit juga file /etc/hosts

vi /etc/hosts

127.0.0.1       localhost.localdomain localhost
192.168.0.100 server1.example.com server1

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Tidak ada komentar: