如何測試Bonjour Conformance Test

下載Bonjour Conformance Test,目前Apple改為只開放給開發者帳號下載,請自行申請,懶得申請就直接到免空下載ConformanceTest-1_2_3.zip。在此以公司某台使用中的MFP(多功能事務機)符合Bonjour Logo測試為例。

準備工作:
將MFP和Mac接到access point或Hub,DHCP功能關閉。MFP的TCP/IP設定為Auto IP,Mac網路設定為DHCP。將MFP關機、等待Mac偵測分配到Link-Local Address。

開啓終端機,進入該目錄下輸入:

sudo ./bonjourconformancetest -I en0

輸入管理員密碼後出現訊息:

********************** IMPORTANT NOTICE **********************
Before proceeding any further, ensure that your computer's Ethernet
port is connected to an isolated Ethernet hub with no other devices
connected to it. Running this test on an operational network will
almost always be disruptive to other devices on that network.

Use of this Apple software is subject to the Software License
Agreement ("License") that accompanies it.  Please read the
License carefully before using this software.  If you agree to
be bound by the terms of the License, enter "yes" to proceed
with the test.  Otherwise, enter "no" and the test will abort.

>yes   (在此輸入yes後按enter鍵,將MFP開機)

Starting Test: Mon Aug  8 13:36:05 2011
*** Please Power On Device ***

*** Beginning Link-Local Address Allocation Test ***

15:12:41  starting test: INITIAL PROBING
WARNING: Have not received initial probe from device.  Listening...
WARNING: Have not received initial probe from device.  Listening...
WARNING: Have not received initial probe from device.  Listening...
WARNING: Have not received initial probe from device.  Listening...

約過2至3分鐘等待MFP偵測分配到Link-Local Address才會開始進入測試。

以下測試項目,需要特別設定或動作:
1.測試CABLE CHANGE HANDLING,訊息如下:

15:16:20  starting test: CABLE CHANGE HANDLING
Please unplug the device's network cable for ten seconds and then reconnect.
For a device being tested over its wireless interface, cause the interface to
disassociate from the access point and then re-associate with the access point.

將Hub端的MFP網路線拔除,等待約10秒鐘再插上。

2.測試MANUAL NAME CHANGE,訊息如下:

15:22:34  starting test: MANUAL NAME CHANGE
*** Please manually change the service name "Xerox WorkCentre 6015N (A4:26:DA) (1401)._pdl-datastream._tcp.local." to "New - Bonjour Service Name._pdl-datastream._tcp.local."
WARNING: Have not received probe for new service name.  Listening...
WARNING: Have not received service name deletion record.  Listening...
WARNING: Have not received probe for new service name.  Listening...

進入MFP的Web Page > Protocol > Bonjour(mDNS),修改Printer Name,依照提示訊息改成New - Bonjour Service Name。如果自行改為其他Printer Name,系統會提示修改第二次,如果還是自行改為其他Printer Name,一樣算Pass,但是測試結果會有Warning訊息。

3.測試HOT-PLUGGING,訊息如下:

15:23:56  starting test: HOT-PLUGGING
*** Please unplug the device's network cable for ten seconds and then reconnect. ***
*** For a device being tested over its wireless interface, cause the interface to ***
*** to disassociate from the access point and then re-associate with the access point. ***

*** 15:24:06 Starting sub-test HOT-PLUGGING: INITIAL PROBING
WARNING: Have not received initial probe from device.  Listening...

將Hub端的MFP網路線拔除,等待約10秒鐘再插上。

4.測試LINK-LOCAL TO ROUTABLE COMMUNICATION,訊息如下:

15:26:47  starting test: LINK-LOCAL TO ROUTABLE COMMUNICATION
*** Please manually set test machine (the machine running this test software, not the device being tested) to IP address 17.2.3.4, subnet mask 255.255.255.0 (press enter when done)

將Mac網路設定為手動固定IP,IP為17.2.3.4,子網路遮罩為255.255.255.0,輸入完畢,等待約10秒鐘後再按下enter鍵。

5.測試LINK-LOCAL TO ROUTABLE COMMUNICATION,訊息如下:

15:27:44  starting test: ROUTABLE TO LINK-LOCAL COMMUNICATION
*** Please set the test machine (the machine running this test software)
to a link-local IP address (169.254/16)
(enter when complete)

Mac網路設定為DHCP,等待Mac偵測分配到Link-Local Address完畢後按下enter鍵。

*** Please manually set device to routable address 17.1.1.1, subnet mask 255.255.255.0 (enter when complete)

將MFP的TCP/IP設為手動固定IP,IP為17.1.1.1,子網路遮罩為255.255.255.0, 等待MFP重新開機到待機畫面約10秒鐘,按下enter鍵。

6.測試CHATTINESS,訊息如下:

15:29:54  starting test: CHATTINESS
Starting timer.

需等待非常久的測試時間(最短5個小時,最長超過一天以上),因為可能會出現以下訊息,而延長測試時間︰

Starting timer.
Reveived gratuitous announcement 2305 seconds after start of test.
Starting timer.
Reveived gratuitous announcement 4792 seconds after start of test.
Starting timer.
Reveived gratuitous announcement 6825 seconds after start of test.
Starting timer.
Reveived gratuitous announcement 7498 seconds after start of test.
Starting timer.

目前尚不知其原因為何。

進行單項測試。
共分為三大項測試:
Link-Local Address Allocation Test,輸入:

sudo ./bonjourconformancetest -I en0 –L

Multicast DNS Test,輸入:

sudo ./bonjourconformancetest -I en0 –M

Mixed-Network Interoperability Test,輸入:

sudo ./bonjourconformancetest -I en0 –N

之後出現訊息如下:

*** Beginning Mixed-Network Interoperability Test ***
Please enter the device's service type in the form
  "_._.local.", e.g. "_printer._tcp.local."
  (or try again with "-M"):
>_printer._tcp.local.   (在此輸入MFP的service type)
Starting TTL check (packets will be monitored for the remainder of the mixed-network test)

09:10:52  starting test: LINK-LOCAL TO ROUTABLE COMMUNICATION
*** Please enter the device's link-local IP address in 'dot' notation (or try again with "-L"):
>169.254.60.122   (在此輸入MFP的Link-Local Address)

其餘步驟同第四項。

以下為完整測試Passed的Log(Warning訊息可以忽略):

Bonjour Conformance Test Version 1.2.3
Started Tue Aug  9 15:43:44 2011
Completed Wed Aug 10 08:54:01 2011


Link-Local Address Allocation
-----------------------------
        PASSED: INITIAL PROBING
        PASSED: PROBING: RATE LIMITING
        PASSED: PROBING: CONFLICTING SIMULTANEOUS PROBES
        PASSED: PROBING: PROBE DENIALS
        PASSED: PROBING COMPLETION
        PASSED: SUBSEQUENT CONFLICTS
        PASSED: HOT-PLUG: USE OF PREVIOUS ADDRESS AS FIRST PROBE CANDIDATE
        PASSED: CABLE CHANGE HANDLING
        PASSED: PREMATURE MDNS PROBING
PASSED with 0 warning(s).

Multicast DNS
-----------------------------
        PASSED: INITIAL PROBING
        PASSED: PROBING: SIMULTANEOUS PROBE CONFLICT
        PASSED: PROBING: RATE LIMITING
        PASSED: PROBING: PROBE DENIALS
        PASSED: WINNING SIMULTANEOUS PROBES - ANNOUNCEMENTS
        PASSED: WINNING SIMULTANEOUS PROBES: WINNING SIMULTANEOUS PROBES
        PASSED: SRV PROBING/ANNOUNCEMENTS
        PASSED: SUBSEQUENT CONFLICT - ANNOUNCEMENTS
        PASSED: SUBSEQUENT CONFLICT - A
        PASSED: SUBSEQUENT CONFLICT - ANNOUNCEMENTS
        PASSED: SUBSEQUENT CONFLICT - SRV
        PASSED: SIMPLE REPLY VERIFICATION
        PASSED: SHARED REPLY TIMING - UNIFORM RANDOM REPLY TIME DISTRIBUTION
        PASSED: SHARED REPLY TIMING
        PASSED: MULTIPLE QUESTIONS - SHARED REPLY TIMING - UNIFORM RANDOM REPLY TIME DISTRIBUTION
        PASSED: MULTIPLE QUESTIONS - SHARED REPLY TIMING
        PASSED: REPLY AGGREGATION
        PASSED: MANUAL NAME CHANGE - ANNOUNCEMENTS
        PASSED: HOT-PLUGGING: INITIAL PROBING
        PASSED: HOT-PLUGGING: PROBING: SIMULTANEOUS PROBE CONFLICT
        PASSED: HOT-PLUGGING: PROBING: RATE LIMITING
        PASSED: HOT-PLUGGING: PROBING: PROBE DENIALS
        PASSED: HOT-PLUGGING: WINNING SIMULTANEOUS PROBES - ANNOUNCEMENTS
        PASSED: HOT-PLUGGING: WINNING SIMULTANEOUS PROBES: WINNING SIMULTANEOUS PROBES
        PASSED: HOT-PLUGGING: SRV PROBING/ANNOUNCEMENTS
        PASSED: HOT-PLUGGING: SUBSEQUENT CONFLICT - ANNOUNCEMENTS
        PASSED: HOT-PLUGGING: SUBSEQUENT CONFLICT - A
        PASSED: HOT-PLUGGING: SUBSEQUENT CONFLICT - ANNOUNCEMENTS
        PASSED: HOT-PLUGGING: SUBSEQUENT CONFLICT - SRV
        PASSED: HOT-PLUGGING
        PASSED: NO DUPLICATE RECORDS IN PACKETS
        PASSED: REQUIRED ADDITIONAL RECORDS IN ANSWERS
        PASSED: LEGAL CHARACTERS IN ADDRESS RECORD NAMES
        PASSED: CACHE FLUSH BIT SET IN NON-SHARED RESPONSES
        PASSED: CACHE FLUSH BIT NOT SET IN PROPOSED ANSWER OF PROBES
PASSED with 0 warning(s).

Mixed-Network Interoperability
-----------------------------
        PASSED: LINK-LOCAL TO ROUTABLE COMMUNICATION
        PASSED: ROUTABLE TO LINK-LOCAL COMMUNICATION
        PASSED: CACHE FLUSH BIT NOT SET IN UNICAST RESPONSE
        PASSED: UNICAST INTEROPERABILITY
        PASSED: CHATTINESS
        PASSED: mDNS IP TTL CHECK
        PASSED: DUPLICATE RECORDS CHECK
        WARNING: ADDITIONAL RECORDS IN ANSWER CHECK
PASSED with 1 warning(s).


******************************************************************************
        CONGRATULATIONS: You successfully passed the Bonjour Conformance test
******************************************************************************