AIX - NIC device explanation need

Thread Tools Search this Thread
Operating Systems AIX AIX - NIC device explanation need
# 8  
Old 05-20-2019
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  
Old 05-21-2019

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  
Old 06-07-2019
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  
Old 06-08-2019
@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; 06-08-2019 at 01:02 PM..
This User Gave Thanks to bakunin For This Post:
# 12  
Old 06-08-2019
@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; 06-08-2019 at 07:13 PM..
This User Gave Thanks to RecoveryOne For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

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. ... (1 Reply)
Discussion started by: alphatron150
1 Replies

2. Linux

Add two different subnet public IPs to single NIC or two different NIC on same box

Hello Admins, My ask is how can I add two different subnet IPs to same box with two different gateways? The issue is I can connect to the box when I am on ethernet LAN, but I am not able to connect to the same IP when I am on wifi. The server is RHEL 7 VM on vmware. How can I get connected... (4 Replies)
Discussion started by: snchaudhari2
4 Replies

3. AIX

AIX Frame: NIC port down

NIC port is down on IBM Frame. From the back its slot C7/C8. The network switch is the problem, and a new switch will be coming into play. There's one VIO and one LPAR. How do i tell the port is down in the OS on the VIO? And how can i verify it's backup without pulling cables? We have a... (1 Reply)
Discussion started by: gps1976
1 Replies

4. Red Hat

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.... (0 Replies)
Discussion started by: nnnnnnine
0 Replies

5. AIX

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... (4 Replies)
Discussion started by: jimthompson
4 Replies

6. Solaris

x86 Solaris 10 nic driver added but not attached. NIC is not detected.

I couldn't install my nic in solaris 10. I compiled and added the driver but failed to attach the driver and ifconfig output shows only loopback dev. Please see the following output and tell me whether my nic has been detected and why the driver failed to attach? My nic is detected in linux... (0 Replies)
Discussion started by: vectrum
0 Replies

7. AIX

AIX -How to find which NIC is on which PCI card

Hi All, How can I find out which is ETH5 on my AIX P5 system. I have about seven different NIC card on this. I did move the cable to each one but still I was not able to see the link light up when I did netstat -v Any idea? Thanks. (2 Replies)
Discussion started by: samnyc
2 Replies

8. UNIX for Dummies Questions & Answers

NIC and Device NO to Change

I am a beginer in unix . I would like to know what is the command in orser to change NIC and Device NO (1 Reply)
Discussion started by: Ilias Kappatos
1 Replies

9. UNIX for Dummies Questions & Answers

Dleting a Device in AIX 4.3

I need to delete a TTY in my AIX 4.3 system. I have tried using the smit but everytime I try it, there is a message telling me that the device is in use and cannot be changed. How do I take the device "offline", so to speak, so that I can edit the settings and/or delete it. V/R Djassi (3 Replies)
Discussion started by: djassi
3 Replies
Login or Register to Ask a Question

Featured Tech Videos