SUMMARY: ifconfig on Solaris 8

From: UnixAdmin <sunixadm_at_yahoo.com>
Date: Wed Apr 03 2002 - 01:52:34 EST
Hi Managers,

I received quite a few answers/suggestions regarding
my issue with ifconfig.  I would like to thanks all
who responded and a special thanks goes to Fabrice
Guerini, who suggested changing my entry in
/etc/netmasks from 10.192.2.0 to 10.192.0.0.  I did
this and the correct broadcast address displays after
a reboot.  The other answers/suggestions worked but,
none held after the reboot which I contribute to the
entry in the netmasks.  What's strange is that the
entry for my primary network isn't xxxx.xxxx.0.0 but
xxxx.xxxx.xxx.0 and the broadcast is still correct
with a netmask of 255.255.248.0.  

Below are the responses I received as well as my
original message.

Thanks again to all who responded.

-Joe


Rick Place:
Try adding the broadcast definition to your ifconfig
command, i.e.

# ifconfig hme0:1 plumb 10.192.2.70 netmask
255.255.248.0 broadcast + 
up

The "+" tells it to use the default broadcast address
based on your netmask.


Larry Snyder:
Try:
# ifconfig hme0:1 10.192.2.70 netmask 255.255.248.0
broadcast + up


Steve Mickeler:
The answer is "man ifconfig"


ifconfig hme0:1 plumb
ifconfig hme0:1 10.192.2.70 netmask + broadcast + up

>From ifconfig(1M)

If a "+" (plus sign) is given for the  netmask  value,
  the
     mask  is looked up in the  netmasks(4) database.


The  default  broadcast
address is the address with a host part of all 1's.  A
"+"  (plus  sign) given for the broadcast value causes
the  broadcast  address  to  be  reset  to  a  default
appropriate  for  the  (possibly new) address and net-
mask.


Michael Hocke:
Use 'broadcast +' in your ifconfig command and it will
set the correct
broadcast address:

# ifconfig eri0:1 10.192.2.70 netmask 255.255.248.0
broadcast +
# ifconfig -a
...
eri0:1:
flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu
1500 index 
2
        inet 10.192.2.70 netmask fffff800 broadcast
10.192.7.255
...

Thomas_J_Jones:
Try setting your broadcast, ie: # ifconfig hme0:1
10.192.2.70 netmask
255.255.248.0 broadcast + up

Fabrice Guerini:
So would I, except that your network number, for this
netmask and 
address 
range is 10.192.0.0. Try putting this in your
/etc/netmasks:

10.192.0.0 255.255.248.0

Darren Dunham:
How about the man page?
You didn't set the broadcast address...  'netmask' and
'broadcast' are
separate keywords.  Setting one does not set the
other.

You can avoid doing all that work in the future simply
by creating a
"/etc/hostname.hme0:1" file with the IP address (or
hostname) inside.

The scripts that activate it do the equivalent of
this..

ifconfig <interface> plumb up inet <name> netmask +
broadcast +

The '+' bit means to look at /etc/netmasks for the
address or mask to 
be
used.  Without that, it'll use the pre-cidr
expectation that 10.x is a
class A address.


matthew zeier:
Try:

ifconfig hme0:1 10.192.2.70 netmask 255.255.248.0
broadcast + up

However, on Solaris 8,  you can do:

ifconfig hme0 addif 10.192.2.70 netmask 255.255.248.0
broadcast + up

And let the OS figure out the virtual interface
instance.


Dan Astoorian:
Try inserting "broadcast +" in the ifconfig command,
just before "up".

You can also probably use "netmask +" instead of
"netmask 
255.255.248.0"
if you want, since you've entered the subnet into your
/etc/netmasks
file.

Hope this helps.


Nathan W. Lindstrom:
Just specify the broadcast address on the ifconfig
line, for example:

# ifconfig hme0:1 10.192.2.70 netmask 255.255.248.0
broadcast 
10.192.7.255
up




--- UnixAdmin <sunixadm@yahoo.com> wrote:
> Hi Managers,
> 
> I am trying to add an additional IP Address to a NIC
> on an Ultra 10 running SOlaris 8.
> 
> The commands I am running are:
> # ifconfig hme0:1 plumb
> # ifconfig hme0:1 10.192.2.70 netmask 255.255.248.0
> up
> 
> When I do ifconfig hme0:1 I get:
> 
> hme0:1:
> flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
> mtu
> 1500 index 2
> inet 10.192.2.70 netmask fffff800 
> broadcast 10.255.255.255
> 
> The entries in /etc/netmasks is:
> 10.192.2.0 255.255.248.0
> 139.7.156.0 255.255.248.0
> 
> What bothers me is the broadcast address.  Using a
> netmask of 255.255.248.0, I would expect a broadcast
> of 10.192.7.255.  I have looked on docs.sun.com and
> sunsolve but didn't find anything that helped.
> 
> Thanks in advance for the help.
> 
> -Joe
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Apr 3 00:53:21 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:39 EST