cancel
Showing results for 
Search instead for 
Did you mean: 

How to show cluster ids on a physical network

Hello.

We are looking for a way to discover all cluster ids visible on the physical network in order to choose a unique id.

How can we do this?

Regards,

Carlyle

1 Solution

Accepted Solutions
Accepted Solution!

I sincerely thank you all for

I sincerely thank you all for trying to help. My final solution is as follows.

 

First I used tcpdump to gather the llt broadcasts and cut out the MAC addresses and the cluster IDs.

<code>tcpdump -a -X -c 1000 broadcast and ether proto 0xcafe 2>/dev/null |
sed -n '
/^[012][0-9]:/{
    s/^[^ ]* \([^ ]*\) .*/\1/
    h
    n
    s/^[  ][  ]*[^ ]*  *[^ ]*  *\([^ ]*\) .*$/\1/
    H
    g
    s/\n/ /
    p
}
' | sort -uk2</code>

This would actualy have been enough to answer my original question but I was curious which clusters have which IDs.

Then I used arp to gather the MAC addresses together with the IP information. Of course I needed to feed the arp cache on the local server first so I chose to use a SYN request in perl.

<code>function sshping
{
typeset -x SERVER=$1
typeset -x PORT=22
        [[ -n $2 ]] && PORT=$2

        /usr/bin/perl -w -e '
        use strict;
        use Net::Ping;
        use Socket;

        my $ip;
        my $host = $ENV{"SERVER"};;
        my $packed_ip = gethostbyname($host);
        if (defined $packed_ip) {
                        $ip = inet_ntoa($packed_ip);
        } else {
                        print "$host ssh port is unreachable.\n";
                        exit( 1 );
        }
        my $p = Net::Ping->new("tcp", 6);

        $p->{port_num} = $ENV{"PORT"};

        if( $p->ping($ip) ) {
          print "$host port $p->{port_num} is reachable.\n";
          exit( 0 );
        } else {
          print "$host port $p->{port_num} is unreachable.\n";
          exit( 1 );
        }
        '
}
i=1;while ((i<255)) ; do sshping 10.217.130.$i >/dev/null 2>&1 ; ((i+=1)) ; done</code>

Then I was ready for my arp requst.

<code>arp -a | tr -d '][)(' | sed -n '
        /ethernet/{
                s/\([ :]\)\([0-9]\)\([ :]\)/\10\2\3/g
                s/at //
                s/ ethernet .*$//
                p
        }
'</code>

View solution in original post

7 Replies

You can use "lltconfig -N" -

You can use "lltconfig -N" - see extract from 6.1 man page:

       -N     List all the used cluster ids in the network.

              This option must not be used when LLT is configured. This option
              may not list all the cluster ids if the LLT broadcast message
              frequency on the remote clusters is decreased or if the LLT
              broadcast feature is disabled.

You can also use download at https://www-secure.symantec.com/connect/downloads/find-cluster-id-script

Mike

If you try to configure SFHA

If you try to configure SFHA using installer script, it will ask to "check for unique cluster id" in a network. 

# lltconfig -N lltconfig:

# lltconfig -N
lltconfig: illegal option -- N
LLT lltconfig ERROR V-14-2-15010 usage: lltconfig
 

# find_cluster_id.sh -n

# find_cluster_id.sh
-n Counting 50 Heartbeats
find_cluster_id.sh[51]: snoop:  not found
find_cluster_id.sh[52]: snoop:  not found

Cluster and Node ID's detected.
-------------------------------
cat: cannot open /tmp/fndclid.out

-N option is available on

-N option is available on 6.x, so you must have a lower version.
If script is using snoop, then this will probably only work on Solaris.
So if you do not have access to 6.x system or a Solaris system, then other option as Novonil says is to run the vcsinstaller which you MAY be able to run with option to makeresponse file so that installer doesn't actually do anything.

Mike

check

check  /etc/llttab:

 

 

bash-3.2# more /etc/llttab
set-node t5120a
set-cluster 44353                        <<<<<<<<<<<<<cluster id
link e1000g2 /dev/e1000g:2 - ether - -
link e1000g3 /dev/e1000g:3 - ether - -

Accepted Solution!

I sincerely thank you all for

I sincerely thank you all for trying to help. My final solution is as follows.

 

First I used tcpdump to gather the llt broadcasts and cut out the MAC addresses and the cluster IDs.

<code>tcpdump -a -X -c 1000 broadcast and ether proto 0xcafe 2>/dev/null |
sed -n '
/^[012][0-9]:/{
    s/^[^ ]* \([^ ]*\) .*/\1/
    h
    n
    s/^[  ][  ]*[^ ]*  *[^ ]*  *\([^ ]*\) .*$/\1/
    H
    g
    s/\n/ /
    p
}
' | sort -uk2</code>

This would actualy have been enough to answer my original question but I was curious which clusters have which IDs.

Then I used arp to gather the MAC addresses together with the IP information. Of course I needed to feed the arp cache on the local server first so I chose to use a SYN request in perl.

<code>function sshping
{
typeset -x SERVER=$1
typeset -x PORT=22
        [[ -n $2 ]] && PORT=$2

        /usr/bin/perl -w -e '
        use strict;
        use Net::Ping;
        use Socket;

        my $ip;
        my $host = $ENV{"SERVER"};;
        my $packed_ip = gethostbyname($host);
        if (defined $packed_ip) {
                        $ip = inet_ntoa($packed_ip);
        } else {
                        print "$host ssh port is unreachable.\n";
                        exit( 1 );
        }
        my $p = Net::Ping->new("tcp", 6);

        $p->{port_num} = $ENV{"PORT"};

        if( $p->ping($ip) ) {
          print "$host port $p->{port_num} is reachable.\n";
          exit( 0 );
        } else {
          print "$host port $p->{port_num} is unreachable.\n";
          exit( 1 );
        }
        '
}
i=1;while ((i<255)) ; do sshping 10.217.130.$i >/dev/null 2>&1 ; ((i+=1)) ; done</code>

Then I was ready for my arp requst.

<code>arp -a | tr -d '][)(' | sed -n '
        /ethernet/{
                s/\([ :]\)\([0-9]\)\([ :]\)/\10\2\3/g
                s/at //
                s/ ethernet .*$//
                p
        }
'</code>

View solution in original post