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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deleted route keeps coming back...why?

Status
Not open for further replies.

jerryk

Programmer
Jun 13, 2001
82
US
Hello,

I've begun using an AIX box that had 2 default gateways.
One of them (.242 below) is a router that has been gone for a year. A week ago I deleted (with "route delete") the pointless gateway, but now it's back!

Route Tree for Protocol Family 2 (Internet):
default 10.0.3.242 ........
default 10.0.3.241 ........

I have no /etc/gateways and no /etc/networks file, and /etc/gated contains no references to this route.

How is this route finding it's way back into my routing table?
 
You have to delete it whith smitt else you'll keep it each time you reboot.
 
thats because the route command doesn't write to the ODM. Check also rc.tcpip that is include the route add.
 
follow example:

# lsattr -El inet0
authm 65536 Authentication Methods True
bootup_option no Use BSD-style Network Configuration True
gateway Gateway True
hostname cws Host Name True
rout6 IPv6 Route True
route net,-hopcount,0,,0,10.0.3.242 Route True
route net,-hopcount,0,,0,10.0.3.241 Route True


# chdev -l inet0 -a delroute="net,-hopcount,0,,0,10.0.3.242"


I should solve your problem.

r,.
 
had same problem this week with default gateway retained and also previously with static route not being deleted.
To overcome I did the following;
# netstat -nr (to check what gateway is being used)
#odmget -q "name=inet0" CuAt
You will then get a value from above command, use this in odmdelete.
# odmdelete -q "name=inet0 and value=OUTPUT_FROM_ODMGET" -o CuAt
Then flush all routing tables with smit
I then deleted the TCP/IP info in smit for network card
Rebooted and should have a clean default gateway

Hope this helps
Shaun
 
All,

I forgot to follow up on this....

The advice from ogneimi:
# chdev -l inet0 -a delroute="net,-hopcount,0,,0,10.0.3.242"

did the trick. Thanks!
 
the routes are enregistred in ODM
You can delete via smit
tcpip + route + remove route in ODM
or
via command line
cmd_to_exec: '/etc/route -n -f' 'odmdelete -o CuAt -q "name=inet0 and attribute=route"'

Then , you enregistred you new route with smit utility
 
Try with the 'network options' command no, and the ipignoreredirects option
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top