Howto find the data and management IP address

Can anyone help me to find the data and management IP address on a IBM unix server without looking at the /etc/hosts file. sometimes the hosts file may not make it obvious between the data & mgmt ip addresses. thanks

Are you talking about a HACMP cluster?

Perhaps netstat -na might give you more of a clue. Look for IP addresses that don't have a default route defined for them.

Of course, that's is still no guarantee. You need to tell us a bit more about what the server does, is it:-

  • HACMP (probably most likely)
  • Oracle RAC
  • SAN connections
  • Private networks for database connections
  • GFS
  • Something else?

We might then be able to steer you to find the answers you are looking for.

Robin

At my company we have many unix servers hosting oracle databases. The unix servers have many NIC interfaces to allow access to the server via putty for db admin staff like me or access to the database for applications. Typically each server will have a management lan and a data lan attached to each NIC. To connect via putty to the server I have to specify an IP address. I just need to know is there an easy way to identify the data & management IP addresses. Most of the times the /etc/hosts file has this info with comments that make this obvious, other times this info is not readily available and in this instance how do I find this info ?
Many thanks in advance for your help.

You would probably need to investigate your RAC configuration.

Basically, the answer is: no. A UNIX host doesn't deal with "management-", "data-" or "other-" NICs, one NIC is just like the other to it. What makes one interface a "data-interface" and the other a "mangement-interface" is just the way you use it - the system has no knowledge about that.

Having said this: it is quite common that the LAN has special segments for different purposes, so your request is quite understandable. Even if there is no explicit way to do this there might be implicit ways which may work in your case better or less good.

Usually, LAN segments have different IP address ranges and are connected only via routers. Observe the subnet mask of the various IP interfaces to know the host-part and the net-part of the address: you need to convert the subnet mask to binary. The part with ones is the net part, the one with the zeroes the host part. Here is an example: determine if IP1 and IP2 are on the same subnet:

IP1: 10.15.3.5
IP1: 10.15.129.3
SNM: 255.255.128.0

SNM: 11111111.11111111.100000000.00000000
          net part <---||---> host part
IP1: (10)    .(15)    .000000011.(5)
IP2: (10)    .(15)    .100000001.(3)

You see, they are not on the same subnet, because the net part differs in the last bit: a "0" in IP1, a "1" in IP2.

In most cases all the "data-NICs" are in one subnet, all the management-NICs in another, all the "backup-NICs" in a third, etc.. Observing serveral different servers might give you a clue what is what.

Another possibility is to check the DB-configuration itself: check the listener-configuration and tnsnames.ora to see which interface the DB uses for its outgoing data. This, obviously, is the "data-NIC".

You can also use the netstat utility to find all the ports behind which services are listening. netstat -an will also give you hints about the involved network connections and you might find that all the ssh-sessions go over one NIC (perhaps the "management-NIC"), whereas the listeners are connected via the other NIC (this hints at being the "data NIC"), while a connection to the TSM server is using the third NIC (perhaps for backup/restore/collecting archive logs).

With some creativity you might find even more ways. Still, for the system itself any interface is like the other and there is no (principal) difference between them save for the use you make of it.

I hope this helps.

bakunin