Solved

Static IP Ethernet Problems in Mandrake 8.x

Posted on 2002-05-19
6
290 Views
Last Modified: 2013-12-15
Hi, my computer has been setup with both windows 2000 and mandrake 8.1.  Before I was using both with dhcp ethernet and it was working just fine.  But I moved to an apartment where I have a static ip address.  I was able to get the windows networking working with the new ip info. I was given.  But the linux networking doens't seem to be working on static ip.  :-(  

I thought it might be a problem with Mandrake 8.1, so I formatted the linux partition and installed Mandrake 8.2.  And I entered the static ip info when I went through the setup.  I don't know what I'm doing wrong.  I entered the exact same ip, dns, gateway, and netmask into the windows networking configuration, and it works just fine.  

Can someone please help me out?

thanks,

jenny
:-)
0
Comment
Question by:jenny_holmes1980
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 17

Expert Comment

by:psimation
ID: 7019589
Are you sure your eth0 get initialized OK?
Post output of ifconfig eth0.
What make and model LAN card?
0
 

Author Comment

by:jenny_holmes1980
ID: 7020360
Okay, I'm not sure if my eth0 is being initialized properly.  It seems like it is because it says that the status of the lan is "up" within the mandrake control center.  And it also says "ok" when it tries to bring it up during boot.  However, when I try to get it to connect to the internet, it never works.  

Here is my ethernet info:
ip: 128.252.185.22
subnet mask: 255.255.255.0
default gateway: 128.252.22.254
preferred dns: 128.252.120.1
alternate dns: 128.252.135.4

And that works in windows 2000.

Here is my /etc/sysconfig/network file:

NETWORKING=yes
FORWARD_IPV4=false
HOSTNAME=localhost.localdomain
DOMAINNAME=localdomain
GATEWAY=128.252.22.254

And here is my /etc/sysconfig/network-scripts/ifcfg-eth0 file:

DEVICE=eth0
BOOTPROTO=static
IPADDR=128.252.185.22
NETMASK=255.255.255.0
NETWORK=128.252.185.0
BROADCAST=128.252.185.255
ONBOOT=yes

My lan card is a 3Com EtherLink 10/100 PCI TX NIC (3C905B-TX).  I think that mandrake recognizes it without any problems.  Well, I'm coming to that conclusion because I was always able to use this card with dhcp ethernet (in mandrake and windows) without any problems.

Please give me any suggestions you have.

thanks so much,

jenny :-)
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7020706
Given the data above it would look like basic networking is configured properly. I can't tell if your DNS is set up properly from that but /etc/resolv.conf should contain something like:

search wuh.wustl.edu
nameserver 128.252.120.1
nameserver 128.252.135.4

Right now I'd guess that resolv.conf isn't right and that's the problem. But, to be sure that the configuration is correct you can look at the output of 'ifconfig eth0' and you should see:

eth0      Link encap:Ethernet  HWaddr 00:01:02:35:CB:FE  
          inet addr:128.252.185.22 Bcast:128.252.185.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16818955 errors:1 dropped:0 overruns:1 frame:2
          TX packets:3251391 errors:0 dropped:0 overruns:0 carrier:1
          collisions:379 txqueuelen:100
          RX bytes:2210443508 (2108.0 Mb)  TX bytes:207584086 (197.9 Mb)
          Interrupt:11 Base address:0xe400

There should not be an excessive number of errors, dropped, or overruns, nor should the collisions be a large number relative to the TX packet count.

And there should be a line in the output of "netstat -rn" like:

0.0.0.0         128.252.22.254      0.0.0.0         UG       40 0          0 eth0

If that matches what you see you should have basic connectivity and you can verify that by trying a ping of your gateway, like:

chaos> ping -c 3 128.252.22.254
PING 128.252.22.254 (128.252.22.254) from 10.1.0.1 : 56(84) bytes of data.
64 bytes from 128.252.22.254: icmp_seq=0 ttl=238 time=45.944 msec
64 bytes from 128.252.22.254: icmp_seq=1 ttl=238 time=46.875 msec
64 bytes from 128.252.22.254: icmp_seq=2 ttl=238 time=45.360 msec

--- 128.252.22.254 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/mdev = 45.360/46.059/46.875/0.671 ms

Then verify that your DNS is working by trying a lookup like:

chaos> host 128.252.135.4
4.135.252.128.in-addr.arpa. domain name pointer ns1.wustl.edu.

If one of those doesn't work I can probably tell what's wrong from knowing which failed.





0
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 

Author Comment

by:jenny_holmes1980
ID: 7020787
Hi again,

Okay, I tried doing that, here's what I found.

My /etc/resolv.conf originally had just:

search localdomain
namespace 128.252.120.1

I changed it to the following:

search wuh.wustl.edu
namespace 128.252.120.1
namespace 128.252.135.4

Next I tried 'ifconfig eth0', here's the output of that:

[root@localhost network-scripts]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:50:DA:0A:50:2B  
          inet addr:128.252.185.22  Bcast:128.252.185.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2159 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:355013 (346.6 Kb)  TX bytes:480 (480.0 b)
          Interrupt:11 Base address:0xe000


Then I did 'netstat -rn', and here's that output:

[root@localhost network-scripts]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
128.252.185.0   0.0.0.0         255.255.255.0   U        40 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U        40 0          0 lo

I assumed that the ping and dns wouldn't work, but I tried them anyway, here are their outputs:


[root@localhost sysconfig]# ping -c 3 128.252.22.254
connect: Network is unreachable


[root@localhost sysconfig]# host 128.252.135.4
;; connection timed out; no servers could be reached


I hope you know what's wrong.  The problem's been out of my reach for some time now.

thanks so much again,

jenny
:-)
0
 
LVL 40

Accepted Solution

by:
jlevie earned 75 total points
ID: 7020826
Okay... Now that I see what's happening I can see that there's something that I overlooked in your network config data. According to what you said earlier your config data is:

ip: 128.252.185.22
subnet mask: 255.255.255.0
default gateway: 128.252.22.254
...

There's a problem here in that the default gateway lies outside of the network that your system is in. According to that config data your system in in the 128.252.185.0/24 network. But the gateway is in the 128.252.22.0/24 network if the netmask is right. So as far as Linux is concerned there's no way to reach the default gateway as its IP lies in a different network. That's why there's no default route showing in the output of netstat. That would say to me that either you have the wrong IP for the gateway, the wrong netmask or the wrong IP for your system.

You say that w2k works. Take a look at the output of 'ipconfig /all' when executed in a cmd window and compare the IP, netmask, and gateway to the config data you are using on the Linux system. I think you are ging to find something is different.
0
 

Author Comment

by:jenny_holmes1980
ID: 7020862
Wow, I can't believe how something that small could
have caused the entire problem.  Thank-you so much.

FYI:
So I did 'ipconfig /all' in windows, and it just showed
me what I had entered for the config myself.  So, I booted
into linux and changed the gateway to 128.252.185.254.  It
connected me to the internet in seconds.

thanks,

jenny
:-)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question