LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-25-2009, 11:41 AM   #1
Dims
Member
 
Registered: Feb 2009
Posts: 151

Rep: Reputation: 15
How to make eth1 being up upon reboot?


I have two interfaces eth0 and eth1 on linux machine. eth1 is set up to use DHCP but is not working upon reboot. I always need to issue a command

ifup eth1

after reboot.

How to make eth1 to be up automatically?
 
Old 05-25-2009, 11:43 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you've not said what distro you are using at all, but guessing fedora / centos / redhat or a similar derivative, you need to set "ONBOOT=YES" and BOOTPROTO=DHCP in /etc/sysconfig/network-scripts/ifcfg-eth1
 
Old 05-25-2009, 12:15 PM   #3
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
Sorry, I am using debian/lenny.
 
Old 05-25-2009, 12:35 PM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
You could cheat and put it in rc.local, but thats fixing the symptoms, not the problem
 
Old 05-25-2009, 12:51 PM   #5
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
Take a look in /etc/network/interfaces (text file). If a stanza for eth1 is not there, you'll need to add it. Be sure to include the "auto" command. There should be some examples to help you. This should get run during boot, IIRC.
 
Old 06-06-2009, 01:05 PM   #6
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
Now I have similiar situation with eth0 and Fedora 9 - eth0 in down after reboot and I need to up it manually. H

How to fix it?

I have the following config file (IP addresses removed by me):

Code:
[root@kestrel network-scripts]# cat ifcfg-eth0
# Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:1f:bc:00:fb:78
ONBOOT=yes
DHCP_HOSTNAME=host20.anla.org
NM_CONTROLLED=no
IPADDR=65.XXX.XXX.XXX 
NETMASK=255.255.255.248
GATEWAY=65.XXX.XXX.XXX
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
DNS2=198.6.1.1
DNS1=198.6.1.2
 
Old 06-06-2009, 01:20 PM   #7
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
My suspection is follows: I have patched dhcp for infiniband use and it prevents normal eth0 startup (despite the fact it is configured for static IP I see dhcp-related messages about eht0 in boot logs).
 
Old 06-08-2009, 09:51 AM   #8
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
I have installed new clean installation of Fedora 9 today. On old i386 machine. Initially eth0 was configured for using DHCP and was automatically up when system starts. But after I reconfigured /etc/sysconfig/network-scripts/ifcfg-eth0 to the following

Code:
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:02:b3:03:11:da
ONBOOT=yes
DHCP_HOSTNAME=testbed2
IPADDR=192.168.10.7
NETMASK=255.255.255.0
DNS1=192.168.10.1
NM_CONTROLLED=no
TYPE=Ethernet
it stops. I.e. I need to do "ifup eth0" after each reboot.

What's wrong with the text above?
 
Old 06-08-2009, 01:06 PM   #9
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
Problem resolved!

The following command helped:

chkconfig --levels 35 network on

I.e. other place, controlling eth0 upping exists!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't make eth1 work.... or even exists... everal Slackware 3 10-08-2006 12:41 PM
how to make sure vpnc using eth1 rather than eth0 zyuadl Linux - Wireless Networking 2 03-09-2006 06:57 AM
eth0 and eth1 switch places on reboot? slayer17 Linux - Networking 8 12-14-2005 09:33 PM
How can i make one program use eth1 and others still use eth0? jim64 Linux - Networking 2 10-27-2004 02:14 PM
eth0 (and eth1) lost on reboot larsonse Slackware 3 10-12-2004 04:58 AM


All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration