1

My task is to verify that all current routes will be preserved after a reboot of AIX 6.1 and 7.1 systems, i.e., I want to verify the system will reboot and build the current routing table with a script that can be run periodically. We have had instances where operators have added routes without adding the information to the ODM. Everything is fine until the system is rebooted weeks or months later. The system comes up and is missing routes. Managers and customers are upset with the down time. You get the idea. We've all been there.

First of all, I'm new to AIX but not to UNIX. I've been using RHEL lately, so my Solaris and IRIX knowledge is rusting away from disuse. ;-)

If there is an AIX tool to verify the ODM and current routing table match, I'd love to use it!

If not, my plan is to gather information from

odmget -q "attribute=route" CuAt

or

lsattr -El inet0 -a route -F value

to compare with the output of netstat -rn. Unfortunately, I do not understand how the system parses this information to build the routing table at boot time. I've looked at a couple systems. Selected output of the lsattr command from above looks something like this.

net,-hopcount,0,,0,10.20.225.1 net,-hopcount,0,-netmask,255.255.255.0,,,10.29.200.0,10.22.160.5 net,10.20.226.0,-netmask,255.255.254.0,10.20.225.1 net,-hopcount,0,-netmask,255.255.255.0,,,10.19.215.0,10.22.160.5 net,-hopcount,0,-netmask,255.255.192.0,,,,,10.22.125.0,10.22.160.5 [many more with this format] net,-hopcount,0,-netmask,255.255.255.0,,,,,10.10.10.0,10.22.160.5 net,,0,10.20.225.1 net,-hopcount,0,-netmask,255.255.254.0,-if,en1,,,,-static,10.20.245.0,10.22.160.5

net,-hopcount,0,,0,10.20.225.1 net,-hopcount,0,,,,,,-static,170.225.25.40,10.22.135.5 net,-hopcount,0,,,,,,-static,170.225.25.40,10.22.195.5 net,-hopcount,0,-netmask,255.255.255.0,,,,,-static,10.0.1.0,10.22.160.5 net,-hopcount,0,-netmask,255.255.255.0,-if,en1,,,,-static,10.0.5.0,10.22.160.5 net,-hopcount,0,-netmask,255.255.255.0,-if,en1,,,,-static,10.10.10.0,10.22.160.5 net,-hopcount,0,-netmask,255.255.240.0,-if,en1,,,,-static,10.10.20.0,10.22.160.5 net,-hopcount,0,-netmask,255.255.240.0,-if,en1,,,,-static,10.19.25.0,10.22.160.5 net,-hopcount,0,-netmask,255.255.255.0,-if,en1,,,,-static,10.20.5.0,10.22.160.5 host,-hopcount,0,,-if,en1,,,,-static,170.225.25.40,10.22.160.5

(I've changed the IPs a bit, but not netmasks or other values. If you find a networking error, it's my fault. I'm trying to discover the syntax/layout, not verify routing.)

My machines have interfaces like en0, en1, en2. I don't see references to all of them. I don't see any explicit mention of the loopback or default routes, but I think I see them. (The default route has the values -hopcount,0,,0?)

What script or process reads the ODM and converts it to a routing table? If I read that, I can probably work out how the routing table is built. Barring that, is there an on-line document describing or simple explanation of how it is done?

Should I be using different commands to pull information from the ODM? Perhaps smitty has something that can help me?

I've looked at all the other questions with the "aix" tag (There are only 97 of them.) and not found anything like this. Mr. Google hasn't turned up anything useful (to me) after a day of searching. The man pages do not give me enough detail regarding lsattr output or how the routing table is created. Obviously, I'm missing something.

I realize I could just save the output of netstat -rn when the machine is booted and periodically compare that with the current values, but it won't tell me if the ODM has changed, and I'd really like to learn something more AIX-specific. Thank you, in advance, for all answers and suggestions!

1
  • IBM support has provided me with an interactive process. I'll be examining that in the following week to devise an automated process. If I'm successful, I'll post what I come up with.
    – iAmJeff
    May 14, 2015 at 19:51

1 Answer 1

0

I've since changed jobs, so to put a cap on this...

It is possible to compare the running netstat output and the ODM data, but it's not trivial. The ODM provided me 3 bits of information, the IP address, the network name, and the network mask. The biggest complication is data stored in the ODM doesn't have to be absolutely correct. The ODM can contain a network name that resides in the usable IP address space, but not what network calculators would calculate. The routines that calculate routing tables at boot time are smart enough to fix it and discard the bogus datam.

I could not find the AIX process that did the actual work. Smitty provided some clues, but I found that any properly formatted dotted quad could be accepted as a netmask. (One of my hosts had a netmask of 155.155.155.0 in the ODM. That route was discarded at boot time.) Any ODM entries that resolved into duplicate routing entries were discarded when the live routing table was built.

If I had to do it again I'd use an array of four items: The IP, netmask, ODM-provided network name, and a properly calculated network name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .