LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Queston on eth0 I don't understand (https://www.linuxquestions.org/questions/linux-newbie-8/queston-on-eth0-i-dont-understand-12012/)

wbheinkel 01-17-2002 07:29 PM

Queston on eth0 I don't understand
 
Hi,

I have a queston on eth0. In booting int says,
Start Servece eth0
Bring up Interface eyh0: Determining IP information for eth0:0 FAILED

I think my ethernet card is working. How san I be sure?
I an a very NEW newbie I don't understand what IP is looking for? can some tell me.

:newbie:

trickykid 01-17-2002 08:01 PM

it seems your ethernet is working, it just can't find the information to gain network access.. are you on a lan or cable modem or something.. ?? its trying to get the IP info but can't...

tell us what kind of network your on and we might be of some help.

you can use ifconfig eth0 to view your ethernet settings and connection. man ifconfig for more info...
you can use netconfig for set your network settings for your ethernet as well...

wbheinkel 01-18-2002 09:55 AM

Thanks for the reply. Right now I have my computer duel booted WinME/Redhat 7.2 and my son on Win95. We are useing modem sharing and sharing files, and sharing my printer.

I would like to use my computer on Redhat 7.2 and share with my son's on win95.

One other thing I tryed to use the command ifconfig from the Console it says bash: ifconfig : command not found. I have tryed other commands in the last few days and they all say "command not found". I know these commands are executabe. I typed su and went to supper user but they still don't work.:confused:

I want to thank you and all the other on this form. It is a lot of help to me and the other Newbies. I try to read the manuals but a lot I don't understand. I have worked on MS products for the last 15 years and I think I may be brain dead.

wbheinkel 01-18-2002 11:17 AM

I found I had to logged it to root. I thought it would work under su (Super User).

Any way ifconfig says,

lo Link encap:Local Feedback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 METRIC:1
RX packets:313 errors:0 dropped:0 overruns:0 frame:0
TX packets:313 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelin:0
RX bytes:20350 (19.8 kb) TX bytes:20350 (19.8 kb)

ifcomfig eth0 says,

eth0 Link encap:Ethernet HWaddr 00:D0:09:38:92:B4
BROADCAST MILTICAST 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 txqueuelin:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interupt:10 Base address:0x8f80

trickykid 01-18-2002 11:31 AM

ok.. so it appears your eth0 is working and being detected.. just not getting network access.. is the ethernet connected via cble modem.. etc ?? most likely its not getting the IP info due to incorrect settings.. try running netconfig as root to check your settings for your type of connection.

oh, and if you usually just type su and then asks for password, that is why your getting command not found.. usually if you do a su root or su - , you will have the commands in your path..

wbheinkel 01-18-2002 12:01 PM

My ethernet is connected to a HUB thru a twisted pair.

aford 01-19-2002 10:09 AM

A network can be configured either with a static IP address or a dynamic address. Your configuration seems to suggest the latter. This depends on the availbility of DHCP server, which for your needs is not required.

Therefore log-on as root and at prompt type 'setup', under RH 7.1 this will bring a menu driven config program. An option network configuration should be shown in there enter a required IP address for your card.

wbheinkel 01-19-2002 06:21 PM

Thanks for the replys. I just wanted to setup my Linux to network with my son's win95. I now think should remove my netconf, the ethernet., try to setup Samba What do you think?

eboggess 01-23-2002 09:48 AM

Hi...
Before you will be able to use Samba, you will need to get your TCP/IP stack working on your Linux box. That means getting a valid IP address assigned to your /dev/eth0 NIC (Network Interface Card). As user aford suggests, you need to either statically assign an address to eth0 or use DHCP. That being said, I believe you can use your Win95 box to serve up IP addresses (as a DHCP server). In fact, I have a Win98 box doing this exact same thing. You will want to do a search on Microsoft's web site on the "Internet Connection Sharing Wizard" and "Internet Connection Sharing" protocol. They have detailed instructions for setting this up. In addition, you may want to consult a recent thread I started that detailed the Linux side of setting this type of network configuration up. That thread is entitled, "Configure Red Hat 7.2 Workstation as DHCP Client." Once you iron out the TCP/IP issues and establish network connectivity between your Win95 and Linux boxes, then you can work on making your Linux box a Samba client. I hope this helps. Good luck! By the way, you can try /sbin/ifconfig and execute that as a general user. In addition, you will want to look into using the su -c command to use the root account for a single command. Once you do this, you can use find to discover the exact path to a command, since you were having path issues in finding commands earlier. Again, good luck and persevere!!!

wbheinkel 01-26-2002 05:48 PM

Thank for the reply.

When I set my NIC to static and when I boot the eth0 says it is ok. But with it set to static my internet browser can not find the web pages. If I set the NIC to dynamic (DHCP) the browser works fine but the eth0 fails on boot as I said at the begining. I am at a loss why does eth0 not find a IP in DHCP. I hope you can tell me.

:confused:


tiamat 01-26-2002 06:37 PM

Quote:

Originally posted by wbheinkel
Thank for the reply.

When I set my NIC to static and when I boot the eth0 says it is ok. But with it set to static my internet browser can not find the web pages. If I set the NIC to dynamic (DHCP) the browser works fine but the eth0 fails on boot as I said at the begining. I am at a loss why does eth0 not find a IP in DHCP. I hope you can tell me.

:confused:


Static IP is when you use the same IP everytime you boot.

Im guessing you are trying to use the modem for viewing webpages, now you told us you are connected via a HUB.

There is 2 options here as i see it, for us to be able to help us answer theese questions.

a) Do you get your IP via DHCP from your ISP?
b) Do you connect to your ISP with the Windows box or your Linux box?


Since your ifconfig dont show any PPP setup, im guessing you use the windows machine for the internet connection.

This means, you will have to go through the windows box. Which means you want a static IP adress. IE. 192.168.1.1 and then you need to setup the windowbox to have a static ip on the same network, 192.168.1.2.

this means the windows and linux machine will be able to communicate. However i suggest you do it the other way around.

Your LAN (local network) needs to have static IP's within same network (192.168.1.x).

Start by setting up a PPP (modem) connection with your Linux machine. When you got that working move on to your local network.

a) Setup windows box to have your linuxmachine as default gateway.

b) Set windows IP to 192.168.1.2

c) Set your Linux box IP static to 192.168.1.1

d) Enable IP forwarding on Linux machine.

there is plenty of documentation on each of the steps, but this should get you going in the correct direction.

wbheinkel 01-27-2002 09:47 AM

Quote:

Originally posted by tiamat


Static IP is when you use the same IP everytime you boot.

Im guessing you are trying to use the modem for viewing webpages, now you told us you are connected via a HUB.

There is 2 options here as i see it, for us to be able to help us answer theese questions.

a) Do you get your IP via DHCP from your ISP?
b) Do you connect to your ISP with the Windows box or your Linux box?


Since your ifconfig dont show any PPP setup, im guessing you use the windows machine for the internet connection.

This means, you will have to go through the windows box. Which means you want a static IP adress. IE. 192.168.1.1 and then you need to setup the windowbox to have a static ip on the same network, 192.168.1.2.

this means the windows and linux machine will be able to communicate. However i suggest you do it the other way around.

Your LAN (local network) needs to have static IP's within same network (192.168.1.x).

Start by setting up a PPP (modem) connection with your Linux machine. When you got that working move on to your local network.

a) Setup windows box to have your linuxmachine as default gateway.

b) Set windows IP to 192.168.1.2

c) Set your Linux box IP static to 192.168.1.1

d) Enable IP forwarding on Linux machine.

there is plenty of documentation on each of the steps, but this should get you going in the correct direction.


In answer to your questions.

a) I think I get my IP via DHCP from my ISP.
b) I connect to my ISP through my Linux box.

There are so many option in Linux so I here is a lot I don't understand. Right now I have my network set to dynamic (DHCP) and have ppp(modem) connection on my linux box. With this setup I can view webpages fine.

My box is duel booted WinME and RedHat 7.2. When I am booted to WinMe I am networking to my son's Win95 Box where we share files and a printer. I would like to do the same with me booted to RedHat 7.2 and still be able to use my modem.

I will try your suggestions the one thing I don't understand is how to enable IP forwarding on my Linux box. I have only been on Linux for less than two weeks but I will learn Thanks to everyone's help.

Thanks again.
:newbie:

tiamat 01-27-2002 09:17 PM

Ok.

This is what you should do.

You do NOT want DHCP on your network (eth0).

eth0 should have IP 192.168.1.1 (this ip will be yout internal network between you and your sons computer). Set your Netmask to 255.255.255.0. Also enable ipv4 forwarding. All theese settings can be done in the X network configurator that came with your Linux installation.

Second on your sons computer set IP to 192.168.1.2. Netmask to 255.255.255.0.
And default gateway to 192.168.1.1 (since he will be using your computer as gateway to internet.

Then you need to setup IPchains to forward the traffic from eth0 to ppp. Ive prepared a script for you to do this. Download it from Here
. The script (named firewall.sh) is setup to forward ALL traffic from eth0 to ppp0 which means all traffic from (192.168.1.2) will be directed out to PPP0.

All you have to do is to save it somewhere in root's path and run it in a shell.
ie. save it in /root/ then do this at prompt as root.

chmod 700 ~/firewall.sh
~/firewall.sh

You will need to have ipchains installed and the service running though for this to work. Refer to your manual.

Good luck.

wbheinkel 01-28-2002 12:51 PM

Quote:

Originally posted by tiamat
.


Then you need to setup IPchains to forward the traffic from eth0 to ppp. Ive prepared a script for you to do this. Download it from Here
. The script (named firewall.sh) is setup to forward ALL traffic from eth0 to ppp0 which means all traffic from (192.168.1.2) will be directed out to PPP0.

All you have to do is to save it somewhere in root's path and run it in a shell.
ie. save it in /root/ then do this at prompt as root.

chmod 700 ~/firewall.sh
~/firewall.sh

You will need to have ipchains installed and the service running though for this to work. Refer to your manual.

Good luck.



It would not let me download the script "firewall.sh" It told me I didn't have permission to access. :(

Useing netcomfig I set it to 192.168.1.1 and thr rest the defaults. I edited the file/etc/sysctl and added.

# Enable packet forwarding
net.ipv4.ip_forward = 1

I set my son's windows box to 192.168.1.2 and the gateway to 192.168.1.1.
I was able to ping my son's box (192.168.1.2) to my Linux box (192.168.1.1) OK. Also the from the Linux box to my son's OK.

My PPP connects OK but am unable to view webpages. :confused:

This is maybe because I have not I don't have the firewall.sh yet. If to want you can e-mail it to me from this thread.

:D

tiamat 01-28-2002 05:28 PM

Doh.
Changed rights try again on same link


All times are GMT -5. The time now is 09:06 PM.