User Tools

Site Tools


aix:network_route

Bad default route

  • If you have deleted a default route, and it reappear without any intervention, check the /etc/niminfo once the default route is correct, then restart nimsh.
  • Check the attribute of the device inet0, and delete all unused routes, or all routes and redefine the default with smitty tcpip –> Minimum …
[root@aixsrv]/root# lsattr -El inet0
authm         65536                                  Authentication Methods              True
bootup_option no                                     Use BSD-style Network Configuration True
gateway                                              Gateway                             True
hostname      aixsrv                                 Host Name                           True
rout6                                                IPv6 Route                          True
route         net,-hopcount,0,-active_dgd,0,10.1.0.254 Route                               True
route         net,-hopcount,0,,0,128.19.30.1         Route                               True
route         net,-hopcount,0,,0,10.1.0.254            Route                               True
route         net,,0,128.19.30.1                     Route                               True
[root@aixsrv]/root# chdev -l inet0 -a delroute="net,,0,,0,10.1.0.254"
[root@aixsrv]/root# chdev -l inet0 -a delroute="net,,0,,0,10.1.0.254"
[root@aixsrv]/root# chdev -l inet0 -a delroute="net,,0,,0,128.19.30.1"
[root@aixsrv]/root# chdev -l inet0 -a delroute="net,,0,,0,128.19.30.1"
  • Check into ODM
[root@aixsrv]/root# odmget -q name=inet0 CuAt

CuAt:
        name = "inet0"
        attribute = "hostname"
        value = "aixsrv"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 24

CuAt:
        name = "inet0"
        attribute = "route"
        value = "net,-hopcount,0,,0,128.19.30.1"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 0
  • Check in the file /etc/rc.net, if you detect something suspect, then comment it
[root@aixsrv]/root# cat /etc/rc.net | grep -v "^#"
  • Add now net route
[root@aixsrv]/root# chdev -l inet0 -a route=net,-hopcount,0,,0,[ip address of default gateway]
or attach to en interface
[root@aixsrv]/root# chdev -l inet0 -a route=net,-hopcount,0,if,enX,,0,[ip address of default gateway]
aix/network_route.txt · Last modified: 2021/01/01 21:21 (external edit)