Click to See Complete Forum and Search --> : eth0 failing on boot/networking problems too
tamara
12-15-2002, 03:26 PM
On boot I'm getting eth0 failed for my RedHat 7.2 box. I've been through the nhf's and tried to config it according to all the info there, yet as soon as I think it's set and then reboot, it's gone.
This may or may not be related to a networking problem I've been having for the last 2 days -- I've gone through the nhf's and I *think* I have everything deciphered, yet, the windows machine (connected to the 'net through ip masq on the 7.2 box -- dial up connection) won't actually go on-line until I run:
source /etc/rc.d/rc.local
from the nhf (http://linuxnewbie.org/nhf/Networks/Easy_Internet_Sharing.html)
What is the next step then? how can I get the ipmasq to hold?
siphil
12-16-2002, 02:14 PM
I'm not positive this is exactly all you're looking for but here's a script to get your eth0 interface up and running:
edit /etc/sysconfig/network-scripts/ifcfg-eth0 to look like this:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=
IPADDR=
NETMASK=
NETWORK=
ONBOOT=yes
that should get the eth0 up and running; you might need to change the file permissions before you can edit the file tho. Let me know if it works:D
jumpedintothefire
12-16-2002, 10:09 PM
For some ideas on how to auto load the firewall when you connect:
http://linuxnewbie.org/forum/showthread.php?s=&threadid=75570
http://linuxnewbie.org/forum/showthread.php?s=&threadid=44418
Did you get eth0 fixed up??
rdlevan
12-16-2002, 10:19 PM
Are we to understand that it was once working and now it isn't? If it never worked to begin with, please post the type of network card and the driver you're using.
rioguia
12-17-2002, 11:44 AM
i agree with redlevan.
1. to see if your card is recognized by linux, open a terminal as root and type:
dmesg | grep eth0
2. to see if linux recognized your card, type
lspci | grep Ethernet
3. to see if linux loaded a module that matches the card listed in lspci, type:
lsmod
4. if you don't see a module in lsmod for the card named by lspci (or aren't sure of the
module name), go to
http://www.scyld.com/network/index.html#pci
and try to find the correct module; you probably don't need to download it because the
linux kernel drivers are pretty comprehensive. once you know the name of the module you
need to load, type
modprobe your.module.name.here.o
if you don't get an error message, the module probably loaded. try configuring it using
netconfig
if you don't get any error messages, check your connection with mii-tool. if you see an ok at the end of the message, you are probably ok.
if things don't go your way, post the results back here.
tamara
12-17-2002, 02:29 PM
This is starting to make me ill -- I replied to this thread after following the directions and it's gone -- it didn't take.
Anyway, I tried to *fix* it and made it worse, sometimes I can barely connect at all.
Yes, eth0 is there and recognized. Everything's peachy until I try dhcp -- then I lose the eth0 config on boot. But, if I try netconfig and set this machine as 192.168.0.1, then I lose my dial-up connection.
I've read the nhf's and I've read over at tldp and only managed to make things worse.
well, back to work -- maybe, if I try really really really hard I can get IPMasq and the network back?
Or, just start all over ? ? ?
rioguia
12-17-2002, 05:04 PM
i'm confused. has your linux box ever had a connection to the net?
scenario one: your pc has never been connected to the linux box. if this is your problem, then the approach suggested in rioguia's post should be for you. you need to make sure you have the correct module loaded for your network card. netconfig will allow you to set up a static ip on eth0. this should not impact your internet connection which is through your dial-up modem. then follow jumpedintothefire's post for autoloading ip masque.
5. if the pc access to the net is still an issue, post back here your routing table of eth0 on your linux box with the results of
route -n
scenario two (pc was once connected to the linux box and had access to the internet through your dial up):
1. your linux box boots up.
2. your recieve the eth0 error message.
3. you configure your eth0 .
4. next you invoke the command
source /etc/rc.d/rc.local
5. and your windows pc gets a connection to the net (ping, browse, etc).
therefore, the problem you are trying to solve is how to avoid repeating steps 3 and 4. if this is your problem, then the approach suggested by siphil (as modified below) and jumpedintothefire's posts are for you.
siphil modified
etc/sysconfig/networking-scripts/ifcfg-eth0
BOOTPROTO=dhcp
BROADCAST=
IPADDR=
NETMASK=
NETWORK=
ONBOOT=yes
tamara
12-17-2002, 06:47 PM
Scenario 2 is what I had up until about Thursday night.
Now, I have a problem with ipchains too -- when I do source /etc/rc.d/rc.local I get a bunch of ipchains errors/warnings. AND, it kills the modem connection.
So, when I first tried to reply here, I did make sure etc/sysconfig/network-scripts/ifcfg-eth0 is what was posted -- the modified version -- and then rebooted.
And, eth0 hung up on boot again.
I think I've got ipchains hosed, so I'm going to go back and study up on iptables??
rioguia
12-17-2002, 08:23 PM
i don't think i've been much help so far but you might want to delay putting up your firewall and consider doing the modem configuration and nic configuration and getting those up and running first. once you have a good connection, it will be easier to problem solve your security problem. since you have a dial up with a dynamically assigned address, this suggestion poses fewer risks than normal.
jumpedintothefire
12-17-2002, 08:38 PM
--quote---
Everything's peachy until I try dhcp -- then I lose the eth0 config on boot. But, if I try netconfig and set this machine as 192.168.0.1, then I lose my dial-up connection.
-----------
Don't set dhcp if you don't have a dhcp server on your lan....
---quote----
So, when I first tried to reply here, I did make sure etc/sysconfig/network-scripts/ifcfg-eth0 is what was posted -- the modified version -- and then rebooted.
And, eth0 hung up on boot again.
--------------
try filling in all the lines.....
ie:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
---quote----
But, if I try netconfig and set this machine as 192.168.0.1, then I lose my dial-up connection.
-------------
When you configure the lan don't assign a default gateway in the GUI or in the /etc/sysconfig/network file.
Hope it helps...
tamara
12-18-2002, 12:06 PM
O.k., I edited the network-scripts, turned off dhcpd on boot and checked sysconfig/network -- no default gateway there. It does have IPV4 forwarding on.
About the only question would be the rc.local file (and, why do I have two of those? Is that a redhat7.2 thing? -- I have /etc/rc.local and /etc/rc.d/rc.local -- maybe I'm overthinking all this?)
I'm about to re-boot again, but I am curious about the rc.local file that is invoking the firewall?
buy-bye for now
tamara
12-19-2002, 10:14 PM
Hopped on irc today and my rc.local files are no longer linked which may be a major part of my problem -- hey, at least eth0 is coming up on boot -- thanks all!
But, looks like redhat 8.0 is in my very near future since I'm so totally messed up here -- ah well
just wanted to check back in