<PAGE>   1
                                                                   EXHIBIT 10.39

                                    EXHIBIT A

                              CONSULTING AGREEMENT

        This Agreement is entered into as of the date set forth below between
Advanced Fibre Communications, Inc. ("AFC") and the consultant named below
("Contractor").

        In consideration of the mutual covenants set forth herein, AFC hereby
retains Contractor on the terms set forth below:

        1. SERVICES TO BE RENDERED. Contractor will perform services as
described in Attachment A.

        2. PAYMENT FOR CONTRACTOR'S SERVICES. AFC will pay Contractor according
to the terms specified in the Termination Agreement and General Release and as
detailed in Attachment A hereof.

        3. LOCATION OF WORK. Contractor's principal place of work shall be
determined by contractor, except that it will not be at the offices of AFC.

        4. CONTRACTOR'S INDEPENDENT CONTRACTOR STATUS. Contractor will provide
services as an independent contractor, and is not authorized to act as AFC's
agent. Contractor will not be an employee of AFC, and will not be entitled to
Workmen's Compensation Coverage, Unemployment Insurance or any other type of
insurance or benefit normally provided by AFC to its employees. AFC will not
withhold income or Social Security taxes from Contractor's fee. AFC shall have
no financial liability to Contractor as a result of this Agreement, except as
provided in paragraph one above.

        5. EXPENSES. Expenses incurred by Contractor in connection with
performing services to be provided herein shall be borne exclusively by
Contractor and will not be reimbursed by AFC, except as may be set forth herein.

        6. OTHER SERVICES. This Agreement shall not be construed to preclude or
limit Contractor from performing services similar to those provided to AFC to
other persons or entities, provided the confidentiality provisions set forth
below are complied with, and provided such other services do not present a
conflict of interest.


                                       6
<PAGE>   2

        7. CONFIDENTIAL INFORMATION OF OTHERS. Contractor represents that he
will not use, disclose to AFC, or induce AFC to use any confidential information
or documents belonging to others, which he has in his possession. Contractor
represents that this Agreement will not cause Contractor to violate any
copyright or other intellectual property right of any third party.

        8. DEFINITION OF PROPRIETARY INFORMATION. As used herein, the term
"Proprietary Information" refers to any and all information of a confidential,
proprietary or secret nature which is or may be either applicable to, or related
in any way to (i) the business, present or future, of AFC, (ii) the research and
development or investigations of AFC, or (iii) the business of any customer of
AFC. Proprietary Information includes, for example and without limitation, trade
secrets, processes, formulae, data, algorithms, source codes, object codes,
know-how, improvements, inventions, techniques, marketing plans and strategies,
information concerning volume of sales, profits and losses, and any information
regarding current or potential customers. Proprietary Information shall also
include all information of a like nature owned by any other person and furnished
to AFC by such other person pursuant to an undertaking by AFC to maintain the
same in confidence.

        9. PROPRIETARY INFORMATION TO BE KEPT IN CONFIDENCE. Contractor
acknowledges that Proprietary Information is a special, valuable and unique
asset of AFC and/or its customers or licensors, and Contractor agrees at all
times during the period of this Agreement, and thereafter, to keep in confidence
and trust all Proprietary Information. Contractor agrees that during the period
of this Agreement and thereafter, Contractor will not directly or indirectly use
the Proprietary Information other than in the course of performing duties for
AFC, nor will Contractor directly or indirectly disclose any Proprietary
Information or anything relating thereto to any person or entity, except in the
course of performing services under this Agreement and with the consent of AFC.
Contractor will abide by AFC's policies and regulations as may be established
from time to time for the protection of its Proprietary Information.

        10. RETURN OF MATERIALS. At the request of AFC or in the event of any
termination of this Agreement for whatever reason, Contractor will promptly
deliver to 


                                       7
<PAGE>   3

AFC all documents, data, records and other information pertaining to
this Agreement, including information created by Contractor as a result of this
Agreement. Contractor shall not take with him any documents or data, or any
reproductions or excerpt of any document or data, containing or pertaining to
any Proprietary Information.

        11. DISCLOSURE TO AFC; INVENTIONS AS SOLE PROPERTY OF AFC. Contractor
agrees promptly to disclose to AFC any and all inventions, discoveries,
improvements, trade secrets, copyrights, formulae, techniques, processes and
know-how, whether or not patentable or whether or not reduced to practice,
conceived or learned by Contractor during the period of his work on behalf of
AFC, either alone or jointly with others, which relate to or result from the
actual or anticipated scope of this Agreement, or which result, to any extent,
from use of AFC's premises or property (the work being hereinafter collectively
referred to as the "Inventions").

        Contractor acknowledges and agrees that all such Inventions shall be the
sole property of AFC and/or any other person or entity designated by it, and
Contractor hereby assigns to AFC his entire right and interest in and to all
Inventions; provided, however, that such assignment does not apply to any
invention which qualifies for protection under California Labor Code Section
2870. Upon request by AFC, Contractor shall execute any required documents and
furnish all reasonable assistance to AFC in order to vest all rights to the
Inventions in AFC. All data and reports prepared as a result of this Agreement
shall be the exclusive property of AFC and shall be used by Contractor solely in
his work for AFC. If any preexsisting materials are contained in the deliverable
items, Contractor hereby grants a royalty free license to AFC to use such
materials.

        12. INJUNCTION. Contractor agrees that it would be difficult to measure
damage to AFC from any breach by Contractor of the agreements set forth in
Paragraphs 6, 7, 8 and 9 herein, and that injury to AFC from any such breach
would be impossible to calculate, and that money damages would therefore be an
inadequate remedy. Accordingly, Contractor agrees that if he should breach any
provision of Paragraphs 6, 7, 8 and 9, or any of them, AFC shall be entitled, in
addition to all other remedies it may have, to an injunction or other
appropriate


                                       8
<PAGE>   4

orders to restrain any such breach by Contractor without showing or proving any
actual damage sustained by AFC.

        13. TERM OF THIS AGREEMENT. Either party may terminate this Agreement
with no further obligation for unperformed work ten (10) days after written
notice is mailed or given to the other party.

        14. INDEMNIFICATION. Contractor agrees to indemnify and defend AFC and
its employees from any liability for claims arising as a result of services
performed under this Agreement, except for liability occasioned by the
negligence of AFC or its employees.

        15. OTHER OBLIGATIONS. Contractor is not currently obligated, nor will
Contractor assume any obligations which interfere with or are inconsistent with
the services to be performed under this Agreement.

        16. GENERAL.

                  (a) To the extent that any of the promises set forth herein,
or any word, phrase, clause, or sentence thereof shall be found to be illegal or
unenforceable for any reason, such agreement, word, clause, phrase or sentence
shall be modified or deleted in such manner so as to make the agreement as
modified legal and enforceable under applicable laws, and the balance of the
agreement, or parts thereof, shall not be affected thereby, the balance being
construed as severable and independent.

                  (b) This Agreement shall be binding upon Contractor and his
heirs, executors, assigns, and administrators and shall inure to the benefit of
AFC, its successors and assigns and any Subsidiary or Parent of AFC.

                  (c) This Agreement shall be governed by and construed in
accordance with the laws of the State of California.

                  (d) This Agreement may be signed in counterparts, each of
which shall be deemed an original and which together shall constitute one
instrument.

                  (e) The use of the singular in this Agreement includes the
plural, as appropriate.


                                       9
<PAGE>   5

                  (f) This Agreement and Attachment A represent the entire
agreement between Contractor and AFC with respect to the subject matter hereof,
superseding all previous oral or written communications, representations or
agreements. This Agreement may be modified only by a duly authorized and
executed writing, signed by Contractor and the Manager and approved by the
President.


Dated:  12/22/97                      Dated:
      ----------------------------          --------------------------------

Contractor:                           ADVANCED FIBRE COMMUNICATIONS, INC.

By: /s/ DANIEL E. STEIMLE             By: /s/ CARL GRIVNER
   -------------------------------       -----------------------------------
           Daniel E. Steimle                        Carl Grivner
                                                    President and CEO

SS or ER ID#


                                       10
<PAGE>   6

                                  ATTACHMENT A

Contractor will assist, as requested, with the orderly transition of his
responsibilities as the former Vice President, Chief Financial Officer to the
new Vice President, Chief Financial Officer. Contractor agrees to be available
for telephone consultations as needed for the period commencing October 1, 1997
through July 20, 1998. AFC will pay for all of Contractor's reasonable out of
pocket expenses related to providing consulting services hereunder.

In exchange for such services, AFC will compensate Contractor by continuing to
vest the following stock options held by him through July 20, 1998:

<TABLE>
<CAPTION>
                             NQSO              Shares to Vest
Grant Date                   Shares Granted    10/1/97 - 7/20/98                Price
--------------------------------------------------------------------------------------
<S>                         <C>                <C>                             <C>   
January 17, 1997             1,300              542                             $26.50
January 17, 1997             20,000            4167                             $26.50
</TABLE>



Contractor will be permitted to exercise the "shares to vest" (totaling 4709
NQSOs) for a period of ninety (90) days after July 20, 1998.


                                       11