AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  chopping up lsattr- El inet0 output

    Posted Thu July 24, 2014 10:19 AM

    Originally posted by: tpersoon


    My output from lsattr -El inet0 looks like this:

    ....

    ....

    route         net,-hopcount,0,,0,ipaddress

     

    Now I'm trying to decipher what each value behind route means. I'm guessing the following:

    net                        Destination Type

    -hopcount           ?

    0                           Cost

    "  "                         ?

    0                          Weight

    Default gw         ip address

     Is this correct and can someone help me with the ? values. Thanx!


    #AIX-Forum


  • 2.  Re: chopping up lsattr- El inet0 output

    Posted Fri July 25, 2014 05:49 AM

    Originally posted by: j.gann


    it's documented in the manual under "chginet method":

    route
    Specifies the route. The format of the Value variable of the route attribute is: route = type, [args,], destination, gateway, [metric] .

    The value of the type parameter can be net or host.

     

    so your first 0 is the value of the route -hopcount (i.e. cost) option, the second 0 is the destination (default)
    weight would be specified as a route option just like -hopcount


    #AIX-Forum


  • 3.  Re: chopping up lsattr- El inet0 output

    Posted Fri July 25, 2014 06:02 AM

    Originally posted by: tpersoon


    So that would mean:

    net                       type

    -hopcount          [args]

    0                           cost

    "  "                         ?

    0                          destination

    ip address         Default gw         

     

    But I still have an undefined value between the two zeroes. Also, I find it strange that the order in which the "chginet method" describes the output, does not correlate with the actual output. If I follow the output like it is put in the documentation, the result would look like this:

    net                       type

    -hopcount          [args]

    0                          destination

    "  "                       gateway

    0                          [metric]

    ip address         ?        

     

    #AIX-Forum


  • 4.  Re: chopping up lsattr- El inet0 output

    Posted Fri July 25, 2014 06:08 AM

    Originally posted by: j.gann


    args = "-hopcount,0" representing the route option "-hopcount 0"

    args is terminated and followed by a comma, which allows the command (and you) to detect the end of the args

     


    #AIX-Forum


  • 5.  Re: chopping up lsattr- El inet0 output

    Posted Fri July 25, 2014 06:15 AM

    Originally posted by: tpersoon


    So that would mean this?:

    net                      type

    -hopcount,0,    args

    0                        metric

    ipaddress        default gw


    #AIX-Forum


  • 6.  Re: chopping up lsattr- El inet0 output

    Posted Fri July 25, 2014 07:18 AM

    Originally posted by: j.gann


    close:

    net                      type
    -hopcount,0,    args
    0                        destination

    ipaddress        gateway

     

    destination 0 makes the route a default route, additional static routes will appear as additional inet0 attributes with the same format, specifying destinations other than 0 then of course.


    #AIX-Forum