<PAGE>
                                                                     EXHIBIT 4.2

                               SECURITY AGREEMENT


<PAGE>

                               SECURITY AGREEMENT

        THIS SECURITY AGREEMENT (this "AGREEMENT") is dated as of the 23rd day
of January, 2002 between Gadzoox Networks, Inc., a Delaware corporation
("BORROWER"), and Berg & Berg Enterprises, LLC, a California limited liability
company ("LENDER").

                                    RECITALS

        WHEREAS, Lender has agreed to make available to Borrower a $5,000,000
loan pursuant to that certain 2.5% Senior Convertible Debenture, dated as of an
even date herewith, between the Lender and the Borrower, as amended from time to
time (the "DEBENTURE"). Capitalized terms used herein without definitions shall
have the meanings given to them in the Debenture; and

        WHEREAS, in connection with the transactions contemplated by the
Debenture, Borrower has agreed to grant a security interest in its assets to
Borrower, upon and subject to the terms, provisions and conditions set forth
herein.

                                    AGREEMENT

        NOW, THEREFORE, in consideration of the mutual covenants and agreements
set forth herein and for other good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged, Borrower and Lender agree as
follows:

        1. DEFINITIONS.

        As used in this Agreement, the following terms shall have the following
meaning:

        "ACCOUNT DEBTOR" shall mean any Person who is or who may become
obligated under, with respect to or on account of an Account.

        "ACCOUNTS" shall mean all of Borrower's currently existing and hereafter
arising accounts, as defined in the UCC, including any contract rights to
payment arising out of the sale or lease of goods or the rendition of services
by Borrower, irrespective of whether earned by performance, and any and all
credit insurance, guarantees or security therefor.

        "COLLATERAL" shall mean all current and hereafter acquired personal
property of Borrower, including all insurance relating thereto, and including
all Accounts, Deposit Accounts, Equipment, General Intangibles, Inventory and
Negotiable Collateral, and any and all proceeds, as defined in the UCC, thereof.

        "DEPOSIT ACCOUNTS" shall mean all deposit accounts, as defined in the
UCC, now or hereafter held in Borrower's name.

        "EQUIPMENT" shall mean all of Borrower's present and hereafter acquired
machinery, machine tools, motors, computers, equipment, furniture, furnishings,
fixtures, vehicles (including motor vehicles and trailers), tools, parts, goods,
wherever located, including all attachments,



<PAGE>

accessories, accessions, replacements, substitutions, additions and improvements
to any of the foregoing.

        "GENERAL INTANGIBLES" shall mean all of Borrower's present and future
general intangibles and other personal property (including contract rights,
rights arising under common law, statutes or regulations, chooses or other
things in action, goodwill, patents, trade names, trade secrets, trademarks,
service marks, copyrights, blueprints, drawings, purchase orders, customer
lists, monies due or recoverable from pension funds, route lists, rights to
payment, and other rights under any royalty or licensing agreements,
infringement claims, computer programs, information contained on computer disks
or tapes, literature, reports, catalogs, deposit accounts, insurance premium
rebates, tax refunds and tax refund claims), other than goods, Accounts and
Negotiable Collateral.

        "INVENTORY" shall mean all present and future inventory in which
Borrower has any interest, including goods held for sale or lease or to be
furnished under a contract of service and all of Borrower's present and future
raw materials, work in process, finished goods and packing and shipping
materials, wherever located.

        "NEGOTIABLE COLLATERAL" shall mean all of Borrower's present and future
letters of credit, letter of credit rights, notes, drafts, instruments,
investment property, securities (including the shares of capital stock or other
equity or membership interests of United States subsidiaries of Borrower),
documents, personal property leases (wherein Borrower is the lessor) and chattel
paper. (Any terms used in the preceding sentence that are defined in the UCC
shall have the meanings set forth therein.).

        "PERMITTED LIENS" means the following types of liens:

                        (i) the security interests granted pursuant to this
Agreement;

                        (ii) the security interest of a bank or similar
institution on accounts receivable and Inventories;

                        (iii) liens for taxes assessments or governmental
charges or claims (a) for amounts not yet overdue or (b) for amounts that are
overdue and that (in the case of any such amounts overdue for a period in excess
of five days) are being contested in good faith by appropriate proceedings, so
long as (A) such reserves or other appropriate provisions, if any, as shall be
required by generally accepted accounting principles shall have been made for
any such contested amounts and (B) in the case of a lien with respect to any
portion of the Collateral, such contest proceedings conclusively operate to stay
the sale of any portion of the Collateral on account of such lien;

                        (iv) liens incurred or deposits made in the ordinary
course of business in connection with workers' compensation, unemployment
insurance and other types of social security or to secure the performance of
tenders, statutory obligations, bids, leases, government contracts, trade
contracts, performance and return-of-money bonds and other similar obligations
(exclusive of obligations for the payment of borrowed money), so long as no
foreclosure, sale or similar proceedings have been commenced with respect to any
portion of the Collateral on account thereof;



                                      -2-
<PAGE>


                        (v) any attachment or judgment lien not constituting an
Event of Default;

                        (vi) leases or subleases granted to third parties and
not interfering in any material respect with the ordinary conduct of the
business of Borrower;

                        (vii) liens in favor of customs and revenue authorities
arising as a matter of law to secure payment of customs duties in connection
with the importation of goods;

                        (viii) liens upon any equipment acquired or held by
Borrower to secure the purchase price of such equipment or indebtedness incurred
solely for the purpose of financing the acquisition of such equipment, so long
as such lien extends only to the equipment financed, and any accessions,
replacements, substitutions and proceeds (including insurance proceeds) thereof
or thereto; and

                        (ix) liens which constitute rights of setoff of a
customary nature or banker's liens, whether arising by law or by contract.

        "UCC" shall mean the Uniform Commercial Code, as in effect from time to
time, of the State of California or of any other state the laws of which are
required as a result thereof to be applied in connection with the issue of
perfection of security interests.

        2. CREATION OF SECURITY INTEREST; COLLATERAL.

                2.1 Grant of Security Interest. Borrower hereby pledges and
grants to Lender a first priority continuing security interest in all Collateral
in order to secure prompt payment and performance of:

                        (a) all debts, liabilities and obligations of Borrower
to Lender, now existing or hereafter incurred, arising out of or related to the
Debenture and this Agreement;

                        (b) any and all other obligations of Borrower to Lender,
direct or indirect, whether or not secured, and whether now existing or
hereafter incurred.

                        (c) Lender agrees to subordinate its interest to the
Permitted Liens in clauses (ii) and (viii) to the definition of Permitted Liens
above (the "SUBORDINATED LIENS"), (and the Borrower acknowledges that the Lender
has not agreed to subordinate the indebtedness evidenced by the Debenture to any
other indebtedness of the Borrower other than indebtedness of the Borrower
incurred in connection with the transactions contemplated by clauses (ii) and
(viii) to the definition of Permitted Liens above).

        The debts, obligations and liabilities described in the above clauses
(a) and (b) above are herein referred to as the "OBLIGATIONS." Lender's security
interest in the Collateral shall attach to all Collateral without further action
on the part of Lender or Borrower.

                2.2 Transfer of Collateral. Anything contained in this Agreement
or any other Loan Document to the contrary notwithstanding, Borrower shall not
dispose of any item or portion



                                      -3-
<PAGE>

of the Collateral without the prior written consent of Lender, other than (a)
the sale of Inventory to buyers in the ordinary course of business, (b) the
non-exclusive license of General Intangibles in the ordinary course of business,
(c) the sale of worn-out or surplus Equipment, (d) dispositions of leased
equipment pursuant to and in accordance with the terms of the leases relating to
such equipment and (e) other dispositions in an amount not to exceed $500,000
during any twelve-month period. Notwithstanding the foregoing, payments in the
ordinary course of business on obligations incurred by the Borrower or its
subsidiaries shall not constitute a disposition.

                2.3 Negotiable Collateral. In the event that any Collateral is
evidenced by or consists of Negotiable Collateral, Borrower will, immediately
upon request of Lender, endorse and deliver physical possession of such
Negotiable Collateral to Lender.

                2.4 Collection of Accounts, General Intangibles and Negotiable
Collateral. License/Sale of Collateral. Subject to pre-existing rights of
holders of Subordinated Liens, at any time that an Event of Default has occurred
and is continuing, Lender or Lender's designee may (a) notify customers or any
Account Debtors of Borrower that the Accounts, General Intangibles or Negotiable
Collateral have been assigned to Lender (if applicable) or that Lender has a
security interest therein; (b) collect the Accounts, General Intangibles and
Negotiable Collateral directly and charge the collection costs and expenses to
the account of the Borrower and treat the same as a Loan hereunder; (c) prepare
for license or sale, advertise for license or sale, and license or sell (in the
manner provided for herein) the Collateral and Lender is hereby granted a
license or other right, solely pursuant to the provisions of this Section 2.4,
to use, without charge, Borrower's intellectual property as it pertains to the
Collateral, in completing production of, advertising for license or sale, and
licensing or selling any Collateral and, in connection with Lender's exercise of
its rights under this Section 2.4, Borrower's rights under all Collateral shall
inure to Lender's benefit; and (d) license or sell the Collateral at either a
public or private sale, or both, by way of one or more contracts or
transactions, for cash or on terms, in such manner and at such places (including
Borrower's premises) as Lender determines is commercially reasonable, and apply
any proceeds to the Loan obligations in whatever manner or order Lender deems
appropriate. Lender may disclaim any warranties in connection therewith.

                2.5 Delivery of Additional Documentation Required. At any time
upon the request of Lender, Borrower shall at its sole expense execute and
deliver to Lender all financing statements, continuation financing statements,
fixture filings, security agreements, pledges, assignments, control agreements,
endorsements of certificates of title, applications for title, affidavits,
reports, notices, schedules of accounts, letters of authority and all other
documents that Lender reasonably may request, in form satisfactory to Lender, to
perfect and continue perfected Lender's security interest in the Collateral, and
in order to fully consummate all of the transactions contemplated hereby.

                2.6 Power of Attorney. Borrower hereby irrevocably makes,
constitutes and appoints Lender (and any of Lender's officers, employees or
agents designated by Lender) as Borrower's true and lawful attorney in fact,
with power to (a) if Borrower refuses to, or fails timely to execute and deliver
any of the documents described in Section 2.5, sign the name of Borrower to any
of the documents described in Section 2.5, (b) subject to the rights of holders
of Subordinate Liens, at any time that an Event of Default has occurred and is
continuing, (i) sign Borrower's name



                                      -4-
<PAGE>

on any invoice or bill of lading relating to any Account, drafts against Account
Debtors, schedules and assignments of Accounts, verifications of Accounts, and
notices to Account Debtors, (ii) send requests for verification of Accounts,
(iii) endorse Borrower's name on any Collateral in the possession of the Lender,
(iv) notify the post office authorities to change the address for delivery of
Borrower's mail to an address designated by Lender, to receive and open all mail
addressed to Borrower, and to retain all mail relating to the Collateral and
forward all other mail to Borrower, (v) make, settle and adjust all claims under
Borrower's policies of insurance and make all determinations and decisions with
respect to such policies of insurance and (vi) settle and adjust disputes and
claims in respect of the Accounts directly with Account Debtors, for amounts and
upon terms that Lender determines to be reasonable, and Lender may cause to be
executed and delivered any documents and releases that Lender determines to be
necessary. The appointment of Lender as Borrower's attorney, and each and every
one of Lender's rights and powers, being coupled with an interest, is
irrevocable until all of the Obligations have been fully paid and performed and
Lender's obligations to extend credit under the Debenture have terminated.

                2.7 Right to Inspect. Lender (through any of its officers,
employees or agents) shall have the right, from time to time hereafter, during
regular business hours and upon reasonable prior notice, to inspect any of
Borrower's books and records and to check, test and appraise the Collateral in
order to verify Borrower's financial condition or the amount, quality, value,
condition of or any other matter relating to the Collateral.

        3. TITLE; PERMITTED LIENS.

        Borrower represents and warrants and agrees that, other than
Subordinated Liens, Borrower is or will be lawfully possessed and the sole owner
of its property, free and clear of any mortgage, pledge or other secured debt
and, all such property is free and clear of any lien or encumbrance of any kind
or character, legal or equitable, other than Subordinated Liens.

        4. LOCATION OF COLLATERAL.

        Borrower represents and warrants to Lender that: (a) Exhibit A is a
correct and complete list of the location of Borrower's chief executive office,
the location of its books and records, the locations of the Collateral, and the
locations of all of its other places of business; and (b) Exhibit A correctly
identifies any of such facilities and locations that are not owned by Borrower
and sets forth the names of the owners and lessors or sublessors of such
facilities and locations. Borrower covenants and agrees that it will not (i)
maintain any Collateral at any location other than those locations listed for
Borrower on Exhibit A, (ii) otherwise change or add to any of such locations, or
(iii) change the location of its principal office from the location identified
in Exhibit A, unless it gives Lender at least 30 days' prior written notice
thereof and executes any and all financing statements and other documents that
Lender reasonably requests in connection therewith. Without limiting the
foregoing, Borrower represents that all of its Inventory (other than Inventory
in transit) is, and covenants that all of its Inventory will be, located either
(A) on premises owned by Borrower, (B) on premises leased by Borrower, provided
that Lender has received an executed landlord waiver from the landlord of such
premises in form and substance satisfactory to Lender or (C) in a warehouse or
with a bailee, provided that Lender has received an executed bailee letter in
form and substance satisfactory to Lender.



                                      -5-
<PAGE>

        5. NAME; JURISDICTION OF ORGANIZATION.

        Borrower represents and warrants that (a) it is a corporation duly
organized, validly existing and in good standing under the laws of the State of
Delaware, (b) is qualified to do business and is in good standing in all
jurisdictions in which the failure to be so qualified will have a material
adverse effect on the conduct of its business, (c) has all requisite corporate
power and authority to own and operate its properties and carry on its business
as now conducted or presently proposed to be conducted, and (d) its exact legal
name is as set forth on the first page hereof. Borrower shall not change its
name or reorganize itself under the laws of any jurisdiction other than the
jurisdiction in which it is organized as of the date hereof or change its type
of entity without providing prior written notice to Lender.

        6. ACCOUNTS.

                6.1 Validity. Borrower hereby represents and warrants, with
respect to its Accounts, that: (a) each existing Account represents, and each
future Account will represent, a bona fide sale or lease and delivery of goods
by Borrower, or rendition of services by Borrower, in the ordinary course of
Borrower's business; (b) each existing Account is, and each future Account will
be, for a liquidated amount payable by the Account Debtor thereon on the terms
set forth in the invoice therefor or in the schedule thereof delivered to
Lender, without any offset, deduction, defense, or counterclaim except those
known to Borrower and disclosed to Lender pursuant to this Agreement; (c) each
copy of an invoice delivered to Lender by Borrower will be a genuine copy of the
original invoice sent to the Account Debtor named therein; and (d) all goods
described in any invoice representing a sale of goods will have been delivered
to the Account Debtor and all services of Borrower described in each invoice
will have been performed.

                6.2 Certain Actions. Borrower shall not re-date any invoice or
sale or make sales on extended dating beyond that customary in Borrower's
business or extend or modify any Account. If Borrower becomes aware of any
matter adversely affecting the collectibility of any Account involving an amount
greater than $100,000, including information regarding the Account Debtor's
creditworthiness, Borrower will promptly so advise Lender.

                6.3 Disputes: Allowances. Upon request of Lender, Borrower shall
notify Lender promptly of all disputes and claims in excess of $25,000 with any
Account Debtor, and agrees to settle, contest, or adjust such dispute or claim
at no expense to Lender. No discount, credit or allowance shall be granted to
any Account Debtor, except for discounts, credits and allowances made or given
in the ordinary course of Borrower's business when no Event of Default exists
hereunder.

                6.4 Conflict. Notwithstanding any provision of this Section 6 to
the contrary, to the extent the provisions of this Section 6 conflict with the
provisions of the Receivables Financing Agreement, dated September 25, 2000, as
amended, entered into between the Senior Lender and the Borrower, including all
agreements, certifications and documents related thereto (the "PBF Agreement"),
the provisions of the PBF Agreement shall be controlling.



                                      -6-
<PAGE>

        7. REMEDIES.

        Upon the occurrence of any Event of Default, Lender, in addition to
availing itself of any remedies conferred upon it by law or equity or by the
terms of the Debenture or this Agreement, may pursue any available remedy under
the UCC.

        8. RIGHT TO CURE.

        In the Event of Default, so long as such Event of Default is continuing,
Lender may, in its discretion, pay any amount or do any act required of Borrower
hereunder in order to preserve, protect, maintain or enforce the Obligations,
the Collateral or Lender's liens therein, and which Borrower fails to pay or do,
including payment of any judgment against Borrower, any insurance premium, any
warehouse charge, any finishing or processing charge, any landlord's or bailee's
claim, and any other lien upon or with respect to the Collateral. All payments
that Lender makes under this Section 7 and all out-of-pocket costs and expenses
that Lender pays or incurs in connection with any action taken by it hereunder
shall be charged to Borrower. Any payment made or other action taken by Lender
under this Section 7 shall be without prejudice to any right to assert the
occurrence of an Event of Default hereunder and to proceed thereafter as herein
provided.

        9. LENDER'S RIGHTS, DUTIES AND LIABILITIES.

               9.1 No Impairment of Obligations. Borrower assumes all
responsibility and liability arising from or relating to the use, license, sale
or other disposition of the Collateral. The Obligations shall not be affected by
any failure of Lender to take any steps to perfect Lender's liens or to collect
or realize upon the Collateral, nor shall loss of or damage to the Collateral
release Borrower from any of the Obligations.

               9.2 Borrower Remains Liable. Anything herein to the contrary
notwithstanding, Borrower shall remain liable under each of its contracts and
each of its licenses to observe and perform all the conditions and obligations
to be observed and performed by it thereunder. Lender shall not have any
obligation or liability under any contract or license by reason of or arising
out of this Agreement or the granting herein of a lien thereon or the receipt by
Lender of any payment relating to any contract or license pursuant hereto.
Lender shall not be required or obligated in any manner to perform or fulfill
any of the obligations of Borrower under or pursuant to any contract or license,
or to make any payment, or to make any inquiry as to the nature or the
sufficiency of any payment received by it or the sufficiency of any performance
by any party under any contract or license, or to present or file any claims, or
to take any action to collect or enforce any performance or the payment of any
amounts which may have been assigned to it or to which it may be entitled at any
time or times.

        10. INDEMNIFICATION.

        In any suit, proceeding or action brought by Lender relating to any Loan
Document or Collateral for any sum owing with respect thereto or to enforce any
rights or claims with respect thereto, Borrower will save, indemnify and keep
Lender harmless from and against all expense (including reasonable attorneys'
fees and expenses), loss or damage suffered by reason of any



                                      -7-
<PAGE>

defense, setoff, counterclaim, recoupment or reduction of liability whatsoever
of the Account Debtor or other individual or entity obligated on the Collateral,
arising out of a breach by Borrower of any obligation thereunder or arising out
of any other agreement, indebtedness or liability at any time owing to, or in
favor of, such obligor or its successors from Borrower, except in the case of
Lender, to the extent such expense, loss, or damage is attributable solely to
the gross negligence or willful misconduct of Lender as finally determined by a
court of competent jurisdiction. All such obligations of Borrower shall be and
remain enforceable against and only against Borrower and shall not be
enforceable against Lender.

        11. MISCELLANEOUS.

                11.1 Additional Acts. Borrower shall, upon request, execute and
deliver such further instruments and documents and do such further acts and
things as may be reasonably required to provide to Lender the evidence of and
security for the Obligations as well as the perfection of Lender's security
interest in the Collateral and its priority against all other parties.

                11.2 Amendment: Waiver; Approval. This Agreement shall not be
amended, modified or supplemented without the written agreement of Borrower and
Lender at the time of such amendment, modification or supplement. No waiver of
any provision of this Agreement or any of the other Loan Documents shall be
effective unless set forth in writing signed by the party making such waiver,
and any such waiver shall be effective only to the extent therein set forth.
Failure by Lender to insist upon full and prompt performance of any provisions
of this Agreement or any of the other Loan Documents, or to take action upon the
occurrence of any Event of Default, shall not constitute a waiver of any rights
of Lender, and Lender may at any time thereafter exercise all available rights
and remedies with respect to such Event of Default. Receipt by Lender of any
instrument or document shall not constitute or be deemed to be an approval
thereof. Any approvals required under any of the Loan Documents must be in
writing, signed by Lender.

                11.3 Entire Agreement. This Agreement and the other Loan
Documents constitute the entire agreement and understanding among the Borrower
and the Lender, and supersede any prior agreement and understanding relating to
the subject matter of this Agreement; provided, however, that notwithstanding
the foregoing, this Agreement shall not supersede any previous security
agreement, or security interest or pledge, given by Borrower to secure any or
all of the Obligations.

                11.4 Notice. Any notice which any party hereto gives to any
other party hereunder shall be in accordance with the provisions of the
Debenture relating thereto.

                11.5 Benefit; Assignment. The rights, powers and remedies of
Lender and Borrower under this Agreement shall inure to their respective
benefits and to the benefit of their respective successors and permitted
assigns. The rights and obligations of either Borrower or Lender under this
Agreement may not be assigned and any purported assignment by one party shall be
null and void without prior written approval of the other party.



                                      -8-
<PAGE>


                11.6 Governing Law. This Agreement shall be governed by and
construed in accordance with the laws of the State of California, as applied to
agreements among residents made and to be performed entirely within the State of
California.

                11.7 Headings. The titles and headings of the articles, sections
and paragraphs of this Agreement have been inserted as a matter of convenience
of reference only and shall not control or affect the meaning or construction of
any of the terms or provisions of this Agreement.

                11.8 No Partnership or Joint Venture. Lender, by executing and
performing this Agreement (or any of the Loan Documents), shall not become a
partner or joint venturer with Borrower or any of its respective associates or
affiliates and all inspections herein provided for are for the sole benefit of
Lender.

                11.9 Time is of the Essence. Time is of the essence for the
payment of all amounts due Lender under the Loan Documents and performance and
observance by Borrower of each covenant, agreement, provision and term of the
Loan Documents.

                11.10 Invalid Provisions. In the event any one or more of the
provisions contained in this Agreement or in any of the other Loan Documents
shall for any reason be held to be invalid, illegal or unenforceable in any
respect by a court of competent jurisdiction, such invalidity, illegality or
unenforceability shall not affect any other provision of this Agreement or any
other Loan Document, and this Agreement and the other Loan Document shall be
construed as if such invalid, illegal or unenforceable provision had never been
in the Loan Documents.

                11.11 Acts Prohibited Under Law. Notwithstanding anything herein
contained to the contrary, Lender will not be required to make any disbursement
or perform any other act under this Agreement if, as a result thereof, Lender
will violate any law, statute, ordinance, rule, regulation or judicial decision
applicable thereto. Lender shall use its reasonable efforts to promptly notify
Borrower of Lender's inability to make such disbursement or perform such act due
to such violation.

                11.12 Counterparts. This Agreement and the other Loan Documents
may be executed in counterparts, and all said counterparts when taken together
shall constitute one and the same Agreement.

                11.13 No Third Party Beneficiary. This Agreement and the other
Loan Documents are only for the benefit of the parties hereto and thereto and
their permitted successors and assigns. No other person or entity shall be
entitled to rely on any matter set forth herein or therein or shall gain any
rights herein whether by subrogation or otherwise without the prior written
consent of such parties.



                                       ***



                                      -9-
<PAGE>

                      SIGNATURE PAGE OF SECURITY AGREEMENT

        IN WITNESS WHEREOF, this Security Agreement has been entered into as of
the date first written above.


                                        BORROWER:



                                        GADZOOX NETWORKS, INC.
                                        a Delaware corporation

                                        By: /s/ Michael Parides
                                           -------------------------------------

                                        Its: President and CEO
                                             -----------------------------------


                                        BERG & BERG ENTERPRISES, LLC
                                        a California limited liability company

                                        By: /s/ Carl E. Berg
                                           -------------------------------------

                                        Its: Member
                                             -----------------------------------



<PAGE>

                                    EXHIBIT A


                           List of Collateral Location