AIX

AIX

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


#Power
 View Only
  • 1.  Fix GW on reboot AIX 5.2

    Posted Thu December 06, 2007 09:56 AM

    Originally posted by: SystemAdmin


    Does anyone know how to maintain a changed GW on reboot? I need to permanently remove the .254 GW but it returns every reboot despite all my efforts to remove it.
    e.g.
    bash-2.05# netstat -rn
    Routing tables
    Destination Gateway Flags Refs Use If PMTU Exp Groups

    Route Tree for Protocol Family 2 (Internet):
    default 10.130.12.254 UGc 0 0 en0 - - =>
    default 10.130.12.1 UGc 0 0 en0 - -
    <snip>

    bash-2.05# route delete 0 10.130.12.254
    10.130.12.254 net 0: gateway 10.130.12.254

    Now it looks good:
    bash-2.05# netstat -rn
    Routing tables
    Destination Gateway Flags Refs Use If PMTU Exp Groups

    Route Tree for Protocol Family 2 (Internet):
    default 10.130.12.1 UGc 0 0 en0 - -
    10.130.11.10 10.130.12.1 UGHW 0 480 en0 - 1
    <snip>

    bash-2.05# route change 0 10.130.12.1 -active_dgd
    -active_dgd net 0: gateway 10.130.12.1

    Looking even better:
    bash-2.05# netstat -rn
    Routing tables
    Destination Gateway Flags Refs Use If PMTU Exp Groups

    Route Tree for Protocol Family 2 (Internet):
    default 10.130.12.1 UGcA 0 0 en0 - -
    10.130.11.10 10.130.12.1 UGHWA 0 45 en0 - 1

    Reboot and go get a coffee:
    Now the machine does not return a ping except to machines on the same subnet and it is back to the original netstat:
    bash-2.05# netstat -rn
    Routing tables
    Destination Gateway Flags Refs Use If PMTU Exp Groups

    Route Tree for Protocol Family 2 (Internet):
    default 10.130.12.254 UGc 0 0 en0 - - =>
    default 10.130.12.1 UGc 0 0 en0 - -
    <snip>

    Previously it was returning pings from machines on various different subnets.

    There must be something simple that I am missing, Can anyone help?
    Thanks
    #AIX-Forum


  • 2.  Re: Fix GW on reboot AIX 5.2

    Posted Thu December 06, 2007 10:32 AM

    Originally posted by: alethad


    You didn't say so I'll ask. Did you change en0 or other interfaces to the new gateway address?

    regards
    alethad
    #AIX-Forum


  • 3.  Re: Fix GW on reboot AIX 5.2

    Posted Thu December 06, 2007 10:40 AM

    Originally posted by: SystemAdmin


    Yes en0 is the interface, In smitty it all looks fine it has all the correct details after I do the route delete 0 10.130.12.254
    It really is just a case of making the settings last on reboot.
    #AIX-Forum


  • 4.  Re: Fix GW on reboot AIX 5.2

    Posted Thu December 06, 2007 10:39 AM

    Originally posted by: alethad


    Forgot to say.
    If you're not changing the gateway on the interfaces I'm not sure the routing table actually gets flushed on reboot. I think that info is still stored. Have you tried flushing that particular IP?
    If .254 GW is still up & running not sure it won't be detected.
    Just make sure you don't have .254 config'd to any of your interfaces.

    Good luck.
    alethad
    #AIX-Forum


  • 5.  Re: Fix GW on reboot AIX 5.2

    Posted Thu December 06, 2007 10:52 AM

    Originally posted by: SystemAdmin


    Use the "chdev" command or "smitty route" to make the change that will persist. Something like:

    chdev -l inet0 -a route=blahblah

    Use "lsattr -El inet0" to see the stored settings.
    #AIX-Forum


  • 6.  Re: Fix GW on reboot AIX 5.2

    Posted Thu December 06, 2007 11:18 AM

    Originally posted by: SystemAdmin


    bash-2.05# lsattr -El inet0
    authm 65536 Authentication Methods True
    <snip>
    route net,-hopcount,0,,0,10.130.12.254 Route True
    route net,-hopcount,0,,0,10.130.12.1 Route True

    bash-2.05# chdev -l inet0 -a route=10.130.12.1
    Method error (/usr/lib/methods/chginet):
    0514-034 The following attributes do not have valid values:

    No output

    I have tried flushing all routes and recreating it using mktcpip for en0 just cant seem to drop this bogus route
    #AIX-Forum


  • 7.  Re: Fix GW on reboot AIX 5.2

    Posted Thu December 06, 2007 11:58 AM

    Originally posted by: hdkutz


    To change a route do:
    /usr/sbin/chdev -l inet0 -a route=net,-hopcount,1,-netmask,255.255.255.0,0,10.130.12.1
    To delete a route do:
    lsattr -El inet0
    Use the Output to remove the route you want to delete:
    chdev -l inet0 -a delroute=net,-hopcount,0,,0,10.130.12.1

    Cheers,
    ku
    #AIX-Forum


  • 8.  Re: Fix GW on reboot AIX 5.2

    Posted Thu December 06, 2007 12:41 PM

    Originally posted by: SystemAdmin


    Cheers hdkutz this is the info I needed
    All is fixed now - much appreciated
    Thanks
    #AIX-Forum