[OpenIndiana-discuss] Static IP configuration problem
carlsonj at workingcode.com
Wed Oct 12 20:35:38 UTC 2011
Ray Arachelian wrote:
> On 10/12/2011 03:23 PM, Lucas Van Tol wrote:
>> I think /etc/netmasks is where you would store the netmask?
>> echo $NETWORK $NETMASK >> /etc/netmasks
> It is and I was just about to reply to point out that if you forget
> this, you can get in trouble since it may pick /8 for a 10.x.x.x
> address, or /16 for a 172.15.x.x for example when you might not want it
> to. :) netmask should be in the form of 255.255.255.0 for class C.
I can't recommend using /etc/netmasks for anything. It's a brutal hack
and really doesn't work right for modern CIDR networks.
Instead, just specify "address/length" or "name/length" for the address
on the interface.
In other words, if you would previously have done something like this:
# echo 10.1.0.0 255.255.0.0 >> /etc/netmasks
# echo 10.1.0.1 > /etc/hostname.foo0
I recommend doing this instead:
# echo 10.1.0.1/16 > /etc/hostname.foo0
It's easier, and it has the great benefit that it works right with CIDR
netmasks without fuss.
Or just use "ipadm" to administer the addresses ...
James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
More information about the OpenIndiana-discuss