"Al. C" <(E-Mail Removed)> writes:
> I have standard home network... three machines on a Linksys router which
> does the DHCP assignments.
>
> Two of the machines has a local printer.
>
> I want each machine to be able to print to the other machine's printers.
>
> I can get it to work in CUPS when I tell it the IP of each machine in the
> CUPS "add printer". The problem is that often one of the machines with a
> printer is turned off and when it is turned back on it has a different IP
> and obviously I can't print to its printer.
>
> How do you handle that, short of deleting the printer and reinstalling it?
In some routers, you can configure the DHCP server to give out a permanent
address for a given machine, based on the MAC address (ethernet hardware
address). To get the MAC address do an ifconfig on your network address. For
example on this laptop, I get:
--> ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:EB:02:1F:3A
inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:ebff:fe02:1f3a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10674 errors:0 dropped:0 overruns:0 frame:0
TX packets:7599 errors:0 dropped:0 overruns:2 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7559077 (7.2 Mb) TX bytes:1032913 (1008.7 Kb)
Interrupt:10 Base address:0x3000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:251312 errors:0 dropped:0 overruns:0 frame:0
TX packets:251312 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13644383 (13.0 Mb) TX bytes:13644383 (13.0 Mb)
So the MAC address of the ethernet is 00:50:EB:02:1F:3A.
As others have mentioned another solution is to use fixed addresses for your
machines, and use manual routing to the router. To be on the safe side, reduce
the range of the DHCP server cliend addresses so that it doesn't give out the
address used by static hosts.
Another possibility is using a secondary address on the same ethernet device
that is fixed (ie, eth0:1 might be bound to 10.0.0.254, while eth0 gets its
address from DHCP). This is a lot of trouble for 3 machines. I use it in my
home network to fix the server de-jure at 10.0.0.254, so I don't have to
reconfigure things depending on whether tiktok or pumpkin-head are currently
acting as server.
A third possibility is CUPS has printer browsing, which would allow printers to
broadcast their status, and you can automatically pick up printers as they come
online. I don't use this, so I can't say how well it works.
--
Michael Meissner
email:
(E-Mail Removed)
http://www.the-meissners.org