免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 11285 | 回复: 11
打印 上一主题 下一主题

[故障求助] 求助:删除静态路由 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-06-30 18:17 |只看该作者 |倒序浏览
本帖最后由 盗亦有道 于 2010-06-30 18:20 编辑

[TOP]
Routing tables
Destination        Gateway           Flags   Refs     Use  If   Exp  Groups

Route Tree for Protocol Family 2 (Internet):
default            10.163.128.254    UG       21    832200 en4      -      -   =>
default            10.163.128.254    UG       18    274299 en2      -      -
10.163.128.0       10.163.128.89     UHSb      0         0 en4      -      -   =>
10.163.128.0       10.163.128.90     UHSb      0         0 en2      -      -   =>
10.163.128/24      10.163.128.89     U        24  12497834 en4      -      -   =>
10.163.128/24      10.163.128.90     U        53   5913382 en2      -      -
10.163.128.89      127.0.0.1         UGHS      8    110266 lo0      -      -
10.163.128.90      127.0.0.1         UGHS     22    869847 lo0      -      -
10.163.128.255     10.163.128.89     UHSb      0         0 en4      -      -   =>
10.163.128.255     10.163.128.90     UHSb      0         0 en2      -      -
10.163.134.32/31   10.163.128.254    UG        0         1 en4      -      -   =>  这行需要删除
10.163.134.32/31   10.163.128.254    UG        0         0 en2      -      -
10.163.134.35      10.163.128.254    UGH       0         0 en2      -      -
10.163.134.38      10.163.128.254    UGH       0     10821 en4      -      -   => 这行也需要删除
10.163.134.38      10.163.128.254    UGH       0      2716 en2      -      -

试了很多方法,都不能把上面两条en4上的路由删除,很奇怪 lsattr -El inet0 执行结果:
$ lsattr -El inet0
authm         65536                                                     Authentication Methods              True
bootup_option no                                                        Use BSD-style Network Configuration True
gateway                                                                 Gateway                             True
hostname      SHXP0025                                                  Host Name                           True
rout6                                                                   IPv6 Route                          True
route         host,-hopcount,0,,-if,en2,,,,10.163.134.35,10.163.128.254 Route                               True
$

麻烦高手指点一下,谢谢!

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2010-06-30 23:33 |只看该作者
chdev -l inet0 -a delroute=host,-hopcount,0,,-if,en2,,,,10.163.134.35,10.163.128.254

论坛徽章:
0
3 [报告]
发表于 2010-07-01 08:53 |只看该作者
回复 2# yddll

我是要删掉下面两行:
10.163.134.32/31   10.163.128.254    UG        0         1 en4      -      -   =>   
10.163.134.38      10.163.128.254    UGH       0     10821 en4      -      -   =>

执行结果如下:
SHXP0025:/#chdev -l inet0 -a delroute=net,-hopcount,0,,-if,en4,,10.163.134.38,10.163.128.254
Method error (/usr/lib/methods/chginet):
        0514-009 Cannot delete an object from the device
                 configuration database.
0821-216 chginet: Cannot delete route (net,10.163.134.38,10.163.128.254) from CuAt.

SHXP0025:/#

论坛徽章:
0
4 [报告]
发表于 2010-07-01 11:26 |只看该作者
route delete  目标ip地址 网关ip地址

论坛徽章:
0
5 [报告]
发表于 2010-07-01 11:34 |只看该作者
smitty route

论坛徽章:
0
6 [报告]
发表于 2010-07-01 12:21 |只看该作者
同意楼上

smit route -- Remove Static Route

Destination TYPE  是 host

楼主的命令里的type 为什么是 net ?

论坛徽章:
0
7 [报告]
发表于 2010-07-01 12:54 |只看该作者
同意楼上

smit route -- Remove Static Route

Destination TYPE  是 host

楼主的命令里的type 为什 ...
bxwz2004 发表于 2010-07-01 12:21



host的我也试过了,如下:

SHXP0025:/#chdev -l inet0 -a delroute=host,-hopcount,0,,-if,en4,,,,10.163.134.38,10.163.128.254
Method error (/usr/lib/methods/chginet):
        0514-009 Cannot delete an object from the device
                 configuration database.
0821-216 chginet: Cannot delete route (host,10.163.134.38,10.163.128.254) from CuAt.

按smitty route删除如下

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  Destination TYPE                                    host
* DESTINATION Address                                [10.163.134.38]
  (dotted decimal or symbolic name)
* Default GATEWAY Address                            [10.163.128.254]
  (dotted decimal or symbolic name)
  Network MASK (hexadecimal or dotted decimal)       []

执行结果:
Command: failed        stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

Method error (/usr/lib/methods/chginet):
        0514-009 Cannot delete an object from the device
                 configuration database.
0821-216 chginet: Cannot delete route (host,10.163.134.38,10.163.128.254) from CuAt.   

我这台机器的路由不能刷新

论坛徽章:
0
8 [报告]
发表于 2010-07-01 12:56 |只看该作者
回复 5# chalylau

现在的问题主要是把en4上的静态路由删掉,保留en2上的,如下:

10.163.134.32/31   10.163.128.254    UG        0         1 en4      -      -   =>
10.163.134.32/31   10.163.128.254    UG        0         0 en2      -      -

10.163.134.38      10.163.128.254    UGH       0     10821 en4      -      -   =>
10.163.134.38      10.163.128.254    UGH       0      2716 en2      -      -

静态路由重复了

论坛徽章:
0
9 [报告]
发表于 2010-07-01 12:59 |只看该作者
回复 8# 盗亦有道

lsattr -El inet0 的执行结果:


SHXP0025:/#lsattr -El inet0
authm         65536    Authentication Methods              True
bootup_option no       Use BSD-style Network Configuration True
gateway                Gateway                             True
hostname      SHXP0025 Host Name                           True
rout6                  IPv6 Route                          True
route                  Route                               True
SHXP0025:/#

论坛徽章:
0
10 [报告]
发表于 2010-07-01 16:00 |只看该作者
终于删掉了,两条命令就可以完成
route delete -if en4 10.163.134.38 10.163.128.254
route delete -if en4 10.163.134.32/31 10.163.128.254
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP