AIX

 View Only
  • 1.  lsattr Command and ODM Database

    Posted Thu November 06, 2008 09:44 AM

    Originally posted by: SystemAdmin


    Hi,

    Seems like the question in my previous post was not phrased properly. But anyways, now I would like to know something about the lsattr command and the ODM Database.

    I ran the "lsattr -El en1" command the AIX machine which is a cluster node. There are two IP Addresses for Resource Groups (Virtual IP Addresses) on that interface (en1) and one more IP Address (i.e. Total 3). This command returns the third IP Address (not one of the Resource Groups) as value of its "netaddr" attribute. Is it correct to assume that this is the Physical IP address of this interface?

    And hence,
    #1 In general can we assume that the value returned by the "lsattr -El <interface name>" command will return the Physical IP Address of the interface?

    #2 If there are multiple IP Addresses configured for a particular interface, which I believe are returned as values of the "alias4" attribute through the "lsattr -El <interface name>" command, then is there any other command to find those IP Address? In short, I want to find out the IP Addresses, which can be pinged successfully.

    Hoping for few replies this time as a different point of view is always helpful even though we don't have a concrete answer.

    Thanks in advance.

    Regards,
    Chaitanya


  • 2.  Re: lsattr Command and ODM Database

    Posted Thu November 06, 2008 10:08 AM

    Originally posted by: nh4aix


    Hi there...

    you asked:

    #1 In general can we assume that the value returned by the "lsattr -El <interface name>" command will return the Physical IP Address of the interface?

    Response: Yes, it has been my experience that "lsattr -El enX" will give you the physical IP address. It will not give you any aliases.

    #2 If there are multiple IP Addresses configured for a particular interface, which I believe are returned as values of the "alias4" attribute through the "lsattr -El <interface name>" command, then is there any other command to find those IP Address? In short, I want to find out the IP Addresses, which can be pinged successfully.

    Response: I like the "netstat -i" command to see all of the interfaces with the aliases assocated with each one. I have colleagues that like "ifconfig -a". They both give you similar info, but I find netstat easier to read. The man pages for netstat are at http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.cmds/doc/aixcmds4/netstat.htm?resultof=%22%6e%65%74%73%74%61%74%22%20

    Good luck...

    joe


  • 3.  Re: lsattr Command and ODM Database

    Posted Thu November 06, 2008 04:56 PM

    Originally posted by: tom-aixadmin


    hctunx110$ lsattr -El en0 -a alias4 -a netaddr
    alias4 111.222.19.82,255.255.252.0 IPv4 Alias including Subnet Mask True
    netaddr 111.222.19.246 Internet Address True
    hctunx110$ lsattr -El en0 -a alias4 -a netaddr|sed 's/,/ /'|awk '{print $2}'
    111.222.19.82
    111.222.19.246

    you appear to be on the right track, I'm not sure if I'm not understanding your question.. what addresses would you want that may not be in the lsattr output?

    It IS possible for addresses to not be in the ODM.. (if you use ifconifg to change your running system, those dynamic changes don't get stored in the ODM, thus are lost after a reboot.

    to see the running system, use netstat or ifconfig. as indicated in previous message.

    Tom


  • 4.  Re: lsattr Command and ODM Database

    Posted Sun November 09, 2008 11:13 AM

    Originally posted by: SystemAdmin


    Thank you for your answers Joe and Tom. I appreciate the answers.

    Actually I want to find the IP addresses which are not associated to the Service IP Labels (Addresses) of the cluster resource groups. I was wondering if it is possible to achieve this through any of the commands. But I guess I can achieve this through a combination of the ifconfig, netstat and lsattr.

    I would appreciate if anyone posts a better way to achieve the above.

    Thanks,
    Chaitanya :)