Ubuntu Network Interface Config



To configure the network on Ubuntu server, such as IP settings, Network Interface eth0, eth1. wlan0, wlan1 and so on, can be done easily in text mode, but you still have to have accuracy in network configuration, because if there is one invalid configuration, Then the network becomes error and does not work, the example of the most frequent error when the network configuration is when setting the IP of an interfaces. Admin at the beginning of the configuration learning seering experience in the IP tuning phase, due to lack of accuracy. Well. If you are ready, take a look at the tutorials that admin often use below.

1. Select Interface to set
Before setting the settings. You must first decide which interface will be configured manually. You can see a list of Network Interfaces on your computer by typing the command:
# ls /sys/class/net



Caution: You are advised to log in as root user with sudo su command and enter your password. In order to shorten the write command tampa must type sudo.

After you type the above command it will show some network interface, in my computer example there are 3 interfaces. Ie eth0, lo and wlan0 as shown below.


Enable Interfaces
After you have specified the interface to be configured, next is to make sure that the interface is active. For example I will configure the eth0 interface. To see the status of active / not then type the command:
# ifconfig

For example, the active network on my computer is just a "lo" interface, as shown below.


And to enable the interface type the command below
# ifconfig nama-interface up

For example, I want to enable eth0 interface, then I write command
# ifconfig eth0 up

To ensure that the interface is active type the command
#ifconfig

Then it will look like the picture below, and eth0 that was not there become exist.


Configure Interfaces
Once you have enabled the interface to be configured. Next is to set the interface such as IP address, DNS, Netmask and others with the command:
# nano /etc/network/interfaces

Then the image will appear below


And to do the configuration, then add the text as below, and adjust with what you want,

 # The  local network interfaces
 auto eth0
 iface eth0 inet static
 address 192.168.100.20
 netmask 255.255.255.0
 gateway 192.168.100.1
 broadcast 192.168.100.31
 dns-search dellze.net
 dns-nameservers 192.168.100.20 192.168.100.1

Note the green text above, replace it with the interface you are using, Example: If you use wlan0 as the interface, then change the green text above to wlan0. Etc.

For red text, you can replace it with the IP Address you use / want, above, I use class C IP Address because I use it in local network.

And to see the result, cyclical restart the service network with the command:
# service networking restart
# ifconfig

And see the result if his IP has not appeared then reboot the computer and do ifconfig command



Next
Previous
Click here for Comments

0 comments: