Pages

Friday, 24 June 2011

AIX commands


AIX Command
AIX supports a number of different networking technologies, including Ethernet, Token-ring, and Fiber Distributed Data Interface (FDDI). For purposes of this discussion we will assume Ethernet, since its use is so widespread. You must have the bosnet.tcpip.obj software installed in order to configure TCP/IP.
On most UNIX systems you configure TCP/IP with commands such as ifconfig and route, and then make your configuration permanent by editing startup files. You can do this with AIX, but since TCP/IP configuration is part of the ODM database, it is best to use SMIT to do all your configuration.
  1. Start SMIT:
  1. On the Available Network Interfaces screen, select the appropriate interface. Upon bootup cfgmgr recognizes the network card and configures it into the ODM database.
  2. On the Minimum Configuration & Startup menu, fill in, as a minimum, the HOSTNAME, Internet ADDRESS fields. Also specify whether or not you want to start TCP/IP now or at bootup in the START Now field.
  3. Additional parameters that can be configured with this screen are network mask, name service, gateway, and cable types. If you leave the Network MASK field blank, AIX will provide you with a default value based upon the class of the system's IP address. For the CABLE Type field, bnc specifies thin cable and dix specifies thick; for other types, choose N/A.
Example
Minimum Configuration & Startup
To Delete existing configuration data, please use Further Configuration menus


Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                             [Entry Fields]
* HOSTNAME                                           [a2410bjv]
* Internet ADDRESS (dotted decimal)                  [15.24.48.58]
  Network MASK (dotted decimal)                      [255.255.248.0]
* Network INTERFACE                                   en0
  NAMESERVER
           Internet ADDRESS (dotted decimal)         [15.41.144.101]
           DOMAIN Name                               [nsr.hp.com]
  Default GATEWAY Address                            [15.24.55.253]
  (dotted decimal or symbolic name)
  Your CABLE Type                                     N/A              +
  START Now                                           no               +
To set or reset your host's name,
  1. Start SMIT:
  1. Choose the Set the Hostname menu item.
  2. Fill in the new hostname in the HOSTNAME field.
  1. Start SMIT:
  1. Fill in the values for DESTINATION Address and Default GATEWAY Address. For Destination Type you have a choice between net and host. AIX provides a default value of 1 for the METRIC field.

Add Static Route
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
                                                        [Entry Fields]
  Destination TYPE                                    net              +
* DESTINATION Address                                []
  (dotted decimal or symbolic name)
* Default GATEWAY Address                            []
  (dotted decimal or symbolic name)
* METRIC (number of hops to destination gateway)     [1]               #
Removing a route in SMIT looks much as the same as adding a route. Just type in the following and fill in the appropriate values:
To flush the routing table,
  1. Start SMIT:
  1. This produces the following:

Flush Routing Table
Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  Flush Routing Table in the Current Running System   yes              +
  Flush Routing Table in the Configuration Data Base  no               +
   (effective in the next system restart)

If you want to flush the routing table temporarily but keep the routing information in the database, accept the defaults. If you want to clear the ODM of routing information, select yes for Flush Routing Table in the Configuration Data Base.
To alter the configuration of a network card, do the following:
  1. Start SMIT:
  1. Select the appropriate interface in the Available Network Interfaces menu.
  2. Make the appropriate changes as needed. If you leave the BROADCAST ADDRESS field blank, AIX will provide a default based on the subnet mask.
Example
Change / Show a Standard Ethernet Interface
Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  Network Interface Name                              en0
  INTERNET ADDRESS (dotted decimal)                  [15.24.48.58]
  Network MASK (hexadecimal or dotted decimal)       [255.255.248.0]
  Current STATE                                       up               +
  Use Address Resolution Protocol (ARP)?              yes              +
  BROADCAST ADDRESS (dotted decimal)                 []
There is no SMIT fastpath option to removing an interface. Instead,
  1. Start SMIT:
  1. Select the Remove a Network Interface option.
  2. Select the appropriate interface.
CAUTION: SMIT removes the interface without prompting!
  1. Start SMIT:
  1. This produces the following:
Domain Nameserver (/etc/resolv.conf)
Move cursor to desired item and press Enter.

  Start Using the Nameserver
  List All Nameservers
  Add a Nameserver
  Remove a Nameserver
  Stop Using a Nameserver
  -------------------------------
  Set / Show the Domain
  Remove the Domain
Use this as a means to edit the /etc/resolv.conf file or use a text editor to do so.
  1. Start SMIT:
  1. This produces the following:
Hosts Table (/etc/hosts)
Move cursor to desired item and press Enter.

  List All Hosts
  Add a Host
  Change / Show Characteristics of a Host
  Remove a Host

Use this as a means to edit the /etc/hosts file or use a text editor to do so.
To edit /etc/inetd.conf and ensure the ODM database is updated:
  1. Start SMIT:
  1. This produces the following:
inetd Subservers
Move cursor to desired item and press Enter.

  List All inetd Subservers
  Add an inetd Subserver
  Change / Show Characteristics of an inetd Subserver
  Remove an inetd Subserver
Use the menu selections to add or remove entries to the /etc/inetd.conf and update the ODM. If, however, you edit /etc/inetd.conf with a text editor you must use the inetimp command to update the new information in the InetServ object class in the ODM.
You can use SMIT to edit /etc/services and at the same time ensure that the ODM database is updated.
  1. Start SMIT:
  1. This produces the following:
Services (/etc/services)
Move cursor to desired item and press Enter.

  List All Services
  Add a Service
  Change / Show Characteristics of a Service
  Remove a Service
Follow the menus to make the changes you desire. As with the /etc/inetd.conf file, you must use inetimp to update the ODM after using a text editor to change the /etc/services file.
To create entries to or modify /etc/hosts.equiv using SMIT:
  1. Start SMIT:
  1. This produces the following:
Host Access (/etc/host.equiv)
Move cursor to desired item and press Enter.

  List All Remote Hosts
  Add a Remote Host
  Remove a Remote Host
Follow the menus to make the changes you desire.
To edit /etc/ftpusers:
  1. Start SMIT:
  1. This produces the following:
Restrict File Transfer Program Users (/etc/ftpusers)
Move cursor to desired item and press Enter.

  Show All Restricted Users
  Add a Restricted User
  Remove a Restricted User
  1. Start SMIT:
  1. This produces the following:
Other Available Services
Move cursor to desired item and press Enter.

  Super Daemon (inetd)
  syslogd Subsystem
  routed Subsystem
  gated Subsystem
  named Subsystem
  rwhod Subsystem
  timed Subsystem
  portmap Subsystem (information only)


No comments:

Post a Comment

Twitter Bird Gadget