#161871 - 2006-05-15 09:34 AM
Re: Checking existing Subnets
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
You may be able to see if an IP address is active, but I do not think you can reliably check for a subnet. The reason I say that a subnet 10.1.2.128/25 may not exist if the router was reconfigured to 10.1.2.0/24. The original subnet no longer exists but all the IP addresses could stil be active.
Sure, however once you have an active address you would check the subnet mask on the device to determine the subnet. You'd want to do that anyway to avoid pinging the rest of the devices on the subnet which would be a waste of time once you'd determined that it was up.
There are some cuter ways of getting the information. We have centralised DHCP, so I can just enumerate the DHCP scopes looking for any which haven't got any recent leases and then check the default gateway specified in the scope to see if it is available.
I also have a special DNS sub-zone for network equipment to aid my bespoke network monitoring software, so I can very quickly check the state of every router in the network.
Another options is to enumerate DNS to check to active hosts, ignoring IP addresses for sites which have already showed active - this is more accurate when looking for active sites rather than inactive ones.
In my network the primary router at a site is always the last IP address in the network range, so for example if the network is 192.168.8.0/22 then I know that the router LAN address is 192.168.11.254 - given a range of possible networks I can very quickly determine whether they are available.
A more complex solution is to use SNMP to read your local router. If your network is simple enough you will be able to check the routing table for a route to the network that you are interested in. If you have a very complicated network with route summarisation or default routing then you will need to enumerate all the next hop routers recursively until you've mapped your entire network. A sort of KiXtart network discovery.
I'd like to use the network discovery method myself for keeping an eye on my network but unfortunately I'm in the middle of switching from Frame-Relay point-to-point to MPLS cloud, and the next-hop routers are ISP managed devices that we have no access to 
So, there are a number of ways of doing it. What you do depends on what control you already have over your network, how complicated you want to make the process and (most importantly) what you are actually trying to do.
Personally if a network engineer came to me and said that he could not tell me which of the subnets he was responsible for were still active he'd get my boot up his arse as a timely reminder of the importance of keeping documentation up-to-date.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 657 anonymous users online.
|
|
|