Skip to content


Lekcja 2: Konfiguracja adaptera Sieci

Introduction to Networking

Most likely, your computer will be attached to the Ethernet network using the “twisted pair” cable (RJ45 at both ends). This network schema was originally called 10BaseT to signify that the maximum speed over this media (cable) could not be faster then 10mbps. With the passing time, the speed limit grew and now it is quite common to connect with the network at 1gbps

To allow host to communicate with the network we have to do two things. First, we have to physically connect one of its network adapters with a network switch. Second, we have to configure this network adapter (entX) and its logical drivers (enX) accordingly with the site specific information. Without going into details, system administrator at the minimum must secure from a site specific authority hostname, IP address and netmask, the address of the default gateway. You may also need the domain name and the name/IP address of your site DNS server or servers.

What hostname really is?

Please be aware of that in AIX realm the host name and the label associated with the IP address assigned to a specific network interface are not the same. Host name is just a host name that you set executing either the ‘uname’ or the ‘hostname’ command. IP label is the name associated with IP address which is done on the most elementary level with the entry in /etc/hosts file. The source of confusion is most likely this smitty window (smitty tcpip -> Minimum Configuration and startup):

If prior to executing this shortcut the host had been given its name then this name will be automatically displayed next to the HOSTNAME label (on this display) regardless you are configuring en0, ent1, et2 and so forth. You cannot have the same name associated with different IP addresses, so as you see this is just a “programmers” error of sort. I believe that instead of HOSTNAME this field should be named “IP Label”. This would clearly associate IP address and its name as given in the /etc/host. If you never work with HACMP environment or all you hosts attach to network fabric via a single network adapter then the above have no meaning for you. The host name and IP label will be the same. Things change if a host becomes a node in HACMP cluster or if a host is attached directly to multiple networks. For now, just be aware that the host name and the name/label associated with your host IP address do not need to be identical.

Introduction to Networking – Host Name Resolution.

The minimum requirements to attach a host to the network are – provide a physical connection (?BaseT) and configure physical adapter and its logical counter part (driver). If we stop here, your host will not be able to communicate with hosts on the other networks. To allow it to communicate with devices on the other networks we have to identify the ‘default’ router. The default router is a specialized computer with multiple network adapters. It’s each network adapter is connected to a different network. Router has a very specialized operating system that pretty much centers around looking at the source and the destination network attribute of every data pocket flowing through each every network adapters. If these addresses are different then router will send the pocket to one of its network adapters connected to appropriate network or to another router which has its adapters connected to the destination network. Keep in mind, that this is an extremely simplistic description of what routers are capable of doing. The /etc/hosts file is the simplest form of name resolution. Accordingly, with the general presumptions, numerical addresses are difficult to remember, “Meaningful” names are easier to remember. The/etc/hosts provide association of the difficult to remember numerical address and it is easier to remember mnemonic representation. For example, instead to remember 129.14.15.2 we could just call the computer by its name: epcprdi1p1 – you decide what is easierJ. The ‘/etc/hosts’ file was the very first attempt toward host name resolution and it is not suited or efficient in managing large number of entries. Today, it is not uncommon to see UNIX machines, which do not use /etc/hosts in this regard. There are other solutions in commercial use. They are NIS, NIS+, DNS and LDAP. To make host aware of “external” name resolution you have to work with two files located in the /etc directory. These files are resolv.conf and bind.conf.

Ethernet Flavors

Least but not last – AIX host supports two “flavors” of Ethernet protocol: Standard and IEEE 802.3. This accomplished via two separate “logical” devices. Any network device which name follows pattern ‘enX’, where X represents a digit starting with zero identifies the Standard Ethernet compliant device. Every network device which name pattern follows etX identifies device supporting the IEE802.3 protocol. I have never worked with anything else but the Standard Ethernet networks and adapters.

Network Configuration step 1: physical adapter configuration (entX)

To enable network communication first you have to configure the physical network adapter (entX) attributes as if for example media speed (10, 100, 1000 gbps full duplex or half duplex), jumbo frames, etc. Remember, network adapter speed/duplex attributes and its assigned switch port speed/duplex attribute must be set to identical values! (In one of the following pages, I will show you how to verify it) Network adapter has more attributes that you may need to modify in order to satisfy your particular site network requirements – consult with network administrator.

Assuming that we are working with a brand new host, let start by giving it a name. You can use any of the following two commands or execute ‘smitty hostname’.

chdev -l inet0 -a host_name=your_host_name

hostname -s your_host_hostname

For the sake of an example, let us say that our network administrator notified us to set our network adapter to 1000GB/Full Duplex with Jumbo Frames. We will configure our ent0 adapter in the simplest form – no EtherChannel, no backup device. To do so, we will execute ‘smitty chgenet’ shortcut which will present us with a screen from which we will select the adapter we want to configure.

With the adapter selection behind us, the next screen gives us the opportunity to change all desired attributes of selected adapter.

Please note the “Apply change to DATABASE only”. Changes cannot be applied to adapter that is already in-use. So what to do when adapter is already used to communicate with the outside world but its certain attribute requires a change? The most common solution is to apply the change to the DATABASE only (set this value to ‘yes’) and then reboot the host in the most convenient time.

In our case, since the adapter is not in “use” we should set the value of this field to ‘no’. Hit the Enter key to start the configuration process.

Network Configuration step 2: software driver configuration (enX)

After the network adapter configuration complete and in-sync with the physical network fabric requirements we are ready to set the “logical” network adapter that will be used by the applications to communicate with the network adapter and the rest of the world. Execute ‘smitty chinet’ command and you will see this display from which you will select the logical adapter to configure. The next screen will allow you to enter all the information required to associate this device with IP address, netmask, routing, and so forth.

You have to select the correct “logical” interface. If your network adapter is called ent0 its associated “logical” interface is called en0. For ent1 it is en1, for ent2 it is en2. I think you already know what it will be for ent3. On the following screen, verify that you are about to configure en0 and enter the required IP address and netmask. Did you notice the mistake? The screen bellow shows that we are about to configure en1 and not en0. We have to exit this screen and re-execute the same command. Afterwards we make sure we select en0 and not en1! Without providing too much information, be aware that network aka internet address and network mask are not trivial elements which require consideration. Find out who on your site or in your office is address authority. Most likely it will be network administrator. In any event the IP address you obtain must be unique and the netmask must be appropriate for the network to which your host will be attached.

It is against TCP/IP rules to associate more than one network interface with the same network as for a host with multiple network interfaces, each interface must be connected to a different network. A typical AIX machine can support up to eight Ethernet adapters, which can be configured to support the standard Ethernet protocol or its IEEE 802.3 flavor.  There is nothing that prevents you from assigning multiple addresses to the same network driver/interface. These addresses (aliases) could be on different or the same networks.

Network Configuration step 3: defining search order

If you look inside /etc directory, you will notice a number of different configuration files. They share the same extension – ‘conf’.  Two of these files are important from network communication point of view. They are ‘netsvc.conf’ and ‘resolv.conf’. The first file dictates the search order used to resolve computer name. The second one specifies at the minimum the DSN domain name and the name of the DNS server servicing this domain. In a more advanced form the ‘/etc/resolv.conf’ will also contain the name or names of any DNS backup servers and domain names to use to locate a host not associated with the default domain.

The following illustration shows the contents of the ‘/etc/resolv.conf’ which stipulate that any unsuccessful search of ‘/etc/hosts’ file should be followed with search via DNS as indicated by ‘bind’ statement.

Since this file calls for DNS involvement in host name resolution, let’s look at the ‘/etc/resolv.conf’.

Network Configuration step 3:  Basic Name Resolution via DNS

The following entries are copied from one of my AIX hosts ‘/etc/resolv.conf’ file. The first line defines the name of the default domain – domain that this computer belongs to. The second line specifies search order to use to resolve name/IP address of the destination device. The next thee lines define DNS servers to use – if one does not respond query the other. The last three entries are for resiliency, peace of mind, and a good night sleep.

domain xxx.edu
search xxx.edu yyy.xxx.edu zzz.xxx.edu
nameserver 159.14.3.10
nameserver 159.14.27.2
nameserver 159.14.36.4


1.1. Logical network interface configuration – with “smitty mktcpip”

At this moment, the network adapter (entX) attributes have already been set. Execute “smitty tcpip” shortcut and select the Minimum Configuration & Startup option. The next screen will present you with listing of network adapters to choose from. Select the one you want to configure and the screen will present you with all the entries that will identify your host and allow it seamless integration with other devices on the network.

This screen is just the only screen through which you identify not only your host name, its address and netmask but also the router and DNS server and domain information to complete “logical” interface configuration. Isn’t this faster or simpler then the method described above? Is it faster? I do not know. I prefer the method over the second one as the first one does not updates the /etc/hosts file no matter how many times it is executed. If you execute ‘smitty tcpip’ and if you chante host name or its IP address or both notice that each time /etc/hosts will be ‘updated’ with this information and you may have few more problems to solve that day. Especially if you do HACMP, stay away from this method or remember it the implications.

After you populate the required fields, remember to change to ‘yes’ the last field labeled ‘START Now’ – tcpip subsystem will not be started otherwise.

  • 1.2. Logical network interface configuration – command line

The fastest way to configure the network driver is via command line. Take a look at the following line:

/usr/sbin/mktcpip -h’ip_label’ -a’192.192.192.192′ -m ’255.255.255.0′ -I’en0′
- n’192.192.192.10′ -d’aix.edu’ -g’192.192.192.193′ -t’tp’ -s

With one line you can associate the name (ip_label) to the IP address (192.192.192.192) and its netmask (255.255.255.255.0), with logical network device (en0). To use DNS for name resolution the DNS server (192.192.192.10) address and the DNS domain name (aix.edu) are given. The default router (192.192.192.192) is declared followinf the ‘-g’ flag. The physical media type is declared (-t) to be twisted pair (tp). Finally, we request that this command also starts the tcp/ip subsystem with the ‘-s’ flag.


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. afzalchouhan says

    wonderful



Some HTML is OK

or, reply to this post via trackback.