SUMMARY: DNS IP Cleanup

jagga_at_chamkila.org
Date: 07/31/03

  • Next message: paulose kutty: "Heavy swap"
    Date: Thu, 31 Jul 2003 00:42:18 -0700 (PDT)
    To: sunmanagers@sunmanagers.org
    
    

    Hi Guys,

    I apologize for not sending a Summary sooner but wanted to fix a couple of
    things before I posted... Thanks to Douglas Palmer and everyone who
    replied to my question... Alot of people suggested I use nmap which was
    not an option so I was unable to do so.. but is a good choise if someone
    else out there does have a similar issue and access to nmap.. but the
    following is what I came up with..

    ___________________________________________________
    if ($#argv < 2) then
            echo "Usage: static Building Subnet"
            echo "ex: static 26 95"
            exit
    endif

    cd /usr/local/adm/domain
    touch notp
    touch range

    echo "Searching for Non-Active Ips in Building $argv[1] - Subnet
    $argv[2]..."
    egrep -vi origin\|^\; *hosts.b$argv[1]* |\
    perl -e 'while (<>) {\
            m/(\d{1,3}\.\d{1,3}\.\d{1,3}.\d{1,3})/;\
            print "$1\n" if $1; }' | sort -u | sort -n > ips
    awk -F . -v foo=$argv[2] '{if ($4 > 199 && $4 < 251 && $3 == foo) print
    $0}' ips >> range

    foreach addr(`cat range`)
            /sbin/ping -c 1 $addr
            if ($status != 0) then
                    echo $addr >> notp
            endif
    end
    clear
    echo "Emailing `whoami` a list of all non-responding Static
    IP's in Subnet $argv[2]"
    echo "Note: Null message means all Static IPs are responding"
    cat notp | mail -s "Static IPs Not Responding - Subnet $argv[2] -
    Building $argv[1]" `whoami`

    rm -f range
    rm -f notp
    rm -f ips
    ________________________________________________

    Thanks again for all the suggestions and for taking the time to answer my
    question..

    -Simran H.

    > Hi Guys,
    >
    > We have dns files for about 54 buildings that we are maintaining and I
    > would like to do some IP cleanup since we are running out of statics and I
    > would like to free up the ones that are not being used. Our statics are
    > in the range of 200 - 250 for every subnet and the rest are reserved for
    > dhcp and other networking purposes. Has anyone ever done something
    > similar to this before? I am thinking that the best way to go about doing
    > this would be to create a script that touches each of these files and
    > pings the ips to see if it is responding and if not then stores that ip
    > into a different file. Please let me know if someone has done this before
    > and what would be the best approach for doing this. Also, if someone has
    > a script that does something similar I would be grateful if you could
    > share. Any suggestions or comments would be appreciated.
    >
    > Thanks in advance,
    > Simran H.
    > _______________________________________________
    > sunmanagers mailing list
    > sunmanagers@sunmanagers.org
    > http://www.sunmanagers.org/mailman/listinfo/sunmanagers
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: paulose kutty: "Heavy swap"

    Relevant Pages

    • Re: [opensuse] postfix and helo/ehlo
      ... It is used by small businesses, and also people needing it to ... I wouldn't call it a static ip if these ips are in the same address ... is an ip that is specific to a mac address and will not be ... Even those that do have a special block reserved for statics ...
      (SuSE)
    • Re: Gaussian antenna planar form
      ... Maxwells extension of statics to the time domain' ... immediately responding to. ... source if you state without qualification that Gauss's law of Statics ... I know of no reference anywhere that refers to a radiator or cluster ...
      (rec.radio.amateur.antenna)
    • Re: Gaussian antenna planar form
      ... Maxwells extension of statics to the time domain' ... immediately responding to. ... source if you state without qualification that Gauss's law of Statics ... I know of no reference anywhere that refers to a radiator or cluster ...
      (rec.radio.amateur.antenna)
    • Re: Gaussian antenna planar form
      ... Maxwells extension of statics to the time domain' ... immediately responding to. ... source if you state without qualification that Gauss's law of Statics ... I know of no reference anywhere that refers to a radiator or cluster ...
      (rec.radio.amateur.antenna)
    • Re: Suse Equivalent of rc.local
      ... In suse 10.2, the nearest thing I can find to rc.local is ... You put your script into /etc/init.d ... but remember that statics can be assigned by your dhcp ... I was just about to point you to the skeleton/template script file ...
      (alt.os.linux.suse)