<PAGE>

                                                                    EXHIBIT 10.5

                   AMENDED AND RESTATED CONSULTING AGREEMENT
                   -----------------------------------------

     This AMENDED AND RESTATED CONSULTING AGREEMENT, dated as of January 1, 2001
(the "Agreement"), by and among Acterna Corporation (formerly named Dynatech
      ---------
Corporation), a Delaware corporation (formerly incorporated in Massachusetts)
(the "Company"), Acterna, LLC (formerly named Telecommunications Techniques
      -------
Company, LLC), a Delaware limited liability company ("Acterna", and together
                                                      -------
with the Company and its subsidiaries the "Company Group") and Clayton, Dubilier
                                           -------------
& Rice, Inc., a Delaware corporation ("CD&R").
                                       ----

                              W I T N E S S E T H:
                              - - - - - - - - - -

     WHEREAS, the parties hereto entered into an Indemnification Agreement,
dated May 21, 1998 (the "Indemnification Agreement"), by and among the Company,
                         -------------------------
Acterna, CD&R and Clayton, Dubilier & Rice Fund V Limited Partnership, a Cayman
Islands exempted limited partnership (capitalized terms used herein without
definition having the meanings ascribed in the Indemnification Agreement);

     WHEREAS, pursuant to an Agreement and Plan of Merger, dated as of December
20, 1997 (the "Merger Agreement"), by and between the Company and CDRD Merger
               ----------------
Corporation, a Delaware corporation ("MergerCo") formed by the CD&R Fund,
                                      --------
MergerCo has merged with and into the Company (the "Merger") effective May 21,
                                                    ------
1995;

     WHEREAS, CD&R has performed financial, management advisory and other
services for the Company, including but not limited to assistance in connection
with (i) the preparation, negotiation, execution and delivery of the Merger
      -
Agreement, (ii) the preparation, filing and circulation of the S-4, the 13E-3
            --
and related materials to the stockholders of the Company in connection with the
Merger, (iii) the retention of legal, accounting, environmental, insurance,
         ---
investment banking, financial and other advisors and consultants in connection
with the Merger, (iv) the preparation, negotiation, execution and delivery of
                  --
the commitment, fee and engagement letters, registration rights and purchase
agreements, credit agreements, indentures and indenture supplements, guarantees,
mortgages, pledge agreements and other security agreements, subscription,
registration rights agreements, management equity agreements, exchange agent
agreements, and other agreements, instruments and documents, relating to the
Senior Secured Financing, Note Offering, or otherwise relating to the Financing
or the other Transactions, (v) the preparation and circulation of information
                            -
and offering memoranda and other materials in connection with the Senior Secured
Financing and the Note Offering and (vi) the structuring, implementation and
                                     --
consummation of the Merger (such services collectively, the "Merger Services");
                                                             ---------------

     WHEREAS, the parties hereto entered into a Consulting Agreement, dated as
of May 21, 1998 (the "Original Agreement"), pursuant to which the Company and
                      ------------------
Acterna receive financial and managerial advisory services from CD&R;
<PAGE>

     WHEREAS, in accordance with a determination of the Boards of Directors of
Acterna and the Company at meetings of the Boards held on February 1, 2001, the
parties to the Original Agreement wish to amend certain provisions of the
Original Agreement relating to, among other things the services to be provided
by CD&R to the Company Group and the compensation to be paid by the Company
Group to CD&R and, in connection therewith, to amend and restate the Original
Agreement in its entirety;

     NOW, THEREFORE, in consideration of the premises and the respective
agreements hereinafter set forth and the mutual benefits to be derived herefrom,
the parties hereto hereby agree as follows:

     1.  Engagement. The Company hereby engages CD&R as a consultant, and CD&R
         ----------
hereby agrees to provide financial and managerial advisory services to the
Company Group, all on the terms and subject to the conditions set forth below.

     2.  Services, etc.  (a) CD&R hereby agrees during the term of this
         -------------
Agreement to assist, advise and consult with the respective Boards of Directors
and management of the members of the Company Group in such manner and on such
business, management and financial matters, and provide such other financial and
managerial advisory services (collectively, the "Continuing Services"), as may
                                                 -------------------
be reasonably requested from time to time by the Board of Directors of the
Company, including but not limited to assistance in:

       (i)  establishing and maintaining banking, legal and other business
            relationships for the Company Group;

      (ii)  developing and implementing corporate and business strategy and
            planning for the Company Group, including plans and programs for
            improving operating, marketing and financial performance and
            budgeting of future corporate investments;

      (iii) arranging future debt and equity financings and refinancings; and

      (iv)  providing professional employees to serve as directors of the
            members of the Company Group.

      (b) CD&R hereby agrees during the term of this engagement to provide each
member of the Company Group financial advisory, investment banking and other
similar services (the "Transaction Services") with respect to any proposal for
                       --------------------
an acquisition, merger, recapitalization or any other similar transaction
directly or indirectly involving such member of the Company Group and any other
person or entity (collectively, "Add-on Transactions").
                                 -------------------

      (c) Each of Acterna and the Company will furnish CD&R with such
information as CD&R believes appropriate to its engagement hereunder (all such
information so furnished being referred to herein as the "Information"). Acterna
                                                          -----------
and the Company recognizes and confirms that (i) CD&R will use and rely
                                              -
primarily on the Information and on information available from generally
recognized public sources in performing the

                                       2
<PAGE>

services to be performed hereunder and (ii) CD&R does not assume responsibility
                                        --
for the accuracy or completeness of the Information and such other information.

     (d) As used in this Agreement, "affiliate" means, with respect to any
person or entity, any other person or entity directly or indirectly controlling,
controlled by or under common control with such first person or entity and
"control' means the possession, directly or indirectly, of the power to direct
or cause the direction of the management policies of a person or entity by
reason of ownership of voting securities, by contract or otherwise.

     3.  Compensation; Payment of Expenses.  (a)  Concurrently with the
         ---------------------------------
execution of the Original Agreement, the Company and Acterna paid CD&R as
compensation for the Merger Services, a fee of $9,200,000.

     (b) The Company and Acterna jointly and severally agree to pay to CD&R, as
compensation for the Continuing Services rendered and to be rendered by CD&R
hereunder, a fee of $1,000,000 per year (the "Continuing Services Fee"), one
                                              -----------------------
quarter of which shall be payable quarterly in advance on the first day of each
of January, April, July and October commencing on January 1, 2001.  Any
Continuing Services Fees due for the quarterly period commencing January 1, 2001
that has not been paid shall be payable on the date hereof.  Such Continuing
Services Fee may be increased with the approval of a majority of the members of
the Company's Board of Directors who are not employees of any member of the
Company Group, CD&R or any affiliate of CD&R (the "Disinterested Directors"),
                                                   -----------------------
but may not be decreased without the prior written consent of CD&R.  If any
employee of CD&R shall be elected to serve on the Board of Directors of any
member of the Company Group (a "Designated Director"), in consideration of the
                                -------------------
Continuing Services Fee being paid to CD&R, CD&R shall cause such Designated
Director to waive any and all compensation, including without limitation, fees,
stock options, equity participation and other incentives, to which such director
would otherwise be entitled as a director for any period for which the
Continuing Services Fee or any installment thereof is paid and for which such
Designated Director continues to be employed by CD&R.

     (c) If an employee of CD&R is appointed to an executive management position
(or a position of comparable responsibility), whether in addition to or other
than as a Designated Director, in any member of the Company Group, then for the
period of such employee's service in such position the Continuing Services Fee
shall be increased by an amount to be determined by CD&R, such amount not to
exceed 100% of the Continuing Services Fee in effect at such time.

     (d) The Company and Acterna jointly and severally agree to pay to CD&R upon
consummation of any Add-on Transaction, as compensation for Transaction Services
rendered by CD&R hereunder with respect to such Add-on Transaction, a cash fee
equal to 1.0% of the Transaction Value of such Add-on Transaction (the "Add-on
                                                                        ------
Fee").  Payment by the Company or Acterna of an Add-on Fee in excess of 1.0% of
---
the Transaction Value of the Add-on Transaction shall require the approval of a
majority of the Disinterested Directors, provided that an Add-on Fee shall not
                                         --------
be payable in

                                       3
<PAGE>

connection with the sale by way of merger or otherwise of all or substantially
all of the outstanding shares of capital stock of the Company or the sale of all
or substantially all of the assets of the Company and its subsidiaries. As used
herein, the term "Transaction Value" means the total value of the Add-on
Transaction, including, without limitation, the aggregate amount of the cash
funds or other securities required to complete the Add-on Transaction (excluding
any fees payable pursuant to this Section 3(d)) including the amount of any
indebtedness, preferred stock or similar items assumed, refinanced or left
outstanding. For purposes of calculating the Add-on Fee, the value of any
securities included in the Transaction Value will be determined by the average
of the last sales prices for such securities on the five trading days ending
five days prior to the consummation of the Add-on Transaction, provided that if
                                                               --------
such securities do not have an existing public trading market, the value of the
securities shall be their fair market value as mutually agreed between the
Company, Acterna and CD&R on the day prior to consummation of the Add-on
Transaction.

     (e) The Company and Acterna jointly and severally agree to reimburse CD&R
for such reasonable travel and other out-of-pocket expenses ("Expenses") as may
                                                              --------
have been or be incurred by CD&R and its employees, agents and advisors in the
course or on account of rendering any services hereunder, including but not
limited to any reasonable fees and expenses of any legal, accounting or other
professional advisors to CD&R engaged in connection with the services being
provided hereunder and any reasonable expenses incurred by any Designated
Director in connection with the performance of his or her duties.  CD&R may
submit monthly expense statements, which shall be payable within thirty days.

     4.  Term, etc.  (a)  This Agreement shall be in effect until, and shall
         ---------
terminate upon, the earlier to occur of (x) the tenth anniversary of the date of
                                         -
the Original Agreement and (y) the date on which the CD&R Fund no longer owns
                            -
any shares of the capital stock of the Company, and may be earlier terminated by
either party hereto upon 30 days' prior written notice to the other party
hereto.  The provisions of this Agreement shall survive any termination of this
Agreement, except for the provisions of Section 1, Section 2(a), Section 2(b),
the first sentence of Section 2(c) and (solely as to any portion of any
Continuing Services Fee, any Add-on Fee or any Expense not paid or reimbursed
prior to such termination and not required to be paid or reimbursed thereafter
pursuant to Section 4(c) hereof) Section 3 hereof.

     (b) Upon any consolidation or merger, or any conveyance, transfer or lease
of all or substantially all of the assets of Acterna or the Company, the
successor corporation formed by such consolidation or into which Acterna or the
Company are merged or to which such conveyance, transfer or lease is made shall
succeed to, and be substituted for, Acterna or the Company under this Agreement
with the same effect as if such successor corporation had been a party thereto.
No such consolidation, merger or conveyance, transfer or lease of all or
substantially all of the assets of Acterna or the Company shall have the effect
of terminating this Agreement or of releasing Acterna or the Company or any such
successor corporation from its obligations hereunder.

                                       4
<PAGE>

     (c)  Upon any termination of this Agreement, any accrued and unpaid
installment of the Continuing Services Fee or portion thereof (pro rated, with
respect to the month in which such termination occurs, for the portion of such
month that precedes such termination), any accrued and unpaid Add-on Fee or
portion thereof and any unpaid and unreimbursed Expenses that shall have been
incurred prior to such termination (whether or not such Expenses shall then have
become payable), shall be immediately paid or reimbursed, as the case may be, by
Acterna or the Company.  In the event of the liquidation of Acterna or the
Company, all amounts due CD&R hereunder shall be paid to CD&R before any
liquidating distributions or similar payments are made to stockholders of
Acterna or the Company.

     5.  Indemnification.  (a) Each of Acterna and the Company confirms and
         ---------------
reaffirms its obligations pursuant to the Indemnification Agreement, as the same
may be amended, waived, modified or supplemented from time to time.  Without
limiting the generality of the foregoing, each of Acterna and the Company
confirms and agrees that (a) it shall indemnify, defend and hold harmless CD&R,
                          -
the CD&R Fund, CD&R Associates, CD&R Investment Associates Inc., Associates II,
their respective successors and assigns and each of the respective directors,
officers, partners, employees, agents, advisors, representatives and controlling
persons (within the meaning of the Securities Act of 1933, as amended) and their
respective successors and assigns (collectively, "Indemnitees") from and against
                                                  -----------
any and all claims, obligations, liabilities, causes of action, actions, suits,
proceedings, investigations, judgments, decrees, losses, damages, fees, costs
and expenses (including without limitation interest, penalties and fees and
disbursements of attorneys, accountants, investment bankers and other
professional advisors) (collectively, "Obligations"), whether incurred with
                                       -----------
respect to third parties or otherwise, in any way resulting from, arising out of
or in connection with, based upon or relating to, the performance of the
services contemplated hereby, except to the extent that any such Obligation is
found in a final judgment by a court having jurisdiction to have resulted from
the gross negligence or intentional misconduct of an Indemnitee,  (b) no
                                                                   -
Indemnitee shall have any liability (whether direct or indirect, in contract or
tort or otherwise) to any member of the Company Group or their respective
security holders or creditors with respect to any Obligation in any way
resulting from, arising out of or in connection with, based upon or relating to,
the performance of the services contemplated hereby, except to the extent that
any such Obligation is found in a final judgment by a court having jurisdiction
to have resulted from the gross negligence or intentional misconduct of an
Indemnitee, and (c) the rights of each Indemnitee to be indemnified under any
                 -
agreement, document, certificate or instrument or applicable law are independent
of and in addition to any rights of such Indemnitee under any other agreement,
document, certificate or instrument or applicable law.

     (b)  Acterna and the Company jointly and severally hereby agree to advance
costs and expenses, including attorneys' fees, incurred by CD&R (acting on its
own behalf or, if requested by any such Indemnitee other than itself, on behalf
of such Indemnitee) or any Indemnitee in defending any claim relating to any
Obligation in advance of the final disposition of such claim within 30 days of
receipt from CD&R of (i) a notice setting forth the amount of such costs and
                      -
expenses (a "Payment Notice") and (ii) an undertaking by or on behalf of CD&R or
             --------------        --
such Indemnitee to repay amounts so advanced if it shall

                                       5
<PAGE>

ultimately be determined that CD&R or such Indemnitee is not entitled to be
indemnified by the Company as authorized by this Agreement. CD&R may submit
Payment Notices to the Company monthly.

     6.  Independent Contractor Status.  The parties agree that CD&R shall
         -----------------------------
perform services hereunder as an independent contractor, retaining control over
and responsibility for its own operations and personnel.  Neither CD&R nor any
of its employees or agents shall, solely by virtue of this Agreement or the
arrangements hereunder, be considered employees or agents of Acterna or the
Company nor shall any of them have authority to contract in the name of or bind
Acterna or the Company, except (a) to the extent that any professional employee
                                -
of CD&R may be serving as a director of Acterna or the Company pursuant to
Section 2(a)(iv) hereof or as an officer of Acterna or the Company pursuant to
Section 3(c) hereof or (b) as expressly agreed to in writing by Acterna or the
                        -
Company.  The Company hereby acknowledges and agrees that the agreements,
arrangements or understandings entered into by CD&R on behalf of the Company,
MergerCo or any of their respective subsidiaries prior to the date hereof  in
connection with the Merger (including, but not limited to, any confidentiality
agreements and agreements with brokers or finders) shall be obligations of the
Company binding on it to the same extent as such obligations may be binding on
CD&R, and the Company shall fully perform, and indemnify and hold harmless CD&R
from and against, all such obligations.  Any duties of CD&R arising out of its
engagement to perform services hereunder shall be owed solely to the Company.

     7.  Notices.  Any notice or other communication required or permitted to be
         -------
given or made under this Agreement by one party to the other parties shall be in
writing and shall be deemed to have been duly given and effective (i) on the
                                                                   -
date of delivery if delivered personally or (ii) when sent if sent by prepaid
                                             --
telegram, or mailed first-class, postage prepaid, registered or certified mail,
or facsimile transmission as follows (or to such other address as shall be given
in writing by one party to the other parties in accordance herewith):

          If to the Company or Acterna, to:

               Acterna Corporation
               Corporate Headquarters
               3 New England Executive Park
               Burlington, Massachusetts 01803
               Facsimile:  (617) 229-8850
               Telephone:  (781) 272-6100
               Attention:  General Counsel
               ---------

          If to CD&R, to:

               Clayton, Dubilier & Rice, Inc.
               375 Park Avenue
               18th Floor
               New York, New York 10152

                                       6
<PAGE>

               Telephone:  (212) 407-5200
               Telecopy:   (212) 407-5252

               Attention:  Joseph L. Rice, III
               ---------

          with a copy to:

               Debevoise & Plimpton
               875 Third Avenue
               New York, New York 10022
               Telephone:  (212) 909-6000
               Telecopy:   (212) 909-6836

               Attention:  Franci J. Blassberg, Esq.
               ---------

     8.  Entire Agreement.  This Agreement, together with the Indemnification
         ----------------
Agreement, (a) contains the complete and entire understanding and agreement of
            -
CD&R, Acterna and the Company with respect to the subject matter hereof and (b)
                                                                             -
supersedes all prior and contemporaneous understandings, conditions and
agreements, oral or written, express or implied, in respect of the subject
matter hereof, including but not limited to in respect of the engagement of CD&R
in connection with the subject matter hereof.  There are no representations or
warranties of CD&R in connection with this Agreement or the services to be
provided hereunder, except as expressly made and contained in this Agreement.

     9.  Headings.  The headings contained in this Agreement are for purposes of
         --------
convenience only and shall not affect the meaning or interpretation of this
Agreement.

     10. Counterparts.  This Agreement may be executed in several counterparts,
         ------------
each of which shall be deemed an original and all of which shall together
constitute one and the same instrument.

     11. Binding Effect; Assignment.  This Agreement shall be binding upon and
         --------------------------
inure to the benefit of the parties to this Agreement and their respective
successors and assigns and to each Indemnitee, provided that none of CD&R, the
                                               --------
Company or Acterna may assign any of its rights or obligations under this
Agreement without the express written consent of the other party hereto.  This
Agreement is not intended to confer any right or remedy hereunder upon any
person other than the parties to this Agreement and their respective successors
and permitted assigns and each Indemnitee.

     12. Governing Law.  This Agreement shall be governed in all respects
         -------------
including as to validity interpretations and effects by the laws of the State of
New York, without giving effect to its principles or rules of conflict of laws
to the extent such principles or rules would require or permit the application
of the laws of another jurisdiction.  The Company, Acterna and CD&R hereby
irrevocably submit to the jurisdiction of the courts of the State of New York
and the Federal courts of the United States of America, in each case located in
the State, City and County of New York, solely in respect of the interpretation
and enforcement of the provisions of this Agreement, and

                                       7
<PAGE>

hereby waive, and agree not to assert, as a defense in any action, suit or
proceeding for the interpretation or enforcement hereof, that it is not subject
thereto or that such action, suit or proceeding may not be brought or is not
maintainable in such courts or that the venue thereof may not be appropriate or
that this Agreement may not be enforced in or by such courts, and the parties
hereto irrevocably agree that all claims with respect to such action or
proceeding shall be heard and determined in such a New York State or Federal
court. The Company, Acterna and CD&R hereby consent to and grant any such court
jurisdiction over the person of such parties and over the subject matter of any
such dispute and agree that mailing of process or other papers in connection
with any such action or proceeding in the manner provided in Section 7, or in
such other manner as may be permitted by law, shall be valid and sufficient
service thereof.

     13.  Waiver of Jury Trial.  Each party hereto acknowledges and agrees that
          --------------------
any controversy that may arise under this Agreement is likely to involve
complicated and difficult issues, and therefore it hereby irrevocably and
unconditionally waives any right it may have to a trial by jury in respect of
any litigation directly or indirectly arising out of or relating to this
Agreement, or the breach, termination or validity of this Agreement, or the
transactions contemplated by this Agreement.  Each party certifies and
acknowledges that (a) no representative, agent or attorney of any other party
                   -
has represented, expressly or otherwise, that such other party would not, in the
event of litigation, seek to enforce the foregoing waiver, (b) it understands
                                                            -
and has considered the implications of this waiver, (c) it makes this waiver
                                                     -
voluntarily, and (d) it has been induced to enter into this Agreement by, among
                  -
other things, the mutual waivers and certifications contained in this Section
13.

     14.  Amendment; Waivers.  No amendment, modification, supplement or
          ------------------
discharge of this Agreement, and no waiver hereunder, shall be valid or binding
unless set forth in writing and duly executed by the party or Indemnitee against
whom enforcement of the amendment, modification, supplement, discharge or waiver
is sought (and in the case of Acterna or the Company, approved by resolution of
their respective Boards of Directors).  Any such waiver shall constitute a
waiver only with respect to the specific matter described in such writing and
shall in no way impair the rights of the party or Indemnitee granting such
waiver in any other respect or at any other time.  Neither the waiver by any of
the parties hereto or any Indemnitee of a breach of or a default under any of
the provisions of this Agreement, nor the failure by any party hereto or any
Indemnitee on one or more occasions, to enforce any of the provisions of this
Agreement or to exercise any right, powers or privilege hereunder, shall be
construed as a waiver of any other breach or default of a similar nature, or as
a waiver of any of such provisions, rights, power or privileges hereunder.  The
rights and remedies herein provided are cumulative and are not exclusive of any
rights or remedies that any party or Indemnitee may otherwise have at law or in
equity or otherwise.

                                       8
<PAGE>

     IN WITNESS WHEREOF, the parties have duly executed this Agreement as of the
date first above written.

                           CLAYTON, DUBILIER & RICE, INC.


                           By:_____________________________________
                            Name:
                            Title:


                           ACTERNA CORPORATION


                           By:_____________________________________
                            Name: Mark V. B. Tremallo
                            Title: Vice President



                           ACTERNA, LLC

                           By: Acterna Corporation, its sole member


                           By:_____________________________________
                            Name: Mark V. B. Tremallo
                            Title: Vice President

                                       9