Subject: Re: Routing issue (no route to default host)
To: Alan Barrett <apb@cequrux.com>
From: Anthony Lieuallen <arantius@yahoo.com>
List: tech-net
Date: 02/14/2003 09:11:51
--- Alan Barrett <apb@cequrux.com> wrote:
> You seem to think that NetBSD has a hard-coded refusal to route to
> 10.x.x.x addresses.  I am sure that there's no such thing.

As to this, someone had previously posted they suspected this was the
reason.  They were wrong =)
 
> Now, addressing your original question:
> > >  > Situation is the cable modem service here.  All that is
> available
> > >  > is a "one-way" cable modem (asynchronus, cable downlink,
> analog
> > >  > phone modem uplink), and the strange way the cable modem's
> > >  > hardware seems to operate.  It assigns me a public address of
> > >  > 209.122.183.50, while the default router is at 10.17.44.244 .
> They should be allocating you an address in the same subnet as your
> default gateway.  Either they are crazy or you didn't understand what
> they intended.

Yes, it seems to me to be a crazy setup as well.  The DHCP server as
well as router seem to be within the modem, not at their end.  This is
the only reason I can find for it using a private address.
 
> > >  > In short, I am never able to add a route to that address, as
> > >  > there is no route to the 10.x.x.x subnet.
> Right.  If your provider is crazy and really intends this setup to
> work, then you will need to add a route to the 10.x.x.x subnet.  Try
> something like this:
> 
>     route add -net 10.0.0.0 -netmask 255.0.0.0 -interface
> 209.122.183.50
> 
> This should works adequately if the interface has a unique IP
> address.  I have never understood why the NetBSD "route add" command 
> doesn't take an interface name in this context.

I assure you I've tried this =)  I agree, it would probably work better
if I could just give an interface name.  (As in my original post, this
is how I have worked around the solution, I have managed to make linux
route packets for that IP to the appropriate interface.)  Unfortunately
that does not seem to work.  Below is a session that contains the best
I've managed to achieve.  Basically, I got it to route packets for the
10.x.x.x subnet to the correct place, and I managed to ping that IP
(though I did not try to verify if that was really going out to the
modem, or maybe trapped in a loopback or something).  I added an arp
entry just in case (It has been suggested before, and usually not
worked).  But then, I am still unable to add a default route to that
IP.

(Sorry I know.. this is a little big....)

paranoid:~:root:{505} netstat -f inet -nr
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use    Mtu 
Interface
127                127.0.0.1          UGRS        0        0  33228 
lo0
127.0.0.1          127.0.0.1          UH          2        2  33228 
lo0
192.168.1          link#2             UC          3        0   1500 
ep1
192.168.1.110      00:10:5a:0c:65:ed  UHLc        2      162   1500 
ep1
192.168.1.112      00:60:08:0a:4b:f9  UHLc        1        8   1500 
ep1
192.168.1.255      link#2             UHLc        2       37   1500 
ep1
209.122.183        link#1             UC          1        0   1500 
ep0
209.122.183.50     127.0.0.1          UGHS        0        0  33228 
lo0
209.122.183.255    link#1             UHLc        2       37   1500 
ep0
paranoid:~:root:{506} route add -net 10 -interface 209.122.183.50
add net 10: gateway 209.122.183.50
paranoid:~:root:{507} netstat -f inet -nr
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use    Mtu 
Interface
10                 link#1             UCS         0        0   1500 
ep0
127                127.0.0.1          UGRS        0        0  33228 
lo0
127.0.0.1          127.0.0.1          UH          2        2  33228 
lo0
192.168.1          link#2             UC          3        0   1500 
ep1
192.168.1.110      00:10:5a:0c:65:ed  UHLc        2      216   1500 
ep1
192.168.1.112      00:60:08:0a:4b:f9  UHLc        1        8   1500 
ep1
192.168.1.255      link#2             UHLc        2       37   1500 
ep1
209.122.183        link#1             UC          1        0   1500 
ep0
209.122.183.50     127.0.0.1          UGHS        0        0  33228 
lo0
209.122.183.255    link#1             UHLc        2       37   1500 
ep0
paranoid:~:root:{508} ping 10.17.44.244
PING 10.17.44.244 (10.17.44.244): 56 data bytes
64 bytes from 10.17.44.244: icmp_seq=0 ttl=254 time=3.610 ms
64 bytes from 10.17.44.244: icmp_seq=1 ttl=254 time=3.763 ms
64 bytes from 10.17.44.244: icmp_seq=2 ttl=254 time=3.766 ms
^C
----10.17.44.244 PING Statistics----
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.610/3.713/3.766/0.089 ms
paranoid:~:root:{509} route add default 10.17.44.244
writing to routing socket: Network is unreachable
add net default: gateway 10.17.44.244: Network is unreachable
paranoid:~:root:{510} ping 10.17.44.244
PING 10.17.44.244 (10.17.44.244): 56 data bytes
64 bytes from 10.17.44.244: icmp_seq=0 ttl=254 time=3.487 ms
64 bytes from 10.17.44.244: icmp_seq=1 ttl=254 time=3.733 ms
^C
----10.17.44.244 PING Statistics----
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.487/3.610/3.733/0.174 ms
paranoid:~:root:{511} arp -s 10.17.44.244 00:20:cd:02:f1:5a
paranoid:~:root:{512} route add default 10.17.44.244
writing to routing socket: Network is unreachable
add net default: gateway 10.17.44.244: Network is unreachable
paranoid:~:root:{513}


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com