AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
Expand all | Collapse all

How to delete unwanted ip in the routing table permanently from AIX server

  • 1.  How to delete unwanted ip in the routing table permanently from AIX server

    Posted Wed February 13, 2008 09:13 PM

    Originally posted by: apple08


    Dear AIX gurus,
    How can i delete the unwanted ip permanently from the routing table even after restart the server? last time i use smit route and delete it.
    i heard something like to soft delete and the unwanted ip will come back again after the server restart.

    looking forward for your awaiting reply. many thanks in advance
    #AIX-Forum


  • 2.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Thu February 14, 2008 04:05 AM

    Originally posted by: tony.evans


    If you delete the static route (which I assume is what you're talking about) from smit, then it will remove it from the ODM as well and it won't come back post-reboot.

    However, if someone has added route commands to some rc files (like a route add) then it'll come back after every reboot until you find it.

    Not really 100% sure what you're asking, hope that helps.
    #AIX-Forum


  • 3.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Thu February 14, 2008 04:25 AM

    Originally posted by: apple08


    Dear AIX Gurus,
    that's really help.
    how can i find the file? can we remove permanently the unwanted entry in th rc file in order to ensure this unwanted route in not come back again after server reboot.
    i don't know who has added the unwanted route in our server. tahnks a lot
    #AIX-Forum


  • 4.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Fri February 15, 2008 04:05 PM

    Originally posted by: ostost


    AIX stores the static routes in the inet0 device. You can display it using the lsattr command like in the example below.

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

    If you wanted to delete the default route through gateway 111.111.111.111 shown in this example you would have to run the following chdev comamand (paste the route as it is display in the lsattr output).

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

    Sometimes the routes are also set through a script which is called from the inittab. In this case do an lsitab -a and verify the scripts called there.

    Message was edited by: ostost
    #AIX-Forum


  • 5.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Thu March 06, 2008 09:57 PM

    Originally posted by: apple08


    after i delete using smit route, i restarted the server the route come back again. how can i delete permanently. i wanted to delete en3 (10.10.10.10 and 10.10.10/24)
    looking 4ward for your awaiting reply. thanks in advance
    1. netstat -rn
    Routing tables
    Destination Gateway Flags Refs Use If Exp Groups

    Route Tree for Protocol Family 2 (Internet):
    default 10.103.0.1 UG 9 2756752 en2 - -
    10.1.0.0 10.1.1.3 UHSb 0 0 en0 - - =>
    10.1/16 10.1.1.3 U 1 474375 en0 - -
    10.1.1.3 127.0.0.1 UGHS 0 64113 lo0 - -
    10.1.255.255 10.1.1.3 UHSb 0 29 en0 - -
    10.2.0.0 10.2.1.3 UHSb 0 0 en2 - - =>
    10.2/16 10.2.1.3 U 2 451219 en2 - -
    10.2.1.3 127.0.0.1 UGHS 0 99407 lo0 - -
    10.2.255.255 10.2.1.3 UHSb 0 27 en2 - -
    10.10.10.0 10.10.10.10 UHSb 0 0 en3 - - =>
    10.10.10/24 10.10.10.10 U 0 2368 en3 - -
    10.10.10.10 127.0.0.1 UGHS 0 5 lo0 - -
    10.10.10.255 10.10.10.10 UHSb 0 1 en3 - -
    10.103.0.0 10.103.1.44 UHSb 0 0 en2 - - =>
    10.103/16 10.103.1.44 U 15 1907436 en2 - -
    10.103.1.44 127.0.0.1 UGHS 0 0 lo0 - -
    10.103.1.45 127.0.0.1 UGHS 0 13 lo0 - -
    10.103.255.255 10.103.1.44 UHSb 0 0 en2 - -
    127/8 127.0.0.1 U 14 378475 lo0 - -

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


  • 6.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Sat March 08, 2008 04:29 AM

    Originally posted by: IBMFORUMS


    what is your "ifconfig -a" output?
    #AIX-Forum


  • 7.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Sun March 09, 2008 08:15 PM

    Originally posted by: apple08


    Dear AIX guru,
    the output of ifoconfig -a is:

    1. ifconfig -a
    en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
    inet 10.1.1.3 netmask 0xffff0000 broadcast 10.1.255.255
    tcp_sendspace 131072 tcp_recvspace 65536
    en2: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
    inet 10.2.1.3 netmask 0xffff0000 broadcast 10.2.255.255
    inet 10.103.1.45 netmask 0xffff0000 broadcast 10.103.255.255
    inet 10.103.1.44 netmask 0xffff0000 broadcast 10.103.255.255
    tcp_sendspace 131072 tcp_recvspace 65536
    en3: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
    inet 10.10.10.10 netmask 0xffffff00 broadcast 10.10.10.255
    tcp_sendspace 131072 tcp_recvspace 65536
    lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
    inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
    inet6 ::1/0
    tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
    #AIX-Forum


  • 8.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Sun March 09, 2008 10:02 PM

    Originally posted by: orphy


    If you don't need en3 anymore, try removing en3 using "smitty rminet" and then a reboot to see if it goes away. If not, you have more investigations to do.

    Orphy
    #AIX-Forum


  • 9.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Mon March 10, 2008 03:39 AM

    Originally posted by: apple08


    dear AIX Guru,
    we wanted to delete one entry.the network card is being used by others. last time i deleted using smit route and # route delete, but it come back again after we restarted the server. can we delete it the entry permanently. hope to hear frm you. thanks a lot
    #AIX-Forum


  • 10.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Mon March 10, 2008 11:00 AM

    Originally posted by: orphy


    I'm somewhat confused and I might be missing something. It seems to me that you are trying to delete a route that is used by others. When you configure en3 to have that IP, AIX will create a route in the routing table for you. You typically can't get to these "others" from this AIX box without the entry in the routing table (at least not without wasting additional network bandwidth).

    If you have a special routing need, you can add your own "route add/delete" command in a script and call it from inittab. Some people put entries in /etc/rc.net which I don't recommend. Should you want to deal with inittab, please beware that a corrupted inittab could render your AIX box to be un-bootable so be careful.

    Orphy
    #AIX-Forum


  • 11.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Mon March 10, 2008 08:58 PM
      |   view attached

    Originally posted by: apple08


    thank you. very great reply. how to edit the rc.net file? i can see default gateway entries, but it involves scripting entries. how can i edit this file. attached is the rc.net file i get from our aix server. hope to hear from you. thank you
    #AIX-Forum

    Attachment(s)



  • 12.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Tue March 11, 2008 07:20 AM

    Originally posted by: orphy


    Like I said previously, I don't recommend you changing rc.net. If it more so now that you have issue doing the editing but if you must, try vi or any text editor (Emacs, Pico, etc). It's nothing more than a plain text file. How do you usually edit AIX text files? You simply do it the same way.

    Orphy
    #AIX-Forum


  • 13.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Tue March 11, 2008 09:24 AM

    Originally posted by: IBMFORUMS


    if you have ent3 configured in your system, you see an entry in routing table.

    if you wana get rid of the ent3, use smit chinet.

    or better:

    rmdev -dl en3
    rmdev -dl ent3
    cfgmgr

    but remember this will remove the whole configuration of ent3 in the odm.
    #AIX-Forum


  • 14.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Wed April 09, 2008 11:46 AM

    Originally posted by: SystemAdmin


    Ok, I am experiencing the same type of issue. When someone configured our server, he accidentally typed in 172.24.255.255 as the gateway during initial setup.
    These entries are all before the route delete command being run
    netstat -r:
    Route Tree for Protocol Family 2 (Internet):
    default 172.24.20.1 UGc 0 0 en0 - - -
    10.1.30.12 172.24.20.1 UGHW 0 1 en0 - - -
    127/8 localhost U 4 247 lo0 - - -
    172.24.0.0 wdsvista UHSb 0 0 en0 - - - =>
    172.24/16 wdsvista U 5 721 en0 - - -
    wdsvista localhost UGHS 5 71 lo0 - - -
    172.24.255.255 wdsvista UHSb 0 1 en0 - - -
    We have run the route delete 172.24.255.255 wdsvista, and the entry seems to go away but when I reboot the system, the entry remanifests itself. Running ifconfig -a:
    en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,CHAIN>
    inet 172.24.30.237 netmask 0xffff0000 broadcast 172.24.255.255

    Here are the entries after trying to clean-up:
    route delete 172.24.255.255 wdsvista
    Route Tree for Protocol Family 2 (Internet):
    default 172.24.20.1 UGc 0 0 en0 - - -
    wfsnt36.westcorp.c 172.24.20.1 UGHW 1 50 en0 1500 - -
    127/8 localhost U 5 267 lo0 - - -
    172.24.0.0 wdsvista UHSb 0 0 en0 - - - =>
    172.24/16 wdsvista U 3 863 en0 - - -
    wdsvista localhost UGHS 5 71 lo0 - - -

    Route Tree for Protocol Family 24 (Internet v6):
    ::1 ::1 UH 0 0 lo0 16896 - -
    1. ifconfig -a
    en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,CHAIN>
    inet 172.24.30.237 netmask 0xffff0000 broadcast 172.24.255.255
    tcp_sendspace 131072 tcp_recvspace 65536

    **It is still showing up incorrectly in the ifconfig -a table.**

    Message was edited by: rteeter
    #AIX-Forum


  • 15.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Wed April 09, 2008 12:02 PM

    Originally posted by: j.gann


    AIX routing is different from other unixes. When you configure IP on an interface, you get some routing table entries as an extra bonus. These are 2 broadcast routes and 1 loopback route, which help aix to optimize networking (MTU size e.g.). There used to be a good document called "Two noticeable routing changes" on the IBM site, but not so anymore.

    It makes no sense to try and delete these routes.
    Regards
    Joachim

    Example:
    en1: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
    inet 172.29.176.68 netmask 0xffffff00 broadcast 172.29.176.255

    172.29.176.0 172.29.176.68 UHSb 0 0 en1 - - =>
    172.29.176/24 172.29.176.68 U 3 667 en1 - -
    172.29.176.68 127.0.0.1 UGHS 0 1 lo0 - -
    172.29.176.255 172.29.176.68 UHSb 0 4 en1 - -

    UHSb is for "broadcast routes", the lo0 route is a loopback route

    Message was edited by: j.gann
    #AIX-Forum


  • 16.  Re: How to delete unwanted ip in the routing table permanently from AIX ser

    Posted Wed April 09, 2008 12:37 PM

    Originally posted by: SystemAdmin


    I have seen this same problem before. Usually you can resolve this by following the suggestion in reply #4 of this thread.
    #AIX-Forum