Most AIX system administrators use: smitty tcpip to add a hostname, IP address, network mask, gateway, and DNS server setting to get the virtual machines (LPAR) and AIX on a network. And as a side benefit so we don't need to use the ghastly VTERM console anymore as ssh or the dreaded unsecure telnet (don't do it) can now be used - as the root user:
# smitty tcpip
...
Minimum Configuration & Startup
Further Configuration
Use DHCP for TCPIP Configuration & Startup
IPV6 Configuration
Quality of Service Configuration & Startup
Configure IP Security (IPv4)
Configure IP Security (IPv6)
Once smitty starts, you take the "Minimum Configuration & Startup" first line menu option and then select the Network interface like en0, en1 and so on.
+--------------------------------------------------------------------------+
| Available Network Interfaces |
| |
| Move cursor to desired item and press Enter. |
| |
| en0 Standard Ethernet Network Interface |
| en1 Standard Ethernet Network Interface |
| et0 IEEE 802.3 Ethernet Network Interface |
| et1 IEEE 802.3 Ethernet Network Interface |
| |
| F1=Help F2=Refresh F3=Cancel |
| F8=Image F10=Exit Enter=Do |
| /=Find n=Find Next |
+--------------------------------------------------------------------------+
That sets up the primary network for the machine and the hostname matches the DNS server name for the IP address.
* HOSTNAME [orange.aixncc.uk.ibm>
* Internet ADDRESS (dotted decimal) [9.133.62.82]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en0
NAMESERVER
Internet ADDRESS (dotted decimal) [9.133.62.2]
DOMAIN Name [aixncc.uk.ibm.com]
Default Gateway
Address (dotted decimal or symbolic name) [9.137.62.1]
Cost [0] #
Do Active Dead Gateway Detection? no +
Your CABLE Type N/A +
START TCP/IP daemons Now no +
But lots of machines in production have many networks for various purposes like backup, admin network, user access and clustering.
So how to set up these 2nd, 3rd, 4th and so on. Network interfaces is not so obvious.
Again start with: smitty tcpip
$ smitty tcpip
...
Minimum Configuration & Startup
Further Configuration
Use DHCP for TCPIP Configuration & Startup
IPV6 Configuration
Quality of Service Configuration & Startup
Configure IP Security (IPv4)
Configure IP Security (IPv6)
Then, the second option "Further Configuration"
Hostname
Static Routes
Network Interfaces
Name Resolution
Client Network Services
Server Network Services
Manage Print Server
Select BSD style rc Configuration
Start Configured TCPIP Daemons
Stop TCPIP Daemons
Authentication Configuration
Then, down two to "Network Interfaces"
Network Interface Selection
Network Interface Drivers
Then, "Network Interface Selection"
List All Network Interfaces
Add a Network Interface
Change / Show Characteristics of a Network Interface
Remove a Network Interface
PVCs for IP over an ATM Network
Configure Aliases
Then "Change / Show Characteristics of a Network Interface"
+--------------------------------------------------------------------------+
| Available Network Interfaces |
| |
| Move cursor to desired item and press Enter. |
| |
| en0 Standard Ethernet Network Interface |
| en1 Standard Ethernet Network Interface |
| et0 IEEE 802.3 Ethernet Network Interface |
| et1 IEEE 802.3 Ethernet Network Interface |
| |
| F1=Help F2=Refresh F3=Cancel |
| F8=Image F10=Exit Enter=Do |
| /=Find n=Find Next |
+--------------------------------------------------------------------------+
Then, select the Network interface like en0, en1 but making sure you DO NOT select the primary network interface that you set above.
Network Interface Name en1
INTERNET ADDRESS (dotted decimal) [1.1.1.2]
Network MASK (hexadecimal or dotted decimal) [255.255.255.0]
Current STATE up +
Use Address Resolution Protocol (ARP)? yes +
BROADCAST ADDRESS (dotted decimal) []
Interface Specific Network Options
('NULL' will unset the option)
rfc1323 []
tcp_mssdflt []
tcp_nodelay []
tcp_recvspace []
tcp_sendspace []
Apply change to DATABASE only no +
This gives you a simpler panel to fill in but NOT the hostname, gateway nor the DNS details - these are only set once and while you are setting up the primary network as they apply to the other networks too.
Using the "Minimum Configuration & Startup" panel to set up the 2nd, 3rd and so on network interfaces is a VERY BAD IDEA as it messes up the network configuration but I have seen it done many times.
*** FLAME ON ***
Before I get lots of comments about why does smitty allows this, if it causes problems, I would like to say UNIX, AIX and smitty are not meant to be "idiot proof" and I like it the way it is. Idiots, newbies to UNIX and the untrained must not be given root access.
*** FLAME OFF ***