Finding cluster ip address on SLES



Slightly off topic here and I'm not sure if it's the same story when using oracle clusterware (i guess it is - but nowhere to test it out for the moment) but it seems that good old ifconfig does not actually display cluster ip address in it's output on linux. I don't know if this is a new thing or if it has always been this way but it was a surprise to me when I'm used to seeing this information displayed on AIX.

As an example on AIX  the following command shows me all the ip addresses running on the system


ifconfig -a
en8: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,CHAIN>
        inet x.x.x.x netmask 0xfffff800 broadcast x.x.x.x
        inet x.x.x.x netmask 0xfffff800 broadcast x.x.x.x
        inet x.x.x.x netmask 0xfffff800 broadcast x.x.x.x
        inet x.x.x.x netmask 0xfffff800 broadcast x.x.x.x5
        inet x.x.x.x netmask 0xfffff800 broadcast x.x.x.x
        inet x.x.x.x netmask 0xfffff800 broadcast x.x.x.x
 some output removed here......


So we have a normal ip address and multiple cluster addresses - all fine

However when i try this on linux i get

ifconfig -a
Absolute path to 'ifconfig' is '/sbin/ifconfig', so it might be intended to be run only by user with superuser privileges (eg. root).
-bash: ifconfig: command not found


Ok - thats annoying to start with - so if i try the full path

/sbin/ifconfig -a
bond0     Link encap:Ethernet  HWaddr A0:B3:CC:EB:95:58
          inet addr:x.x.x.x  Bcast:x.x.x.x  Mask:255.255.255.0
           UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:992747840 errors:0 dropped:0 overruns:0 frame:0
          TX packets:846653127 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:162594677125 (155062.3 Mb)  TX bytes:376461468132 (359021.6 Mb)


So only one address - when i know there is an extra one

It seems this is normal behaviour and if you want to see the other address yopu have to use this command

ip addr show bond0

9: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether a0:b3:cc:eb:95:58 brd ff:ff:ff:ff:ff:ff
    inet x.x.x.x/24 brd x.x.x.x scope global bond0
    inet x.x.x.x/24 brd x.x.x.x scope global secondary bond0
          valid_lft forever preferred_lft forever


And then you can see them all - so it's easy once you know but yet another subtle difference between operating systems to remember

Comments