LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Bringing up interface eth0: failed (https://www.linuxquestions.org/questions/linux-networking-3/bringing-up-interface-eth0-failed-501905/)

sernova 11-15-2006 01:02 PM

Bringing up interface eth0: failed
 
Dear all,

I cannot establish Internet connection in Linux.
This question was asked one thousand times,
I read the answers and followed them - nothing
worked for me. For example, I tryed /netconfig -
file not found.
On start up I have 'Bringing up interface eth0: failed'.
I tryed to change /etc/resolv.conf
and wrote nameserver and my IP-address (is it wrong?)

Please, help me; before I had
cable connection with automatic IP detection, now I have
fixed IP and have to use LAN-modem.
I have Mandrake Linux 9.1;
my mashine is Dell Inspiron 5150.
Many thanks for your help!

Natasha

igorc 11-15-2006 09:36 PM

Hi Natasha,

Mandrake/Mandriva comes with a Network and Internet Configuration Wizard, which is preferably started up from Mandrake's Control Center. For static configuration you can enter the IP address, netmask, DNS server and default gateway manualy (DNS and default gw is your modem IP address e.g.10.1.1.1 and the netmask is usually 255.0.0.0), OR you can try this long manual way:

First type this in the console:

# ifconfig

which will list all your network devices. If you use modem/router with enabled DHCP server (which usually is the case by default) then you can get an IP address by typing:

# dhclient eth0

loged as root. You will see some messages about quering the DHCP server and requesting an IP address. If this command is succesfull you will get an IP address for eth0 interface and this will also set the DNS for you in the /etc/resolv.conf file and the default gateway for internet access. You can check this with one of these commands as root:

# route -n
or
# netstat -r

If this works you are ready for surfing :).

If your only option is manual setting of the network then run this command but you have to know at least one DNS server IP (you can obtain this from your ISP or just use the modem one) and IP address for your interface (let say your network is 10.1.1.0, you can find this in your modem/router manual):

# ifconfig eth0 10.1.1.3 netmask 255.0.0.0 broadcast 10.1.1.255

Then you have to set the default gateway also manualy which is usually the IP address of the modem/router which in this case will be 10.1.1.1:

# route add default gw 10.1.1.1 dev eth0

and the DNS server(s) in /etc/resolve.conf:

# vi /etc/resolve.conf - put here the following line(s), you can use some other text editor if you are not comfortable with vi

nameserver DNS_address1
nameserver DNS_address2

(you can have only one nameserver line in this file usually the address of the modem 10.1.1.1 in this example) then type:

# ifconfig eth0 up

and you are ready to go (check with ifconfig command again).

In case of manual setup you should know that your eth0 interface will loose it's settings after restart so to make these changes permanent you have to edit the network file /etc/sysconfig/network-scripts/ifcfg-eth0 and put/change lines like this for eth0 section:

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.1.1.3
NETMASK=255.0.0.0
GATEWAY=10.1.1.1

and save the file. On the next boot up the network should be already configured for you. Please change all these values from the example with your apropriate ones.

I hope this helps.

Igor


All times are GMT -5. The time now is 02:28 PM.