Setup ip address and gateway via console
You can setup the ip address and ip gateway through Ubuntu Console. But, this is for temporary. If you unplug your LAN cable then you have to configure it out again. Although, it’s easy if you setup via System > Administration > Network menu, I always do this step. First, I always remember my ip address in my network and second I always remember the command lines.
taufanlubis@zyrex:~$ sudo ifconfig eth0 192.168.0.10 netmask 255.255.255.0
taufanlubis@zyrex:~$ sudo route add default gw 192.168.0.1
taufanlubis@zyrex:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:90:F5:36:9A:EB
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0xa000
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:78 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5976 (5.8 KiB) TX bytes:5976 (5.8 KiB)
taufanlubis@zyrex:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
After you setup the networking through System > Administration > Network menu, will Ubuntu stores the network configuration at file /etc/network/interfaces.
taufanlubis@zyrex:~$ sudo gedit /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
auto eth0
Because, I set a temporary configuration, it will not written to this file.
Now, I will setup the configuration through System > Administration > Network menu then open the interfaces file at /etc/network again.
taufanlubis@zyrex:~$ sudo gedit /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
auto eth0
Now, it’s already there….





Dear Pak Taufan Lubis
Maaf pakai bahasa ibu, mudah mudahan tidak keberatan.
Saya masih sangat pemula di linux, ubuntu interpid sudah terinstall di komputer saya, konek internet dengan HSDPA USB modem HuaWei E160G. Sudah bisa browsing dan update.
Ingin sharing internet/file dengan komputer lain via Access Point SMCWEB-N, tapi masalahnya Ubuntu tidak bisa konek ke access point dengan konfigurasi Auto DHCP lewat Network Manager Applet.
Saya sudah coba prosedur diatas , tapi masih belum berhasil juga.
Btw Ubuntu yang saya install versi desktop, apakah saya hrs install yang versi server?
Terimakasih