[wplug-bsd] Dumb question: "no route to host" but why?

Poyner, Brandon bpoyner at ccac.edu
Thu Jul 7 08:37:23 EDT 2005


What is the output from 'ifconfig xl0' and 'route get 192.168.1.1' ?

Brandon Poyner
Network Engineer III
CCAC - College Office
412-237-3086
 
 

> -----Original Message-----
> From: wplug-bsd-bounces+bpoyner=ccac.edu at wplug.org 
> [mailto:wplug-bsd-bounces+bpoyner=ccac.edu at wplug.org] On 
> Behalf Of Brandon Kuczenski
> Sent: Wednesday, July 06, 2005 7:20 PM
> To: WPLUG BSD user group
> Subject: [wplug-bsd] Dumb question: "no route to host" but why?
> 
> I am configuring a system running FreeBSD 5.3 to act as a NAT 
> gateway.  It 
> receives its real-world IP address over dhcp on interface xl1 
> and acts as 
> a dhcp server to the internal network on interface xl0.
> 
> After startup, I can talk to the outside world but when I try 
> to ping a 
> destination that should lie on the internal network I get "no 
> route to 
> host."
> 
> Relevant network config in /etc/rc.conf:
> 
> network_interfaces="lo0 xl0 xl1"
> ifconfig_xl1="DHCP"
> ifconfig_xl0="inet 192.168.1.2 netmask 255.255.255.0"
> 
> 
> 
> output of 'netstat -rn' (IPv4 only):
> Routing tables
> 
> Internet:
> Destination        Gateway            Flags    Refs      Use  
> Netif Expire
> default            128.2.56.1         UGS         0      210    xl1
> 127.0.0.1          127.0.0.1          UH          1       10    lo0
> 128.2.56/22        link#2             UC          0        0  
>   xl1    500
> 128.2.56.1         08:00:7f:0a:00:57  UHLW        1        0  
>   xl1   1702
> 128.2.57.58        127.0.0.1          UGHS        0        0    lo0
> 192.168.1          link#1             UC          0        0  
>   xl0    495
> 192.168.1.1        00:13:10:19:67:58  UHLW        0        1  
>   xl0   1780
> 192.168.1.255      ff:ff:ff:ff:ff:ff  UHLWb       0       12    xl0
> 
> 192.168.1.1 is the dsl/wireless router with which I am trying to 
> communicate.  But pinging, I get:
> 
> $ ping 192.168.1.1
> PING 192.168.1.1 (192.168.1.1): 56 data bytes
> ping: sendto: no route to host
> 
> If I try to add an explicit route:
> # route add -net 192.168.1.0/24 192.168.1.1
> route: writing to routing socket: File exists
> add net 192.168.1.0: gateway 192.168.1.1: File exists
> # route add -net 192.168.1.0/24 192.168.1.2
> route: writing to routing socket: File exists
> add net 192.168.1.0: gateway 192.168.1.2: File exists
> 
> I have basically the exact same setup at home running FreeBSD 4.11 -- 
> except the real-world routing is static -- and it works fine.  The 
> handbook looks like it's telling me to do what I've already 
> done.  Am I 
> missing something dumb?
> 
> Thanks in advance,
> Brandon
> 
> _______________________________________________
> wplug-bsd mailing list
> wplug-bsd at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug-bsd
> 



More information about the wplug-bsd mailing list