On Wed, 23 Aug 2006, Andrew Beekhof wrote:
> On 8/23/06, Serge Dubrouski <[EMAIL PROTECTED]> wrote:
> > You are wrong. If you take a look at IPAddr from 2.0.7 you can seet this
> > code:
> >
> > IFCMD="$FINDIF $ipaddr/$netmask_bits/$iface_base/$broadcast"
> > NICINFO=`$IFCMD`
> >
> > rc=$?
> > if [ $? -eq 0 ]; then
> > netmask_text=`echo "$NICINFO" | cut -f2`
> > broadcast=`echo "$NICINFO" | cut -f3`
> > ....................................
> >
> > *)
> > CMD="$IFCONFIG $iface $ipaddr $netmask_text $broadcast"
> > ;;
> >
> >
> > It does not exist in the current CVS version. And script doesn't work
> > correctly because ifconfig under Linux wants regular netmask not cidr.
>
> Does every OS support the "regular" netmask?
The Solaris case.
It generally uses commands such as:
ifconfig le0:1 inet 1.2.3.4 netmask 255.255.255.128
(the word "inet" is optional).
It also seems to allow:
ifconfig le0:1 inet 1.2.3.4/25
and this achieves (as would be hoped!) the same result.
Alas, I'm not in a position to test CVS right now. But does this email
thread suggest that you want to try:
ifconfig le0:1 inet 1.2.3.4 netmask 25
?
The result of that ("ifconfig -a") is wild! Not the expected:
le0:1 [...] netmask ffffff80 [...]
but rather:
le0:1 [...] netmask 19 [...]
Summary: Soalris seems to accept either separate, dotted-notation "inet"
and "netmask" clauses, or a combined "inet #.#.#.#/n" specification.
Did I understand the question correctly? Feel to ask me "try this command
(or command template) and let us know the result".
--
: David Lee I.T. Service :
: Senior Systems Programmer Computer Centre :
: Durham University :
: http://www.dur.ac.uk/t.d.lee/ South Road :
: Durham DH1 3LE :
: Phone: +44 191 334 2752 U.K. :
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/