Re: Phantom default gateway
Hi,
greetings from from Austria.
Just one hint:
Default GW entries are stored in device inet0.
Customized routes (e.g. via smit) are stored in en0/en1 ...
Clean up the inet0 device with chdev ...
--jk
Scottz wrote:[color=blue]
> We had temporarily setup an ip on the second nic (en1) of a p510 (AIX
> 5.3.3 ML5).
>
> The second IP was a unique private range and had the default gateway
> of a bogus IP on that range as we didn't want routing to occur.
>
> Once we had completed our use of the second nic, it was unplugged and
> was to remain configured but not in use.
>
> Obviously that now looks like the wrong way to have handled that.
>
> netstat -rn shows two default gateways of course, but I can't seem to
> permanently get rid of the "temporary" one.
>
> I "route delete default (our bogus ip)" to delete it and have tried to
> reset it to the "real" gateway in smit tcpip, but it still comes back
> as the bogus default route after a reboot.
>
> Now I've tried to remove the IP config of second nic altogether
> (blanking it out in smit) which seems to take, except again that
> default gateway keeps coming back after a reboot.
>
> Now I'm confused on where it is keeping that info and how to
> permanently get rid of it.
> Just going through smit and changing it isn't doing the job.
>
> I'm also trying to avoid just deleting it via script on startup.
>
> 1. Was there a better way to have handled the "no route" between nics
> and not have a default gateway?
>
> 2. How can I permanently set that adapter back to "nothing" (i.e. like
> it is when you've just installed)?
>
> Thanks
>[/color]
Re: Phantom default gateway
Scottz wrote:
[color=blue]
> netstat -rn shows two default gateways of course, but I can't seem to
> permanently get rid of the "temporary" one.[/color]
smitty tcpip -> STatic Routed -> Delete a static route
confirm with lsattr -El inet0, there are the static routes listed, also
the dafault gateways
[color=blue]
> I "route delete default (our bogus ip)" to delete it and have tried to
> reset it to the "real" gateway in smit tcpip, but it still comes back
> as the bogus default route after a reboot.[/color]
This is only a temporary measure, remember the ODM.
[color=blue]
> 1. Was there a better way to have handled the "no route" between nics
> and not have a default gateway?[/color]
You forgot to remove the default route permanently.
[color=blue]
> 2. How can I permanently set that adapter back to "nothing" (i.e. like
> it is when you've just installed)?[/color]
rmdev -Rdl enX
cfgmgr
--
Michael Prix
Re: Phantom default gateway
Johann Kappacher wrote:[color=blue]
> Hi,
>
> greetings from from Austria.
>
> Just one hint:
>
> Default GW entries are stored in device inet0.
> Customized routes (e.g. via smit) are stored in en0/en1 ...[/color]
Sorry, a mistake!
Static Routes are stored in inet0,
Ip aliases are stored in en0/en1 ...
--jk
Re: Phantom default gateway
On Sep 9, 7:14 am, Michael Prix <michael.p...@t-online.de> wrote:[color=blue]
> Scottz wrote:[color=green]
> > netstat -rn shows two default gateways of course, but I can't seem to
> > permanently get rid of the "temporary" one.[/color]
>
> smitty tcpip -> STatic Routed -> Delete a static route
>
> confirm with lsattr -El inet0, there are the static routes listed, also
> the dafault gateways
>[color=green]
> > I "route delete default (our bogus ip)" to delete it and have tried to
> > reset it to the "real" gateway in smit tcpip, but it still comes back
> > as the bogus default route after a reboot.[/color]
>
> This is only a temporary measure, remember the ODM.
>[color=green]
> > 1. Was there a better way to have handled the "no route" between nics
> > and not have a default gateway?[/color]
>
> You forgot to remove the default route permanently.
>[color=green]
> > 2. How can I permanently set that adapter back to "nothing" (i.e. like
> > it is when you've just installed)?[/color]
>
> rmdev -Rdl enX
> cfgmgr
>
> --
> Michael Prix[/color]
I seem to have the same issue (a route appear after a reboot, I delete
it, but after rebooting it comes back).
Michael, you mentioned removing them from the ODM. Do you have a set
of instructions? Where are they stored?
Thanks Miles
Re: Phantom default gateway
miles wrote:
[color=blue]
> I seem to have the same issue (a route appear after a reboot, I delete
> it, but after rebooting it comes back).
>
> Michael, you mentioned removing them from the ODM. Do you have a set
> of instructions? Where are they stored?[/color]
Nothing special, just use smitty. The static routes are stored in inet0,
and can be removed with
smitty rmroute
just check afterwards, if the offending entry is removed from inet0 by
lsattr -El inet0
If you don't see the route in netstat, and you perform the
smit-operation, you will get an error but, the entry is still removed
from inet0, as the underlying script tries to remove the entry from the
active routingtable.
--
Michael Prix
q: If you were young again, would you start writing TeX again or would
you use Microsoft Word, or another word processor?
a: I hope to die before I have to use Microsoft Word.
-- <unknown person> asking Donald E. Knuth
Re: Phantom default gateway
On Sep 10, 10:44 am, Michael Prix <michael.p...@t-online.de> wrote:[color=blue]
> miles wrote:[color=green]
> > I seem to have the same issue (a route appear after a reboot, I delete
> > it, but after rebooting it comes back).[/color]
>[color=green]
> > Michael, you mentioned removing them from the ODM. Do you have a set
> > of instructions? Where are they stored?[/color]
>
> Nothing special, just use smitty. The static routes are stored in inet0,
> and can be removed with
>
> smitty rmroute
>
> just check afterwards, if the offending entry is removed from inet0 by
>
> lsattr -El inet0
>
> If you don't see the route in netstat, and you perform the
> smit-operation, you will get an error but, the entry is still removed
> from inet0, as the underlying script tries to remove the entry from the
> active routingtable.
>
> --
> Michael Prix
> q: If you were young again, would you start writing TeX again or would
> you use Microsoft Word, or another word processor?
> a: I hope to die before I have to use Microsoft Word.
> -- <unknown person> asking Donald E. Knuth[/color]
This is interesting. As noted before, when I reboot I get two default
gateways. One I want, the other I don't.
After I reboot, netstat -r, shows (I'm guessing a bit):
default BM1 UG 9 8149463 en1
- -
default MS UG
en0
So I always run:
route delete default ms
Which only works until the next reboot.
But, as you noted, lsattr still shows the route:
lsattr -El inet0
....
route net,-hopcount,0,,0,10.113.210.1
Route True
route net,-hopcount,0,,0,10.113.210.202
Route True
Host ms is .202.
I had a look at the smitty command (f6), and noticed it uses chdev,
not route, to delete the route. ie:
chdev -l inet0 -a delroute=$1,$arg2,$2,$3 with cmd_to_exec 'net'
'default' 'ms'
The smitty command will FAIL:
Method error (/usr/lib/methods/chginet):
0514-068 Cause not known.
0821-279 writing to routing socket: The process does not exist.
0821-103 : The command /usr/sbin/route delete -net 0 10.113.210.202
failed.
But the route STILL gets deleted:
....
lsattr -El inet0
route net,-hopcount,0,,0,10.113.210.1
Route True
I guess we shouldn't be using route delete, to delete any routes! I
didn't know that.
Thanks for you help.
Miles
Re: Phantom default gateway
Thanks, the chdev option does "work" (albeit with the errors you
mentioned for route which is understandable).
What was odd was that there were more than a few other default routes
listed for the primary adapter as well.
These were historic/legacy default gateways used from the time the box
was setup in house to when the box was installed on site.
When switching segments, we would just go in with smit tcpip and
change the info there.
So apparently it doesn't overwrite this info in inet0, it just adds to
it.
Fortunately it seems to use the last one entered and doesn't add the
others to your "live" routing table which is why probably nobody
notices.
It also mostly explains why blanking out the gateway for that nic in
smit didn't delete it in inet0.
It just didn't change anything and kept the old.
Thanks for the help.
Re: Phantom default gateway
miles wrote:
[color=blue]
> I guess we shouldn't be using route delete, to delete any routes! I
> didn't know that.[/color]
As I said before: Remember the ODM. The route command only works against
the actual routing-table, which will be flushed at a reboot (or network
restart). Static entries reside in the ODM and are bound to the devices
(enX, trX, ...) for device-attributes and inet0 for routing. These will
be changed with chdev and/or the appropriate smit-menues.
[color=blue]
> Thanks for you help.[/color]
You?re welcome.
--
Michael Prix
The only sensible way to estimate the stability of a Windows
server is to power it down and try it out as a step ladder.
-- Robert Crawford, in the Monastery