gateway

Dear folks,
How can delete the gateway from smitty or by command, Because I have 2 gatway in the system and I tried to delete by smitty it gave me failed command

route delete <dest_ip> <gw_ip>

But check the ODM too (if it's a Def. GW) maybe with

odmget -q "name=inet0" CuAt
# or
lsattr -El inet0

and delete the unwanted entry with odmdelete.

Since I had problems when I deleted duplicate Def. GW entries even from ODM and having them back again after a reboot, I always write a new boot image now, when doing such changes

bosboot -ad /dev/ipldevice

what do you means by destination address?

Gateways always point to some network or host. So when you do a "netstat -rn" and look at your routing table, you get one column called "Destination".

# netstat -rn
Routing tables
Destination Gateway Flags Refs Use If PMTU Exp Groups

Route Tree for Protocol Family 2 (Internet):
default 172.29.2.127 UGcA 0 0 en1 - - - =>
default 172.29.2.126 UGcA 0 0 en1 - - -10.96.70.81/32 172.29.2.126 UGc 0 0 en1 - - -
10.96.70.222 172.29.2.126 UGHW 2 2318 en1 - - - =>
10.96.70.222/32 172.29.2.126 UGc 0 0 en1 - - -
127/8 127.0.0.1 U 10 8961 lo0 - - -
172.20.239.192/32 255.255.255.254 UGc 0 0 en1 - - -
172.29.2/25 172.29.2.1 U 4 84890 en1 - - -
172.29.2.1 127.0.0.1 UGHS 5 73 lo0 - - - =>
172.29.2.1/32 172.29.2.126 UGc 0 0 en1 - - - =>
172.29.2.1/32 127.0.0.1 UG 0 0 lo0 - - -
172.29.2.126 172.29.2.1 UHSb 5 85182 en1 - - -
172.29.7.192/27 172.29.2.100 UGc 0 0 en1 - - -
172.29.7.197 172.29.2.100 UGHW 0 6 en1 - - - =>
172.29.7.197/32 172.29.2.100 UGc 0 0 en1 - - -
192.168.1.0 192.168.1.2 UHSb 0 0 en0 - - - =>
192.168.1/24 192.168.1.2 U 0 1 en0 - - -
192.168.1.2 127.0.0.1 UGHS 0 1 lo0 - - - =>
192.168.1.2/32 127.0.0.1 UG 0 0 lo0 - - -
192.168.1.255 192.168.1.2 UHSb 0 4 en0 - - -

Route Tree for Protocol Family 24 (Internet v6):
::1 ::1 UH 0 0 lo0 16896 - -

My problem appeared in above specific lines.
I have 2 Def.Gw I tried to delete from smitty but I can't, also I tried to delete by command but I faced problem in destination address. By the result above I need to proper way to delete GW:172.29.2.127.
If possible pls.

I already explained you how to purge it. Where is the problem? :confused:

perform this:
route delete -net xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx

route delete 0 172.29.2.127

Check the ODM with odmget or lsattr as I showed before and remove it if it's there with odmdelete. Also don't forget to write a new bosboot image as stated before.