AIX

AIX

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


#Power
#Power
 View Only
  • 1.  Duplicated default gateway.

    Posted Tue December 08, 2015 09:33 AM

    Originally posted by: ppereira


    Hi; Yesterday I found that some of our servers had two default routes; two default gateways:

     

    
    #netstat -nr
    Routing tables
    Destination        Gateway           Flags   Refs     Use  If   Exp  Groups
    
    Route Tree for Protocol Family 2 (Internet):
    
    
    default            172.26.45.250     UG       80  36458695 en3      -      -   =>
    default            172.26.45.230     UG       71  32024159 en3      -      -
    127/8              127.0.0.1         U        25  42140072 lo0      -      -
    172.26.45.0        172.26.45.169     UHSb      0         0 en3      -      -   =>
    172.26.45/24       172.26.45.169     U         9 149665378 en3      -      -
    172.26.45.169      127.0.0.1         UGHS      0        55 lo0      -      -
    172.26.45.255      172.26.45.169     UHSb      0         4 en3      -      -
    
    
    #odmget -q attribute=route CuAt
    
    CuAt:
            name = "inet0"
            attribute = "route"
            value = "net,-hopcount,0,,0,172.26.45.250"
            type = "R"
            generic = "DU"
            rep = "s"
            nls_index = 0
    
    CuAt:
            name = "inet0"
            attribute = "route"
            value = "net,,0,172.26.45.230"
            type = "R"
            generic = "DU"
            rep = "s"
            nls_index = 0
    

     

    These are lpars running AIX 6100-06-03-1048 on a P750 server.

    I found this article about AIX Networking: http://www.ibm.com/developerworks/aix/library/au-aixnetworking/

    It states that:

    "One other potential problem that can occur with route manipulation is getting duplicate default routes. This usually happens when someone changes the default route on the primary network interface with the Minimum Configuration & Startup window. The new route takes effect immediately, but the ODM stores both the old and new default routes. Consequently, a reboot can cause the server to come up with two default routes, resulting in all sorts of headaches, visible with netstat -rn."

     

    The default Gateway on this server was changed some time ago, so this could be the case.

    My question is:

    This article was written in 2010.  Is this behaviour still valid?.

    I tryed to duplicate this on AIX 6.1 TL09 and AIX 7.1 and it does not duplicates the default route.

    Why the article says that this is a "potential problem"?.  Is this a bug that happens sometimes?

     

    Regards and thanks in advance.

    Pablo.


    #AIX-Forum


  • 2.  Re: Duplicated default gateway.

    Posted Wed December 09, 2015 02:14 PM

    Originally posted by: AncientAIXer


    The behavior is still valid.  There are several ways to add a default route.  Going through smitty is probably the best way since it seems to take into account whether there is a default route already ( depends upon AIX version, etc ).  Using chdev or route probably would allow you to add a second default route.

    When was the route changed and how was it changed (via smitty, ?)?  It is a potential problem since competing default routes may cause traffic to be have issues.  I've seen networking slow down to a crawl and I've seen it not be able to reach anything outside the local subnet.

    There are several ways to correct this.  The first is to flush the routing table and rebuild the default route.  This has to be done from the console since networking will go away until the default route is rebuilt.  A more non-interruptive method is to delete the route that you don't want.  You can do this with:

     

    route delete 0 172.26.45.2#0

     

    You can also use 'default' instead of 0, and use the IP for the route you want to delete, 230 or 250.

     


    #AIX-Forum


  • 3.  Re: Duplicated default gateway.

    Posted Wed December 16, 2015 02:52 PM

    Originally posted by: lech77


    Run "lsattr -El inet0 -a route" command. You should get this output:

    route net,-hopcount,0,,0,172.26.45.250 Route True
    route net,,0,172.26.45.230 Route True

    Choose which entry you want to delete, then run "chdev -l inet0 -a delroute=net,-hopcount,0,,0,172.26.45.250" or "chdev -l inet0 -a delroute=net,,0,172.26.45.230" to delete it. Be careful not to cut yourself off from the system if you are logged remotely (ie not from HMC virtual console).


    #AIX-Forum