PDA

View Full Version : Realtek RTL8139 'network unreachable'


omnikorn
2005-03-05, 11:23 AM CST
Hi,
I have recently installed Redhat Fedora Core 3, on my PC recently, It's a P3 with a 'Realtek RTL8139 Family PCI Fast Ethernet NIC' ethernet card. I am still a rookie at linux, though i have used a couple of linux for the past few years during short intervals. Anyways, i am unable to connect to the internet through my Realtek Card, the details are:

IP Address : 172.18.6.91
Subnet Mask : 255.255.255.0
Default Gateway : 172.18.0.1

My internet connection works fine on Windows 98 and XP. I have a searched a lot reagarding this problem and tried many things posted online but couldn't get it working.

The same lan card used to work when i used 'Redhat Linux 8' and 'Mandrake Linux 9' but then i had a different ISP. Now with 'Fedora Core 3' and another ISP, when i try to 'ping 172.18.0.1' i get the error network unreacable.

Any help will be appreciated, and thanks in advance.

The contents of '/etc/resolv.conf' , '/etc/hosts' and the outputs of the commands:

ping 172.18.0.1
ping www.google.com
ping 172.18.6.91
ifconfig
route
lspci | grep Eth

are as follows...

---------------------------------------------------------------

Contents of : /etc/resolv.conf

nameserver 172.18.0.1

---------------------------------------------------------------

Contents of : /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 OMNIKORN localhost.localdomain localhost

---------------------------------------------------------------

[root@OMNIKORN ~]# ping 172.18.0.1
connect: Network is unreachable

---------------------------------------------------------------

[root@OMNIKORN ~]# ping www.google.com
ping: unknown host www.google.com

---------------------------------------------------------------

[root@OMNIKORN ~]# ping 172.18.6.91
PING 172.18.6.91 (172.18.6.91) 56(84) bytes of data.
64 bytes from 172.18.6.91: icmp_seq=0 ttl=64 time=0.083 ms
64 bytes from 172.18.6.91: icmp_seq=1 ttl=64 time=0.088 ms
64 bytes from 172.18.6.91: icmp_seq=2 ttl=64 time=0.089 ms

--- 172.18.6.91 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.083/0.086/0.089/0.011 ms, pipe 2

---------------------------------------------------------------

[root@OMNIKORN ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:C0:26:7F:D5:1C
inet addr:172.18.6.91 Bcast:172.18.6.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:26ff:fe7f:d51c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3741 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:370189 (361.5 KiB) TX bytes:2164 (2.1 KiB)
Interrupt:11 Base address:0xd800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2436 errors:0 dropped:0 overruns:0 frame:0
TX packets:2436 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2565946 (2.4 MiB) TX bytes:2565946 (2.4 MiB)

---------------------------------------------------------------

[root@OMNIKORN ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use

Iface
172.18.6.0 * 255.255.255.0 U 0 0 0

eth0
169.254.0.0 * 255.255.0.0 U 0 0 0

eth0

---------------------------------------------------------------

[root@OMNIKORN ~]# lspci | grep Eth
01:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd.

RTL-8139/8139C/8139C+ (rev 10)

---------------------------------------------------------------

Thanks again

pcssbb
2005-03-05, 11:35 AM CST
I am pretty sure that card will work with FC3. My NIC is a NVidia but uses that same Realtek chip I think. I did notice that your default gateway and nameserver had the same address. This is not likely since the default gateway is probably a router. So obviously one of these is wrong. There is no doubt that if the default gateway is not set correctly you will not be able to get to the internet at all and if the nameserver is wrong you won't be able to resolve any URL's.

Edit: It is possible that they both(gateway and nameserver) could be the same but in that case you have a cheap ISP as it must be using a server for a router. Just a guess but I think the default gateway address is likely wrong.

Woad_Warrior
2005-03-05, 11:45 AM CST
i have the same realtek chip on my network card and it has always functioned properly in every distro i've tried. (mandrake 7.0-2 through 10.1, fedora core 1, 2, 3, xandros, suse, libranet and a couple others) so i'd have to agree with pcssbb that it's your network configuration that's at fault.

omnikorn
2005-03-05, 11:46 AM CST
Thanks for such quick reply.

My ISP provides internet service through a LAN, and probably my PC must be connected to a router. But, my internet connection works using the same settings on XP & 98.

Could you suggest me some steps to spot the problem or cure it.

omnikorn
2005-03-05, 11:51 AM CST
I am still a rookie, so please don't mind my stupidity.

One more thing, i had to perform the installation in text mode as my graphics card being intel 815e did not function properly in graphical mode installation. So could there be a chance or the information getting stored in an incorrect manner in the config files.

pcssbb
2005-03-05, 11:57 AM CST
Did those systems(98 & XP) get that IP info via DHCP or were they statically assigned? Are they the same system you are currently using?

pcssbb
2005-03-05, 12:21 PM CST
I just saw this on another thread. This person has the saem NIC, same IRQ and his NIC uppeared to be up as does your. He fixed his as follows: (he changed to half-duplex)

#ifconfig eth0 down
#rmmod 8139too
#insmod 8139too media=0x01

Edit: Here is his post and the link:

...Now it's working! I found that I simply had to set the card to "10 half mode", so I used this commands (found this info in the Realtek website):

#ifconfig eth0 down
#rmmod 8139too
#insmod 8139too media=0x01


Greetings,

Marco

http://www.fedoraforum.org/forum/showthread.php?t=1679

omnikorn
2005-03-05, 12:29 PM CST
Did those systems(98 & XP) get that IP info via DHCP or were they statically assigned? Are they the same system you are currently using?

I specified IP info in 98 and XP statically the information specified is as follows:

IP Address : 172.18.691
Subnet Mask : 255.255.255.0
Default Gateway : 172.18.0.1

I am currently working on XP and the it's the same sytem on which i have installed 'fedora core 3'

pcssbb
2005-03-05, 12:35 PM CST
See my post just before your last one.

omnikorn
2005-03-05, 12:55 PM CST
I just saw this on another thread. This person has the saem NIC, same IRQ and his NIC uppeared to be up as does your. He fixed his as follows: (he changed to half-duplex)

#ifconfig eth0 down
#rmmod 8139too
#insmod 8139too media=0x01


The output for the following commands on my PC are:

[root@OMNIKORN ~]# ifconfig eth0 down
[root@OMNIKORN ~]# rmmod 8139too
[root@OMNIKORN ~]# insmod 8139too media=0x01
insmod: can't read '8139too': No such file or directory

omnikorn
2005-03-05, 01:11 PM CST
If anyone else has a similar problem with 'Realtek 8139' please post here

pcssbb
2005-03-05, 01:15 PM CST
It looks as if the kernel has remove the modele for your adapter. I don't know why it was not able to insert a new module. Might have something to do with your having to use a text interfact when you installed. BTW, do you now have xwindows(KDE on gnome)? I probably should have guided you to tools I am familiar with to change the speed, negotiation and duplex settings on a NIC(/sbin/ethtool or /sbin/mii-tool). I am new to FC3 also having used RH9 for several years. I am guessing your NIC is gone now but I am not sure. You might try /usr/bin/setup to try to reinstall it and configure your IP settings.

omnikorn
2005-03-05, 01:31 PM CST
Yes, i have x-windows system now (with KDE & GNOME) i got the X-Window working after adding 'noaccel' to /etc/X11/xorg.cof

My NIC is not removed i just saw it in (System Tools > Hardware Browser) with these details:

Driver : 8139too
Device : /dev/eth0

And, i tried those commands again but the result was same.

pcssbb
2005-03-05, 01:36 PM CST
Did you try ethtool &/or mii-tool?

Edit: see the man pages for switches, etc.

omnikorn
2005-03-05, 01:57 PM CST
[root@OMNIKORN ~]# ethtool -t eth0 online
Cannot test: Operation not supported
[root@OMNIKORN ~]# ethtool -s eth0 \speed 10 \duplex half
[root@OMNIKORN ~]# ping 172.18.0.1
connect: Network is unreachable
[root@OMNIKORN ~]# /sbin/mii-tool
eth0: autonegotiation failed, link ok
[root@OMNIKORN ~]# ping 172.18.0.1
connect: Network is unreachable

pcssbb
2005-03-05, 02:23 PM CST
From the following in your very first post and the output of mii-tool your link is up:

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3741 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000

The above indicates that you are receiving packets from somewhere. This is usually a good thing. The txqueuelen:1000 is troubling however.

One other thing from your first post that is somewhat troubling is the following from your route command: eth0 169.254.0.0 * 255.255.0.0 U 0 0 0

The 169.254.0.0 indicates that you system might be using an auto configured private address. It might mean nothing and in any case I don't know what to do about it.

The only other thing I have to offer is to try mii-tool with the F switch and try forcing all of the different combinations (100BaseTX-FD, 100BaseTX-HD, 10BaseT-FD and 10BaseT-HD) You might also use the verbose switch(-v) to see if you can get any useful messages.

Good luck, I am all out of ideas exept if none of that works you might think about forcing your NIC to a different IRQ.

Ned
2005-03-05, 05:56 PM CST
IP Address : 172.18.6.91
Subnet Mask : 255.255.255.0
Default Gateway : 172.18.0.1



I think your problem could be your subnet mask, or rather that your default gateway is not on the same subnet as your nic.

At the moment your subnet mask is blocking all traffic to and from any IP not on the 172.18.6.X range, hence your default gateway is being blocked and you can't get a connection.

Either your gateway needs to be on the same subnet as your nic (ie 172.18.6.X) or vice versa (172.18.0.X)., OR you need to change your subnet mask to allow for your current setting to 255.255.0.0.

Ned

omnikorn
2005-03-06, 04:48 AM CST
I installed 'Redhat 9' that too in text mode, got the same error 'network unreachable'.

Then, i installed Fedora Core 3 with 'everything' selected in packages option. I configured my network card during setup but when i go to 'System Settings > Network' there the device eth0 is listed and is set active. When, i click edit to view the stting the Default Gateway address field is blank, whereas the IP Adress & Subnet mask are set to correct values. When i run commang 'ping 172.18.0.1' i get the error 'network unreachable'.

This time i even installed 'GRUB' on MBR, instead of First Sector of Root Partition, but no progress.

I will install Redhat 8 or Mandrake some old version and try to make the device work, and post the results here.

omnikorn
2005-03-06, 04:55 AM CST
Good luck, I am all out of ideas exept if none of that works you might think about forcing your NIC to a different IRQ.

I had already tried all available IRQ, but no success.

pcssbb
2005-03-06, 05:42 AM CST
Ned is absolutely right. With that subnet mask there is no way you can get to that default gateway. I too would suggest changing the mask to 255.255.0.0 It can't hurt a thing to try it. And if for some reason it doesn't work it couldn't hurt to try to see if you can get your IP settings via DHCP. I know you said you used those addresses and mask before but maybe you read the mask wrong. If you understand how TCP/IP addressing works then it makes sense that your current settings are destined for failure. I really think that if you change that mask you will be in business.

omnikorn
2005-03-06, 06:02 AM CST
:) Thanks a lot for your help.

I think your problem could be your subnet mask, or rather that your default gateway is not on the same subnet as your nic.

Thanks a lot :) Ned and pcssbb :) , for you advice, valuable time, and patience in helping me.

I have changed my Subnet mask to 255.255.0.0 now i can ping the gateway(172.18.0.1) and access my ISP's server home page (172.18.0.1) and my account details (10.10.10.1) when i type 172.18.0.1 in firefox's url field i access my ISP's page. But with any other url such as www.google.com or www.yahoo.com i get error message:

mail.yahoo.com could not be found. Please check the name and try again.

My ISP uses elitecores's CYBERROAM CLIENT www.elitecore.com. I log on using this client and it shows a successful login, but no site open.

The output's for some commands are:

------------------------------------------------------------------------------------------------
Setting preferences using cyberroam client:
------------------------------------------------------------------------------------------------
./crclient -s
AskonExit (y/n)? y
AutoLogin (y/n)? n
ShowNotification (y/n)? y
Server Address in dotted decimal format :: 172.18.0.1
Segmentation fault
[root@OMNIKORN crclient]#

------------------------------------------------------------------------------------------------
Login using Cyberroam client:
------------------------------------------------------------------------------------------------
[root@OMNIKORN crclient]# ./crclient -u mrinaltrikha
Server Address in dotted decimal format :: 172.18.0.1
Password:
save password(y/n)? y
[root@OMNIKORN crclient]#
./crclient:user 'mrinaltrikha' successfully logged in to server '172.18.0.1'


------------------------------------------------------------------------------------------------
Ping Gateway:
------------------------------------------------------------------------------------------------
[root@OMNIKORN ~]# ping 172.18.0.1
PING 172.18.0.1 (172.18.0.1) 56(84) bytes of data.
64 bytes from 172.18.0.1: icmp_seq=0 ttl=255 time=0.806 ms
64 bytes from 172.18.0.1: icmp_seq=1 ttl=255 time=0.777 ms
64 bytes from 172.18.0.1: icmp_seq=2 ttl=255 time=0.739 ms
64 bytes from 172.18.0.1: icmp_seq=3 ttl=255 time=0.792 ms
64 bytes from 172.18.0.1: icmp_seq=4 ttl=255 time=0.802 ms
64 bytes from 172.18.0.1: icmp_seq=5 ttl=255 time=0.772 ms
64 bytes from 172.18.0.1: icmp_seq=6 ttl=255 time=0.784 ms

--- 172.18.0.1 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6005ms
rtt min/avg/max/mdev = 0.739/0.781/0.806/0.039 ms, pipe 2


Is there anything i am missing or doing incorrect or are there some more setting required.

One thing i don't understand is that subnet mask 255.255.255.0 works fine under Windows XP and 98. My ISP had provided it to me. But, when i changed it to 255.255.0.0 even in windows it still works. I guess maybe windows automatically cures this problem.

Thanks Again

omnikorn
2005-03-06, 07:24 AM CST
I am posting this reply from Fedora Core 3

It worked, the error was that the localhost's DNS was in place of the ISP's DNS. I changed it and now it's working.

Thank again to pcssbb & Ned

pcssbb
2005-03-06, 08:26 AM CST
One thing i don't understand is that subnet mask 255.255.255.0 works fine under Windows XP and 98. My ISP had provided it to me. But, when i changed it to 255.255.0.0 even in windows it still works. I guess maybe windows automatically cures this problem. I don't understand how that could have worked in Windows either. It goes against everything I have ever learned about TCP/IP. I would be interested in hearing someones explanation as to how the following IP configuration could work in Windows:

IP Address : 172.18.6.91
Subnet Mask : 255.255.255.0
Default Gateway : 172.18.0.1

Anyway, I am glad you are now networked. You are welcome. Good catch Ned.

Ned
2005-03-06, 02:02 PM CST
Glad you got it working - a fresh pair of eyes looking at a problem will often spot what others have missed :)

Ned

omnikorn
2005-03-06, 08:12 PM CST
I am interested in learning the basics of networking. It would be very helpful if you guys can send me some links.

Thanks in advance

jarifed
2005-03-06, 11:22 PM CST
Read this
http://www.brennan.id.au/index.html

Jarifed

omnikorn
2005-03-07, 06:47 PM CST
Thnks, Jarifed for suggesting this excellent site.

junkhunk
2005-07-17, 02:03 PM CDT
omnikorn i hav facing the same problem u hav. I hav installled FC1 and hav rtl8139 network card. My net connection is ok in XP and 2000. But in FC1 i can not ping to my service provider ip. Do u get any solution?

But one thing i must tell u that in thReadme of rtl8139 driver i saw that linus 2.4.22-1.2115.nptl kernel(of FC1) does not support rtl8139. So i think 1st we hav to get the driver of rtl8139.

Plz let me know what do u think?

junkhunk
2005-07-17, 11:18 PM CDT
pcssbb thank u. I am astonished that after changing my subnetmask 255.255.255.192 to 255.255.0.0 its working. I dont why its happening. the subnetmask given my service provider is 255.255.255.192.
Its working in xp but not in linux. I hav to chacge it to 255.255.0.0 . Then its working.Plz explain it

junkhunk
2005-07-17, 11:19 PM CDT
I don't understand how that could have worked in Windows either. It goes against everything I have ever learned about TCP/IP. I would be interested in hearing someones explanation as to how the following IP configuration could work in Windows:

IP Address : 172.18.6.91
Subnet Mask : 255.255.255.0
Default Gateway : 172.18.0.1

Anyway, I am glad you are now networked. You are welcome. Good catch Ned.



pcssbb thank u. I am astonished that after changing my subnetmask 255.255.255.192 to 255.255.0.0 its working. I dont why its happening. the subnetmask given my service provider is 255.255.255.192.
Its working in xp but not in linux. I hav to chacge it to 255.255.0.0 . Then its working.Plz explain it