IP configuration file on linux in / etc / network / interfaces. Edit the file with the command,
server:~# nano /etc/network/interfacesYou are ready to add or edit the IP address manually. By default if we have not given an IP address on file so that there was only the loopback interface configuration. To add another IP on the interface (eg eth0, eth1) add the following parameters at the bottom after the loopback so it be like this.
# Loopback network interface
auto lo
iface lo inet loopback
# Tambahkan konfigurasi interface dibawah sini
auto eth0
iface eth0 inet static
address 192.168.10.1
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.254
dns-nameservers 202.134.0.155
auto eth1
iface eth1 inet dhcp
In the example above I add the IP on eth0 a static IP. While on my eth1 set to get IP from DHCP server. Examples of the above IP to be adjusted with the IP configuration on your network.
"auto eth1" the intention is that the interface runs automatically once the computer is turned on. "iface eth0 inet static", meaning the interface eth0 using static IP, not dynamic. If you want to be dynamic then use dhcp.
0 comments:
Post a Comment