AIX - NIC device explanation need

Login or Register to Reply

Thread Tools Search this Thread
# 8  
CuAt:         name = "en6"         attribute = "alias4"         value = "10.176.x.127,255.255.x.x"         type = "R"         generic = "DU"         rep = "s"         nls_index = 0

There's your alias!
You positive you are not seeing it under the smitty menu's?
# 9  

I don't see it on smitty tcpip
Move cursor to desired item and press Enter.

  Add an IPV6 Network Alias
  Add an IPV4 Network Alias
  Remove an IPV6 Network Alias
  Remove an IPV4 Network Alias  --> I select this

                       Available Network Interfaces                       |
                             |                                                                          |
                             | Move cursor to desired item and press Enter.                             |
                             |                                                                          |
                             |   en4           Standard Ethernet Network Interface                      |
                             |   en6           Standard Ethernet Network Interface                      |   --> I select en6
                             |   et0   03-00   IEEE 802.3 Ethernet Network Interface                    |
                             |   et1   03-01   IEEE 802.3 Ethernet Network Interface                    |
                             |   et2   04-00   IEEE 802.3 Ethernet Network Interface                    |
                             |   et3   04-01   IEEE 802.3 Ethernet Network Interface                    |
                             |   et4           IEEE 802.3 Ethernet Network Interface                    |
                             |   et5           IEEE 802.3 Ethernet Network Interface                    |
                             |   et6           IEEE 802.3 Ethernet Network Interface                    |

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

                                                        [Entry Fields]
  Network INTERFACE                                   en6

* IPV4 ADDRESS (dotted decimal)                      []
  Network MASK (hexadecimal or dotted decimal)       []

--> There is no info about the alias IP

# 10  
Sorry been tied up with other tasks and haven't spent much time on forums.

So from what you posted you can see that the alias does exist!

[root@xxx] / > odmget -q "name = en6" CuAt CuAt:         name = "en6"         attribute = "alias4"         value = "10.176.x.127,255.255.x.x"         type = "R"         generic = "DU"         rep = "s"         nls_index = 0

So, to remove it:
chdev -l en6 -a delalias4=10.176.x.127,255.255.x.x

Where the x's are filled in with the real value's from the odmget command.
Just make sure nothing is expecting to use that alias before you remove it!
# 11  
@Phat: first off, you are receiving very good advice from RecoveryOne, so i will not interfere with that and add some general information.

@RecoveryOne: great to see a fellow AIX-guy here! I was absent for some time, so a somewhat belated welcome to this forum.

You have to understand that AIX stores a lot of configuration and customisation information in a data structure called ODM (Obect Data Manager). It is database-like and remotely similar to the registry in Windows-OSes (in fact the registry was derived from it) or what you get in Firefox when you type about:config into the address bar.

Many commands look up information there when you ask for certain configuration aspects. Also, the respective configuration commands will update the ODM to reflect the changes they do upon your bidding. It is a common problem for AIX novices to use not the "official" commands but low-level workarounds to get configuration changes done. This usually leads to a disparity between the content of the ODM and the real configuration (because the low-level commands won't update the ODM accordingly) and usually such configuration changes are lost upon reboot, because during the boot process commands are run that get their necessary information from the ODM and the changes that have been made are not reflected there. (On the other hand, though, once you know exactly what you are doing you can use this mechanism to your advantage if you *want* a certain configuration change not to survive reboot.)

Here is an example, using the configuration of an IP alias, about how to do it correctly. At first the naive way:

ifconfig <interface> alias <IP-address> netmask <netmask> up

You can fire off this command and it will do what you expect but this will not survive the next reboot: the changes are made but not stored in ODM and because during the boot only what is in ODM is configured it will not be there any more.

Some (especially people coming from other UNIX OSes) will now create some start-scripts where they run this command over and over again during each boot to make up for that. This exercise basically shows the difference between a working and a desirable solution: will this work? Yes. Will it be good that way? No! Because the information is still not in the ODM some commands, which get their information from there will still ignore this alias with all the problems this can cause.

Here is how to do it the AIX way:

The network interface is a device and there are only so many commands to deal with devices:

lsdev    list devices and their attributes
chdev    change devices and their attributes
mkdev    create devices
rmdev    delete devices

since we want to change the attributes of a network device we need [i]chdev[/icode]:

chdev -l <device> -a alias4=<IP-address>,<netmask>

This will change the device and updated the ODM at the same time, so upon reboot the new configuration will automatically be in place, without any startup script.

Bonus information: if you want to remove the alias but keep the interface you simply have to change the device again:

chdev -l <device> -a delalias4=<IP-address>,<netmask>

Notice, that only the ODM is kept up-to-date this way. You will have to i.e. edit /etc/hosts yourself still if you need to reflect the changes in there. Also notice that with the same mechanism you can also set up/delete/change/show (lasting) static routes for a certain interface.

smitty, as suggested by RecoveryOne, is just an interface to the commands i explained here. If you are unsure about any of them you should definitely use it because this way you will always get it right: instead of dealing with the command formats you can enter the information into convenient forms. Still, there is nothing you can do with smitty you couldn't do without it and it is reassuring to know that. smitty is just an interface to things that are already there.

I hope this helps.


Last edited by bakunin; 1 Week Ago at 01:02 PM..
This User Gave Thanks to bakunin For This Post:
# 12  
@bakunin Hello!
Yeah I was trying to walk Phat down the proper way as I looked at his other posts and (nothing against him at at all) he's a little green behind the ears.

Thanks for the welcome. Been working with AIX for 4 years. From P520's on up to S824 along with some HACMP and TSM goodness. I really have a lot to learn myself. Just figured I've lurked here for some time when it comes to scripting help, figure I should at least help with what limited knowledge that I have.

Anyhow, take care everyone!

Last edited by RecoveryOne; 1 Week Ago at 07:13 PM..
This User Gave Thanks to RecoveryOne For This Post:
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Configuring NIC device in Solaris 9 SPARC OS [QEMU]
I have Xubuntu 18.04 installed on my PC. I have created a 10G .img image file created by QEMU-IMG. I have installed inside of it Solaris 9 SPARC edition . If I try and mount the image file as a loop device (using sudo losetup /dev/loop0 /path-to-img-file) I can only mount it as read only. ...... UNIX for Beginners Questions & Answers
UNIX for Beginners Questions & Answers
I want to tune NIC's rps, rfs and xps value. which NIC device should I modify.
Dear All I want tune my NIC's rps, rfs and xps value. In my system I have two NIC (eth0, eth1) and I have a bond0 ( eth0, eth1). Here is the question? Which device should I modify ? eth0 and eth1? or just modify bond0 or modify all device (eth0, eth1, bond0) Any advice is welcome....... Red Hat
Red Hat
Explanation of C Compiler for AIX
Hi, I have the following packages installed on my AIX server xlC.aix50.rte COMMITTED XL C/C++ Runtime for AIX 5.3 xlC.cpp COMMITTED C for AIX Preprocessor xlC.msg.en_US.cpp COMMITTED C for AIX Preprocessor xlC.msg.en_US.rte COMMITTED XL C/C++ Runtime xlC.rte...... AIX
NIC and Device NO to Change
Ilias Kappatos
I am a beginer in unix . I would like to know what is the command in orser to change NIC and Device NO... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers

Featured Tech Videos