The print subsystem requires access information for the printer. The subsystem uses the destination name when making the network connection to the printer. You supply this name to the print subsystem by using the lpadmin command. This name then becomes part of the printer configuration database. The printer access name is the name of the printer node, sometimes qualified by a port name. Port designation varies across printer vendors. You can find information about port designation in the printer documentation.
Here is the format of printer access name:
Destination names can be specified in one of three forms:
(destination) - Is resolved by locating a printer-uri-supported key/value pair for the named destination in the printers.conf or the printers configuration database. If no printer-uri-supported key is found for an entry, it's bsdaddr value is converted to printer URI form and used.
(scheme://endpoint) - Is completely resolved and specifies the protocol and communication endpoint to contact for print services. This form of destination name is useful for accessing print services outside of your system's current management domain. Since the name includes the protocol to use when contacting the print service, you can select a richer protocol than the RFC-1179 protocol.
(server:queue[:extensions]) - Is complete and resolves to an equivalent printer URI form of lpd://server/printers/queue[#extensions] This form is being maintained for backward compatibility only. The printer URI form is the preferred replacement.
A common port designation with TCP is 9100. If the printer node name is pn1, and the printer vendor defines the port as 9100, then the printer access name is pn1:9100. To configure a printer in this case, use the following command:
lpadmin -p printer_name -o dest=pn1:9100
When you use the BSD protocol, the port designation might not be a number, but some name defined by the printer vendor, for example: xxx_parallel_1. If the printer node name is cardboard, then the printer access name is cardboard:xxx_parallel_1. To configure a printer in this case, use the following command:
lpadmin -p printer-name -o dest=cardboard:xxx_parallel_1
If there is no port designation, and the printer node name is newspaper, the printer access name is the printer node name: newspaper. To configure a printer in this case, use the following command:
lpadmin -p printer-name -o dest=newspaper