Subject: Re: "default" outgoing address
To: Michael Graff <explorer@flame.org>
From: Ted Lemon <mellon@hoffman.vix.com>
List: tech-kern
Date: 02/04/1999 18:43:05
> I don't think I can say
> 	ifconfig de0 inet 204.152.184.79 netmask 0xffffffff
> and have this work.

Of course you can.

> And for using a smaller netmask it would require proxy arp on the
> routers to really work.  And broadcasting to the local network would
> fail.  Etc.

Set the broadcast address to the local network's broadcast address.

piccola# ifconfig cs0 10.0.100.2 netmask 255.255.255.255 broadcast 10.0.0.255
piccola# ifconfig cs0 alias 10.0.0.4 netmask 255.255.255.0
piccola# ping 10.0.0.255
PING 10.0.0.255 (10.0.0.255): 56 data bytes
64 bytes from 10.0.100.2: icmp_seq=0 ttl=255 time=1.348 ms
64 bytes from 10.0.0.5: icmp_seq=0 DUP! ttl=255 time=3.483 ms
64 bytes from 10.0.0.2: icmp_seq=0 DUP! ttl=255 time=4.020 ms
64 bytes from 10.0.100.2: icmp_seq=1 ttl=255 time=1.202 ms
64 bytes from 10.0.0.5: icmp_seq=1 DUP! ttl=255 time=1.809 ms
64 bytes from 10.0.0.2: icmp_seq=1 DUP! ttl=255 time=2.330 ms

piccola# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use    Mtu  Interface
default            10.0.0.2           UGS         0        0      -  cs0
10/24              link#1             UC          0        0      -  cs0
10.0.0.2           00:10:4b:ec:93:61  UHL         1        0      -  cs0
10.0.0.4           127.0.0.1          UGHS        0        2      -  lo0
10.0.0.5           00:a0:24:ab:fb:9c  UHL         0        0      -  cs0
10.0.0.255         link#1             UHL         0        2      -  cs0
10.0.100.2/32      link#1             UC          0        0      -  cs0
127.0.0.1          127.0.0.1          UH          2       32      -  lo0

Proxy arp shouldn't be required - you should have a route to each
network for which there's an alias.   This worked fine for me just now
when I tested it.

			       _MelloN_