Default route question

Hello I have a question regarding default route on AIX servers. (I am using a p5 5.3 TL9 machine).
in my output of "lsattr -El inet0" I can see there are two routes like below.
route net,-hopcount,0,,0,x.x.207.7 Route True
route net,-hopcount,0,,0,x.x.202.129 Route True

But in netstat -nr

Route Tree for Protocol Family 2 (Internet):
default            x.x.207.7     UG      106  50570580 en4      -      -
127/8              127.0.0.1         U        14   1419976 lo0      -      -
x.x.207.0      x.x.207.99    UHSb      0         0 en4      -      -   =>
x.x.207/25     x.x.207.99    U         2    607749 en4      -      -
x.x.207.99     127.0.0.1         UGHS      2    471951 lo0      -      -
x.x.207.127    x.x.207.99    UHSb      0         0 en4      -      -

Here there is no entry in the table showing x.x.202.129.

My questions are:

  1. How do I know if a route a persistant across reboots (how to Check without actually rebooting the machine :-0) . Because as per my understanding route added with "route add" command is not persistant and the same done with smitty is persistant across reboots.
  2. Is it because there were no packet transfered t,hat there is no entry about x.x.202.129

Thank you very much in advance.

There are several ways to make a route persistent. On AIX this usually means writing the information into the ODM. This is done with the mkdev/chdev commands (that are being used by SMIT but can also be used on commandline). With the lsattr command you query the ODM:

# lsattr -El inet0

shows you the routes that are defined in the ODM and thus will be active after reboot. The same information but in different format can be found by querying the ODM directly:

# odmget -q attribute=route CuAt

The route command itself however can be used for the same purpose just by adding an entry into the /etc/rc.net. This would lead to a 'permanent' route but without a trace in the ODM.
As to your second question: from the inet0 information there should be 2 default routes. As the netstat output just shows one I would think that the missing default route was removed by the route command. However, it will be back after a reboot. Best to remove it from the ODM if you don't need it.

If the routes are in ODM, they will be configured at boot. You can configure these routes anytime with "mkdev -t inet".

However, the "x.x.202.129" route is not valid for en4, since that interface is on a different subnet. Gateways must be directly reachable (i.e., on the same subnet) from a local address.

Thank you both for the reply.. appreciate it..

I typed the below command in a production server from /etc dir

lsattr -El inet0

Does this just show the route table info or does this command do any sort of manipulation ( in the background etc )

I am new to tcp/ip. Please solve my query.

Regards,
Pranav Kumar

The lsattr command looks up information in the AIX ODM. It does not change anything so you may use it anytime. The ODM is basically a database containing information about your server's hardware and device configuration.

I got your private message and I'd like to welcome you to this great AIX forum. However, I (as probably most other forum users) won't answer AIX questions by private message or by email as that would disrupt the flow of information in this forum. :slight_smile: So best to always place questions in the forum directly.

Dear Sir,
Thank you very much for ur reply.

I have a doubt as below :

In the command , lsattr -E -l inet0 I guess inet0 stands for Ethernet

How to know , which ethernet is our system using.

Is inet0 , a default for any production server ( I mean the server on which the applications are running) or can there be something like inet1 or inet2 etc
In that case how to find the ethernet address.

Regards,
Pranav

The inet0 device contains (among other) information about the systems hostname and its default route. However, to find out about the server's TCP/IP address(es) you need to look up the configuration of the "en" devices. Use

ifconfig -a

to find out how TCP/IP is configured on your system. Then use

lsattr -El en0

and/or

lsattr -El ent0

to see the device configuration information stored in the ODM. For a start these commands should return the information you are looking for.

A useful reference on how AIX communicates with other servers is the IBM Redbook IBM eServer Certification Study Guide - AIX 5L Communications
For a general introduction to AIX I would recommend the great document by Stuart Watkiss http://www.watkissonline.co.uk/wordpress/?page_id=2416

lsattr -El ent0 should work

Try it out

Brian

ifconfig -a

will show Server's interface and entstat en1 will show ethernet statistics.. such us UP Boradcast runing...