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      -        -  

 

  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章