Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I thought I was getting the hang of networking stuff, but, apparently not. Anyhoo, I have a startup script (very basic one liner)
ifup -a
Reading the man page for ifup it says this should bring up all devices listed in interfaces file (so contained in there I have):
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
After starting my machine I run ifconfig which returns no output.
If I do ifup eth0 I get: ifup: interface eth0 already configured
So finally, if I run dhcpcd this brings up my nic. If I then do ifdown -a and kill the dhcpcd process and then manually type ifup -a, it all magically comes back.
Would someone explain what step I am missing in the process to have all my cards startup as part of the boot process?
Hmmmm ... I do not have this file nor entry at all, but I have also found that after machine has booted
if I simply run ifup -a at the command line that nothing starts up either
So the file you have listed may / mat not be needed but I obviously have another underlying issue
It seems all the advice (except #4) you have received so far is from people who are unfamiliar with Debian style networking. Your /etc/network/interfaces file seems to be ok. I suspect the problem is that the device is not seen. Can you please post the output of:
Code:
ifconfig -a
lspci | grep -i ether
uname -a
cat /etc/debian_version
Maybe one should see what the situation is before and after the ifup -a in your script. Specially during boot things change very frequently as drivers getting loaded, daemons getting started and alike. So maybe just put a little script like this in front and after ifup -a
1. I have not replaced the ifup executable, it is the one line in my bootup script
2. The system I am running into this issue on is not my Ubuntu system, but a source based distro of my own making (very early stages)
3. ifconfig -a yields:
Code:
eth0 Link encap:Ethernet HWaddr 08:00:27:AE:BE:C5
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo Link encap:Local Loopback
LOOPBACK MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
I just reread you post #8. Regarding 2.
Are you using upstream sources and designing your networking in a similar fashion to Debian or are you actually using Debian sources?
ifup tries to keep track of the whether the interface is up or down using the file /etc/network/run/ifstate
Sometimes this can get out of sync with the true state of the device. In such a case you can use "ifdown eth0" to get the ifstate file back in sync, or you can use the --force option to ignore the ifstate file. All of this is documented in the man page.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.