很奇怪,用netstat -rn 可以看到,但在 smit route 中就是无法删除,提示:
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,192.168.172.68,192.168.11.2) from CuAt.
找到答案:
from: http://linyy37.itpub.net/post/5284/62475
突然明白,为什么删除路由时,有时用smit rmroute 可以成功有时切不成功。
前几天在客户处,刚好客户要册除在AIX系统中的几条静态路由,很奇怪,用smit rmroute册除不了,最后用route delete -net *.*.*.* *.*.*.* 给删除了。
当时没有多想,今天做实验时仔细看错误提示时才发现问题所在“0821-216 chginet: Cannot delete route (net,192.168.0.0,192.168.1.46) from CuAt.”
由于之前的路由是通过route add -net 添加的,没有存放在ODM库是,因此无法通过smit rmroute来进行删除。而只能通过route delete 命令来删除。只有通过smit route 添加的路由才能通过,smit rmroute来册除。因为smit route添加的路由是存放在ODM库中的。豁然开朗呀!
To establish a route so that a computer on one network can send a message to a computer on a different network, enter:
route add 192.100.201.7 192.100.13.7
The 192.100.201.7 address is that of the receiving computer (the Destination parameter). The 192.100.13.7 address is that of the routing computer (the Gateway parameter).
To establish a route so you can send a message to any user on a specific network, enter:
route add -net 192.100.201.0 192.100.13.7
The 192.100.201.0 address is that of the receiving network (the Destination parameter). The 192.100.13.7 address is that of the routing network (the Gateway parameter).
To establish a default gateway, enter:
route add 0 192.100.13.7
The value 0 or the default keyword for the Destination parameter means that any packets sent to destinations not previously defined and not on a directly connected network go through the default gateway. The 192.100.13.7 address is that of the gateway chosen to be the default.
To clear the host gateway table, enter:
route -f