View Full Version : Fresh install of FC3, same old networking error.
sandrogalli
2005-05-07, 02:12 PM CDT
hey everyone,
I've been using linux for a couple of weeks now, starting off with a copy of suse7.1 that I bought for 50p. Finally got round to downloading FC3 yesterday and installed it this morning.
Absolutely LOVING Fedora Core, not only does it look amazing but it runs more stable and quicker on my DellDimension with Intel866mhz and 192mb RAM. Had some initial problems - machine has inbuilt Intel810e graphics - but looking through these forums I straightened it out pretty quickly.
However, I still cant get it on the home network. I am running a smoothwall with dhcp and 2 XP computers. The smoothie seems to issue an address alright, and I can ping all the machines on the network, but I cannot access the admin page or ping an external site. It's the same problem I had with suse7.1, and i'm less sure than i was now about it being a driver issue.
I'm pretty sure that the problems lies in the gateway settings, as it gives error messages that i will come on to in a minute.
I've set a staticIP, and i think it is assigning itself a broadcast address.
Ifconfig gives:
ifconfig
eth0 Link encap:Ethernet HWaddr 00:D0:B7:59:CD:10
inet addr:192.168.0.201 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:b7ff:fe59:cd10/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1467 (1.4 KiB) TX bytes:2459 (2.4 KiB)
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:2211 errors:0 dropped:0 overruns:0 frame:0
TX packets:2211 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2957520 (2.8 MiB) TX bytes:2957520 (2.8 MiB)
And 'route -n'
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.1 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
Now i'm sure that under gateway should be my defualt gateway address and the 'route-eth0' file seems to indicate that a gateway is set:
'route-eth0':
GATEWAY0=192.168.0.1
NETMASK0=255.255.255.0
ADDRESS0=0.0.0.0
this is the same as i set in 'Applications>System settings>network'
The trouble arises when i try to add a gateway in the terminal:
route add defualt gw 192.168.0.1
returns:
"SIOCADDRT: Network is unreachable"
as does 'route add -net 0.0.0.0/0 gw 192.168.77.0' and other variations.
Does anyone know what this error means? It's been bugging me ever since i started running linux. I tryed different cables and i know my switch supports Linux. I've even tryed installing a different NIC but i still get the same error.
Any suggestions would be welcome.
Thanks.
rsimhamb
2005-05-07, 03:02 PM CDT
Could you post the output of the following two commands?
- lspci
- mii-tool
sandrogalli
2005-05-07, 04:24 PM CDT
lspci:
'...01:01.0 Ethernet controller: Intel Corp. 82557 /8/9 [Ethernet Pro 100] (rev 08)...'
mii-tool:
'eth0: negotiated 100baseTx-FD flow-control, link ok'
cheers.
rsimhamb
2005-05-07, 05:04 PM CDT
In a terminal, do the following:
- using #, comment out all lines in route-eth0
- edit /etc/sysconfig/network
- add line GATEWAY=192.168.0.1
- save and exit
- edit /etc/sysconfig/network-scripts/ifcfg-eth0
- if a GATEWAY= line exists, comment it using #
- execute service network restart
- execute route command
can you now see the default gateway in your route?
sandrogalli
2005-05-08, 06:32 AM CDT
Hey,
nope, it still returns 'SIOCADDRT: network is unreachable' when i try to add a default gateway.
Anything else i could try?
rsimhamb
2005-05-08, 08:44 AM CDT
Are you certain that 192.168.0.1 is your gateway? The 'SIOCADDRT: network is unreachable' error is encountered when the either no link is found or when the gateway is mis-configured or is unreachable.
In your case, a link exists as reported by mii-tool
So the only two factors here could be a mis-configured gateway or an unreachable gateway. Assuming that your gateway settings/ip address are correct, you should check if your firewall is somehow denying traffic from/to your linux box based on IP address or mac address or both.
I am assuming that the smoothwall box also serves as your default gateway. Have you looked at it's drop/deny logs for entries corresponding to your linux box's IP/MAC address?
sandrogalli
2005-05-08, 09:44 AM CDT
hi,
I'm pretty sure its the correct gateway, i've got 3 xp computers set up and working fine.
The logs don't show any indication that it is blocking the linux box.
How would I go about finding out whether my gateway is unreachable?
thanks.
AndyGreen
2005-05-08, 09:49 AM CDT
From your route -n
192.168.0.1 0.0.0.0 255.255.255.0 U 0 0 0 eth0Shenanigens. 192.168.0.*1*???
sandrogalli
2005-05-08, 09:54 AM CDT
thats what i set my smoothie to during installation, it seems to be working fine for my xp machines.
AndyGreen
2005-05-08, 09:57 AM CDT
You should specifiy your subnet with zeroes in the masked portion:
192.168.0.0/24
it seems to be working fine for my xp machines.Well, tell your Linux machine that VERY STERNLY, or try changing it.
sandrogalli
2005-05-08, 10:07 AM CDT
i changed the ip and rebooted the network, but I still get exactly the same SIOCADDRT error when I try to add a default gw.
telling it off didn't work either. :D
been looking around a bit on google and found this link:
http://www.uit.co.uk/practical-tcpip/w-rterr-015.htm
what does it mean when it says it isn't on a 'directly connected network'??
AndyGreen
2005-05-08, 10:16 AM CDT
When you say "changed the IP", what exactly did you change?
What does
route -n
say now?
sandrogalli
2005-05-08, 10:24 AM CDT
to '192.168.1.0':
route -n shows exactly the same except with the changed destination.
AndyGreen
2005-05-08, 10:40 AM CDT
There is some confusion here on one side or the other. I'm perfectly willing to believe it is on my side.
route
shows us the rules for what to send where. You just set up a rule to send packets conforming to
192.168.1.*
down eth0. It's a perfectly fine rule, who knows on somebody's computer it might even be useful. However on your computer your IP address is 192.168.0.201 and your netmask is 255.255.255.0. Therefore your "local subnet" is 192.168.0.0/24 or we can say informally 192.168.0.*.
Your routing table has this useless rule for what to do with packets headed down 192.168.1.*, but NO CLUES what to do with traffic on your local subnet, 192.168.0.*.
Therefore it seems to me you want to change your routing table entry to lose this bogus 192.168.1.* stuff and replace it with the far more useful information that traffic for the subnet
192.168.0.0 netmask 255.255.255.0 should be sent down eth0.
How does that sound?
w5set
2005-05-08, 10:45 AM CDT
Are you using a hub/switch between all of the network and Smooth?
Or are you using a router/nat between the network and Smoothwall?
sandrogalli
2005-05-08, 10:50 AM CDT
sorry, that's my mistake. i've been tinkering and changing ip addresses so much that i guess i forgot some stuff.
the only problem is this, I've already tried 192.168.0.0, as this is what i initially set smoothie to. At that point i was running suse7.1 but i was still returning a 'network is unreachable error".
I've been troubleshooting this problem for about two weeks, but have'nt made any headway, so i'm quite willing to try any suggestions even if there's only a miniscule chance of success.
Dagnabit! how do i get round this error??!!
sandrogalli
2005-05-08, 10:51 AM CDT
i'm using a netgear fs605 switch, that all the machines connect to directly, and according to the documentation it supports linux.
thanks
AndyGreen
2005-05-08, 10:54 AM CDT
Your first move is to get your routing table right. When you have a correct entry for the 192.168.0.* subnet, I think you should be able to set a default gateway to an address on that subnet. Why don't you set that back to rights, post your
route -n
and if it still complains on setting the gateway, we'll see what we can think of.
sandrogalli
2005-05-08, 11:14 AM CDT
Ok,
reset the smoothie ip to 192.168.0.0
route -n on the linux box gives:
'route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0'
but I still cannot add a default gateway!!
It gives exactly the same siocaddrt error.
AndyGreen
2005-05-08, 11:18 AM CDT
reset the smoothie ip to 192.168.0.0Can you please give the results of
ifconfig
and
cat /etc/sysconfig/networking/devices/ifcfg-eth0
as well
sandrogalli
2005-05-08, 11:30 AM CDT
ifconfig
eth0 Link encap:Ethernet HWaddr 00:D0:B7:59:CD:10
inet addr:192.168.0.201 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:b7ff:fe59:cd10/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1467 (1.4 KiB) TX bytes:2459 (2.4 KiB)
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:2211 errors:0 dropped:0 overruns:0 frame:0
TX packets:2211 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2957520 (2.8 MiB) TX bytes:2957520 (2.8 MiB)
ifcfg-eth0
ipv6init=no
onboot=yes
userctl=no
peerdns=yes
type=ethernet
device=eth0
hwaddr=00:d0:b7:59:cd:10
bootproto=none
netmask=255.255.255.0
ipaddr=192.168.0.201
gateway=192.168.0.0
thanks andy.
AndyGreen
2005-05-08, 12:20 PM CDT
gateway=192.168.0.0This needs to be 192.168.0.1... I get the feeling we are talking at cross-purposes slightly. The specification of the SUBNET for route needs to be 192.168.0.0/24, it says nothing about your other machine's IP address which can stay at 192.168.0.1. The subnet is referring to a RANGE of IP addresses. IIRC blah.0 is an illegal IP address anyway.
'route-eth0':
GATEWAY0=192.168.0.1
NETMASK0=255.255.255.0
ADDRESS0=0.0.0.0 This file seems to be the source of the bad route entry in route -n? It does not need to exist and is messing up your routing. Fedora normally infers your local subnet route interface from the settings in ifconfig and makes an entry in the routing table automatically.
If you have any static routes listed for eth0 remove them. The routing should have worked out of the box since yours is the most simple case and I think maybe something you "knew you had to do to make the routing work", like setting a static route or some other stuff, is responsible for the problems.
Sanity check:
route add default gw 192.168.0.1
is what you should be able to add without error when your routing table contains a line
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
sandrogalli
2005-05-08, 01:14 PM CDT
Andy, you are the best! thanks for spending some time to help out a linux noob like me.
route -n now shows the added line:
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
Shouldn't I be able to access the internet now?? I still can't ping an external address.
What else is there left to do??
w5set
2005-05-08, 01:22 PM CDT
tried turning off the switch (netgear switch) and then back on?
AndyGreen
2005-05-08, 02:30 PM CDT
Yep, packets that are for a destination not mentioned by one of the other route table entries will be sent to 192.168.0.1 now. For completeness, can you once again paste your complete
route -n
so we can be sure that is not containing some other bogus routes.
"I can't ping an external address" is much less helpful than an exact paste of the results of trying to ping an external address.
sandrogalli
2005-05-08, 03:09 PM CDT
'route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0'
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0'
should that first line still be there?
I cant delete it anyway, 'route del -net 192.168.0.0' returns:
"SIOCDELRT: Invalid argument"
Trying to ping my isp's dns gives:
From 192.168.0.201 icmp_seq=0 ttl=64 time=0.xxx ms
From 192.168.0.201 icmp_seq=1 ttl=64 time=0.xxx ms
etc...
AndyGreen
2005-05-08, 03:21 PM CDT
The first line is important and should be there. You couldn't delete it because you didn't fully specify it: you need to give the netmask too. But in fact you don't want to delete it.
Trying to ping my isp's dns gives:
From 192.168.0.201 icmp_seq=0 ttl=64 time=0.xxx ms
From 192.168.0.201 icmp_seq=1 ttl=64 time=0.xxx msIs something missing from this "paste"? Please check it.
sandrogalli
2005-05-08, 03:55 PM CDT
sorry, i pasted the wrong bit!
i should be:
PING xxx.xxx.xxx.x (xxx.xxx.xxx.x) 56(84) bytes of data.
From 192.168.0.201 icmp_seq=0 Destination Host Unreachable
From 192.168.0.201 icmp_seq=1 Destination Host Unreachable
From 192.168.0.201 icmp_seq=2 Destination Host Unreachable
(etc...)
--- xxx.xxx.xxx.x ping statistics ---
x packets transmitted, 0 received, +9 errors, 100% packet loss, time xxxxxms
, pipe 4'
thanks.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.