AIX删除多余的默认网关
admin
2023-02-03 20:22:46
0

AIX删除多余的默认网关

系统环境:

操作系统:AIX 5.3.8

Oracle:  Oracle 10gR2

案例分析:

   在AIX系统上有多个默认网关,在安装RAC时,导致网络环境检测错误,无法安装RAC.

AIX删除多余的默认网关


AIX删除多余的默认网关


AIX删除多余的默认网关

   通过smit和route delete删除,系统在重启后又回到原来的状态!


解决方案:

1、查看当前默认网关

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

@系统在重启后,不再出现多个default gw的现象,至此,问题得到解决!

相关内容

热门资讯

首次突破 屡创新高!一组数字解... 2026年上半年我国GDP同比增长4.7%经济韧性持续彰显在已经出炉的经济数据中更值得关注的还有“含...
男主播卖惨,66岁患癌老太花光... 今年3月,沈阳66岁的张阿姨在家养病期间刷视频时,被一名IP属地为湖北的男主播吸引。该主播主打演唱经...
松下智能马桶盖不喷水怎么回事 松下智能马桶盖不喷水怎么回事1、有时候新买的马桶在安装的时候工人有时候会不会告诉你需要开进水阀的,智...
松下智能马桶盖不喷水 1、有时候新买的马桶在安装的时候工人有时候会不会告诉你需要开进水阀的,智能马桶都是带有进水阀的,如果...
智能马桶盖不喷水故障维修方法 如果是出水口不喷水,先检查下是不是里面没水,或者水管出问题了,水管故障问题需找专业的维修师傅维修;若...
马桶水箱盖子碎了能换么 不能,建议更换整个水箱。方法:先检查排污管及产品内通道是否有异物;确定固定蹲便的安装位置、高度以及将...
洗衣机e1是什么故障 洗衣机e1是什么故障出现这个代码时,是表示洗衣机的进水时间超长了,洗衣机的进水系统发生了问题,比如,...
阿联酋航空发文致歉 7月23日,阿联酋航空发布致歉信:原计划于7月22日从迪拜飞往上海的阿联酋航空EK302航班,因恶劣...
给“南海仲裁案”递刀子的美国人... 执笔/李小飞刀7月12日晚,菲律宾内格罗斯东方省锡布兰镇的一处公寓内,突然响起一阵枪声,美国海洋生物...
特朗普称沙特加入《亚伯拉罕协议... △美国总统特朗普(资料图)当地时间7月23日,美国总统特朗普在社交媒体“真实社交”上发文表示,美国能...