mktcpip – Sets the required values for starting TCP/IP on a host.
Synopsis
This module sets the required minimal values required for using TCP/IP on a host machine.
These values are written to the configuration database.
Requirements
The below requirements are needed on the host that executes this module.
AIX >= 7.1 TL3
Python >= 3.6
Privileged user with authorization: aix.network.config.tcpip
Parameters
- hostname (True, str, None)
Sets the name of the host.
- address (True, str, None)
Sets the Internet address of the host.
- interface (True, str, None)
Specifies a particular network interface.
- netmask (optional, str, None)
Specifies the mask the gateway should use in determining the appropriate subnetwork for routing.
- gateway (optional, str, None)
Adds the default gateway address to the routing table.
- nameserver (optional, str, None)
Specifies the Internet address of the name server the host uses for name resolution.
- domain (optional, str, None)
Specifies the domain name of the name server the host should use for name resolution.
- start_daemons (optional, bool, False)
Starts the TCP/IP daemons.
Notes
Note
The mktcpip command currently supports IPv4 only.
The /etc/resolv.conf file on your system contains the default system configuration database.
The /etc/hosts file on your system contains the host name and IP address entries.
You can refer to the IBM documentation for additional information on the commands used at https://www.ibm.com/support/knowledgecenter/ssw_aix_72/m_commands/mktcpip.html.
Examples
- name: Set the required values for starting TCP/IP
mktcpip:
hostname: fred.austin.century.com
address: 192.9.200.4
interface: en0
nameserver: 192.9.200.1
domain: austin.century.com
start_daemons: true
Return Values
- msg (always, str, Command ‘mktcpip -h quimby01.aus.stglabs.ibm.com -a 9.3.149.150 -i en1’ successful.)
The execution message.
- cmd (always, str, )
The command executed.
- rc (When the command is executed., int, )
The command return code.
- stdout (always, str, en1n quimby01.aus.stglabs.ibm.comn inet0 changedn en1 changed)
The standard output.
- stderr (always, str, en1n x.x.x.x is an invalid address.n /usr/sbin/mktcpip: Problem with command: hostent, return code = 1n)
The standard error.
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.