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

Brandon Kuczenski brandon at 301south.net
Thu Jul 7 12:45:55 EDT 2005


On Thu, 7 Jul 2005, Poyner, Brandon wrote:

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

$ ifconfig xl0
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         options=9<RXCSUM,VLAN_MTU>
         inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
         inet6 fe80::250:4ff:fed3:e73%xl0 prefixlen 64 scopeid 0x1
         ether 00:50:04:d3:0e:73
         media: Ethernet autoselect (none)
         status: no carrier
$ route get 192.168.1.1
    route to: dslrouter
destination: 192.168.1.0
        mask: 255.255.255.0
   interface: xl0
       flags: <UP,DONE,CLONING>
  recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu 
expire
        0         0         0         0         0         0      1500 
-62945
$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
ping: sendto: No route to host



It shouldn't matter that I ran those commands as non-root, right?

Thanks,
[other] Brandon

>> -----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
>>
>
> _______________________________________________
> 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