Directly manipulates address-mapping entries in the system configuration database.
To Add an Address-to-Host Name Mapping
hostmap -addr IPAddress -host HostName...
To Delete an Address-to-Host Name Mapping
hostmap -rm IPAddress
To Show all Address-to-Host Name Mappings
hostmap -ls
The hostmap low-level command adds, deletes, or lists address-mapping entries in the system configuration database. Entries in the database are used to map an Internet Protocol (IP) address (local or remote) to its equivalent host names.
An Internet Protocol (IP) address of a given local or remote host may be associated with one or more host names. Represent a host name as a string with a maximum length of 255 characters, and do not use any blank characters.
Flag name | Description |
---|---|
-addr IPAddress | Adds an IP address-to-host name mapping entry for the given Internet Protocol address in the database. Specify the host names with the -host flag. |
-host HostName... | Specifies a list of host names. Entries in the list should be separated by blanks. |
-ls | Shows all entries in the database. |
-rm IPAddress | Deletes the IP address-to-host name mapping entry in the database that corresponds to the given address specified by the IPAddress variable. |
hostmap -addr 192.100.201.7 -host alpha bravo charlie
The
IP address 192.100.201.7 is specified as the address of the host that
has a primary host name of alpha with synonyms of bravo and charlie. hostmap -ls
hostmap -rm 9.126.85.102
The system displays the following error message with return code 78:
The requested operation is not allowed because partition is a member of "test_cluster" cluster.
Interface being used is "en0" ("inet" Family) for cluster communication.