1833848 Members
2239 Online
110063 Solutions
New Discussion

Subnetmask on MC/SG

 

Subnetmask on MC/SG

Dear all,

I have 2 Lan Segments in my site and now I need to use the netmask 255.255.254.0. And when you configure SUBNET in MC/SG you specify only the Network address, you can't specify the netmask above. I would like to know if someone already configure the SUBNET in MC/SG to netmask different from 255.255.255.0.

Thanks

Tania
If you want something, you need to persist to get that.
9 REPLIES 9
melvyn burnard
Honored Contributor

Re: Subnetmask on MC/SG

You do not specify netmasks in SG config.
this sets up your subnets, and the subnet you need to specify can be obtained by doing netstat -in

use the subnet[s] as they are shown with their network address from this output
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Vijeesh CTK
Trusted Contributor

Re: Subnetmask on MC/SG


hi

In MCSG config there in need to specify sybnet mask.There only we can find subnets only.

CTK
Frederic Sevestre
Honored Contributor

Re: Subnetmask on MC/SG

Hi,

You don't have to configure the subnet for MC/SG but if you are using an IP for a package on this subnet and if you want to monitor it, edit the package's control file and modify the SUBNET parameter :

# IP ADDRESSES
# Specify the IP and Subnet address pairs which are used by this package.
# Uncomment IP[0]="" and SUBNET[0]="" and fill in the name of your first
# IP and subnet address. You must begin with IP[0] and SUBNET[0] and
# increment the list in sequence.
#
# For example, if this package uses an IP of 192.10.25.12 and a subnet of
# 192.10.25.0 enter:
# IP[0]=192.10.25.12
# SUBNET[0]=192.10.25.0 # (netmask=255.255.255.0)
#
# Hint: Run "netstat -i" to see the available subnets in the Network field.
#
# IP/Subnet address pairs for each IP address you want to add to a subnet
# interface card. Must be set in pairs, even for IP addresses on the same
# subnet.
#
Crime doesn't pay...does that mean that my job is a crime ?
Steve Lewis
Honored Contributor

Re: Subnetmask on MC/SG

I have seen this problem too.

The only way to build the cluster is to temporarily change your subnet mask to
255.255.255.0 on all lan interfaces,
modify the cluster configuration file to put in the networks as aaa.bbb.ccc ,
then build the cluster,
then bring up the cluster,
then reset your subnet masks to 255.255.254.0

I know it shouldn't be like that, since MCSG should work irrespective of netmask, but I have come across this problem on several different systems and the above solution works for me.
Sanjay_6
Honored Contributor

Re: Subnetmask on MC/SG

Hi Tania,

This is my opinion. You are definig a subnet and the ip address for the package. The netmask for this ip address would be the same as that of the lan card configured on your system with this subnet.

Hope this helps.

Regds

Re: Subnetmask on MC/SG

Dear Guys,

I understood that I need only to specify in MC configuration the subnet that is shown by "netstat -ni", and The NETMASK is configured on NETCONF file, isn't it?

Thanks
If you want something, you need to persist to get that.
Stephen Doud
Honored Contributor

Re: Subnetmask on MC/SG

Hello Tania,

The subnet mask is of course a filter for a range of IP addresses that the LAN adapter will be interacting with. The mask is set in the /etc/rc.config.d/netconf file as you stated.

The SUBNET the LAN card will be on is listed on lanscan output:
# netstat -in
Name Mtu Network Address Ipkts Opkts
lan0:1 1500 15.44.48.0 15.44.49.77 212971 0
(Note 15.44.48.0)

The subnet should be added to the package ASCII file (if the SUBNET should be monitored for an outage to fail the package over):

SUBNET 15.44.48.0

The SUBNET should also be listed in the package control script to identify the proper LAN adapter to assign the relocatable IP to:

IP[0]="15.44.49.77"
SUBNET[0]="15.44.48.0"

The cluster ASCII file only references real IPs, no SUBNETs or masks are mentioned.

-s.
Sanjay_6
Honored Contributor

Re: Subnetmask on MC/SG

Hi Tania,

The netmask for the package ip would be same as the netmask for the network port configured within that subnet on the system.

The SUBNET variable in the package conf file for SG to monitor that subnet. If the subnet is down the package will be failed over.

Hope this helps.

Regds
Bernhard Mueller
Honored Contributor

Re: Subnetmask on MC/SG

Everybody,

unbelievably I found this thread the only one relating directly to the issue that in MC/SG config you cannot specify a subnet mask.

Tania, I hope you solved the problem last year, anyway this is to share the following. (Just in case s.o. like me tries the same search in the future.)

Actually I just had a real problem with that because the broadcast IP which SG "calculated" was actually the IP of a router's IF. (Not my config...)

So I made up this set_netmask script which I run as "customer_defined_run_command" in the package.

Regards,
Bernhard

#!/bin/sh
#
# 27-Aug-2003 bmr - MX FFM
#
# Script for use in MC/SG to set correct subnet mask
# for non-default network masks
# run as "customer_defined_run_command"
#
LANG=C
PATH=/usr/bin:/usr/sbin:/sbin:/usr/contrib/bin
#
# enter package IP address and subnet mask
IP=10.2.4.79
NETMASK=255.255.252.0
#
# check that IP is correct:
if [ `netstat -rn | grep -c $IP` -eq 0 ] ; then
echo "\nWARNING IP address $IP is NOT in use"
echo "Check $0 and Package Config for consistency\n"
exit 1
fi
# this sets correct netmask
INST=`netstat -rn | grep "^${IP}" | awk '{print $5}'`
ifconfig $INST inet $IP netmask $NETMASK
exit