<PAGE>

                                                                    Exhibit 10.4

                    INTELLECTUAL PROPERTY SECURITY AGREEMENT

         THIS INTELLECTUAL PROPERTY SECURITY AGREEMENT (this "Agreement"), dated
as of May 13, 2002 ("Effective Date"), is between Oasys Telecom, Inc., a
California corporation (the "Grantor") and Larscom Incorporated, a Delaware
corporation (together with its designees and assigns, the "Secured Party").

         Grantor and Secured Party are parties to that certain Amended and
Restated Promissory Note (No. 1) and that certain Amended and Restated
Promissory Note (No.2) each dated as of May 13, 2002 (as amended, modified,
restated or extended from time to time, together, each a "Note" and
collectively, the "Notes"), and Restructuring Agreement dated as of May 13, 2002
(as amended, restated or otherwise modified from time to time, the
"Restructuring Agreement" and collectively with the Notes, the "Loan Documents."

         The Grantor has agreed in connection with the Notes to grant to Secured
Party security interests in certain of its intellectual property rights to
secure the payment and performance all indebtedness, liabilities and other
obligations of Grantor to the Secured Party arising pursuant to or in connection
with this Agreement, the Loan Documents and the transactions contemplated
thereby (collectively, the "Obligations"). Grantor acknowledges that the Secured
Party may file this Agreement with the United States Patent and Trademark Office
(the "PTO") and the United States Copyright Office (the "Copyright Office") (and
any other relevant recording systems in any domestic or foreign jurisdiction) as
further evidence of and to effectuate such grant of the security interests
hereunder.

         Accordingly, Grantor and Secured Party hereby agree as follows:

         SECTION 1 Definitions; Interpretation. All capitalized terms used in
this Agreement and not otherwise defined herein shall have the meanings assigned
to them in the Notes. In this Agreement, (i) the meaning of defined terms shall
be equally applicable to both the singular and plural forms of the terms
defined; and (ii) the captions and headings are for convenience of reference
only and shall not affect the construction of this Agreement.

         SECTION 2 Grant of Security Interest.

         (a) As a continuing security for the payment and performance of the
Obligations, Grantor hereby grants to Secured Party a security interest in all
of Grantor's rights, title and interests in, to and under all intellectual
property rights which are the basis for the grant of the license to the Secured
Party pursuant to that certain License Agreement (as amended or otherwise
modified from time to time, the "License Agreement") between Grantor and Secured
Party dated as of May 13, 2002 (the "Licensed IP"), of any nature of character
and whether domestic or foreign (collectively, the "Intellectual Property
Collateral"), and including, without limitation, all of the following property:

         (i) to the extent comprised in the Licensed IP: (i) all patents and
patent applications, all licenses relating to any of the foregoing and all
income and royalties with respect to any licenses, all rights to sue for past,
present or future infringement thereof, all rights arising therefrom and
pertaining thereto and all reissues, divisions, continuations, renewals,
extensions and continuations-in-part thereof; (ii) all copyrights and
applications for copyright, together with the underlying works of authorship
(including titles), whether or not the underlying works of authorship have been
published and whether said copyrights are statutory or arise under the common
law, and whether registered or unregistered, and all other rights and works of
authorship, all rights, claims and demands in any way relating to any such
copyrights or works, including royalties and rights to sue for past, present or
future infringement, all of Grantor's right, title and interest to make and
exploit all derivative works based on or adopted from all works covered by any
of the foregoing and all rights of renewal and extension of copyright; (iii) all
state (including common law), federal and foreign trademarks, service marks and
trade names, and applications for registration of such trademarks, service marks
and trade names, all licenses relating to any of the foregoing and all income
and royalties with respect to any licenses, whether registered or unregistered
and wherever registered, all rights to sue for past, present or future
infringement or unconsented use thereof, all rights arising therefrom and
pertaining thereto and all reissues, extensions and renewals thereof; and (iv)
all trade secrets, trade dress, trade

<PAGE>

styles, logos, other source of business identifiers, mask-works, mask-work
registrations, mask-work applications, software, confidential information,
customer lists, license rights, advertising materials, operating manuals,
methods, processes, know-how, algorithms, formulae, databases, quality control
procedures, product, service and technical specifications, operating, production
and quality control manuals, sales literature, drawings, specifications, blue
prints, descriptions, inventions, name plates and catalogs (the foregoing rights
and interests collectively, the "Intellectual Property Rights") and including,
without limitation, those Intellectual Property Rights listed, from time to
time, on the Exhibits to this Agreement;

         (ii) the entire goodwill of or associated with the businesses now or
hereafter conducted by Grantor connected with and symbolized by any of the
aforementioned properties and assets;

         (iii) all general intangibles and all intangible intellectual or other
similar property of Grantor of any kind or nature, associated with or arising
out of any of the aforementioned properties and assets and not otherwise
described above; and

         (iv) all products and proceeds at any time of any and all of the
foregoing including products of products and proceeds of proceeds.

         (b) Notwithstanding any provision to the contrary in this Agreement,
the Intellectual Property Collateral shall in no event include any intellectual
property developed or acquired (other than acquisitions of rights in
intellectual property forming any part of the rights granted under the License
Agreement and existing as of the Effective Date) by Grantor after the Effective
Date, including but not limited to any modification or other derivatives created
from the Intellectual Property Collateral.

         (c) This Agreement creates a continuing security interest in the
Intellectual Property Collateral which shall remain in effect until terminated
in accordance with the terms hereof.

         SECTION 3 Subordination.

         (a) The lien of the Secured Party in the Intellectual Property
Collateral pursuant hereto, shall be subordinate to all liens or security
interests now or hereafter granted to a holder of Senior Indebtedness by the
Company notwithstanding the date, order or method of attachment or perfection of
any such lien or security interest or the provisions of any applicable law.
Provided, that, the priority of the holder of the Senior Indebtedness provided
for herein with respect to liens are applicable only to the extent that such
holder's liens are enforceable and perfected and have not been avoided. If the
security interest of any holder of Senior Indebtedness is judicially determined
to be unenforceable or unperfected or is judicially avoided with respect to any
claim of the holder of the Senior Indebtedness or any part thereof, the priority
provided for herein shall not be available to such lien to the extent that it is
avoided or determined to be unenforceable or unperfected. The foregoing
notwithstanding, the Secured Party covenants and agrees that it shall not
challenge, attack or seek to avoid any lien to the extent that it secures Senior
Indebtedness.

         (b) The Secured Party agrees upon the request, of the Grantor that it
will execute such customary forms of subordination agreements as may reasonably
be required by the holders of Senior Indebtedness to evidence the subordination
provided for herein.

         ( c) For the purposes of this Agreement, "Senior Indebtedness" shall
mean, unless expressly subordinated to or made on a parity with the Obligations,
the principal of, interest on, and reimbursable fees, costs and expenses arising
in connection with indebtedness for borrowed money of the Company, arising after
the date of this Agreement, to banks and other customary commercial lending
institutions regularly engaged in the business of lending money (including
equipment lease financing).

         SECTION 4 Further Assurances; Appointment of Secured Party as
Attorney-in-Fact.

<PAGE>

         (a) Grantor shall execute and deliver, or cause to be executed and
delivered, to Secured Party any and all documents and instruments, in form and
substance reasonably satisfactory to Secured Party, and take any and all action,
that Secured Party may reasonably request from time to time, to perfect and
continue perfection, maintain the priority of or provide notice of Secured
Party's security interest in the Intellectual Property Collateral and to
accomplish the purposes of this Agreement, at the expense of Secured Party.

         (b) Grantor hereby constitutes and appoints Secured Party (and any of
Secured Party's officers or employees or agents designated by Secured Party) as
Grantor's true and lawful attorney-in-fact with full power and authority, in the
name of Grantor, Secured Party or otherwise, and without notice to or assent by
Grantor to: (i) sign any financing statements and documents and instruments that
Secured Party deems necessary or reasonably advisable to perfect or continue
perfected, maintain the priority of or provide notice of Secured Party's
security interest in the Intellectual Property Collateral; and (ii) at any time
during the continuation of an Event of Default, execute any and all such other
documents and instruments, and do any and all acts and things for and on behalf
of Grantor, that Secured Party may deem necessary or reasonably advisable to
maintain, protect, realize upon and preserve the Intellectual Property
Collateral and Secured Party's security interest therein and to accomplish the
purposes of this Agreement, including (A) to defend, settle, adjust or institute
any action, suit or proceeding with respect to the Intellectual Property
Collateral, and (B) to assert or retain any rights under any license agreement
for any of the Intellectual Property Collateral, including without limitation,
any rights of Grantor arising under Section 365(n) of the United States
Bankruptcy Code. The power of attorney set forth in this Section 3, being
coupled with an interest, is irrevocable.

         SECTION 5 Future Rights. If and when Grantor shall obtain rights to any
new Intellectual Property Rights, or obtain rights or benefits with respect to
any reissue, division, continuation, renewal, extension or continuation-in-part
of any Intellectual Property Rights, or any improvement of any Intellectual
Property Rights, which Intellectual Property Rights if existing at the date
hereof would be within the scope of Section 2, the provisions of Section 2 shall
automatically apply thereto. Grantor will upon the request of Secured Party
provide the Secured Party with such information regarding any such future
obtained rights as Secured Party shall request in order to ensure the priority
or perfection of the Secured Party's security interests in such Intellectual
Property Rights. Grantor hereby authorizes Secured Party to modify, amend, or
supplement the Exhibits and Schedules hereto and to reexecute this Agreement
from time to time on Grantor's behalf and as its attorney-in-fact to include any
such future Intellectual Property Collateral and to cause such reexecuted
Agreement or such modified, amended or supplemented Exhibits or Schedules to be
filed with the PTO and/or Copyright Office (or other recording office, domestic
or foreign) as appropriate.

         SECTION 6 Secured Party's Duties. Notwithstanding any provision
contained in this Agreement, Secured Party shall have no duty to exercise any of
the rights, privileges or powers afforded to it and shall not be responsible to
Grantor or any other Person for any failure to do so or delay in doing so.
Except for the accounting for moneys actually received by Secured Party
hereunder, Secured Party shall have no duty or liability to exercise or preserve
any rights, privileges or powers pertaining to the Intellectual Property
Collateral.

         SECTION 7 Representations and Warranties. Grantor represents and
warrants to Secured Party as of the date of this Agreement that:

         (a) Grantor is a corporation duly organized, validly existing and in
good standing under the law of the jurisdiction of its incorporation and has all
requisite power and authority to execute, deliver and perform its obligations
under this Agreement.

         (b) The execution, delivery and performance by Grantor of this
Agreement have been duly authorized by all necessary corporate action of
Grantor, and this Agreement constitutes the legal, valid and binding obligation
of Grantor, enforceable against Grantor in accordance with its terms; except as
limited by applicable bankruptcy, insolvency, reorganization, moratorium or
other laws of general application relating to the rights of creditors generally
or the effect of equitable principles which limit the availability of equitable
remedies.

         (c) No authorization, consent, approval, license, exemption of, or
filing or registration with, any governmental authority or agency, or approval
or consent of any other person (other than the filing of this Agreement

<PAGE>

with the Copyright Office or the filing of a UCC financing statement in
connection with the security interests granted hereunder), is required for the
due execution, delivery or performance by Grantor of this Agreement.

         (d) Grantor's chief executive office and principal place of business is
located at the address set forth in Schedule 1; all other locations where
Grantor conducts business are set forth in Schedule 1; and all trade names and
fictitious names under which Grantor at any time in the past has conducted or
presently conducts its business operations are set forth in Schedule 1.

         (e) Grantor is the owner of the Intellectual Property Collateral, free
from any mortgage, deed of trust, pledge, security interest, assignment, deposit
arrangement, charge or encumbrance, lien, or other type of preferential
arrangement (each a "Lien"), other than Liens in favor of Secured Party.

         (f) A true and correct list of all of the existing Intellectual
Property Collateral consisting of U.S. patents and patent applications and/or
registrations, is set forth in Exhibit A.

         (g) A true and correct list of all of the existing Intellectual
Property Collateral consisting of U.S. trademarks, trademark registrations
and/or applications, is set forth in Exhibit B.

         (h) A true and correct list of all of the existing Intellectual
Property Collateral consisting of U.S. copyright registrations and/or
applications is set forth in Exhibit C.

         SECTION 8 Covenants. Until this Agreement has been terminated in
accordance with the terms hereof, Grantor agrees to do the following:

         (a) Grantor shall promptly (and in any event within 5 days) notify the
Secured Party of: (i) any change in the location of Grantor's chief executive
office or principal place of business; (ii) any change in the locations set
forth in Schedule 1; (iii) any change in its name; (iv) any changes in its
identity or structure in any manner which might make any financing statement
filed hereunder incorrect or misleading; (v) any change in its jurisdiction of
organization; or (vi) any change in its registration as an organization (or any
new such registration).

         (b) Grantor shall keep the Intellectual Property Collateral free of all
Liens other than Liens in favor of Secured Party or any Liens granted in favor
of Senior Indebtedness under Section 3.

         SECTION 9 Secured Party's Rights and Remedies.

         (a) Without limitation to the provisions of any other Loan Document,
upon the occurrence and during the continuation of any Event of Default: (i) the
Secured Party may, at any time, declare all unpaid Obligations to be immediately
due and payable without presentment, demand, protest or any other notice of any
kind, all of which are hereby expressly waived by Grantor; and (ii) the Secured
Party may exercise all rights and remedies available to Secured Party under this
Agreement, the Loan Documents, applicable law or otherwise, without presentment,
demand, protest or any other notice of any kind, all of which are hereby
expressly waived by Grantor. Grantor acknowledges and agrees that such rights
and remedies include, but are not limited to, the right of Secured Party to sell
or otherwise dispose of the Intellectual Property Collateral pursuant to any
applicable Uniform Commercial Code. The cash proceeds actually received from the
sale or other disposition or collection of Intellectual Property Collateral, and
any other amounts received in respect of the Intellectual Property Collateral
shall be applied in such order and on such terms as determined by the Secured
Party.

         (b) Grantor agrees that Secured Party shall at all times have such
royalty free licenses, to the extent permitted by law, for any Intellectual
Property Collateral that shall be necessary or reasonably appropriate to permit
the exercise of any of Secured Party's rights or remedies and shall additionally
have the right to license and/or sublicense, whether general, special or
otherwise, and whether on an exclusive or a nonexclusive basis, any of the
Intellectual Property Collateral, throughout the world for such term or terms,
on such conditions, and in such manner, as Secured Party in its sole discretion
shall determine in connection with the exercise of any of such rights or
remedies.

<PAGE>

         SECTION 10 Certain Waivers. Grantor waives, to the fullest extent
permitted by law, (i) any right of redemption with respect to the Intellectual
Property Collateral, whether before or after sale hereunder, and all rights, if
any, of marshalling of the Intellectual Property Collateral or other collateral
or security for the Obligations; (ii) any right to require Secured Party to: (A)
proceed against any Person, (B) exhaust any other collateral or security for any
of the Obligations, (C) pursue any remedy in Secured Party's power, or (D) make
or give any presentments, demands for performance, notices of nonperformance,
protests, notices of protests or notices of dishonor in connection with any of
the Intellectual Property Collateral; and (iii) all claims, damages, and demands
against Secured Party arising out of the repossession, retention, sale or
application of the proceeds of any sale of the Intellectual Property Collateral.

         SECTION 11 Notices. All notices and other communications shall be made
to the address and in the manner specified in the Notes.

         SECTION 12 No Waiver; Cumulative Remedies. No failure on the part of
Secured Party to exercise, and no delay in exercising, any right, remedy, power
or privilege hereunder shall operate as a waiver thereof, nor shall any single
or partial exercise of any such right, remedy, power or privilege preclude any
other or further exercise thereof or the exercise of any other right, remedy,
power or privilege. The rights and remedies of Secured Party under this
Agreement, the Loan Documents, or otherwise are cumulative and not exclusive of
any rights, remedies, powers and privileges that may otherwise be available to
Secured Party under any other agreement or arrangement or law.

         SECTION 13 Costs and Expenses. Grantor agrees to pay on demand all
costs and expenses of Secured Party, and the reasonable fees and disbursements
of counsel, in connection with (i) any amendments, modifications or waivers of
the terms of this Agreement requested or initiated by Grantor, and (ii) the
enforcement or attempted enforcement of, and preservation of any rights or
interests under this Agreement, including in any out-of-court workout or other
refinancing or restructuring or in any bankruptcy case, and the protection, sale
or collection of, or other realization upon, any of the Intellectual Property
Collateral, including all expenses of taking, collecting, holding, sorting,
handling, preparing for sale, selling, or the like, and other such expenses of
sales and collections of Intellectual Property Collateral. Any amounts payable
to Secured Party pursuant to this Section 13 if not paid upon demand shall bear
interest from the date of such demand until paid in full at the rate of ten
percent (10%) per annum.

         SECTION 14 Binding Effect. This Agreement shall be binding upon, inure
to the benefit of and be enforceable by Grantor, Secured Party and their
respective successors and assigns.

         SECTION 15 Governing Law.

         (a) This Agreement shall be governed by, and interpreted in accordance
with, California law without regard to principles of conflict of law, except as
required by mandatory provisions of law and to the extent the validity or
perfection of the security interests hereunder, or the remedies hereunder, in
respect of any Intellectual Property Collateral are governed by the law of a
jurisdiction other than the State of California.

         (b) Each party hereby consents to the institution and resolution of any
action or proceeding of any kind or nature with respect to or arising out of
this Agreement in the state and federal courts located within Santa Clara county
or the Northern District respectively of the State of California.

         (c) Each Party hereby agrees to waive their respective rights to a
trial by jury of any claim or cause of action based upon or arising out of or
related to this Agreement or the transactions contemplated hereby in any action,
proceeding or other litigation of any type brought by any of the parties against
any other party. The parties hereby agree that any such claim or cause of action
shall be tried by a court trial without a jury. Without in any way limiting the
foregoing, the parties further agree that their respective right to a trial by
jury is waived by operation of this Section as to any action, counterclaim or
other proceeding that seeks, in whole or in part, to challenge the validity or
enforceability of this Agreement or any provision hereof.

<PAGE>

         SECTION 16 Entire Agreement; Amendment. This Agreement and the Loan
Documents contain the entire agreement of the parties with respect to the
subject matter hereof and shall not be amended except by the written agreement
of the parties.

         SECTION 17 Severability. Whenever possible, each provision of this
Agreement shall be interpreted in such manner as to be effective and valid under
all applicable laws and regulations. If, however, any provision of this
Agreement shall be prohibited by or invalid under any such law or regulation in
any jurisdiction, it shall, as to such jurisdiction, be deemed modified to
conform to the minimum requirements of such law or regulation, or, if for any
reason it is not deemed so modified, it shall be ineffective and invalid only to
the extent of such prohibition or invalidity without affecting the remaining
provisions of this Agreement, or the validity or effectiveness of such provision
in any other jurisdiction.

         SECTION 18 Counterparts. This Agreement may be executed in any number
of counterparts and by different parties hereto in separate counterparts, each
of which when so executed shall be deemed to be an original and all of which
taken together shall constitute but one and the same agreement.

         SECTION 19 Termination. Upon indefeasible payment and performance in
full of all Obligations, this Agreement shall terminate and Secured Party shall
promptly, at its cost, execute and deliver to Grantor such documents and
instruments reasonably requested by Grantor as shall be necessary to evidence
termination of all security interests given by Grantor to Secured Party
hereunder; provided, however, that the obligations of Grantor under Section 13
hereof shall survive such termination.

                  [Remainder of Page intentionally left blank]

<PAGE>

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


                                            Oasys Telecom, Inc.


                                            By:    /s/ Gerard Miille
                                            Title: President and Chief Executive
                                                   Officer


                                            Larscom Incorporated


                                            By:    /s/ Daniel L. Scharre
                                            Title: President and Chief Executive
                                                   Officer

<PAGE>

                                    EXHIBIT A

                         Issued U.S. Patents of Grantor
                         ------------------------------

Patent No.     Issue Date    Inventors      Title      Secured Party
----------     ----------    ---------      -----      -------------

None within the meaning of Licensed IP as of the Effective Date.

<PAGE>

                                    EXHIBIT A

                     Pending Patent Applications of Grantor
                     --------------------------------------

Application No.          Filing Date          Inventors          Title
---------------          -----------          ---------          -----

None within the meaning of Licensed IP as of the Effective Date.

<PAGE>

                                    EXHIBIT B

                           U.S. Trademarks of Grantor
                           --------------------------


                           Registration                      Registered
     Registration No.      Date             Filing Date      Owner          Mark
                  ---      ----             -----------      -----          ----


None within the meaning of Licensed IP as of the Effective Date.

<PAGE>

                                    EXHIBIT B

                 Pending U.S. Trademark Applications of Grantor
                 ----------------------------------------------


    Application No.        Filing Date        Applicant        Mark
    ---------------        -----------        ---------        ----

None within the meaning of Licensed IP as of the Effective Date.

<PAGE>

                                    EXHIBIT C

                U.S. Copyright/Mask-Work Registrations of Grantor
                -------------------------------------------------


    Copyright/Mask Work            Reg. No.            Date of Issue
    -------------------            --------            -------------

None within the meaning of Licensed IP as of the Effective Date.

<PAGE>

SCHEDULE 1


1.       Locations of Chief Executive Office and Other Locations

a.       Chief Executive Office and Principal Place of Business:
         -------------------------------------------------------


                  Oasys Telecom, Inc.
                  7060 Koll Center Parkway
                  Suite 340
                  Pleasanton, CA 94566



b.       Other locations where Grantor conducts business:



                  None

2.       Trade Names and Trade Styles; Other Corporate, Trade or Fictitious
         Names, Etc.


                  Oasys Telecom, Inc.

                  Oasys Telecom

                  Oasys