Sorry: I'm a bit short of time and so this isn't a complete answer, but hopefully it gives you a starting point.
From the answers to this question, it seems that /usr/libexec/InternetSharing
creates /etc/bootpd.plist
when Internet Sharing is turned on, and removes it again when it is turned off. I think this file is the cause for the ifconfig
values you are seeing.
On my machine, when it exists, among other things, that file contains
<key>net_address</key>
<string>192.168.2.0</string>
<key>net_mask</key>
<string>255.255.255.0</string>
<key>net_range</key>
<array>
<string>192.168.2.2</string>
<string>192.168.2.254</string>
</array>
I'm guessing that 192.168.2 is the default range, as my machine is producing the same results as yours.
I think you could try modifying /etc/bootpd.plist
once the file has been created to set your own range. You might then need to restart bootp
.
I don't know how to configure InternetSharing to use a different default. (I had a brief look at /System/Library/CoreServices/InternetSharing.bundle and the output of strings /usr/libexec/InternetSharing
, but couldn't see anything obvious.) One of the answers to the question I mentioned above suggests creating a cron job or launch agent to overwrite the /etc/bootpd.plist
with the settings you require automatically.
These details are for Mavericks. If I understand right, Mountain Lion uses named
instead: see the question, and the article it refers to also.
However... bootp
is only the subsystem that tells your other devices what addresses they should use (via DHCP). The Mac also has to forward packets from those devices to your wireless connection, and vice versa. I don't know how that forwarding is configured, and it might well be set up to forward only packets from/to the 192.168.2 subnet.