Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to delete static route in SMIT

Status
Not open for further replies.

ej72

MIS
Aug 29, 2012
2
US
Long story short, during the course of troubleshooting access to a remote system we entered an incorrect route on our AIX server. In smit route the route is displayed as follows:

204.138.99/24 172.16.1.1 UG 0 0 en1 - -

We have tech support on this server through GE (it is a medical billing server and we have no AIX admins on staff) and they recommended the following to permanently remove the route (if we just do route delete it comes back after reboot):

log on as root
smit route
Remove a Static Route
Put the IP you want to remove and the associated default gateway. Network mask isn't needed as it's not indicated by a * for required field.
Then exit back to a command prompt and type in the following
bosboot -ad /dev/hdisk0
Then
bosboot -ad /dev/hdisk1


The problem is that no matter what I type into smit to delete the route it won't accept it. I don't know if I should choose host or net, 204.138.99.0, 204.138.99/24, etc. Everything I have tried returns an error.

Is anyone able to offer assistance with this? Thank you.
 
Go command line...

First, run the following and locate the route you want to delete:

Code:
lsattr -El inet0

Then, remove the route with the following:

Code:
chdev -l inet0 -a delroute="<route_info>"

example:

Code:
# lsattr -El inet0
authm         65536                                                                    Authentication Methods              True
bootup_option no                                                                       Use BSD-style Network Configuration True
gateway                                                                                Gateway                             True
hostname      aoctoolbox                                                               Host Name                           True
rout6                                                                                  IPv6 Route                          True
route         net,-hopcount,0,-netmask,255.255.255.0,-if,en2,,,,-static,0,192.168.1.21 Route                               True

# chdev -l inet0 -a delroute="net,-hopcount,0,-netmask,255.255.255.0,-if,en2,,,,-static,0,192.168.1.21"

Regards,
Chuck
 
Thank you for the suggestion, here is what happens:

Code:
# lsattr -El inet0
authm         65536                                                                       Authentication Methods              True
bootup_option no                                                                          Use BSD-style Network Configuration True
gateway                                                                                   Gateway                             True
hostname      IDX                                                                         Host Name                           True
rout6                                                                                     IPv6 Route                          True
route         net,-hopcount,0,-netmask,255.255.255.0,,,,,192.168.16.0,10.20.1.1           Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,,,,,172.16.3.0,172.16.1.1            Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,,,,,172.16.4.0,172.16.1.1            Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,,,,,172.16.1.0,172.16.1.1            Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,,,,,198.114.170.0,172.16.1.1         Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,-if,en1,,,,198.114.170.12,172.16.1.1 Route                               True
route         net,-hopcount,0,-netmask,255.255.252.0,,,,,10.15.0.0,10.20.4.231            Route                               True
route         net,-hopcount,0,-netmask,255.255.252.0,,,,,10.19.0.0,10.20.1.1              Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,,,,,192.168.30.0,10.20.4.254         Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,-if,en0,,,,192.168.31.0,10.20.1.1    Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,-if,en1,,,,204.138.99.81,172.16.1.1  Route                               True
route         net,-hopcount,0,,-if,en0,,,,0,10.20.4.254                                   Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,,,,,192.168.3.0,10.20.1.1            Route                               True
route         net,-hopcount,0,-netmask,255.255.255.0,,,,,192.168.5.0,10.20.1.1            Route                               True
# chdev -l inet0 -a delroute="net,-hopcount,0,-netmask,255.255.255.0,-if,en1,,,,204.138.99.81,172.16.1.1"

Method error (/usr/lib/methods/chginet):
        0514-068 Cause not known.
0821-279 writing to routing socket: The process does not exist.
route: not in table or multiple matches
0821-103 : The command /usr/sbin/route delete -net -hopcount 0 -netmask 255.255.255.0 -if en1    204.138.99.81 172.16.1.1 failed.

#

Any ideas?
 
I've seen that message but the route actually does get deleted sometimes . If not you can try to create a new static route with the correct info and see if it will overwrite the "bad" route.

These can be buggers, if all else fails you can either delete all static routes (be prepared to enter all the routes that do work as well as IP info for your NIC ) or edit the ODM which isn't for the faint of heart

Norm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top