Monday, March 4, 2013

ONS Client Connections

On 11gR2 the onsctl debug output shows the clients IP subscribe to ONS in the client connection section (unlike in 11gR1). The IP is listed in ipv6 format.
Client connections:

   ID            CONNECTION ADDRESS              PORT  FLAGS  SENDQ REF SUB W
-------- --------------------------------------- ----- ------ ----- --- --- -
       1                                internal     0 01008a 00000 001 002
       2                               127.0.0.1  6100 01001a 00000 001 001
       5                               127.0.0.1  6100 01001a 00000 001 000
    10b3 0000:0000:0000:0000:0000:ffff:c0a8:0042  6200 09002a 00000 001 000
 request                               127.0.0.1  6100 03201a 00000 001 000
Converting above connecting IP into IPv4 gives 192.168.0.66. If the connecting client IP is known to be of IPv4 then use last 8 values to find the IPv4 by grouping them into groups of two and converting from hexadecimal to decimal.
c0a8:0042  <-- Last 8 values
c0 | a8 | 00 | 42 <-- group into blocks of two
192 | 168 | 0 | 66  <-- converted from hexadecimal to decimal
This is useful in identifying FCF related issues to know if clients are indeed subscribed to ONS or not


Useful metalink notes
The ONS Daemon Explained In Oracle Clusterware/RAC Environment [ID 759895.1]