Click to See Complete Forum and Search --> : routing no being updated
npereira
10-15-2002, 04:10 PM
Hi,
What service in a desktop setup updates the routes?
I only have 2 routes;
192.168.10.0 GW 0.0.0.0
127.0.0.0 GW 0.0.0.0
I don't even have a default route. What service takes care of this?
I cannot add a default route by typing;
route add default gw 10.1.1.1
says command not found !?! What is going on?
cowanrl
10-15-2002, 05:25 PM
In many Linux distributions, Red Hat for sure, you can set the default gateway in the /etc/sysconfig/network file. Just add a line like this to the file:
GATEWAY=10.1.1.1
That will establish the default gateway each time networking is brought up.
Probably the reason your route command didn't work is because route wasn't in your path. Try, as root,:
/sbin/route add default gw 10.1.1.1
npereira
10-16-2002, 11:46 AM
I have added the GATEWAY=192.168.10.1 to the /etc/sysconfig/network.
Also added it via /sbin/route add default ga 192.168.10.1.
I can now ping the net and 10.1.1.1 ALTHOUGH, if I reboot the box, I loose the GW in "netstat -rn" and I can no longuer ping the net or 10.1.1.1
NPereira
cowanrl
10-16-2002, 12:51 PM
What Linux distribution are you using? Perhaps it doesn't use /etc/sysconfig/network to set the gateway.
Are you getting your IP address via DHCP? If so, maybe the DHCP config is overwriting or changing your settings?
npereira
10-16-2002, 01:19 PM
Originally posted by cowanrl
What Linux distribution are you using? Perhaps it doesn't use /etc/sysconfig/network to set the gateway.
Are you getting your IP address via DHCP? If so, maybe the DHCP config is overwriting or changing your settings?
Static IP 192.168.10.101
Dist= redhat 8.0
I'm starting to wonder if this is not a routing issue.
The RH8 box ip is 192.168.10.101
Gateway is 192.168.10.1 ETH0 of cisco router
10.1.1.3 ETH1 of cisco router
10.1.1.1 Gateway to Inet (Sonicwall LAN port)
Public IP address (WAN port of sonicwall)
How can I tell if it's a routing issue?
cowanrl
10-16-2002, 04:23 PM
If you put the line:
GATEWAY=192.168.10.1
in your /etc/sysconfig/network file and you don't have a default gateway in your route table when it starts, then there's a problem with networking coming up, not with routing. Obviously it will never work without a default gateway.
How about posting the contents of these files:
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
and the output of this command:
route -n
here for us to look at.
npereira
10-16-2002, 10:16 PM
I fixed it by editing the settings using the gnome network panel. Now all is working fine. Also, I had a route issue with my cisco 2600 that I also fixed. Now all is working fine. thanks for your help.
NPereira
Penrich
10-16-2002, 10:21 PM
Can I get my hooks into this post also please? Using Debian 3.0 I'm having trouble getting my network... "Network Unreachable" is all I see. I do not have the /etc/sysconfig/network files. But I did try the route -n, and it came up with an empty table copied in its entirety here
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
I added to Ecartman's post about possible IRQ conflicts also if that helps...
My original post : http://www.linuxnewbie.org/forum/showthread.php?s=&threadid=69140
[If it is bad form to jump in like this, then i do apologize, but I'm at the end of my tether now].
npereira
10-17-2002, 07:57 AM
Post the results of this command;
netstat -rn
also, try bringing down your network and back up again and look at the messages log to see if any errors appear.
to bring down network;
/etc/rc.d/init.d/network restart
to monitor messages log;
tail -f /var/log/messages
also, try;
less /etc/sysconfig/static-routes
Give us the output of all theses commands.
Penrich
10-17-2002, 10:39 AM
Thanks - I'll try tonight. I did have an IRQ conflict, which I corrected by moving my cards around, but that didn't solve my ethernet problem. I did manage to get to ping my router last night by (I think) enabling static IP, but I could never get out of the house. I tried the restart, and I got the error message (from my memory, so it may be wrong) cat: /???/???/dhclient.pid: file not found. I then created a file in the correct place, but nothing ever got put in it if I repeated the command... I'll post more tonight! Thanks again.
Penrich
10-17-2002, 11:24 PM
Ok - made it to my box...
Directory /etc/sysconfig contains only two files: hwconf and soundcard. No static-routes.
In hwconf there is a section:
-
class: NETWORK
bus: PCI
detached: 0
device: eth
driver: ne2k-pci
desc: RealTek IRLT-8029 (AS)
vendorID: 10ec
deviceID: 8029
subvendorID: 0000
subdeviceID: 0000
pciType: 1
-
I have moved all my cards around so that there are no IRQ sharing, but that was not the problem.
tail -f /var/log/messages
Oct 17 18:42:16 debian -- MARK --
Oct 17 19:02:16 debian -- MARK --
Oct 17 19:22:16 debian -- MARK --
Oct 17 19:42:16 debian -- MARK --
Oct 17 20:02:16 debian -- MARK --
Oct 17 20:42:16 debian -- MARK --
Oct 17 21:02:16 debian -- MARK --
Oct 17 21:22:16 debian -- MARK --
Oct 17 21:42:16 debian -- MARK --
I see a pattern there, but I don't know what it means!
/etc/rc.d/init.d/network restart
I had to use /etc/init.d/networking restart -- I guess this is similar?
Just hung for a second and then returned me to the command line
netstat -rn
gives me the empty table as listed before.
netstat -n
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
Active Unix domain Sockets (w/o servers)
Proto refCnt Flags Type State I-node Path
unix 4 [ ] DGRAM 209 /dev/log
unix 3 [ ] STREAM CONNECTED 2396 /tmp/.ICE-unix/dcop324-1034828575
...
...
lots more of the same!
Think that was all! I'm seriously considering wiping debian out right now, but I hate to admit defeat!!!
Thanks for any help!