Skip to main content

vserver services name-service getxxbyyy gethostbyname

Contributors
Suggest changes

Gets the IP address information from host name.

Availability: This command is available to cluster administrators at the advanced privilege level.

Description

The ` vserver services name-service getxxbyyy gethostbyname ` gets the IP address by using the host name. The underlying service for doing the lookup is selected based on the configured name service switch order. When the look up happens from the hosts file, only the first IP address is returned for a host configured with multiple IP addresses.

Parameters

-node {<nodename>|local} - Node Name (privilege: advanced)

Node Use this parameter to specify the node where the lookup will be performed

-vserver <vserver name> - Vserver Name (privilege: advanced)

Vserver Name Use this parameter to specify the Vserver where the lookup will be performed

-hostname <text> - Host Name (privilege: advanced)

Use this parameter to specify the Hostname for which the IP address information is requested

[-show-source {true|false}] - Source used for Lookup (privilege: advanced)

Use this parameter to specify if source used for lookup needs to be displayed

Examples

The following example requests IP Address information from the given hostname

cluster1::*> vserver services name-service getxxbyyy gethostbyname -node cluster1-01 -vserver vs1 -hostname localhost -show-source false
  Host name: localhost
  Canonical name: localhost
  IPv4: 127.0.0.1