HP-UX에서 Network Printer (Laserjet 5000 series) 설정법
1. Jetadmin 설치
A. ftp://ftp-boi.external.hp.com/pub/networking/software/에서 jetadmin 다운로드
i. HP10d621.SD(HP-UX 10.X) 또는 HP11d621.SD(HP-UX 11.X)
ii. swinstall –s /data/HP11d521.SD
2. bootpd, tftp 올리기
A.
/etc/services 파일에서 bootps, bootpc에 주석이 있으면 제거
bootps 67/udp #
Bootstrap Protocol Server
bootpc 68/udp #
Bootstrap Protocol Client
B.
/etc/inetd.conf 파일에서 tftp, bootps에 주석이 있으면 제거
tftp dgram udp
wait root /usr/lbin/tftpd tftpd
bootps dgram udp wait root
/usr/lbin/bootpd bootpd
C. jetadmin 설정 후 /etc/bootptab 파일에 네트워크 프린터 관련 사항 등록됨.
D.
inetd deamon 재시작
# /sbin/init.d/inetd
stop ; /sbin/init.d/inetd start
E.
bootpd, tftpd 확인
# netstat –a | grep
udp
udp *:ftpd
udp *:bootd
3. 네트워크 프린터 설정
A. network printer H/W(MAC) address 확인
i.
프린터에 텔넷
접속
telnet
192.168.0.2 ß 프린터 IP
> / ß “/” 입력
===JetDirect Telnet Configuration===
HP JetDirect : J4169A
Firmware Version : L.21.22
Manufacturing ID : 21214146902121
Hardware Address : 00:01:E6:57:A3:76 ß MAC address
System Up Time : 39:43:01
GENERAL____________________________________
Admin Password : Not Specified
System Location : Not Specified
System Contact : Not Specified
TCP/IP MAIN________________________________
Host
Name : NPI57A376
IP Config Method : USER SPECIFIED
IP
Address : 192.168.0.2
Subnet Mask :
255.255.255.0
Default Gateway : 192.168.0.1
Config Server : Not
Specified (Read-Only)
TFTP Server : Not
Specified (Read-Only)
TFTP Filename : Not
Specified (Read-Only)
Domain Name : Not
Specified
Press RETURN to continue:
ii. Laserjet 5000 시리즈 정보 인쇄
① 프린터의 메뉴, 항목, 선택 버튼 사용
② 메뉴버튼을 눌러서 Information menu 선택
③ 항목버튼을 눌러서 Print configuration 선택
④
선택버튼을 누르고 출력
B. /opt/hpnp/bin/jetadmin 실행
i. main menu에서 1) configuration 선택
ii. configuration에서 1) create printer configuration in BOOTP/TFTP database 선택
iii. printer Hardware Address 입력
① Enter the printer's LAN hardware address: 0001e657a376
②
H/W 주소 입력 다음과 같은 메시지가 출력되면 q를 치고 빠져나온다.
NOTE:
0001e657a376 is not an official address for HP JetDirect!
Continue? (y/n/q, default = n) q
/opt/hpnp/admin/option2 파일을 열어서
080009
| 0060b0 | 100090 | 0001e6 )
현재 프린터 H/W 주소 처음 6자리를 추가해준다. 주석(#) 없이 080009로
시작하는 부분이 2개가 나오는데 모두 H/W 주소를 위와
같이 수정해준다.
그리고 다시 jetadmin에서 다시
configuration한다.
iv.
네트워크 프린터의
이름과 IP 주소를 넣는다. 프린터의 이름과 IP를 /etc/hosts 파일에 추가할 것인 물으면 “y”를 입력한다.
Enter
the network printer name (q - quit): lj
Enter IP address: 192.168.0.2
Add lj and 192.168.0.2 to /etc/hosts? (y/n/q, default=y): y
Printer name and IP address have been added to /etc/hosts.
If your /etc/hosts file is updated automatically from a master
source, add the name and IP address to your master source after
the configuration is complete.
v.
Ethernet 선택
Is this a (1) ethernet or
(2) token-ring connection? (1/2/q, default=1): 1
vi. Other optional parameters에서
① 3) Set subnetmask à 255.255.255.0
② 4) Set gateway à 192.168.0.1
③ 9) Set HP Jetdirect lpd banner page à 2) lpd banner page off 선택
④ “0”을 치고 저장하고 빠져 나온다.
vii. 네트워크 프린터에 대한 BOOTP/TFTP 설정이 완료되면 BOOTP 테스트가 수행된다.
①
BOOTP
simulation test를 마치고 다음과 같은 결과를 받았으면
정상적으로 설정된 것이다.
Please
wait...
(testing, please wait) ...
Testing BOOTP with 080009000000...:
RESULT: Passed BOOTP test 1 with 080009000000.
......
②
다음과 같은 메시지를 뿌리고 BOOTP 테스트로 넘어가지 않을 경우
Can't
perform this task, due to network port has been used by rbootd.
Press the return key to continue ...
rbootd 데몬에 의해 네트워크 포트가 사용되고 있어서 작업을 수행하지 못 한다고 한다면 rboot 데몬을 죽이고 다시 작업을 수행한다.
# /sbin/init.d/rbootd stop ß
rbootd 죽임.
※부팅 시 rbootd 수행하지 않도록 하는 방법은 아직 못 찾았습니다.
③
다음과 같은 메시지를 뿌리고 BOOTP simulation test 실패할 경우
Please
wait...
(testing, please wait) ...
Testing BOOTP with 080009000000...:
RESULT: Failed BOOTP simulation test with dummy address 080009000000.
BOOTP daemon (bootpd) did not
respond.
Check if "bootpd" process is running (use command
"ps").
Check for error messages from bootpd in your syslog file.
Check if the entry for 080009000000 is missing "ip" field.
/etc/inetd.conf 파일에서
bootps, tftp 부분 그리고 /etc/services 파일에서 bootps, bootpc 부분이 주석(#) 처리되어 있지 않은지
확인하고 bootp 및 tftp의 상태를 “netstat –a”로 확인해본다.
/etc/bootptab 파일에 “test:\ ba:\ ……” 부분 삭제 또는 주석 처리한다.
/var/adm/syslog/syslog.log 파일에
Jun 13 23:36:38 g40 syslog: setsockopt(IP_BROADCAST_IF) failed,
errno 22
Jun 13 23:36:38 g40 inetd[570]:
bootps/udp: Exit status 1
위와 같은 로그가 남아있는데 이것에 대한 해결책을 못 찾았습니다.
viii. Spooler에 프린터 추가
① BOOTP simulation test까지 완료했으면 Configuration에서 3) Add printer to local spooler 선택
②
프린터의 이름 또는 IP 주소입력. à /etc/hosts에 등록되어 있음.
Enter the network printer name or IP address
(default=lj, q - quit): lj
③ Configuration Parameters의 1) LP destination이 lj_1으로 setting 되어있다.
④
Configuration
Parameters 설정
6) Additional printer configuration 선택 à
5) banner page 선택 à
banner page를 OFF 시킨다. à “0”을 치고 저장하고
빠져 나온다.
C. 프린터 출력테스트
i.
프린터 스풀
상태 확인
#
lpstat –t
scheduler is running
system default destination: lj_1
device for lj_1: /dev/null
lj_1 accepting requests since Dec 11 20:59
printer lj_1 is idle. enabled since Dec 11 20:59
fence priority : 0
ii. 프린터 출력
①
출력
# lp -dlj_1 /etc/hosts
request id is lj_1-23 (1 file)
②
스풀에는 인쇄작업이 있는데 출력이 안 되는
경우 1번째 용지함에 종이를 넣어본다.
4. 기타(local printer)
A.
/usr/spool/lp/model/laserjet5Si 파일 권한 설정
# chmod 644 laserjet5Si
# chown lp:bin laserjet5Si
B.
stty 명령어로 serial port 설정
MUX에 연결하여 사용하는 프린터의 경우
# stty 9660 –parenb cs8 ixon –istrip clocal crts
C.
lpadmin –pp1 –v/dev/tty0p1 –mdumb
-p: 프린터명
-v: device 명
-m: HP 프린터가 아닌 프린터인 경우 dumb.
D.
/usr/spool/lp/interface/프린터이름 파일
stty raw xxxx –parenb
cs8 ixon –istrip clocal crts <&1 2>/dev/null
à stty raw 9660 –parenb cs8 ixon –istrip clocal
crts <&1 2>/dev/null (두 군데 모두 수정할
것.)
banner=”yes” à # banner=”yes” (주석(#) 처리) ⇒ 출력
시 배너 삽입하지 않기
echo “\014\c” à # echo “\014\c” (두 군데 모두 주석(#) 처리) ⇒ 이전 출력과 다음 출력을 한 페이지에 이어서 찍지 않기. 하나의
출력이 끝나는 마지막 장 skip하고 그 다음의 출력은 새로운 종이에서 출력.