"Has anyone out there
written a script that will read a file (say netmon.seed) and poll each IP
listed and return a list of configured/enabled/up interfaces along with
their IP, network number, and mask?"
I have written a lengthy script to do this (it is for baselining and
trending, but it would work in this situation, albeit overkill). The bad
news is I do not think it would be a good idea to send the whole thing out.
I can lead you in the right direction if the information above is what you
re looking for.
First: Get a copy of RFC1213. This contains the majority of the MIB info
you will need. The best part of this is it -should- be the same across all
vendors.
Second: Start interrogating your routers with snmpget and snmpwalks. The
toughest part for me was finding a way to dynamically understand the number
of interfaces per router/switch (see limitation below). Once you understand
the indexing scheme (starting at 1 and depending on the mib, they may or may
not list all of the interfaces, ie 1,2,3,4,5,6...n (totaling n num of
interfaces) vs 1,2,5,9,10,11,22 (totaling n - definedInterfaces). After
doing a few walks you will see what I mean.
Finally: Gathering, sorting and outputting. This is all up to you, I did
space delimited and in a columnar layout for importing into Excel and
graphing, ie for my baselinining and trending.
--Limitation of my current script is the logic behind learning serial
interfaces, tbd.
--Note: It is not easy to determine which interfaces are currently up and
down. You need to look at Admin and Oper status to make a determination.
All in all, I have prolly given you too much for your solution. I am sure
though I have given you enough information to get started.
Best of luck,
Jason Allison
-----Original Message-----
From: Barr, Scott [mailto:Scott_Barr@csgsystems.com]
Sent: Tuesday, November 27, 2001 8:54 AM
To: 'IBM NetView Discussion'
Subject: RE: [NV-L] Anyone have script to poll routers and return list
of IP enabled interaces ...
Okay I see what you mean. I guess my approach was to do an open discovery
(possible in my network but not in others perhaps) and then use ovobjprint
to dump the subnets into a file. I just figure NETMON is going to be as good
at "polling" things as any script I would write. thanks for the info.
-----Original Message-----
From: Leslie Clark [mailto:lclark@us.ibm.com]
Sent: Monday, November 26, 2001 4:42 PM
To: IBM NetView Discussion
Subject: RE: [NV-L] Anyone have script to poll routers and return list
of IP enabled interaces ...
What I'm after is a list of networks. Object info gives you interface
addresses and masks.
Yes, you want to discover your network first, and take a stab at arranging
it. Once
you decide where you want to put things, then you will want to generate a
location.conf
file that will not leave a lot of stuff laying out for you to put away.
Especially in V7, since
it will put routers away if you tell it what to do with all networks for
the router.
So you want to generate at the very least a list of all configured
networks for each
router in the map. Then programmatically arrange those network entries in
the
desired groupings in the location.conf file. Then rediscover and see how
well it
puts things away. Repeat as necessary.
I assume this is what Don is trying to do as well. Not do the discovery,
but build
a location.conf to handle what does get discovered.
Cordially,
Leslie A. Clark
IBM Global Services - Systems Mgmt & Networking
Detroit
"Barr, Scott"
<Scott_Barr@csgsy To: "'IBM NetView
Discussion'"
stems.com> <nv-l@tkg.com>
Sent by: cc:
owner-nv-l@tkg.co Subject: RE: [NV-L] Anyone
have script to
m poll routers and return list of
IP enabled interaces ...
11/26/01 02:06 PM
Please respond to
IBM NetView
Discussion
Okay I am still missing the point. What is it that this produces that is of
use? Wouldn't using netmon.seed with the router names in it (with discovery
turned off) still produce the same data that could be ripped out of
ovobjprint or ovtopodump? What am i missing?
-----Original Message-----
From: Leslie Clark [mailto:lclark@us.ibm.com]
Sent: Monday, November 26, 2001 1:00 PM
To: IBM NetView Discussion
Subject: RE: [NV-L] Anyone have script to poll routers and return list
of IP enabled interaces ...
What I do is a pretty simple but I don't have a sample script.
Given a list of nodes, use a simple script or commandline awk to
produce a file with a record like this for each node:
rnetstat -I <nodename> | grep -v Network | awk '{print "<nodename> " $4}'
Then run that file and capture the output. That $4 returns all of the
networks to
which the node belongs. That parm on rnetstat is a capital i. A very useful
command. If you have a list mapping routers to sites and maybe parent
site,
you can modify the record above to produce the exact update record for the
location.conf.
(I do it this way because I don't know how to run an awk with a variable in
it.)
Warning: this approach, with no wildcards, can lead you over the 1000
record
max. In that case, in V6, be sure to get the patch from Support and follow
the
instructions for enabling large location.conf files.
Cordially,
Leslie A. Clark
IBM Global Services - Systems Mgmt & Networking
Detroit
"Barr, Scott"
<Scott_Barr@csgsy To: "'IBM NetView
Discussion'"
stems.com> <nv-l@tkg.com>
Sent by: cc:
owner-nv-l@tkg.co Subject: RE: [NV-L] Anyone
have script to
m poll routers and return list
of
IP
enabled interaces ...
11/26/01 12:16 PM
Please respond to
IBM NetView
Discussion
Um, what am I missing? Isn't this what NETMON does? I populates a database
with information about the interfaces?
-----Original Message-----
From: donald.turrentine@amsouth.com
[mailto:donald.turrentine@amsouth.com]
Sent: Monday, November 26, 2001 10:37 AM
To: IBM NetView Discussion
Subject: [NV-L] Anyone have script to poll routers and return list of IP
enabled interaces ...
I am trying to automate much of my map layout using the location.conf file.
Unfortunately all I have been given is a list of loopback addresses for
about 700 routers and another list of hubs/switches. Has anyone out there
written a script that will read a file (say netmon.seed) and poll each IP
listed and return a list of configured/enabled/up interfaces along with
their IP, network number, and mask? I would imagine this would be a useful
tool so hopefully someone has already done this. Any pointers would be
appreciated.
-Don
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
|