Changing Subnet mask

Changing Subnet mask

Post by Robert Yode » Sat, 16 Jan 1999 04:00:00




> Does anyone know how to change the subnet mask for solaris on a sun machine?

Sure!  Lots of us do!

man netmasks

ry
--

"Unix:  The Solution to the W2K Problem."

 
 
 

Changing Subnet mask

Post by aaron » Sun, 17 Jan 1999 04:00:00


Does anyone know how to change the subnet mask for solaris on a sun machine?

 
 
 

Changing Subnet mask

Post by Barry Margoli » Sun, 17 Jan 1999 04:00:00




>Does anyone know how to change the subnet mask for solaris on a sun machine?

ifconfig le0 1.2.3.4 netmask ffffff00

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.

 
 
 

Changing Subnet mask

Post by LeeN » Sun, 17 Jan 1999 04:00:00


Quote:>Does anyone know how to change the subnet mask for solaris on a sun machine?

vi /etc/netmasks

also, ifconfig <interface> netmask <newnetmask>

 
 
 

Changing Subnet mask

Post by Scott Giffor » Sun, 17 Jan 1999 04:00:00


    >> Does anyone know how to change the subnet mask for solaris on a
    >> sun machine?
    LeeNMI> vi /etc/netmasks

    LeeNMI> also, ifconfig <interface> netmask <newnetmask>

I've found that just using ifconfig, and putting it in my startup
files if need be, is *much* easier than dealing with /etc/netmasks.
I've been working with the Internet and with Solaris for several years
now, and I still can't quite figure out what's supposed to be in
/etc/netmasks...

------Scott.

 
 
 

Changing Subnet mask

Post by Barry Margoli » Sun, 17 Jan 1999 04:00:00




Quote:>I've found that just using ifconfig, and putting it in my startup
>files if need be, is *much* easier than dealing with /etc/netmasks.
>I've been working with the Internet and with Solaris for several years
>now, and I still can't quite figure out what's supposed to be in
>/etc/netmasks...

Prior to Solaris 2.6, which supports VLSM and CIDR, /etc/netmasks is pretty
simple.  The first column is the *classful* network, and the second column
is the subnet mask for that network.  E.g. if you're using the 172.16 class
B network, with the third octet as the subnet, you put:

172.16.0.0 255.255.255.0

It's only used by ifconfig when "netmask +" is used to get the default mask
for an interface; it's not used for remote networks.

In 2.6 the first column can contain actual subnet addresses; it will look
for the most specific one that matches your address, and use the
corresponding netmask.  I don't have 2.6 handy, so I haven't actually
played with it and learned all the ways it's used.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.

 
 
 

Changing Subnet mask

Post by Lance Woodso » Sun, 17 Jan 1999 04:00:00


Quote:> Does anyone know how to change the subnet mask for solaris on a sun machine?

Change '/etc/netmasks' and reboot.  You can also use '/sbin/ifconfig'.

Lance Woodson

 
 
 

Changing Subnet mask

Post by John Kotche » Mon, 18 Jan 1999 04:00:00



> > Does anyone know how to change the subnet mask for solaris on a sun machine?

> Change '/etc/netmasks' and reboot.  You can also use '/sbin/ifconfig'.

> Lance Woodson

Lance, don't take this the wrong way, but.....

A reboot is _not_ necessary.  This is Unix, you only reboot as a last
ditch effort.  The fix is in 2 parts.  I call them "Fix it now" and
"Fix it forever".  You use both to avoid the reboot.

Fix it now:
ifconfig <interface> netmask <value> broadcast +

Fix it forever:
Option A:
Tweak /etc/netmasks file as appropriate

Option B:
Add a file /etc/rc2.s/S73localnet and add the
command from the "Fix it now" step.

--
************************************************************
* A goofy Unix SA working for a large computer equipment   *
* manufacturer and  services provider.  Opinions expressed *

************************************************************