aix netmasks question.

From: justin.bleistein@SUNGARD.COM
Date: Thu Jul 18 2002 - 13:52:06 EDT


Here's an: "ifconfig -a" output from one of my AIX systems:

# ifconfig -a
en2:
flags=4e080863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64
BIT,PSEG>
        inet 168.162.21.50 netmask 0xfffffff0 broadcast 168.162.21.63
en4:
flags=4e080863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64
BIT,PSEG>
        inet 172.30.69.253 netmask 0xffffff00 broadcast 172.30.69.255
en3:
flags=3e080863,10<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT
,64BIT,CHECKSUM_OFFLOAD,CHECKSUM_SUPPORT>
        inet 172.20.254.17 netmask 0xfffffff8 broadcast 172.20.254.23
pp0: flags=e000030<POINTOPOINT,NOTRAILERS,GROUPRT,64BIT>
        inet 0.0.0.0 --> 0.0.0.0 netmask 0xff000000
lo0:
flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT
>
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
#

As you can see for each interface it has the netmask listed in what looks
to be hex, how do you convert this. What I have to do now is go into smit
and display the characteristics of each interface to get the netmasks
(ANNOUYING!!!). Does anyone know how "0xfffffff8" is: "255.255.255.248" on
en3? What method do I use to convert this so I can figure out the netmask
of any AIX interface just by looking at the "ifconfig -a" output. Any
assistance would be greatly appreciated thanks!.

--Justin Richard Bleistein



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:04 EDT