No Route to Host

*** EDIT *** Please see my solution at this URL: http://daemonforums.org/showthread.php?t=9094

*** EDIT *** Please see my latest questions at post #8, this thread.


I have just installed FreeBSD-10.1-RELEASE-amd64-dvd1.iso on a fresh platform. All seemed to progress smoothly, except the system cannot route to anything on the WAN. I can ping the local host (127.0.0.1), the static IP of the host name, the gateway address, and other devices on the local switch (a DSL router with four ports).

All info displayed via ifconfig and netstat appear normal; rc.conf is as installed mostly "right out of the box".

No firewall in play; no intermediate LAN router, etc. My previous experience installing versions of FreeBSD have not encountered this problem (other server platforms are working well). For my eyes, I cannot see what is wrong. Suggestions?
 
Last edited:
Ignoring weird and exotic configurations, this is likely a simple configuration error.
Do you have the following in /etc/rc.conf

Code:
defaultrouter="ROUTER_LAN_IP"
Does netstat -rn output a line for the default route - 0.0.0.0/0, with a gateway address of the router LAN address?
 
Ok, I got the impression from your first post it was on a private LAN with a DSL router.

Your netstat -rn output clearly shows that your system knows how to get to the 66.138.104.72/29 network via vr0, and 66.138.104.73 & 127.0.0.1 via lo0, and that's it. It doesn't have a route to anything else.

If vr0 has a static WAN address of 66.138.104.73, then the device plugged into the other end of that network cable must also have an IP address on that range. That IP needs to be set as your default router in rc.conf.
 
Currently, this system is not on a LAN, but simply connected directly to a static WAN IP address.

rc.conf
Code:
<snip>
defaultrouter="YES"
<snip>

This is wrong, the setting is taken literally by the system and it should be an IP address and not "YES". Change it to the IP address of the upstream gateway and everything should work after the change.
 
The private LAN is inside a NetGear FVX538 router that is connected to the DSL router. During this initial setup, I'm only connecting directly to the WAN via the DSL router. Keeping it simple.

. . .while waiting, in rc.conf I changed code to
Code:
defaultrouter="66.138.104.73"
, rebooted and still "no joy".

The defaultrouter address can not be the same address as you have on vr0, check your documentation from your ISP for the correct gateway address.
 
I'm only connecting directly to the WAN via the DSL router. Keeping it simple.

You're making less and less sense, and getting less simple, in every post. Is your FreeBSD machine connected to a DSL router, or does it have a direct Ethernet connection to the Internet? If you're going through a DSL router, configuring a public address on FreeBSD is not going to work.
 
*** Edit ***

OK, my bad for the vague description. The DSL "box" is essentially a bridge to the Ethernet and the server is inside the subnetted LAN attached to a NetGear router with an integrated 8-port switch.

The /etc/rc.config file designates
Code:
defaultrouter="192.168.1.1"
. I can ping the address and I can also connect sftp via the address, but not the domain name. The latter attempt results with "ssh: connect to host archaxis.net port 22: No route to host . . .Connection closed".

I can also ping Google's DNS servers, 8.8.8.8 and 8.8.4.4. Also other of my servers across town. Problem is . . .I cannot ping any of my locally hosted domains served by another Apache HTTP server on the LAN at the 192.168.1.74 address, although I can ping that server address. If I try to ping any of the domains (by name), then the system complains, "ping: sendto: No route to host".

Given this "no route" scenario, nslookup archaxis.net reveals

Server: 127.0.0.1
Address: 127.0.0.1#53
. . .etc.
printsection()
Name: archaxis.net
Address: 66.138.104.73​


Additionally, dig archaxis.net reveals the following:

; <<>> DiG 9.10.2 <<>> archaxis.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28181
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3
. . .etc.
;; ANSWER SECTION:
archaxis.net. 10800 IN A 66.138.104.73


. . .and route get archaxis.net
route to: localhost
destination: adsl-66-138-104-72.dsl.ltrkar.swbell.net
mask: 255.255.255.248
fib: 0
interface: dc0
flags: <UP,DONE,PINNED>
recvpipe sendpipe ssthresh rtt,msec mtu weight expire
0 0 0 0 1500 1 0​

Soooo, why can't ping, sendmail, et al. find a route to the host? I've revisited all of my zone files, double checked /etc/host, etc/hosts.conf, resolv.conf, etc. I'm at a loss . . .there must be something I'm missing in this BIND 9 configuration . . .different from '8 that I'm not seeing. Where should I look?
 
Last edited:
Sounds like it's fixed then.
It was close to "fixed", but still could not resolve to FreeBSD mirrors, NTP, etc. I finally noticed that /etc/resolv.conf was void. I had to add a nameserver pointer, i.e.,
Code:
nameserver 8.8.8.8
before the system would resolve.

BTW, this Google nameserver IP is (probably) temporary. I'm in the process of installing BIND 9.10.2. Over the weekend, I ported and installed xorg (X11) and FireFox. Xorg installed Python2.7. Now, BIND 9.10.2 looks for Python3.4. After installing Python3.4 and setenv PYTHON_DEFAULT 3.4 . . .the BIND 9.10.2 make stopped at:
Code:
Installing py34-setuptools34-5.5.1_1...
pkg-static: py34-setuptools34-5.5.1_1 conflicts with py27-setuptools27-5.5.1_1
(installs files into the same place).
Problematic file: /usr/local/bin/easy_install
*** Error code 70

. . .taking this "Python question" to another thread.


Thanks again for help!
 
Last edited:
Back
Top