Solved

netstat -r: unwanted destinations binding to my routing table

Posted on 2004-10-27
1,102 Views
Last Modified: 2013-12-27
Hello.

One of my Solaris machines is binding to weird desination address when I do netstat -r

Here's a printout.   I just have renamed some of the names from XX.XX to foo.bar for to sanitize my info, but everything is as is
How can I REMOVE this remote binding to those address that have nothing to do with my machine.  Everything I have is on an intranet

# netstat -r

Routing Table:
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
000-001.innovationteam.extern.sw.foo.bar io1-2                 U        2 771400  fciprb2
172.16.1.0           io1-1                 U        3 993412  fciprb1
XXX.XXX.48.0         io1-3                 U        2 330192  hme0
172.18.0.0           172.16.1.254          UG       0     64  
172.19.0.0           254-001.not-in-use.extern.sw.foo.bar  UG       0     64  
BASE-ADDRESS.MCAST.NET io1-1                 U        3      0  fciprb1
default              XXX.XXX.48.1          UG       0    101  
localhost            localhost             UH       04748294  lo0
0
Question by:ROCK1972
    9 Comments
     
    LVL 38

    Expert Comment

    by:wesly_chen
    Hi,

       Use the following command (as root) to remove the route:
       route del -net <IP the destination> <the gateway IP>

       And check /etc/init.d/inetinit and /etc/init.d/inetsvc for some suspecious "routes" then comment them out.

    If you still have issue, please provide the output of "ifconfig -a" (as root) and "netstat -rn", /etc/hosts, /etc/defaultrouter.

    Wesly
    0
     
    LVL 1

    Author Comment

    by:ROCK1972
    Your command worked on one of the address :
    The : BASE-ADDRESS.MCAST.NET  was removed, but the 2 others are still there (000-001.innovationteam.extern.sw.foo.bar)

    How can I disable dynamic routing.  I  don't want and kind of routes to bind without my permission.  
    What parameters I need to change in /etc/init.d/inetinit and inetscv so only the routes I add manually, say in a /etc/rc3.d script are added

    I will give points if you can tell me how to disable dynamic binding. Please advise.
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    Please provide the output of "ifconfig -a" (as root) and "netstat -rn", /etc/hosts, /etc/defaultrouter.

    By the way, RIP is the protocol for dynamic routing. Touch an empty file "/etc/norouter" will disable routed running on the boot-up.

    Wesly
    0
     
    LVL 1

    Author Comment

    by:ROCK1972
    #ifconfig -a
    lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
            inet 127.0.0.1 netmask ff000000
    fciprb1: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
            inet 172.16.1.1 netmask ffffff00 broadcast 172.16.1.255
            ether 0:80:42:f:e0:a4
    fciprb2: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
            inet 172.17.1.1 netmask ffffff00 broadcast 172.17.1.255
            ether 0:80:42:f:e0:a2
    hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
            inet 146.132.60.33 netmask fffff000 broadcast 146.132.63.255
            ether 0:80:42:10:6b:58

    #netstat -rn

    Routing Table:
      Destination           Gateway           Flags  Ref   Use   Interface
    -------------------- -------------------- ----- ----- ------ ---------
    172.17.1.0           172.17.1.1            U        2 774021  fciprb2
    172.16.1.0           172.16.1.1            U        2 996122  fciprb1
    146.132.48.0         146.132.60.33         U        2 331128  hme0
    172.18.0.0           172.16.1.254          UG       0    736  
    172.19.0.0           172.17.1.254          UG       0    736  
    default              146.132.48.1          UG       0   1161  
    127.0.0.1            127.0.0.1             UH       04761670  lo0

    # cat /etc/hosts

    127.0.0.1       localhost loghost       # Loopback
    172.16.1.1      io1-1   io1             # fciprb0 Gateway to Switch 1
    172.17.1.1      io1-2                   # hme0 Gateway to Switch 2
    172.16.1.2      io2-1   io2             # fciprb0 Gateway to Switch 1
    172.17.1.2      io2-2                   # hme0 Gateway to Switch 2
    172.16.1.3      io3-1   io3             # fciprb0 Gateway to Switch 1
    172.17.1.3      io3-2                   # hme0 Gateway to Switch 2
    172.16.1.4      io4-1   io4             # fciprb0 Gateway to Switch 1
    172.17.1.4      io4-2                   # hme0 Gateway to Switch 2

    146.132.60.33   io1-3  
    146.132.60.34   io2-3  
    146.132.60.35   io3-3  
    146.132.60.36   io4-3  

    # cat /etc/defaultrouter
    146.132.48.1

    Ok.  I'll put /etc/norouter, see if it works.  
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    You need to reboot.

    By the way, which 2 routes in the "netstat -rn" you don't want?

    Wesly
    0
     
    LVL 1

    Author Comment

    by:ROCK1972
    Its not with netstat -nr, its with netstat -r that I get the routes I dont want

    netstat -r

    Routing Table:
      Destination           Gateway           Flags  Ref   Use   Interface
    -------------------- -------------------- ----- ----- ------ ---------
    000-001.innovationteam.extern.sw.foo.bar io1-2                 U        2 774085  fciprb2    <---- This one!  What's
    172.16.1.0           io1-1                 U        2 996199  fciprb1
    142.133.48.0         io1-3                 U        2 331152  hme0
    172.18.0.0           172.16.1.254          UG       0    756  
    172.19.0.0           254-001.not-in-use.extern.sw.foo.bar  UG       0    756                    <---- and this one.
    default              142.133.48.1          UG       0   1195  
    localhost            localhost             UH       04762024  lo0

    I want to know how come, and where from, I got this IP address of : 000-001.innovationteam.extern.sw.foo.bar and  254-001.not-in-use.extern.sw.foo.bar  
    0
     
    LVL 1

    Author Comment

    by:ROCK1972
    I guess my question would be how come I see these address with netstat -r and not with netstat -nr....
    0
     
    LVL 38

    Accepted Solution

    by:
    000-001.innovationteam.extern.sw.foo.bar io1-2                 U        2 774085  fciprb2    
    equal to
    172.17.1.0           172.17.1.1            U        2 774021  fciprb2
    It's from the fibre channel card. Are you sure you don't want it?

    172.19.0.0           254-001.not-in-use.extern.sw.foo.bar  UG       0    756                    
    equal to
    172.19.0.0           172.17.1.254          UG       0    736  
    It is from the router "172.17.1.254". It tell you if you want to go to 172.19.0.0 network then you need to go through 172.17.1.254 (fciprb2 interface), not through your default gateway.

    Those are ok to me since you have 3 interface cards.

    Wesly
    0
     
    LVL 1

    Author Comment

    by:ROCK1972
    Ok. I think I know what's going on here.. .  I know how to fix my problem, but thanks for your help.    
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Learn The Basics of Ethical Hacking & Pen Testing

    Computer and network security is one of the fastest growing and most essential industries in technology, meaning companies will pay big bucks for ethical hackers. This is the perfect course to leap into this lucrative career, learning how to use ethical hacking to reveal ...

    When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
    Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now