LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem to set static IP (https://www.linuxquestions.org/questions/linux-networking-3/problem-to-set-static-ip-4175454132/)

Huamin 03-14-2013 10:14 PM

Problem to set static IP
 
Hi,
I've followed the steps in this to set one static IP for eth0
http://thedaneshproject.com/posts/ho...c-ip-in-linux/

and here is ifcfg-eth0 file
DEVICE=eth0
BOOTPROTO=dhcp
IPADDR=192.168.168.20
NETMASK=255.255.255.0
HWADDR=08:00:27:C8:DF:01
ONBOOT=yes

but I don't know why I get these
[root@localhost network-scripts]# ifdown eth0
[root@localhost network-scripts]# ifup eth0

Determining IP information for eth0... failed.

kbp 03-14-2013 10:20 PM

Change to
Code:

BOOTPROTO=none
.. and if that fails, also check that your MAC address is correct.

KinnowGrower 03-14-2013 10:20 PM

Quote:

and here is ifcfg-eth0 file
DEVICE=eth0
BOOTPROTO=dhcp
IPADDR=192.168.168.20
NETMASK=255.255.255.0
HWADDR=08:00:27:C8F:01
ONBOOT=yes
replace dhcp with static so that it looks like
Code:

BOOTPROTO=none


All times are GMT -5. The time now is 10:39 AM.