aix 删除多余默认网关

错误信息:

安装crs时跑脚本报错

[root@aix229:/]#/u01/crs_1/root.sh

WARNING:   directory '/u01' is not owned by root

Checking   to see if Oracle CRS stack is already configured

Checking   to see if any 9i GSD is up

/etc/oracle   does not exist. Creating it now.

 

Setting   the permissions on OCR backup directory

Setting   up NS directories

Oracle   Cluster Registry configuration upgraded successfully

WARNING:   directory '/u01' is not owned by root

Successfully   accumulated necessary OCR keys.

Using   ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node   <nodenumber>: <nodename> <private interconnect name>   <hostname>

node 1:   aix229 aix229-priv aix229

node 2:   aix230 aix230-priv aix230

Creating   OCR keys for user 'root', privgrp 'system'..

Operation   successful.

Now   formatting voting device: /dev/rrac_vote1

Format   of 1 voting devices complete.

Startup   will be queued to init within 30 seconds.

Adding   daemons to inittab

Adding   daemons to inittab

Expecting   the CRS daemons to be up within 600 seconds.

Failure at final check of Oracle CRS stack.

10


出错原因:

检查以后发现,en0(192.168.8.230)默认网关是10.10.10.1,所以造成无法通信。进一步检查发现主机设有多个默认网关。AIX中配置了多条的默认网关,会造成网络不稳定(例如时断时好)。


解决方法:

1、查看当前默认网关

如果用route命令(或smitty route)去删除,下次重启后,又会回来;所以要从ODM里删除。

[root@aix230:/]#netstat -nr

Routing   tables

Destination        Gateway           Flags   Refs       Use  If   Exp    Groups

 

Route   tree for Protocol Family 2 (Internet):

default            192.168.8.1       UG        0         0 en0      -        -  

default            10.10.10.1            UG        0         0 en1      -        -

default            10.10.10.1          UG          0         0 en1      -        -

10.10.10.0         10.10.10.230      UHSb      0         0 en1      -        -   =>

10.10.10/24        10.10.10.230      U         0         1 en1      -        -  

10.10.10.230       127.0.0.1         UGHS      0         1 lo0      -        -  

10.10.10.255       10.10.10.230      UHSb      0         4 en1      -        -  

127/8              127.0.0.1         U        13       247 lo0      -        -  

192.168.8.0        192.168.8.230     UHSb      0         0 en0      -        -   =>

192.168.8/24       192.168.8.230     U         4        42 en0      -        -  

192.168.8.230      127.0.0.1         UGHS      0         1 lo0      -        -  

192.168.8.255      192.168.8.230     UHSb      0         4 en0      -        -  

 

Route   tree for Protocol Family 24 (Internet v6):

::1                ::1               UH        0         0 lo0      -        -  

 

 

2、查看ODM信息

[root@aix230:/]#lsattr -El inet0

authm         65536                          Authentication   Methods              True

bootup_option   no                             Use   BSD-style Network Configuration True

gateway                                        Gateway                               True

hostname      aix230                         Host Name                           True

rout6                                        IPv6   Route                          True

route         net,-hopcount,0,,0,192.168.8.1   Route                                 True

route         net,-hopcount,0,,0,10.10.10.1  Route                               True

route         net,-hopcount,2,,0,10.10.10.1  Route                               True

[root@aix230:/]#odmget -q "name=inet0" CuAt

 

CuAt:

        name = "inet0"

        attribute = "hostname"

        value = "aix230"

        type = "R"

        generic = "DU"

        rep = "s"

        nls_index = 24

 

CuAt:

        name = "inet0"

        attribute = "route"

        value = "net,-hopcount,0,,0,10.10.10.1"

        type = "R"

        generic = "DU"

        rep = "s"

        nls_index = 0

 

CuAt:

        name = "inet0"

        attribute = "route"

        value =   "net,-hopcount,0,,0,192.168.8.1"

        type = "R"

        generic = "DU"

        rep = "s"

        nls_index = 0

 

CuAt:

        name = "inet0"

        attribute = "route"

        value = "net,-hopcount,2,,0,10.10.10.1"

        type = "R"

        generic = "DU"

        rep = "s"

        nls_index = 0

标红的为多余网关。

 

3、逐条删除没用的默认路由

[root@aix230:/]#chdev   -l inet0 -a delroute="net,-hopcount,2,,0,10.10.10.1"

inet0   changed

 

4、确认生效

[root@aix230:/]#odmget   -q "name=inet0" CuAt

 

CuAt:

        name = "inet0"

        attribute = "hostname"

        value = "aix230"

        type = "R"

        generic = "DU"

        rep = "s"

        nls_index = 24

 

CuAt:

        name = "inet0"

        attribute = "route"

        value =   "net,-hopcount,0,,0,192.168.8.1"

        type = "R"

        generic = "DU"

        rep = "s"

        nls_index = 0

 

[root@aix230:/]#netstat   -nr

Routing   tables

Destination        Gateway           Flags   Refs       Use  If   Exp    Groups

 

Route   tree for Protocol Family 2 (Internet):

default            192.168.8.1       UG        0         0 en0      -        -  

10.10.10.0         10.10.10.230      UHSb      0         0 en1      -        -   =>

10.10.10/24        10.10.10.230      U         0         1 en1      -        -  

10.10.10.230       127.0.0.1         UGHS      0         1 lo0      -        -  

10.10.10.255       10.10.10.230      UHSb      0         4 en1      -        -  

127/8              127.0.0.1         U        13       247 lo0      -        -  

192.168.8.0        192.168.8.230     UHSb      0         0 en0      -        -   =>

192.168.8/24       192.168.8.230     U         4        42 en0      -        -  

192.168.8.230      127.0.0.1         UGHS      0         1 lo0      -        -  

192.168.8.255      192.168.8.230     UHSb      0         4 en0      -        -  

 

Route   tree for Protocol Family 24 (Internet v6):

::1                ::1               UH        0         0 lo0      -        -  

 

  

你可能感兴趣的:(删除,AIX,默认网关)