Re: scan for machines in the subnet



Moe Trin wrote:
On Wed, 07 Mar 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <45ee72e6$0$24598$8404b019@xxxxxxxxxxxxxxx>, David Brown wrote:

Moe Trin wrote:

David Brown wrote:

I would have thought that a switch would not modify the MAC - after all,
it would mess up things like statically assigned IP addresses issued by
a DHCP server.
True - but if you're going to statically assign IP addresses, why not do
so directly? It usually takes less time to do so.
There are a few reasons. In the past, I've directly assigned IP
addresses for servers and the like - as you say, it's the easiest method
(no need to copy MAC addresses between leases files and config files).

We're an R&D facility, and are a bit paranoid, but also the way network
services are funded is a tax on each specific host connected. Thus, we
have procedures in place that keep track of inventory data, and that
includes MAC/IP address as well as where a computer is located (not only
room number, but which port on which switch). None the less, the paperwork
takes less than a minute, and actual configuration is a similar time. This
is done when the O/S is installed, or on the rare occasions when a computer
is moved. The paranoia means that in the event of an IP/MAC mismatch or
other strangeness, there will be a security guard and a member of the NOC
staff at the door within two minutes maximum - neither one smiling.


I've been known to threaten abusers with wire cutters (for their network cables, of course :-), but we are not quite that paranoid! I am considering tracking MACs so that I can detect if someone breaks the rules by adding an unauthorised computer to the network.


However, sometimes things change on a network - dns servers, networks,
etc. They don't change often, fortunately - but I'm reconfiguring
things at the moment (well, I'm planning it - when I've got my new
firewall and router set up, I'll do the reconfiguring), and that means
each manually configured server, workstation and printer must be
changed.

The hostnames and IPs of the DNS, NIS, servers and printers are pretty
much cast in stone. The DNS servers and routers haven't changed IPs
since they were set up in the mid-80s. The hardware has changed, but
not the names or IP addresses.


DNS server addresses *do* change. The root servers do not, obviously, but few workstations access them directly. When we changed ISPs a number of years ago, we changed the DNS servers we used. When I get the new router in place, I'll have an DNS caching server for use by machines on the network - future changes should only apply to that one machine.

It is not easy getting the right balance between things that are locked down and never changed, things that can be changed manually if needed, and things that can be easily changed from a single central point. I have seen others using DHCP for static addresses too - our ISP, for example, prefers customers with fixed IP addresses (like us) to continue to use DHCP.


Printers in particular can be conveniently given an address by the DHCP
server, and that address can be locked in the DHCP server's
configuration, so that addresses are consistent thereafter.

Our printers change names when a new model is received (which generally
means a different printcap entry). But the names are in a recognizable
scheme (general printers are named after newspapers - I'm printing on
'ny-times' - while the spiffy top-of-the-line color jobs are named after
magazines - 'vogue' is the one I normally use now), and our users don't
concern themselves with that very often. They know the name of the
nearest printers (sign on the door, as well as on each printer), so it's
a no-brainer. Even name changes are easy, because the "word on the street"
gets to everyone (big sign on the printer room door "boston-globe is being
replaced with bangkok-post on Thursday") and when the change is made, the
old hostname no longer resolves. Even the most dense user figures it out
eventually.


We don't have so many printers (we have something like 30 - 40 pc's in total) that we need a naming scheme. I was thinking of the case of a couple of printers I configured recently. These are small printers, with little control of their network configuration - you plug them in, they get an IP address by DHCP, and you can print out a page of information including the address. I could then set up the printer on our CUPS server, and the printer is then available to all who need it. If it's IP address changed (our DHCP serving is done by our current firewall/router, which is a bit limited) I'd have to reconfigure the printer on the CUPS server. But with a better DHCP server that can lock static addresses, it would be given a fixed address. Additionally, the printer's name and address could be injected into the (local) DNS server, and the CUPS server would refer to that name.

I guess my main concern about a switch messing with MAC addresses is to
be sure that each PC (or other device) on the network has the same MAC
address every time. It doesn't really matter if the apparent MAC
address for a PC is its true MAC address, or some switch-modified
version, as long as it is always the same and always unique.

Look at the term 'Proxy-ARP'. If the switch is doing that, then all hosts
connected through the switch seem to have the same MAC address - that of
the switch itself. IP addresses are then used by the switch to do the
actual routing from port to port.


"proxy arp" is a term I have come across in my recent web reading, at
http://www.shorewall.net/ProxyARP.htm
although I haven't looked at in detail (basically, I thought it was something significantly beyond what we will need in the foreseeable future on our network).

mvh.,

David

Old guy
.



Relevant Pages

  • Re: SBS 2003 Misconfigured?
    ... The netgear has a setting for the Internet IP which is set to the ... DNS server address is set to SBS server's ip 192.168.5.109 ... but something else is clearly awry if you can't get DHCP ... Which, based on the configuration you gave, is part of the problem. ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS 2003 Misconfigured?
    ... The netgear has a setting for the Internet IP which is set to the ... DNS server address is set to SBS server's ip 192.168.5.109 ... DHCP working - and as Cliff says, that should be a simple thing. ... Which, based on the configuration you gave, is part of the problem. ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS 2003 Misconfigured?
    ... The netgear has a setting for the Internet IP which is set to the ... DNS server address is set to SBS server's ip 192.168.5.109 ... but something else is clearly awry if you can't get DHCP ... Which, based on the configuration you gave, is part of the problem. ...
    (microsoft.public.windows.server.sbs)
  • Network configuration - DHCP with a static alternative
    ... I have a rackmount server which I'm soon going to be colocating. ... it can work in either environment without configuration changes (e.g. ... to have it try DHCP by default, but fall back onto a static ... there's a DHCP server on the local network. ...
    (comp.os.linux.misc)
  • Re: Network configuration - DHCP with a static alternative
    ... > I have a rackmount server which I'm soon going to be colocating. ... > it can work in either environment without configuration changes (e.g. ... > to have it try DHCP by default, but fall back onto a static ... work even if you hand wire _all_ the network params. ...
    (comp.os.linux.misc)