<PAGE>   1
                                                                   EXHIBIT 10.31










                               BAY NETWORKS, INC.

                           DEFERRED COMPENSATION PLAN

                                 TRUST AGREEMENT





<PAGE>   2



                                TABLE OF CONTENTS



<TABLE>
<CAPTION>
                                                                                          Page
                                                                                          ----
<S>               <C>                                                                       <C>
ARTICLE 1         ESTABLISHMENT OF TRUST....................................................1

ARTICLE 2         PAYMENTS TO PLAN PARTICIPANTS AND THEIR BENEFICIARIES.....................2

ARTICLE 3         TRUSTEE RESPONSIBILITY REGARDING PAYMENTS TO TRUST BENEFICIARY WHEN
                  COMPANY IS INSOLVENT......................................................2

ARTICLE 4         PAYMENTS TO THE COMPANY...................................................3

ARTICLE 5         INVESTMENT AUTHORITY......................................................3

ARTICLE 6         DISPOSITION OF INCOME.....................................................4

ARTICLE 7         ACCOUNTING BY TRUSTEE.....................................................4

ARTICLE 8         RESPONSIBILITY OF TRUSTEE.................................................4

ARTICLE 9         COMPENSATION AND EXPENSES OF TRUSTEE......................................5

ARTICLE 10        RESIGNATION AND REMOVAL OF TRUSTEE........................................5

ARTICLE 11        APPOINTMENT OF SUCCESSOR TRUSTEE..........................................6

ARTICLE 12        AMENDMENT OR TERMINATION..................................................6

ARTICLE 13        MISCELLANEOUS.............................................................6

ARTICLE 14        EFFECTIVE DATE............................................................8
</TABLE>








                                       i


<PAGE>   3


                               BAY NETWORKS, INC.
                           DEFERRED COMPENSATION PLAN
                            EFFECTIVE JANUARY 1, 1998

                                 TRUST AGREEMENT


        THIS TRUST AGREEMENT is entered into effective as of the 1st day of
January, 1998, by and between Bay Networks, Inc., a Delaware corporation (the
"Company"), and First Trust National Association (the "Trustee").


                                   ARTICLE 1
                             ESTABLISHMENT OF TRUST

        (a) The Company will deposit with Trustee money which shall become the
principal of the Trust to be held, administered and disposed of by Trustee as
provided in this Trust Agreement.

        (b) The Trust hereby established shall be irrevocable.

        (c) The Trust is intended to be a grantor trust, of which the Company is
the grantor, within the meaning of subpart E, part I, subchapter J, chapter 1,
subtitle A of the Internal Revenue Code of 1986, as amended (the "Code"), and
shall be construed accordingly.

        (d) The principal of the Trust, and any earnings thereon shall be held
separate and apart from other funds of the Company and shall be used exclusively
for the uses and purposes of participants in the Bay Networks, Inc. Deferred
Compensation Plan (the "Plan") and general creditors as herein set forth. Plan
participants and their beneficiaries shall have no preferred claim on, or any
beneficial ownership interest in, any assets of the Trust. Any rights created
under the Plan and this Trust Agreement shall be mere unsecured contractual
rights of Plan participants and their beneficiaries against the Company. Any
assets held by the Trust will be subject to the claims of the Company's general
creditors under federal and state law in the event of Insolvency, as defined in
Article 3(a) herein.

        (e) The Company, in its sole discretion, may at any time, or from time
to time, make additional deposits of cash or other property in trust with
Trustee to augment the principal to be held, administered and disposed of by
Trustee as provided in this Trust Agreement. Neither Trustee nor any Plan
participant or beneficiary shall have any right to compel such additional
deposits.

        (f) Upon a Change of Control, the Company shall, as soon as possible,
but in no event longer than thirty (30) days following such Change of Control,
as defined herein, make an irrevocable contribution to the Trust in an amount
that is sufficient to pay each Plan participant or beneficiary the benefits to
which they would be entitled pursuant to the terms of the Plan as of the date on
which the Change of Control occurred.




                                       1
<PAGE>   4

                                   ARTICLE 2
              PAYMENTS TO PLAN PARTICIPANTS AND THEIR BENEFICIARIES

        (a) The Company's Retirement Plans Administrative Committee shall have
the sole right and authority to administer the Plan and shall be referred to
hereafter as the Plan Administrator.

        (b) The Plan Administrator shall direct the Trustee as to when amounts
are payable to a Plan participant (or the participant's beneficiaries) and the
manner in which such amounts shall be paid. Such directions shall be in writing
and in a form acceptable to the Trustee. Except as otherwise provided herein,
the Trustee shall make payments to Plan participants and their beneficiaries in
accordance with the Plan Administrator's directions. The Trustee shall make
provision for the reporting and withholding of any federal, state or local taxes
that may be required to be withheld with respect to the payment of benefits
pursuant to the terms of the Plan and shall pay amounts withheld to the
appropriate taxing authorities or determine that such amounts have been
reported, withheld and paid by the Company. 

        (c) The entitlement of a Plan participant or his or her beneficiaries to
benefits under the Plan shall be determined by the Plan Administrator or such
party as it shall designate under the Plan, and any claim for such benefits
shall be considered and reviewed under the procedures set out in the Plan.


                                    ARTICLE 3
         TRUSTEE RESPONSIBILITY REGARDING PAYMENTS TO TRUST BENEFICIARY
                            WHEN COMPANY IS INSOLVENT

        (a) Trustee shall cease payment of benefits to Plan participants and
their beneficiaries if the Company is Insolvent. The Company shall be considered
"Insolvent" for purposes of this Trust Agreement if (i) the Company is unable to
pay its debts as they become due, or (ii) the Company is subject to a pending
proceeding as a debtor under the United States Bankruptcy Code.

        (b) At all times during the continuance of this Trust, as provided in
Article 1(d) hereof, the principal and income of the Trust shall be used solely
for the payment of Plan benefits to participants and beneficiaries unless the
Company is determined to be Insolvent. If the Company is Insolvent, all assets
in the Trust shall be subject to claims of the Company's general creditors under
federal and state law as set forth below.

            (1) A member of the Retirement Plans Administrative Committee of the
Company shall have the duty to inform the Plan Administrator of the Company's
Insolvency. The Plan Administrator shall have the duty to inform the Trustee in
writing of the Company's Insolvency. If a person claiming to be a creditor of
the Company alleges in writing to Trustee that the Company has become Insolvent,
Trustee shall contact the Plan Administrator and request a determination as to
whether the Company is insolvent. Pending a determination as to whether the
Company is Insolvent, the Trustee shall discontinue payment of benefits to Plan
participants




                                       2
<PAGE>   5

or their beneficiaries. The Trustee shall have no obligation to independently
determine whether the Company is Insolvent.

            (2) Unless Trustee has actual knowledge of the Company's Insolvency,
or has received notice from the Plan Administrator or a person claiming to be a
creditor alleging that the Company is Insolvent, Trustee shall have no duty to
inquire whether the Company is Insolvent. Trustee may in all events rely on the
Plan Administrator's determination as to whether the Company is Insolvent.

            (3) If at any time the Trustee is informed by the Plan Administrator
that the Company is Insolvent, Trustee shall discontinue payments to Plan
participants or their beneficiaries and shall hold the assets of the Trust for
the benefit of the Company's general creditors, who shall include Plan
participants and beneficiaries. Nothing in this Trust Agreement shall in any way
diminish any rights of Plan participants or their beneficiaries to pursue their
rights as general creditors of the Company with respect to benefits due under
the Plan or otherwise.

            (4) Trustee shall resume the payment of benefits to Plan
participants or their beneficiaries in accordance with Article 2 of this Trust
Agreement only after the Plan Administrator has informed the Trustee in writing
of its determination that the Company is not Insolvent (or is no longer
Insolvent). 

        (c) Provided that there are sufficient assets, if the Trustee
discontinues the payment of benefits from the Trust pursuant to Article 3(b)
hereof and subsequently resumes such payments, the first payment following such
discontinuance shall include the aggregate amount of all payments due to Plan
participants or their beneficiaries under the terms of the Plan for the period
of such discontinuance, less the aggregate amount of any payments made to Plan
participants or their beneficiaries by the Company in lieu of the payments
provided for hereunder during any such period of discontinuance.


                                   ARTICLE 4
                             PAYMENTS TO THE COMPANY

        Except as provided in Article 3 hereof, the Company shall have no right
or power to direct Trustee to return to the Company or to divert to others any
of the Trust assets before all payment[s] of benefits have been made to Plan
participants and their beneficiaries pursuant to the terms of the Plan.


                                   ARTICLE 5
                              INVESTMENT AUTHORITY


        (a) In no event may Trustee invest in securities (including stock or
rights to acquire stock) or obligations issued by the Company, other than a de
minimis amount held in common investment vehicles in which Trustee invests. All
rights associated with the assets of the Trust shall be exercised by Trustee or
the person designated by Trustee, and shall in no event be exercisable by or
rest with Plan participants.




                                       3
<PAGE>   6

        (b) In addition to the general investment powers set forth above in this
Article 5, the following provisions shall apply:

            (i) Investment Guidelines and Directives. The Trustee shall manage,
acquire, or dispose of the assets of the Trust in accordance with this Trust
Agreement and the directions of the Plan Administrator. To the extent permitted
by law, the Trustee shall not be liable for any investment made pursuant to the
Plan Administrator's direction.

            (ii) Trustee Powers. The Trustee shall have the following powers,
rights and duties subject to Article 8 and the other provisions of this Trust
Agreement:

                 (A) To receive and hold all contributions paid to it by the
Plan Administrator;

                 (B) To effectuate the written investment instructions given by
the Plan Administrator without regard to any law now or hereafter in force
limiting investments of fiduciaries;

                 (C) To have the authority to invest and reinvest assets of the
Trust in shares of common or preferred stock, bonds, notes, debentures,
short-term securities, mutual funds (including any such fund from which the
Trustee or any affiliate thereof receives an investment management fee or any
other fee), common Trust funds and other property, real or personal, of any
kind; to purchase and sell "put" and "call" options on publicly traded
securities; and to acquire, hold, manage, operate, sell, contract to sell, grant
options with respect to, convey, exchange, transfer, abandon, lease, manage, and
otherwise deal with respect to assets of the Trust;

                 (D) To acquire, hold or dispose of insurance or annuity
contracts as directed by the Plan Administrator;

                 (E) To borrow from anyone such amount or amounts of money
necessary to carry out the purpose of this Trust and for that purpose to
mortgage or pledge all or any part of the Trust;

                 (F) To retain in the Trust for investment or pending
distributions, any portion of the Trust in cash deemed appropriate by the
Trustee;

                 (G) To establish accounts in any affiliate of the Trustee and
in such other banks and financial institutions as the Trustee deems appropriate
to carry out the purposes of the Trust;

                 (H) To deposit securities with a clearing corporation as
defined in Article Eight of the Uniform Commercial Code; to hold the
certificates representing securities, including those in bearer form, in bulk
form with and to merge such certificates into certificates of the same class of
the same issuer which constitute assets of other accounts or owners, without




                                       4
<PAGE>   7

certification as to the ownership attached; and to utilize a book-entry system
for the transfer or pledge of securities held by the Trustee or by a clearing
corporation, provided that the records of the Trustee shall indicate the actual
ownership of the securities and other property of the Trust Fund.


                                   ARTICLE 6
                              DISPOSITION OF INCOME

        During the term of this Trust, all income received by the Trust, net of
expenses and taxes, shall be accumulated and reinvested.


                                   ARTICLE 7
                              ACCOUNTING BY TRUSTEE

        Trustee shall keep accurate and detailed records of all investments,
receipts, disbursements, and all other transactions required to be made,
including such specific records as shall be agreed upon in writing between the
Company and Trustee. Within sixty (60) days following the close of each calendar
year and within sixty (60) days after the removal or resignation of Trustee,
Trustee shall deliver to the Company a written account of its administration of
the Trust during such Plan Year or during the period from the close of the last
preceding Plan Year to the date of such removal or resignation, setting forth
all investments, receipts, disbursements and other transactions effected by it,
including a description of all securities and investments purchased and sold
with the cost or net proceeds of such purchases or sales (accrued interest paid
or receivable being shown separately), and showing all cash, securities and
other property held in the Trust at the end of such year or as of the date of
such removal or resignation, as the case may be.


                                   ARTICLE 8
                            RESPONSIBILITY OF TRUSTEE

        (a) Trustee shall act with the care, skill, prudence and diligence under
the circumstances then prevailing that a prudent person acting in like capacity
and familiar with such matters would use in the conduct of an enterprise of a
like character and with like aims, provided, however, that Trustee shall incur
no liability to any person for any action taken pursuant to a direction, request
or approval given by the Company or the Plan Administrator which is contemplated
by, and in conformity with, the terms of the Plan or this Trust and is provided
in writing by the Company or the Plan Administrator. In the event of a dispute
between the Company and a party, the Trustee may apply to a court of competent
jurisdiction to resolve the dispute.

        (b) If Trustee undertakes or defends any litigation arising in
connection with this Trust, the Company agrees to indemnify Trustee against
Trustee's costs, expenses and liabilities (including, without limitation,
attorneys' fees and expenses) relating thereto and to be primarily liable for
such payments. If the Company does not pay such costs, expenses and liabilities
in a reasonably timely manner, Trustee may obtain payment from the Trust.
Notwithstanding the foregoing provisions, neither the Company nor the Trust
shall be responsible for the payment of




                                       5
<PAGE>   8

any costs, expenses and liabilities (including, without limitation, attorneys'
fees and expenses) that result from negligence, a breach of the terms of this
Trust Agreement, or criminal misconduct on the part of the Trustee or any
employee or agent of the Trustee.

        (c) Trustee may consult with legal counsel (who may also be counsel for
the Company generally) with respect to any of its duties or obligations
hereunder.

        (d) Trustee may hire agents, accountants, actuaries, investment
advisors, financial consultants or other professionals to assist it in
performing any of its duties or obligations hereunder.

        (e) Trustee shall have, without exclusion, all powers conferred on
Trustees by applicable law, unless expressly provided otherwise herein,
provided, however, that if an insurance policy is held as an asset of the Trust,
Trustee shall have no power to name a beneficiary of the policy other than the
Trust, to assign the policy (as distinct from conversion of the policy to a
different form) other than to a successor Trustee, or to loan to any person the
proceeds of any borrowing against such policy.

        (f) Notwithstanding any powers granted to Trustee pursuant to this Trust
Agreement or to applicable law, Trustee shall not have any power that could give
this Trust the objective of carrying on a business and dividing the gains
therefrom, within the meaning of section 301.7701-2 of the Procedure and
Administrative Regulations promulgated pursuant to the Code.


                                    ARTICLE 9
                      COMPENSATION AND EXPENSES OF TRUSTEE

        The Company shall pay all of the Trustee's fees and expenses that are
directly related to the performance of the Trustee's duties and obligations as
set forth in this Trust Agreement. If not so paid, the fees and expenses shall
be paid from the Trust.


                                   ARTICLE 10
                       RESIGNATION AND REMOVAL OF TRUSTEE

        (a) Trustee may resign at any time by written notice to the Company,
which shall be effective sixty (60) days after receipt of such notice unless the
Company and Trustee agree otherwise.

        (b) Trustee may be removed by the Company on sixty (60) days notice or
upon shorter notice accepted by Trustee.

        (c) Upon a Change of Control, Trustee may not be removed by the Company
for twelve (12) months.

        (d) If Trustee resigns or is removed within twelve (12) months of a
Change of Control, the Trustee shall select a successor Trustee in accordance
with the provisions of Article 11(b) prior to the effective date of Trustee's
resignation or removal.




                                       6
<PAGE>   9

        (e) Upon resignation or removal of Trustee and appointment of a
successor Trustee, all assets shall subsequently be transferred to the successor
Trustee. The transfer shall be completed within ninety (90) days after receipt
of notice of resignation, removal or transfer, unless the Company extends the
time limit.


                                   ARTICLE 11
                        APPOINTMENT OF SUCCESSOR TRUSTEE

        (a) If Trustee resigns or is removed in accordance with Article 10(a) or
(b) hereof, the Company may appoint any third party, such as a bank trust
department or other party that may be granted corporate trustee powers under
state law, as a successor to replace Trustee upon resignation or removal. The
appointment shall be effective when accepted in writing by the new Trustee, who
shall have all of the rights and powers of the former Trustee, including
ownership rights in the Trust assets. The former Trustee shall execute any
instrument necessary or reasonably requested by the Company or the successor
Trustee to evidence the transfer.

        (b) If Trustee resigns or is removed pursuant to the provisions of
Article 10(d) and selects a successor Trustee, the Trustee may appoint any third
party such as a bank trust department or other party that may be granted
corporate trustee powers under state law. The appointment of a successor Trustee
shall be effective when accepted in writing by the new Trustee. The new Trustee
shall have all the rights and powers of the former Trustee, including ownership
rights in Trust assets. The former Trustee shall execute any instrument
necessary or reasonably requested by the successor Trustee to evidence the
transfer.

        (c) The successor Trustee need not examine the records and acts of any
prior Trustee and may retain or dispose of existing Trust assets, subject to
Articles 7 and 8 hereof. The successor Trustee shall not be responsible for and
the Company shall indemnify and defend the successor Trustee from any claim or
liability resulting from any action or inaction of any prior Trustee or from any
other past event, or any condition existing at the time it becomes successor
Trustee.


                                   ARTICLE 12
                            AMENDMENT OR TERMINATION

        (a) This Trust Agreement may be amended by a written instrument executed
by Trustee and the Company. Notwithstanding the foregoing, no such amendment
shall conflict with the terms of the Plan or shall make the Trust revocable.

        (b) The Trust shall not terminate until the date on which Plan
participants and their beneficiaries are no longer entitled to benefits pursuant
to the terms of the Plan. Upon termination of the Trust any assets remaining in
the Trust shall be returned to the Company.


                                   ARTICLE 13
                                  MISCELLANEOUS

        (a) Any provision of this Trust Agreement prohibited by law shall be
ineffective to the extent of any such prohibition, without invalidating the
remaining provisions hereof.




                                       7
<PAGE>   10

        (b) Benefits payable to Plan participants and their beneficiaries under
this Trust Agreement may not be anticipated, assigned (either at law or in
equity), alienated, pledged, encumbered or subjected to attachment, garnishment,
levy, execution or other legal or equitable process.

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

        (d) For purposes of this Trust, "Change of Control" shall mean: (a) the
purchase or other acquisition by any person(s) or entity(ies), within the
meaning of Section 13(d) or 14(d) of the Securities Exchange Act of 1934 (the
"Act") or any comparable successor provisions, of beneficial ownership (within
the meaning of Rule 13d-3 under the Act) of thirty percent (30%) or more of the
outstanding shares of common stock or the combined voting power of the Company's
outstanding voting securities; (b) the approval by the Company's stockholders of
a reorganization, merger or consolidation transaction when after such
transaction the Company's stockholders own less than fifty percent (50%) of the
combined voting power owned before such transaction; (c) a dissolution or
liquidation of the Company; or (d) the sale of all or substantially all of the
Company assets.
















                                       8
<PAGE>   11


                                   ARTICLE 14
                                 EFFECTIVE DATE

        The effective date of this Trust Agreement shall be January 1, 1998.




                                       BAY NETWORKS, INC.


                                       By:  /s/ JOHN J. POGGI, JR.
                                           ------------------------------------

                                       Its:  VICE PRESIDENT
                                            -----------------------------------


                                       FIRST TRUST NATIONAL ASSOCIATION


                                       By:  /s/ SANDY HEGAN
                                           ------------------------------------

                                       Its:  VICE PRESIDENT
                                            -----------------------------------









                                       9