Tuesday, August 30, 2011

chhmc - to change the HMC network configuration or to enable and disable remote command execution

The chhmc command is used to change the HMC network configuration or to enable and disable remote command execution:

chhmc -c [network | ssh] -s [enable | disable | add | modify | remove]
[ -i ethØ | eth1 [ -a ip-address ] [ -nm network-mask ]]
[ -d network-domain-name ] [ -h host-name ]
[ -g gateway ] [ -ns DNS-Server ] [ -ds Domain-suffix ]
[ —help ]

where:
• -c – the type of configuration to modify. Valid values are ssh and network.
• -s – the new state value of the configuration. When the configuration type is ssh, the valid values are enable and disable. When the configuration type is network, the valid values are add, modify, and remove. Add and remove are valid only when specifying -ns or -ds.
• -i – the interface to configure. Valid values are eth0 and eth1. This parameter can be used only with -s modify.
• -a – the new network IP address. This parameter can be used only with the -i parameter.
• -nm – the new network mask. This parameter can be used only with the -i parameter.
• -d – the new network domain name. This parameter can be used only with -s modify.
• -h – the new host name. This parameter can be used only with -s modify.
• -g – the new gateway address. This parameter can be used only with -s modify.
• -ns – the DNS server to add or remove. This parameter can be used only with -s add or -s remove.
• -ds – the domain suffix to add or remove. This parameter can be used only with -s add or -s remove.
• -help – prints a help message.

The following are examples of the usage of this command.

To add and remove another domain suffix search other than mycompany.corp:

[hmcusr@hmcproj hmcusr]$ lshmc -n
Network Configuration:
Host Name: hmcproj
TCP/IP Interface Ø Address: 192.168.2.53
TCP/IP Interface Ø Network Mask: 255.255.255.Ø
Default Gateway: 192.168.2.254
Domain Name: mycompany.com
DNS Server Search Order: 192.168.2.6
Domain Suffix Search Order: mycompany.corp

[hmcusr@hmcproj hmcusr]$ chhmc -c network -s remove -ds mycompany.corp

[hmcusr@hmcproj hmcusr]$ lshmc -n
Network Configuration:
Host Name: hmcproj
TCP/IP Interface Ø Address: 192.168.2.53
TCP/IP Interface Ø Network Mask: 255.255.255.Ø
Default Gateway: 192.168.2.254
Domain Name: mycompany.com
DNS Server Search Order: 192.168.2.6
Domain Suffix Search Order: 

Example:


chhmc