subscribe iconSubscribe to this information

mktcpip command

Purpose

Sets the required values for starting TCP/IP on a host.

Syntax

mktcpip -hostname HostName -inetaddrAddress -interfaceInterface [ -start] [ -netmaskSubnetMask ] [ -cabletype CableType ] [ -gateway Gateway ] [ -nsrvaddrNameServerAddress -nsrvdomain Domain ]

To run stateless autoconfiguration of link-local addresses:

mktcpip [-interface Interface] -auto

To add a static IPv6 address:

mktcpip -interfaceInterface -inetaddr IPv6 address [-plenPrefixLen] [-gatewaygateway]

Description

The mktcpip command sets the minimal values required for using TCP/IP on a host machine. The basic functions of the mktcpip command include the following:
  • Setting the host name
  • Setting the IP address of the interface
  • Setting the domain name and IP address of the nameserver, if applicable
  • Setting the subnetwork mask, if applicable
  • Starting the specified TCP/IP daemons

Flags

-auto Enables automatic stateless configuration of link-local addresses. Link-local addresses can coexist with other preexisting IPv6 addresses. Therefore, if an address is assigned using the -auto flag, it will not replace existing IPv6 addresses.
-cabletype CableType Specifies the cable size for Standard Ethernet or IEEE 802.3 Ethernet networks. Valid values for the CableType variable are dix for thick cable, bnc for thin cable, or N/A for not applicable. The -cabletype CableType flag should be used only for Standard Ethernet (en) and IEEE 802.3 Ethernet (et) interfaces. The default is N/A.
-gateway Gateway Sets the gateway address for a static route. Specify the address in dotted decimal notation.
-hostname Hostname Sets the name of the host. If using a domain naming system, the domain and any subdomains must be specified. The following is the standard format for setting the host name:
hostname
The following is the standard format for setting the host name in a domain naming system:
hostname.subdomain.subdomain.rootdomain
-inetaddr Address Sets the Internet address of the host. Specify the address in dotted decimal notation. Each network interface on the host should have a unique Internet address. The following is the standard format for setting the Internet address:
127.10.31.2
-interface Interface Specifies a particular network interface, for example:
en1
-netmask SubnetMask Specifies the mask that the gateway should use in determining the appropriate subnetwork for routing. The subnet mask is a set of 4 bytes, as in the Internet address. The subnet mask consists of high bits (1s) corresponding to the bit positions of the network and subnetwork address, and low bits (0s) corresponding to the bit positions of the host address.
-nsrvaddr NameserverAddress Specifies the Internet address of the name server that the host uses for name resolution, if applicable. The address should be entered in dotted decimal notation, as follows:
127.1.0.1
-nsrvdomain Domain Specifies the domain name of the name server that the host should use for name resolution, if any. The domain name should be in the following format:
subdomain.subdomain.rootdomain
-plen prefixLen Specifies the prefix length of the IPv6 interface.
-start Starts the TCP/IP daemons.

Exit Status

See Exit status for Virtual I/O Server commands.

Examples

  1. To set the required values for starting TCP/IP, type:
    mktcpip -hostname fred.austin.century.com -inetaddr 192.9.200.4 -interface en0 \
    -nsrvaddr 192.9.200.1 -nsrvdomain austin.century.com -start
  2. To set the required values for starting TCP/IP using an IPv6 address, type:
    mktcpip -interface en0 -auto
    Note: If an IPv6 address already exists on the specified interface, this command format will not replace it. You can use the -auto flag to allow multiple IPv6 addresses to coexist on the interface.
  3. To set the required values for starting TCP/IP, using an IPv6 address to replace any pre-existing IPv6 addresses, type:
    mktcpip -interface en0 -hostname host -inetaddr ipv6_address
    Note: This method replaces any IPv6 addresses that were assigned to the interface.

Send feedback | Rate this page

Last updated: Fri, Oct 30, 2009