AIX - NIC device explanation need

Hello,

I have some doubt about the NIC device on my AIX box.
When using lsdev command

[root@xxx] / > lsdev -Cc adapter | grep en
ent0 Available 03-00 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent1 Available 03-01 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent2 Available 04-00 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent3 Available 04-01 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent4 Available       Virtual I/O Ethernet Adapter (l-lan)
ent5 Available       EtherChannel / IEEE 802.3ad Link Aggregation
ent6 Available       Virtual I/O Ethernet Adapter (l-lan)

If I check the physical location of NICs

[root@xxx] / > lsdev -C -H -F "name status physloc location description" | grep en
en0          Defined                                                                  03-00       Standard Ethernet Network Interface
en1          Defined                                                                  03-01       Standard Ethernet Network Interface
en2          Defined                                                                  04-00       Standard Ethernet Network Interface
en3          Defined                                                                  04-01       Standard Ethernet Network Interface
en4          Available                                                                            Standard Ethernet Network Interface
en5          Available                                                                            Standard Ethernet Network Interface
en6          Available                                                                            Standard Ethernet Network Interface
ent0         Available U5802.001.9K84585-P1-C4-T1                                     03-00       2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent1         Available U5802.001.9K84585-P1-C4-T2                                     03-01       2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent2         Available U5877.001.9K8I925-P1-C4-T1                                     04-00       2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent3         Available U5877.001.9K8I925-P1-C4-T2                                     04-01       2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent4         Available U9117.MMD.06528F7-V13-C2-T1                                                Virtual I/O Ethernet Adapter (l-lan)
ent5         Available                                                                            EtherChannel / IEEE 802.3ad Link Aggregation
ent6         Available U9117.MMD.06528F7-V13-C3-T1                                                Virtual I/O Ethernet Adapter (l-lan)
inet0        Available                                                                            Internet Network Extension
rcm0         Defined                                                                              Rendering Context Manager Subsystem

I can see we have en1 ... en6 (without 't') and ent1....ent6.
What is the difference between the en1 and ent1 and so on ... ?

If checking the IP, I can see only "enX" (again without 't')

[root@DB_BI] / > ifconfig -a
en4: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
        inet x.x.x.x netmask 0xffffff00 broadcast x.x.x.x
         tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
en6: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
        inet y.y.y.y netmask 0xfffff800 broadcast y.y.y.y
        inet z.z.z.z netmask 0xfffff800 broadcast z.z.z.z
         tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
en5: flags=1e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN>
        inet u.u.u.u netmask 0xfffff800 broadcast u.u.u.u
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1%1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

If I check with smitty tcpip, I see another "etX"

 en0   03-00   Standard Ethernet Network Interface                      |
                             |   en1   03-01   Standard Ethernet Network Interface                      |
                             |   en2   04-00   Standard Ethernet Network Interface                      |
                             |   en3   04-01   Standard Ethernet Network Interface                      |
                             |   en4           Standard Ethernet Network Interface                      |
                             |   en5           Standard Ethernet Network Interface                      |
                             |   en6           Standard Ethernet Network Interface                      |
                             |   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    

I notice only enX could have IP configured, etX not.

                                                        [Entry Fields]
* HOSTNAME                                           [xxx]
* Internet ADDRESS (dotted decimal)                  [x.x.x.x]
  Network MASK (dotted decimal)                      [255.255.255.0]
* Network INTERFACE                                   en4
  NAMESERVER
           Internet ADDRESS (dotted decimal)         [x.x.x.x]
           DOMAIN Name                               [dfs]
  Default Gateway
       Address (dotted decimal or symbolic name)     [x.x.x.x]
       Cost                                          [0]                                                                             #
       Do Active Dead Gateway Detection?              no                                                                            +
  Your CABLE Type                                     N/A                                                                           +
  START Now                                           no   


* HOSTNAME                                           [xxx]
* Internet ADDRESS (dotted decimal)                  []
  Network MASK (dotted decimal)                      []
* Network INTERFACE                                   et4
  NAMESERVER
           Internet ADDRESS (dotted decimal)         [y.y.y.y]
           DOMAIN Name                               [abc]
  Default Gateway
       Address (dotted decimal or symbolic name)     [y.y.y.y]
       Cost                                          [0]                                                                             #
       Do Active Dead Gateway Detection?              no                                                                            +
  Your CABLE Type                                     N/A                                                                           +
  START Now                                           no       

Another thing, If look again the ifconfig, can see that en6 and en5 has 1 same IP 10.176.x.65 --> how can it?

en6: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
        inet 10.176.x.65 netmask 0xfffff800 broadcast 10.176.39.255
        inet 10.176.x.127 netmask 0xfffff800 broadcast 10.176.39.255
         tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
en5: flags=1e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN>
        inet 10.176.x.65 netmask 0xfffff800 broadcast 10.176.39.255

en6 has 2 IPs, but look in the smitty, just see only 1 IP 10.176.x.65 so where to configure the second IP 10.176.x.127???

* HOSTNAME                                           [xxx]
* Internet ADDRESS (dotted decimal)                  [10.176.x.65]
  Network MASK (dotted decimal)                      [255.255.248.0]
* Network INTERFACE                                   en6
  NAMESERVER
           Internet ADDRESS (dotted decimal)         [10.176.33.81]
           DOMAIN Name                               [dfs]
  Default Gateway
       Address (dotted decimal or symbolic name)     [10.176.32.1]
       Cost                                          [0]                                                                             #
       Do Active Dead Gateway Detection?              no                                                                            +
  Your CABLE Type                                     N/A                                                                           +
  START Now                                           no                                                                            +

Ok, WOW that is a mess.
Someone at one point in time felt it was needed to give two Physical adapters, two VIO adapters, and then somewhere they built a failover/link aggeration adapter with what I am going to assume is built from the two VIO Ethernet's

So ent adapters are used to specify the hardware adapter. Has nothing to do with TCP/IP address.
en represents the interface associated with hardware adapter. So, en0 *should* reference ent0. I say should because you can do "stupid" things like renaming an adapter!
et is used for IEE 802.3

Likely you are seeing an IP alias, that's why you have two ip's on the same adapter.

Now, as to two adapters with same IP, one could be disconnected at the physical layer.
**EDIT again. You can assign an IP to the ETherChannel adapter, and then the parent adapter. But its not a good way to go about it. That actually looks like what is happening here. Or someone tried to remove a backup adapter from the EtherChannel and gave it the IP.

To be honest, I'm not even sure where to begin with cleaning this up, or how far you want to go.
I'd recommend tracking down what ip's and what adapters are actually in use.
For the physical adapters, entstat -d <entX> should return in the output a 'PHYS_LINK_UP'
I am unsure on tracking it from the VIO side of things. You would have to trace from the client lpar, to the vio and look at the configuration.

From what you posted, it really looks to me like someone took the VIO ethernet adapters (ent4 and ent6) to create the EtherChannel adapter ent5, and en5 is your actual link to the outside world.
If that's the case, that's not an ideal configuration.
You should build your EtherChannel adapters at the VIO level, so ent1 and ent2 to make ent3, present ent3 up to the virtual switch so the client uses ent3 from the vio's for communication (client lpar would see it as ent0). Even if you had dual lpars, the setup would be the same because the virtual switch would handle any failover between the vio's.

There's a very good chance to clean this up properly you may have to sell an extended downtime.

**Edit: Also concerns me that the VIO may not be properly configured as well.

1 Like

Hi,

How can I see where the alias IP is configured?

I can go very far :slight_smile:

Could you shed some light on the parent Ether and child Ether?

And also with this, et is not used for IP address?

--- Post updated at 05:18 AM ---

Hello,

After cleaning up, it's birghter :slight_smile:

[root@xxx] / > lsdev -Cc adapter | grep en
ent4 Available       Virtual I/O Ethernet Adapter (l-lan)
ent6 Available       Virtual I/O Ethernet Adapter (l-lan)

[root@xxx] / > lsdev -C -H -F "name status physloc location description" | grep en
en4          Available                                                                            Standard Ethernet Network Interface
en6          Available                                                                            Standard Ethernet Network Interface
ent4         Available U9117.MMD.06528F7-V13-C2-T1                                                Virtual I/O Ethernet Adapter (l-lan)
ent6         Available U9117.MMD.06528F7-V13-C3-T1                                                Virtual I/O Ethernet Adapter (l-lan)
inet0        Available                                                                            Internet Network Extension
rcm0         Defined                                                                              Rendering Context Manager Subsystem
[root@xxx] / > ifconfig -a
en4: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
        inet 10.176.x.127 netmask 0xffffff00 broadcast xxx
         tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
en6: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
        inet 10.176.x.65 netmask 0xfffff800 broadcast xxx
        inet 10.176.x.127 netmask 0xfffff800 broadcast xxx
         tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
        inet 127.0.0.1 netmask 0xff000000 broadcast xxx
        inet6 ::1%1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

But I not yet find out where the alias IP (either 10.176.x.65 or 10.176.x.127) is configured.

So to set/remove alias the clean way I recommend:
smitty tcpip --> Further configuration -->Network interface -->Network interface selection -->Configure alias
Once done, I do recommend checking against the ODM to make sure it was properly removed. I have had a few bad experiences where it was removed and yet the ODM hung onto it.
That would be

odmget -q "name = enX" CuAt

where enX is your adapter.
You should only see the primary network attributes.

Now, before you DO remove the alias, you should know why there was an alias setup in the first place! Is anything using that alias?

The few times I had alias's was for Oracle Databases, HA cluster, or I needed a route to a secure segment that was funky to setup.
I'm sure there's other use cases, but those are my only experiences.

Hello,

I have gone through this, but I don't see the alias IP. I think we have to put the alias IP here to remove. It's not already there for us to choose to remove :slight_smile:

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)       []

1 more question, in the linux we can edit the ifcfg-ethx to make some changes. So on AIX, which file can we do the same to make changes to IP configuration?

No you do not want to add an alias to remove an alias.

Also, its not as simple as editing a file on AIX to add in changes. AIX has whats called the ODM (Object Data Manager). The ODM is where the OS stores and maintains a lot of parameters about what is configured and set. Now, there are some files you can edit and cycle the services to take affect right away. Some examples are syslog.conf and sendmail.cf. The /etc/resolv.conf can also be edited on the fly if so necessary.

Could you paste the output of

odmget -q "name = enX" CuAt

for all your Ethernet devices? That would help us understand where that 2nd ip address is coming from.

Hello,

I have copied the output from the ODM query:

[root@xxx] / > ifconfig -a
en4: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
        inet 10.176.x.y netmask 0xffffff00 broadcast 10.176.233.255
         tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
en6: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
        inet 10.176.x.65 netmask 0xfffff800 broadcast 10.176.39.255
        inet 10.176.x.127 netmask 0xfffff800 broadcast 10.176.39.255
         tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1%1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1


[root@xxx] / > odmget -q "name = en4" CuAt
CuAt:
        name = "en4"
        attribute = "state"
        value = "up"
        type = "R"
        generic = "DU"
        rep = "sl"
        nls_index = 5

CuAt:
        name = "en4"
        attribute = "netaddr"
        value = "10.176.x.y"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 4

CuAt:
        name = "en4"
        attribute = "netmask"
        value = "255.255.255.0"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 8

[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

CuAt:
        name = "en6"
        attribute = "netaddr"
        value = "10.176.x.65"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 4

CuAt:
        name = "en6"
        attribute = "state"
        value = "up"
        type = "R"
        generic = "DU"
        rep = "sl"
        nls_index = 5

CuAt:
        name = "en6"
        attribute = "netmask"
        value = "255.255.x.x"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 8

--- Post updated at 05:27 AM ---

Let me know if this info is helpful.

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?

Hello,

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

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!

@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.

bakunin

1 Like

@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!

1 Like