Subject: Bug? Misfeature?
To: None <tech-net@netbsd.org>
From: John Klos <john@ziaspace.com>
List: tech-net
Date: 09/13/2006 16:20:28
Hi,

I'm not sure whether this is a bug or not, so I'm throwing this out here. 
On a NetBSD 4 system, I have a public subnet routed through a gif 
interface. Because I wanted to use all of the IPv4 addresses, I set 
net.inet.ip.hostzerobroadcast to 0 and set up a machine at that address. 
On the router, my setup looks like:

ex0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
         enabled=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
         address: 00:50:04:d0:32:a8
         media: Ethernet autoselect (100baseTX full-duplex)
         status: active
         inet 72.34.229.6 netmask 0xfffffff0 broadcast 72.34.229.15
         inet6 fe80::250:4ff:fed0:32a8%ex0 prefixlen 64 scopeid 0x1

ex1: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
         enabled=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
         address: 00:50:da:ca:10:31
         media: Ethernet autoselect (100baseTX full-duplex)
         status: active
         inet 192.168.10.1 netmask 0xffffff00 broadcast 192.168.10.255
         inet alias 38.98.18.161 netmask 0xfffffff0 broadcast 38.98.18.175
         inet6 fe80::250:daff:feca:1031%ex1 prefixlen 64 scopeid 0x2

gif0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
         tunnel inet 72.34.229.6 --> 38.98.18.100
         inet 192.168.255.1 -> 192.168.255.0 netmask 0xfffffffe
         inet6 fe80::250:4ff:fed0:32a8%gif0 ->  prefixlen 64 scopeid 0x5


This machine also provides IP NAT for, amongst other networks, 
192.168.10.x. Routing works fine, and all of the machines, including 
38.98.18.160, are available on the public internet.

The strange part is this: when I try to ssh to 38.98.18.160 from somewhere 
on the 192.168.10.x network, I get connected to the router's ssh daemon.

Does anyone know why routing would work fine to 38.98.18.160, but NAT 
wouldn't?

Thanks,
John Klos
-- 
Today is the day that my destiny calls me!
   Meowth