1848940 Members
6944 Online
104039 Solutions
New Discussion

Re: printers and DNS

 
Dan Copeland_1
Advisor

printers and DNS

Can somebody please point me towards info on adding printers to DNS.

Thanks in advance
4 REPLIES 4
Herve BRANGIER
Respected Contributor

Re: printers and DNS

Hi

If you want your network-based printers to be
known by DNS you just need to add (name, IP) couple
to your DNS configuration. For DNS printers are
hosts as PC, servers,...

Regards,

Herv?

Scott Van Kalken
Esteemed Contributor

Re: printers and DNS

We are doing the same thing soon. Our strategy is simple:

have a sub domain called ptr.company.com

put our printers in there with TXT records denoting model.

then gradually comment them out of hosts files (because we don't want every printer to break after we move ALL of them one weekend).

herman anker
Occasional Contributor

Re: printers and DNS

I simply add them to /etc/hosts, using printer name as host name, then perform the following:

cd /etc/dns
hosts_to_named -f hosts_temp
cd /etc
cp named.boot named.boot.bak
cp /etc/dns/named.boot /etc/named.boot
sig_named kill
/etc/named
Celso Medina Kern
Trusted Contributor

Re: printers and DNS

Hello,

It is not clear if you have dificulties with DNS or concepts on printer names regarding DNS.

If your doubt is include names in DNS, i suggest hosts_to_named. Do you already have DNS up and running?

If it is the second case, it only makes sense if you?re talking about network printers. I liked the idea of using TXT record to describe them and make the move gradually. You still have to create your DNS database, and the only tool in hp-ux is hosts_to_named. It expects you have all your name.domain/IP database in the hosts file. So, depending on flags you pass to this command, it creates your zone/reverse/boot/cache files with appropriate information to run the name server. See hosts_to_named(1M) to build your command. Example:
# mkdir /etc/named.data
# cd /etc/named.data
Make your next updates easier using an options file:
# vi named.opt
-b /etc/named.boot #boot file
-H /etc/hosts #make zones from /etc/hosts
-d myzone.hp.com #domain to make zone from hosts(include as many as you need)
-d myzone2.hp.com.
-N 255.255.255.0 #netmask (optional)
-n 128.5.180 #network address
-n 128.5.181 #network address
-n 128.5.182 #network address
-s server1.myzone.hp.com. #primary DNS server
-s server2.myzone.hp.com. #sec DNS server
-z 128.5.180.1 # make boot file for sec DNS server
-m 50:server1.myzone.hp.com. # prefered mail exchanger for myzone.hp.com
-m 100:server2.myzone.hp.com. # alternate MX for myzone.hp.com

# cd /etc/named.data
# hosts_to_named -f named.opt
# /usr/sbin/named

hosts_to_named provide a mean to create TXT records. You?ll have to insert comments in hosts file, i.e.:
128.5.180.1 myprinter.myzone.hp.com # deskjet 9967CPIII
It will create a TXT record with deskjet 9967CPIII for myprinter.

See also sig_named(1m) to manipulate named.

Regards :)
God bless pessimists, they did the backup!