From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078609810627.tru64-unix-managers.marc@archive.invalid> From: "Morrison, Kathy D." Date: Tue, 25 Mar 1997 16:47:47 +0000 To: tru64-unix-managers Subject: SUMMARY "network not reachable problem" X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078609810627 The problem turned out to be that the IP address of the host had changed (i.e. the network admin's here had placed the host on a different subnet). In order to fix the problem, I changed the IP address in /etc/hosts. In addition, I added 3 nameservers to my /etc/resolv.conf file. (no nameservers listed in this file previously- I had the nameserver's IP addresses in /etc/hosts file) I changed the order in /etc/svc.conf to bind,local. (was local,bind) Thanks to all those listed below for their help and suggestions!!- Am including the responses here, because the suggestions were really helpful for troubleshooting the problem. Carlos Augusto Moreira dos Santos Jeffrey G. Micono Tom Webster Alex_Nord@jabil.com George Gallen Bill Bathurst Dick Abraham Cliff Krieger Patricia Campbell Brian Sheehan Responses: _______________________________________________________________________ from Carlos Augusto Moreira dos Santos : On Mon, 24 Mar 1997, Morrison, Kathy D. wrote: > I have used ping -r hostname, and get a "network is unreachable" error > message. Issue a "netstat -nr" command to show your current routing table. You need a route to your local network pointing to the network device (ethernet) and a default route pointing to your gateway. You need also a route pointing to the destination network and using another gateway if the default gateway does not have that route. > I searched the archives, but have not been able to fix this. I've tried > turning on and off routed via netsetup. Are you using dynamic routing? You will NOT need routed nor gated if you have a single network with a default and single gateway. > The "network is unreachable"message seems to mean that there is no > default route. > Wouldn't turning on routed fix this? Probabily not, because your host will not be notified of alternate routes if the routers are not performing dynamic routing and running a routing information protocol which routed knows about. > Since it was working fine previously, I hate to start changing too many > things, when it's probably something obvious..... Check the network interface to see if it is up. Issue a "ifconfig " command. If the interface is down then turn the interface up with "ifconfig netmask ". Check the network routes with "netstat -nr" you must have at least 3 routes, like this (mine): Destination Gateway Flags Refs Use Interface Netmasks: Inet 255.255.255.0 Route Tree for Protocol Family 2: default 200.248.148.1 UG 4 443900 ln0 <-Default 127.0.0.1 127.0.0.1 UH 4 141996 lo0 <-Internal 200.248.148 200.248.148.2 U 25 3738085 ln0 <-Local net If you do not have such routes you can add then by hand with "route add -net " Check the file /etc/rc.config to see if the correct values are assigned to the variables NETDEV_0 and IFCONFIG_0. Check the file /etc/routes to see if it contains at least "default ". If you have a more complex topology than a single net connected to a default router, then you realy may need some other static routes or perhaps a dynamig routing. Please explain your problem a litle bit more, showing your network structure. I hope this helps ___ Carlos Augusto Moreira dos Santos casantos@cpmet.ufpel.tche.br Universidade Federal de Pelotas Centro de Pesquisas Meteorologicas Av Ildefonso Simoes Lopes, 2751 Telefone (0532)23-2525 Pelotas, RS, Brasil FAX (0532)23-4814 CEP 96060-290 http://cpmet.ufpel.tche.br ... a rock solid program is an exception, not a rule. (Lars Wirzenius) _______________________________________________________________________ from Jeffrey G. Micono : The default route is in /etc/routes. Here's what mine looks like: default 134.253.237.254 and my machine's IP is 134.253.237.161 In general, you don't need routed or gated unless you have a multi-homed node and want to do dynamic routing. Also, make sure your ethernet is set up right using ifconfig. Again, here's mine: % ifconfig tu0 tu0: flags=c63 inet 134.253.237.161 netmask ffffff00 broadcast 134.253.237.255 ipmtu 1500 Jeff -- __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ Jeffrey G. Micono 505.844.6767 Ktech Corporation 505.268.3379 __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ __/ _______________________________________________________________________ from Tom Webster Kathy, Try doing a "netstat -r" to verify what your routing table looks like. The output should, hopefully, look something like: ----- snip ----- snip ----- snip ----- snip ----- snip ----- Routing tables Destination Gateway Flags Refs Use Interface Netmasks: Inet 255.255.0.0 Route Tree for Protocol Family 2: default WAN.DOM.COM UG 4 40194 tu0 localhost localhost UH 7 366158 lo0 168.100 host U 48 1476870 tu0 ----- snip ----- snip ----- snip ----- snip ----- snip ----- Where: I am on a class 'b' network (168.100, subnet has been changed to protect the guilty), my hostname is "host" (we'll pretend my address is 168.100.100.1) and my default router is "WAN.DOM.COM". Some things to check: 1. Make sure your netmask is set correctly. The mask tells the system how big of a network to consider 'local'. I'm on a class 'b' (large) subnet, so mine is 255.255.0.0. This would mean that 'host' would consider everything in 168.100.* as local. If you are on a class 'c' network, yours netmask should be 255.255.255.0, meaning that everything in 168.100.100.* would be local. If you have set you subnet mask too restrictively, i.e. you are on a class 'b' net, but have it set for a class 'c' -- your system may think it can't reach the router. 2. Make sure that you have a default route defined and it is marked with a gateway ('G') flag. If not, you can add one using the 'route' command manually. In the example above "WAN.DOM.COM" is my default router. 3. If your network is not really complex, or that complexity is handled by the routers, you may save yourself a lot of headaches by just leaving routed turned off and setting a static route or two. Your system won't do auto-discovery of new or failed net paths, but it is simple and should only need to be changed once in a blue moon. 4. Invest some time in the route manual page, it is one of those things that is good to know about. Hope this helps, Tom -- +--------------------------------+------------------------------+ | Tom Webster | "Funny, I've never seen it | | SysAdmin MDA-SSD ISS-IS-HB-S&O | do THAT before...." | | webster@ssdpdc.mdc.com | - Any user support person | +--------------------------------+------------------------------+ | Unless clearly stated otherwise, all opinions are my own. | +---------------------------------------------------------------+ _______________________________________________________________________ from Alex_Nord@jabil.com: In addition to having routed running, you must make sure that you still have the correct value set for your default gateway. I know this is an obvious pointer, but sometimes they are the easiest to overlook. _______________________________________________________________________ from George Gallen: this happened to us once, the problem it turned out was the ethernet connection to our LAN fell out a little bit, not enough to look like it was out, yet not enough to transmit. George Gallen ggallen@slackinc.com _______________________________________________________________________ from Bill Bathurst : Is the computer you are trying to reach outside your network or inside your network? If it is outside your network you need to add a static route: (1) Edit the /etc/route file. (2) Enter in the IP address of your router. If it is already there then it is another problem. or (1) Run netsetup and add the router IP via the add static route option. Make sure to read the man page first. Restart networking: /usr/sbin/rcinet restart Don't forget "traceroute" is a valuable tool to see where route is getting cut off. Bill Bathurst http://freerange.com Systems Engineer/Oracle DBA Freerange Media _______________________________________________________________________ from Dick Abraham: Try: /usr/sbin/route add default _______________________________________________________________________ from Cliff Krieger: Kathy, You left out some important information such as your address in relation to the address you are trying to ping. If they are on the same network, then you don't need a route. In this case, with the network unreachable I would guess that they are not. Every time I have seen this it is either because the default route went away, or because a static route went away. Routed will usually pick a good default route, but it might not pick up on a static route that isn't advertised. That last idea is my best guess for what is wrong. -cliff _______________________________________________________________________ from Patricia Campbell : This may seem obvious but did you check the network card and cable ?? and can other machines on the same subnet ping you ?? Also 1 try setting static routing temporarily to ensure connectivitiy. 2 gated works better than routed, it sometimes looses connections. Patricia Campbell campbe13@cn.ca Telecomm @ CNR voice 514-399-7187 Montreal, Quebec fax 514-399-8105 Canada _______________________________________________________________________ from Brian Sheehan I have had the same error, always because my default route file was gone: /etc/routes It should contain just one line: default xxx.xxx.xxx.xxx where it has your default route IP address. See if that helps... - Brian +---------------------------------------+------------------------------+ | Brian Sheehan | Standard Disclaimer: | | Research Programmer | "My opinions are not those | | The Scripps Research Institute | of my employers or their | | La Jolla, CA | employers or their....." | | | | | (619)784-2206 (voice) | Is the internet slowing | | (619)784-2943 (fax) | down, or does it just SEEM | | sheehan@scripps.edu | that way because our | | http://dilbert.scripps.edu/~sheehan | computers are faster ? ;) | +---------------------------------------+------------------------------+ end of responses _______________________________________________________________________