<PAGE>   1
                                                                    EXHIBIT 10.5



                           COSINE COMMUNICATIONS, INC.

                                 1997 STOCK PLAN

                            Adopted October 28, 1997
               Amended and Restated Effective as of March 11, 1998
             Amended and Restated Effective as of September 3, 1998
             Amended and Restated Effective as of February 17, 1999
               Amended and Restated Effective as of April 27, 2000


        1. Purposes of the Plan. The purposes of this Stock Plan are to attract
and retain the best available personnel for positions of substantial
responsibility, to provide additional incentive to Employees, Directors and
Consultants and to promote the success of the Company's business. Options
granted under the Plan may be Incentive Stock Options or Nonstatutory Stock
Options, as determined by the Administrator at the time of grant. Stock Purchase
Rights may also be granted under the Plan.

        2. Definitions. As used herein, the following definitions shall apply:

               (a) "Administrator" means the Board or any of its Committees as
shall be administering the Plan in accordance with Section 4 hereof.

               (b) "Applicable Laws" means the requirements relating to the
administration of stock option plans under U.S. state corporate laws, U.S.
federal and state securities laws, the Code, any stock exchange or quotation
system on which the Common Stock is listed or quoted and the applicable laws of
any other country or jurisdiction where Options or Stock Purchase Rights are
granted under the Plan.

               (c) "Board" means the Board of Directors of the Company.

               (d) "Code" means the Internal Revenue Code of 1986, as amended.

               (e) "Committee" means a committee of Directors appointed by the
Board in accordance with Section 4 hereof.

               (f) "Common Stock" means the Common Stock of the Company.

               (g) "Company" means CoSine Communications, Inc., a California
corporation.

               (h) "Consultant" means any person who is engaged by the Company
or any Parent or Subsidiary to render consulting or advisory services to such
entity.

<PAGE>   2

               (i) "Director" means a member of the Board of Directors of the
Company.

               (j) "Disability" means total and permanent disability as defined
in Section 22(e)(3) of the Code.

               (k) "Employee" means any person, including Officers and
Directors, employed by the Company or any Parent or Subsidiary of the Company.
An Employee shall not cease to be an Employee in the case of (i) any leave of
absence approved by the Company or (ii) transfers between locations of the
Company or between the Company, its Parent, any Subsidiary, or any successor.
For purposes of Incentive Stock Options, no such leave may exceed ninety days,
unless reemployment upon expiration of such leave is guaranteed by statute or
contract. If reemployment upon expiration of a leave of absence approved by the
Company is not so guaranteed, on the 181st day of such leave any Incentive Stock
Option held by the Optionee shall cease to be treated as an Incentive Stock
Option and shall be treated for tax purposes as a Nonstatutory Stock Option.
Neither service as a Director nor payment of a director's fee by the Company
shall be sufficient to constitute "employment" by the Company.

               (l) "Exchange Act" means the Securities Exchange Act of 1934, as
amended.

               (m) "Fair Market Value" means, as of any date, the value of
Common Stock determined as follows:

                      (i) If the Common Stock is listed on any established stock
exchange or a national market system, including without limitation the Nasdaq
National Market or The Nasdaq SmallCap Market of The Nasdaq Stock Market, its
Fair Market Value shall be the closing sales price for such stock (or the
closing bid, if no sales were reported) as quoted on such exchange or system for
the last market trading day prior to the time of determination, as reported in
The Wall Street Journal or such other source as the Administrator deems
reliable;

                      (ii) If the Common Stock is regularly quoted by a
recognized securities dealer but selling prices are not reported, its Fair
Market Value shall be the mean between the high bid and low asked prices for the
Common Stock on the last market trading day prior to the day of determination;
or

                      (iii) In the absence of an established market for the
Common Stock, the Fair Market Value thereof shall be determined in good faith by
the Administrator.

               (n) "Incentive Stock Option" means an Option intended to qualify
as an incentive stock option within the meaning of Section 422 of the Code.

               (o) "Nonstatutory Stock Option" means an Option not intended to
qualify as an Incentive Stock Option.

<PAGE>   3

               (p) "Officer" means a person who is an officer of the Company
within the meaning of Section 16 of the Exchange Act and the rules and
regulations promulgated thereunder.

               (q) "Option" means a stock option granted pursuant to the Plan.

               (r) "Option Agreement" means a written or electronic agreement
between the Company and an Optionee evidencing the terms and conditions of an
individual Option grant. The Option Agreement is subject to the terms and
conditions of the Plan.

               (s) "Option Exchange Program" means a program whereby outstanding
Options are exchanged for Options with a lower exercise price.

               (t) "Optioned Stock" means the Common Stock subject to an Option
or a Stock Purchase Right.

               (u) "Optionee" means the holder of an outstanding Option or Stock
Purchase Right granted under the Plan.

               (v) "Parent" means a "parent corporation," whether now or
hereafter existing, as defined in Section 424(e) of the Code.

               (w) "Plan" means this 1997 Stock Plan.

               (x) "Restricted Stock" means shares of Common Stock acquired
pursuant to a grant of a Stock Purchase Right under Section 11 below.

               (y) "Section 16(b)" means Section 16(b) of the Securities
Exchange Act of 1934, as amended.

               (z) "Service Provider" means an Employee, Director or Consultant.

               (aa) "Share" means a share of the Common Stock, as adjusted in
accordance with Section 12 below.

               (bb) "Stock Purchase Right" means a right to purchase Common
Stock pursuant to Section 11 below.

               (cc) "Subsidiary" means a "subsidiary corporation," whether now
or hereafter existing, as defined in Section 424(f) of the Code.

        3. Stock Subject to the Plan. Subject to the provisions of Section 12 of
the Plan, the maximum aggregate number of Shares which may be subject to option
and sold under the Plan is



                                      -3-
<PAGE>   4

twenty seven million six hundred twenty thousand (27,620,000) Shares. The Shares
may be authorized but unissued, or reacquired Common Stock.

               If an Option or Stock Purchase Right expires or becomes
unexercisable without having been exercised in full, or is surrendered pursuant
to an Option Exchange Program, the unpurchased Shares which were subject thereto
shall become available for future grant or sale under the Plan (unless the Plan
has terminated). However, Shares that have actually been issued under the Plan,
upon exercise of either an Option or Stock Purchase Right, shall not be returned
to the Plan and shall not become available for future distribution under the
Plan, except that if Shares of Restricted Stock are repurchased by the Company
at their original purchase price, such Shares shall become available for future
grant under the Plan.

        4. Administration of the Plan.

               (a) Administrator. The Plan shall be administered by the Board or
a Committee appointed by the Board, which Committee shall be constituted to
comply with Applicable Laws.

               (b) Powers of the Administrator. Subject to the provisions of the
Plan and, in the case of a Committee, the specific duties delegated by the Board
to such Committee, and subject to the approval of any relevant authorities, the
Administrator shall have the authority in its discretion:

                      (i) to determine the Fair Market Value;

                      (ii) to select the Service Providers to whom Options and
Stock Purchase Rights may from time to time be granted hereunder;

                      (iii) to determine the number of Shares to be covered by
each such award granted hereunder;

                      (iv) to approve forms of agreement for use under the Plan;

                      (v) to determine the terms and conditions, of any Option
or Stock Purchase Right granted hereunder. Such terms and conditions include,
but are not limited to, the exercise price, the time or times when Options or
Stock Purchase Rights may be exercised (which may be based on performance
criteria), any vesting acceleration or waiver of forfeiture restrictions, and
any restriction or limitation regarding any Option or Stock Purchase Right or
the Common Stock relating thereto, based in each case on such factors as the
Administrator, in its sole discretion, shall determine;

                      (vi) to determine whether and under what circumstances an
Option may be settled in cash under subsection 9(e) instead of Common Stock;



                                      -4-
<PAGE>   5

                      (vii) to reduce the exercise price of any Option to the
then current Fair Market Value if the Fair Market Value of the Common Stock
covered by such Option has declined since the date the Option was granted;

                      (viii) to initiate an Option Exchange Program;

                      (ix) to prescribe, amend and rescind rules and regulations
relating to the Plan, including rules and regulations relating to sub-plans
established for the purpose of qualifying for preferred tax treatment under
foreign tax laws;

                      (x) to allow Optionees to satisfy withholding tax
obligations by electing to have the Company withhold from the Shares to be
issued upon exercise of an Option or Stock Purchase Right that number of Shares
having a Fair Market Value equal to the amount required to be withheld. The Fair
Market Value of the Shares to be withheld shall be determined on the date that
the amount of tax to be withheld is to be determined. All elections by Optionees
to have Shares withheld for this purpose shall be made in such form and under
such conditions as the Administrator may deem necessary or advisable; and

                      (xi) to construe and interpret the terms of the Plan and
awards granted pursuant to the Plan.

               (c) Effect of Administrator's Decision. All decisions,
determinations and interpretations of the Administrator shall be final and
binding on all Optionees.

        5. Eligibility.

               (a) Nonstatutory Stock Options and Stock Purchase Rights may be
granted to Service Providers. Incentive Stock Options may be granted only to
Employees.

               (b) Each Option shall be designated in the Option Agreement as
either an Incentive Stock Option or a Nonstatutory Stock Option. However,
notwithstanding such designation, to the extent that the aggregate Fair Market
Value of the Shares with respect to which Incentive Stock Options are
exercisable for the first time by the Optionee during any calendar year (under
all plans of the Company and any Parent or Subsidiary) exceeds $100,000, such
Options shall be treated as Nonstatutory Stock Options. For purposes of this
Section 5(b), Incentive Stock Options shall be taken into account in the order
in which they were granted. The Fair Market Value of the Shares shall be
determined as of the time the Option with respect to such Shares is granted.

               (c) Neither the Plan nor any Option or Stock Purchase Right shall
confer upon any Optionee any right with respect to continuing the Optionee's
relationship as a Service Provider with the Company, nor shall it interfere in
any way with his or her right or the Company's right to terminate such
relationship at any time, with or without cause.



                                      -5-
<PAGE>   6

        6. Term of Plan. The Plan shall become effective upon its adoption by
the Board. It shall continue in effect for a term of ten (10) years unless
sooner terminated under Section 14 of the Plan.

        7. Term of Option. The term of each Option shall be stated in the Option
Agreement; provided, however, that the term shall be no more than ten (10) years
from the date of grant thereof. In the case of an Incentive Stock Option granted
to an Optionee who, at the time the Option is granted, owns stock representing
more than ten percent (10%) of the voting power of all classes of stock of the
Company or any Parent or Subsidiary, the term of the Option shall be five (5)
years from the date of grant or such shorter term as may be provided in the
Option Agreement.

        8. Option Exercise Price and Consideration.

               (a) The per share exercise price for the Shares to be issued upon
exercise of an Option shall be such price as is determined by the Administrator,
but shall be subject to the following:

                      (i) In the case of an Incentive Stock Option

                             (A) granted to an Employee who, at the time of
grant of such Option, owns stock representing more than ten percent (10%) of the
voting power of all classes of stock of the Company or any Parent or Subsidiary,
the exercise price shall be no less than 110% of the Fair Market Value per Share
on the date of grant.

                             (B) granted to any other Employee, the per Share
exercise price shall be no less than 100% of the Fair Market Value per Share on
the date of grant.

                      (ii) In the case of a Nonstatutory Stock Option

                             (A) granted to a Service Provider who, at the time
of grant of such Option, owns stock representing more than ten percent (10%) of
the voting power of all classes of stock of the Company or any Parent or
Subsidiary, the exercise price shall be no less than 110% of the Fair Market
Value per Share on the date of grant.

                             (B) granted to any other Service Provider, the per
Share exercise price shall be no less than 85% of the Fair Market Value per
Share on the date of grant.

                      (iii) Notwithstanding the foregoing, Options may be
granted with a per Share exercise price other than as required above pursuant to
a merger or other corporate transaction.



                                      -6-
<PAGE>   7

               (b) The consideration to be paid for the Shares to be issued upon
exercise of an Option, including the method of payment, shall be determined by
the Administrator (and, in the case of an Incentive Stock Option, shall be
determined at the time of grant). Such consideration may consist of (1) cash,
(2) check, (3) promissory note, (4) other Shares which (x) in the case of Shares
acquired upon exercise of an Option, have been owned by the Optionee for more
than six months on the date of surrender, and (y) have a Fair Market Value on
the date of surrender equal to the aggregate exercise price of the Shares as to
which such Option shall be exercised, (5) consideration received by the Company
under a cashless exercise program implemented by the Company in connection with
the Plan, or (6) any combination of the foregoing methods of payment. In making
its determination as to the type of consideration to accept, the Administrator
shall consider if acceptance of such consideration may be reasonably expected to
benefit the Company.

        9. Exercise of Option.

               (a) Procedure for Exercise; Rights as a Shareholder. Any Option
granted hereunder shall be exercisable according to the terms hereof at such
times and under such conditions as determined by the Administrator and set forth
in the Option Agreement. Except in the case of Options granted to Officers,
Directors and Consultants, Options shall become exercisable at a rate of no less
than 20% per year over five (5) years from the date the Options are granted.
Unless the Administrator provides otherwise, vesting of Options granted
hereunder shall be tolled during any unpaid leave of absence. An Option may not
be exercised for a fraction of a Share.

                      An Option shall be deemed exercised when the Company
receives: (i) written or electronic notice of exercise (in accordance with the
Option Agreement) from the person entitled to exercise the Option, and (ii) full
payment for the Shares with respect to which the Option is exercised. Full
payment may consist of any consideration and method of payment authorized by the
Administrator and permitted by the Option Agreement and the Plan. Shares issued
upon exercise of an Option shall be issued in the name of the Optionee or, if
requested by the Optionee, in the name of the Optionee and his or her spouse.
Until the Shares are issued (as evidenced by the appropriate entry on the books
of the Company or of a duly authorized transfer agent of the Company), no right
to vote or receive dividends or any other rights as a shareholder shall exist
with respect to the Shares, notwithstanding the exercise of the Option. The
Company shall issue (or cause to be issued) such Shares promptly after the
Option is exercised. No adjustment will be made for a dividend or other right
for which the record date is prior to the date the Shares are issued, except as
provided in Section 12 of the Plan.

                      Exercise of an Option in any manner shall result in a
decrease in the number of Shares thereafter available, both for purposes of the
Plan and for sale under the Option, by the number of Shares as to which the
Option is exercised.

               (b) Termination of Relationship as a Service Provider. If an
Optionee ceases to be a Service Provider, such Optionee may exercise his or her
Option within such period of time as is



                                      -7-
<PAGE>   8

specified in the Option Agreement (of at least thirty (30) days) to the extent
that the Option is vested on the date of termination (but in no event later than
the expiration of the term of the Option as set forth in the Option Agreement).
In the absence of a specified time in the Option Agreement, the Option shall
remain exercisable for three (3) months following the Optionee's termination.
If, on the date of termination, the Optionee is not vested as to his or her
entire Option, the Shares covered by the unvested portion of the Option shall
revert to the Plan. If, after termination, the Optionee does not exercise his or
her Option within the time specified by the Option Agreement, the Option shall
terminate, and the Shares covered by such Option shall revert to the Plan.

               (c) Disability of Optionee. If an Optionee ceases to be a Service
Provider as a result of the Optionee's Disability, the Optionee may exercise his
or her Option within such period of time as is specified in the Option Agreement
(of at least six (6) months) to the extent the Option is vested on the date of
termination (but in no event later than the expiration of the term of such
Option as set forth in the Option Agreement). In the absence of a specified time
in the Option Agreement, the Option shall remain exercisable for twelve (12)
months following the Optionee's termination due to the Optionee's Disability.
If, on the date of termination, the Optionee is not vested as to his or her
entire Option, the Shares covered by the unvested portion of the Option shall
revert to the Plan. If, after termination, the Optionee does not exercise his or
her Option within the time specified herein, the Option shall terminate, and the
Shares covered by such Option shall revert to the Plan.

               (d) Death of Optionee. If an Optionee dies while a Service
Provider, the Option may be exercised within such period of time as is specified
in the Option Agreement (of at least six (6) months) to the extent that the
Option is vested on the date of death (but in no event later than the expiration
of the term of such Option as set forth in the Option Agreement) by the
Optionee's estate or by a person who acquires the right to exercise the Option
by bequest or inheritance. In the absence of a specified time in the Option
Agreement, the Option shall remain exercisable for twelve (12) months following
the Optionee's death. If, at the time of death, the Optionee is not vested as to
the entire Option, the Shares covered by the unvested portion of the Option
shall immediately revert to the Plan. If the Option is not so exercised within
the time specified herein, the Option shall terminate, and the Shares covered by
such Option shall revert to the Plan.

               (e) Buyout Provisions. The Administrator may at any time offer to
buy out for a payment in cash or Shares, an Option previously granted, based on
such terms and conditions as the Administrator shall establish and communicate
to the Optionee at the time that such offer is made.

        10. Non-Transferability of Options and Stock Purchase Rights. The
Options and Stock Purchase Rights may not be sold, pledged, assigned,
hypothecated, transferred, or disposed of in any manner other than by will or by
the laws of descent or distribution and may be exercised, during the lifetime of
the Optionee, only by the Optionee.

        11. Stock Purchase Rights.



                                      -8-
<PAGE>   9

               (a) Rights to Purchase. Stock Purchase Rights may be issued
either alone, in addition to, or in tandem with other awards granted under the
Plan and/or cash awards made outside of the Plan. After the Administrator
determines that it will offer Stock Purchase Rights under the Plan, it shall
advise the offeree in writing or electronically of the terms, conditions and
restrictions related to the offer, including the number of Shares that such
person shall be entitled to purchase, the price to be paid, and the time within
which such person must accept such offer. The terms of the offer shall comply in
all respects with Section 260.140.42 of Title 10 of the California Code of
Regulations. The offer shall be accepted by execution of a Restricted Stock
purchase agreement in the form determined by the Administrator.

               (b) Repurchase Option. Unless the Administrator determines
otherwise, the Restricted Stock purchase agreement shall grant the Company a
repurchase option exercisable upon the voluntary or involuntary termination of
the purchaser's service with the Company for any reason (including death or
disability). The purchase price for Shares repurchased pursuant to the
Restricted Stock purchase agreement shall be the original price paid by the
purchaser and may be paid by cancellation of any indebtedness of the purchaser
to the Company. The repurchase option shall lapse at such rate as the
Administrator may determine. Except with respect to Shares purchased by
Officers, Directors and Consultants, the repurchase option shall in no case
lapse at a rate of less than 20% per year over five (5) years from the date of
purchase.

               (c) Other Provisions. The Restricted Stock purchase agreement
shall contain such other terms, provisions and conditions not inconsistent with
the Plan as may be determined by the Administrator in its sole discretion.

               (d) Rights as a Shareholder. Once the Stock Purchase Right is
exercised, the purchaser shall have rights equivalent to those of a shareholder
and shall be a shareholder when his or her purchase is entered upon the records
of the duly authorized transfer agent of the Company. No adjustment shall be
made for a dividend or other right for which the record date is prior to the
date the Stock Purchase Right is exercised, except as provided in Section 12 of
the Plan.



                                      -9-
<PAGE>   10

        12. Adjustments Upon Changes in Capitalization, Merger or Asset Sale.

               (a) Changes in Capitalization. Subject to any required action by
the shareholders of the Company, the number of shares of Common Stock covered by
each outstanding Option or Stock Purchase Right, and the number of shares of
Common Stock which have been authorized for issuance under the Plan but as to
which no Options or Stock Purchase Rights have yet been granted or which have
been returned to the Plan upon cancellation or expiration of an Option or Stock
Purchase Right, as well as the price per share of Common Stock covered by each
such outstanding Option or Stock Purchase Right, shall be proportionately
adjusted for any increase or decrease in the number of issued shares of Common
Stock resulting from a stock split, reverse stock split, stock dividend,
combination or reclassification of the Common Stock, or any other increase or
decrease in the number of issued shares of Common Stock effected without receipt
of consideration by the Company. The conversion of any convertible securities of
the Company shall not be deemed to have been "effected without receipt of
consideration." Such adjustment shall be made by the Board, whose determination
in that respect shall be final, binding and conclusive. Except as expressly
provided herein, no issuance by the Company of shares of stock of any class, or
securities convertible into shares of stock of any class, shall affect, and no
adjustment by reason thereof shall be made with respect to, the number or price
of shares of Common Stock subject to an Option or Stock Purchase Right.

               (b) Dissolution or Liquidation. In the event of the proposed
dissolution or liquidation of the Company, the Administrator shall notify each
Optionee as soon as practicable prior to the effective date of such proposed
transaction. The Administrator in its discretion may provide for an Optionee to
have the right to exercise his or her Option or Stock Purchase Right until
fifteen (15) days prior to such transaction as to all of the Optioned Stock
covered thereby, including Shares as to which the Option or Stock Purchase Right
would not otherwise be exercisable. In addition, the Administrator may provide
that any Company repurchase option applicable to any Shares purchased upon
exercise of an Option or Stock Purchase Right shall lapse as to all such Shares,
provided the proposed dissolution or liquidation takes place at the time and in
the manner contemplated. To the extent it has not been previously exercised, an
Option or Stock Purchase Right will terminate immediately prior to the
consummation of such proposed action.

               (c) Merger or Asset Sale. In the event of a merger of the Company
with or into another corporation, or the sale of substantially all of the assets
of the Company, each outstanding Option and Stock Purchase Right shall be
assumed or an equivalent option or right substituted by the successor
corporation or a Parent or Subsidiary of the successor corporation. In the event
that the successor corporation refuses to assume or substitute for the Option or
Stock Purchase Right, the Optionee shall fully vest in and have the right to
exercise the Option or Stock Purchase Right as to all of the Optioned Stock,
including Shares as to which it would not otherwise be vested or exercisable. If
an Option or Stock Purchase Right becomes fully vested and exercisable in lieu
of assumption or substitution in the event of a merger or sale of assets, the
Administrator shall notify the Optionee in writing or electronically that the
Option or Stock Purchase Right shall be fully



                                      -10-
<PAGE>   11

exercisable for a period of fifteen (15) days from the date of such notice, and
the Option or Stock Purchase Right shall terminate upon the expiration of such
period. For the purposes of this paragraph, the Option or Stock Purchase Right
shall be considered assumed if, following the merger or sale of assets, the
option or right confers the right to purchase or receive, for each Share of
Optioned Stock subject to the Option or Stock Purchase Right immediately prior
to the merger or sale of assets, the consideration (whether stock, cash, or
other securities or property) received in the merger or sale of assets by
holders of Common Stock for each Share held on the effective date of the
transaction (and if holders were offered a choice of consideration, the type of
consideration chosen by the holders of a majority of the outstanding Shares);
provided, however, that if such consideration received in the merger or sale of
assets is not solely common stock of the successor corporation or its Parent,
the Administrator may, with the consent of the successor corporation, provide
for the consideration to be received upon the exercise of the Option or Stock
Purchase Right, for each Share of Optioned Stock subject to the Option or Stock
Purchase Right, to be solely common stock of the successor corporation or its
Parent equal in fair market value to the per share consideration received by
holders of Common Stock in the merger or sale of assets.

        13. Time of Granting Options and Stock Purchase Rights. The date of
grant of an Option or Stock Purchase Right shall, for all purposes, be the date
on which the Administrator makes the determination granting such Option or Stock
Purchase Right, or such other date as is determined by the Administrator. Notice
of the determination shall be given to each Service Provider to whom an Option
or Stock Purchase Right is so granted within a reasonable time after the date of
such grant.

        14. Amendment and Termination of the Plan.

               (a) Amendment and Termination. The Board may at any time amend,
alter, suspend or terminate the Plan.

               (b) Shareholder Approval. The Board shall obtain shareholder
approval of any Plan amendment to the extent necessary and desirable to comply
with Applicable Laws.

               (c) Effect of Amendment or Termination. No amendment, alteration,
suspension or termination of the Plan shall impair the rights of any Optionee,
unless mutually agreed otherwise between the Optionee and the Administrator,
which agreement must be in writing and signed by the Optionee and the Company.
Termination of the Plan shall not affect the Administrator's ability to exercise
the powers granted to it hereunder with respect to Options granted under the
Plan prior to the date of such termination.

        15. Conditions Upon Issuance of Shares.

               (a) Legal Compliance. Shares shall not be issued pursuant to the
exercise of an Option unless the exercise of such Option and the issuance and
delivery of such Shares shall comply



                                      -11-
<PAGE>   12

with Applicable Laws and shall be further subject to the approval of counsel for
the Company with respect to such compliance.

               (b) Investment Representations. As a condition to the exercise of
an Option, the Administrator may require the person exercising such Option to
represent and warrant at the time of any such exercise that the Shares are being
purchased only for investment and without any present intention to sell or
distribute such Shares if, in the opinion of counsel for the Company, such a
representation is required.

        16. Inability to Obtain Authority. The inability of the Company to
obtain authority from any regulatory body having jurisdiction, which authority
is deemed by the Company's counsel to be necessary to the lawful issuance and
sale of any Shares hereunder, shall relieve the Company of any liability in
respect of the failure to issue or sell such Shares as to which such requisite
authority shall not have been obtained.

        17. Reservation of Shares. The Company, during the term of this Plan,
shall at all times reserve and keep available such number of Shares as shall be
sufficient to satisfy the requirements of the Plan.

        18. Shareholder Approval. The Plan shall be subject to approval by the
shareholders of the Company within twelve (12) months after the date the Plan is
adopted. Such shareholder approval shall be obtained in the degree and manner
required under Applicable Laws.

        19. Information to Optionees and Purchasers. The Company shall provide
to each Optionee and to each individual who acquires Shares pursuant to the
Plan, not less frequently than annually during the period such Optionee or
purchaser has one or more Options or Stock Purchase Rights outstanding, and, in
the case of an individual who acquires Shares pursuant to the Plan, during the
period such individual owns such Shares, copies of annual financial statements.
The Company shall not be required to provide such statements to key employees
whose duties in connection with the Company assure their access to equivalent
information.



                                      -12-
<PAGE>   13
                                                                    EXHIBIT 10.5

                          COSINE COMMUNICATIONS, INC.

                                 1997 STOCK PLAN

                    STOCK OPTION AGREEMENT -- EARLY EXERCISE
                             (WITH PROMISSORY NOTE)

      Unless otherwise defined herein, the terms defined in the 1997 Stock
Plan shall have the same defined meanings in this Stock Option Agreement (the
"Option Agreement"), and shall be effective as of the Date of Grant set forth
below.

I.      NOTICE OF STOCK OPTION GRANT

        ------------------------------

        ------------------------------

        ------------------------------

        You have been granted an option to purchase Common Stock of the Company,
subject to the terms and conditions of the Plan and this Option Agreement, as
follows:

        Grant Number
                                             -----------------------------------

        Date of Grant
                                             -----------------------------------

        Vesting Commencement Date
                                             -----------------------------------

        Exercise Price per Share            $
                                             -----------------------------------

        Total Number of Shares Granted
                                             -----------------------------------

        Total Exercise Price                $
                                             -----------------------------------

        Type of Option:                              Incentive Stock Option
                                             --------

                                                     Nonstatutory Stock Option
                                             --------

        Term/Expiration Date:
                                             -----------------------------------

        Exercise and Vesting Schedule:

        This Option shall be exercisable in whole or in part, and shall vest
according to the following vesting schedule:

        25% OF THE SHARES SUBJECT TO THE OPTION SHALL VEST TWELVE MONTHS AFTER
THE VESTING COMMENCEMENT DATE, AND 1/48 OF THE SHARES SUBJECT TO THE OPTION
SHALL VEST EACH MONTH THEREAFTER, SUBJECT TO OPTIONEE'S CONTINUING TO BE A
SERVICE PROVIDER ON SUCH DATES.



<PAGE>   14
        Termination Period:

        This Option may be exercised, to the extent it is then vested, for three
months after Optionee ceases to be a Service Provider. Upon death or Disability
of the Optionee, this Option may be exercised, to the extent it is then vested,
for one year after Optionee ceases to be Service Provider. In no event shall
this Option be exercised later than the Term/Expiration Date as provided above.

II.     AGREEMENT

        1. Grant of Option. The Administrator of the Company hereby grants to
the Optionee named in the Notice of Grant (the "Optionee"), an option (the
"Option") to purchase the number of Shares set forth in the Notice of Grant, at
the exercise price per Share set forth in the Notice of Grant (the "Exercise
Price"), and subject to the terms and conditions of the Plan, which is
incorporated herein by reference. Subject to Section 14(c) of the Plan, in the
event of a conflict between the terms and conditions of the Plan and this Option
Agreement, the terms and conditions of the Plan shall prevail.

        If designated in the Notice of Grant as an Incentive Stock Option
("ISO"), this Option is intended to qualify as an Incentive Stock Option as
defined in Section 422 of the Code. Nevertheless, to the extent that it exceeds
the $100,000 rule of Code Section 422(d), this Option shall be treated as a
Nonstatutory Stock Option ("NSO").

        2. Exercise of Option. This Option shall be exercisable during its term
in accordance with the provisions of Section 9 of the Plan as follows:

               (a) Right to Exercise.

                          (i) Subject to subsections 2(a)(ii) and 2(a)(iii)
below, this Option shall be exercisable cumulatively according to the vesting
schedule set forth in the Notice of Grant. Alternatively, at the election of the
Optionee, this Option may be exercised in whole or in part at any time as to
Shares that have not yet vested. Vested Shares shall not be subject to the
Company's repurchase right (as set forth in the Restricted Stock Purchase
Agreement, attached hereto as Exhibit C-1).

                          (ii) As a condition to exercising this Option for
unvested Shares, the Optionee shall execute the Restricted Stock Purchase
Agreement.

                          (iii) This Option may not be exercised for a fraction
of a Share.

               (b) Method of Exercise. This Option shall be exercisable by
delivery of an exercise notice in the form attached as Exhibit A (the "Exercise
Notice") which shall state the election to exercise the Option, the number of
Shares with respect to which the Option is being exercised, and such other
representations and agreements as may be required by the Company. The Exercise
Notice shall be accompanied by payment of the aggregate Exercise Price as to all
Exercised

                                      -2-
<PAGE>   15

Shares. This Option shall be deemed to be exercised upon receipt by the Company
of such fully executed Exercise Notice accompanied by the aggregate


               No Shares shall be issued pursuant to the exercise of an Option
unless such issuance and such exercise comply with Applicable Laws. Assuming
such compliance, for income tax purposes the Shares shall be considered
transferred to the Optionee on the date on which the Option is exercised with
respect to such Shares.

        3. Optionee's Representations. In the event the Shares have not been
registered under the Securities Act of 1933, as amended, at the time this Option
is exercised, the Optionee shall, if required by the Company, concurrently with
the exercise of all or any portion of this Option, deliver to the Company his or
her Investment Representation Statement in the form attached hereto as Exhibit
B-1.

        4. Lock-Up Period. Optionee hereby agrees that, if so requested by the
Company or any representative of the underwriters (the "Managing Underwriter")
in connection with any registration of the offering of any securities of the
Company under the Securities Act, Optionee shall not sell or otherwise transfer
any Shares or other securities of the Company during the 180-day period (or such
other period as may be requested in writing by the Managing Underwriter and
agreed to in writing by the Company) (the "Market Standoff Period") following
the effective date of a registration statement of the Company filed under the
Securities Act. Such restriction shall apply only to the first registration
statement of the Company to become effective under the Securities Act that
includes securities to be sold on behalf of the Company to the public in an
underwritten public offering under the Securities Act. The Company may impose
stop-transfer instructions with respect to securities subject to the foregoing
restrictions until the end of such Market Standoff Period.

        5. Method of Payment. Payment of the aggregate Exercise Price shall be
by any of the following, or a combination thereof, at the election of the
Optionee:

               (a) cash;

               (b) check;

               (c) consideration received by the Company under a formal cashless
exercise program adopted by the Company in connection with the Plan;

               (d) surrender of other Shares which, (i) in the case of Shares
acquired upon exercise of an option, have been owned by the Optionee for more
than six (6) months on the date of surrender, and (ii) have a Fair Market Value
on the date of surrender equal to the aggregate Exercise Price of the Exercised
Shares;

               (e) with the Administrator's consent, delivery of Optionee's
promissory note (the "Note") in the form attached hereto as Exhibit B-2, in the
amount of the aggregate Exercise Price of the Exercised Shares together with the
execution and delivery by the Optionee of the Security Agreement attached hereto
as Exhibit B-3. The Note shall bear interest at the "applicable federal

                                      -3-
<PAGE>   16

rate" prescribed under the Code and its regulations at time of purchase, and
shall be secured by a pledge of the Shares purchased by the Note pursuant to the
Security Agreement.

        6. Restrictions on Exercise. This Option may not be exercised until such
time as the Plan has been approved by the shareholders of the Company, or if the
issuance of such Shares upon such exercise or the method of payment of
consideration for such shares would constitute a violation of any Applicable
Law.

        7. Non-Transferability of Option. This Option may not be transferred in
any manner otherwise than by will or by the laws of descent or distribution and
may be exercised during the lifetime of Optionee only by Optionee. The terms of
the Plan and this Option Agreement shall be binding upon the executors,
administrators, heirs, successors and assigns of the Optionee.

        8. Term of Option. This Option may be exercised only within the term set
out in the Notice of Grant, and may be exercised during such term only in
accordance with the Plan and the terms of this Option.

        9. Tax Consequences. Set forth below is a brief summary as of the date
of this Option of some of the federal tax consequences of exercise of this
Option and disposition of the Shares. THIS SUMMARY IS NECESSARILY INCOMPLETE,
AND THE TAX LAWS AND REGULATIONS ARE SUBJECT TO CHANGE. THE OPTIONEE SHOULD
CONSULT A TAX ADVISER BEFORE EXERCISING THIS OPTION OR DISPOSING OF THE SHARES.

               (a) Exercise of NSO. There may be a regular federal income tax
liability upon the exercise of an NSO. The Optionee will be treated as having
received compensation income (taxable at ordinary income tax rates) equal to the
excess, if any, of the Fair Market Value of the Exercised Shares on the date of
exercise over the Exercise Price. If Optionee is an Employee or a former
Employee, the Company will be required to withhold from Optionee's compensation
or collect from Optionee and pay to the applicable taxing authorities an amount
in cash equal to a percentage of this compensation income at the time of
exercise, and may refuse to honor the exercise and refuse to deliver Shares if
such withholding amounts are not delivered at the time of exercise.

               (b) Exercise of ISO. If this Option qualifies as an ISO, there
will be no regular federal income tax liability upon the exercise of the Option,
although the excess, if any, of the Fair Market Value of the Exercised Shares on
the date of exercise over the Exercise Price will be treated as an adjustment to
the alternative minimum tax for federal tax purposes and may subject the
Optionee to the alternative minimum tax in the year of exercise.

               (c) Exercise of ISO Following Disability. If the Optionee ceases
to be an Employee as a result of a disability that is not a total and permanent
disability as defined in Section 22(e)(3) of the Code, to the extent permitted
on the date of termination, the Optionee must exercise an ISO within three
months of such termination for the ISO to be qualified as an ISO.

               (d) Disposition of Shares. In the case of an NSO, if Shares are
held for at least one year, any gain realized on disposition of the Shares will
be treated as long-term capital gain for

                                      -4-
<PAGE>   17

federal income tax purposes. In the case of an ISO, if Shares transferred
pursuant to the Option are held for at least one year after exercise and at
least two years after the Date of Grant, any gain realized on disposition of the
Shares will also be treated as long-term capital gain for federal income tax
purposes. If Shares purchased under an ISO are disposed of within one year after
exercise or two years after the Date of Grant, any gain realized on such
disposition will be treated as compensation income (taxable at ordinary income
rates) to the extent of the difference between the Exercise Price of the
Exercised Shares and the lesser of (i) the Fair Market Value of the Exercised
Shares on the date of exercise, or (ii) the sale price of the Exercised Shares.
Different rules may apply if the Shares are subject to a substantial risk of
forfeiture (within the meaning of Section 83 of the Code) at the time of
purchase. Any additional gain will be taxed as capital gain, short-term
depending on the period that the ISO Shares were held.

               (e) Notice of Disqualifying Disposition of ISO Shares. If the
Option granted to Optionee herein is an ISO, and if Optionee sells or otherwise
disposes of any of the Shares acquired pursuant to the ISO on or before the
later of (i) the date two years after the Date of Grant, or (ii) the date one
year after the date of exercise, the Optionee shall immediately notify the
Company in writing of such disposition. Optionee agrees that Optionee may be
subject to income tax withholding by the Company on the compensation income
recognized by the Optionee.

               (f) Section 83(b) Election for Unvested Shares Purchased Pursuant
to Options. With respect to the exercise of an Option for unvested Shares, an
election (the "Election") may be filed by the Optionee with the Internal Revenue
Service, within 30 days of the purchase of the Shares, electing pursuant to
Section 83(b) of the Code to be taxed currently on any difference between the
purchase price of the Shares and their Fair Market Value on the date of
purchase. In the case of an NSO, this will result in a recognition of taxable
income to the Optionee on the date of exercise, measured by the excess, if any,
of the Fair Market Value of the Exercised Shares, at the time the Option is
exercised over the purchase price for the Exercised Shares. Absent such an
election, taxable income will be measured and recognized by Optionee at the time
or times on which the Company's Repurchase Option lapses. In the case of an ISO,
such an election will result in a recognition of income to the Optionee for
alternative minimum tax purposes on the date of exercise, measured by the
excess, if any, of the Fair Market Value of the Exercised Shares, at the time
the Option is exercised, over the purchase price for the Exercised Shares.
Absent such an election, alternative minimum taxable income will be measured and
recognized by Optionee at the time or times on which the Company's Repurchase
Option lapses. Optionee is strongly encouraged to seek the advice of his or her
own tax consultants in connection with the purchase of the Shares and the
advisability of filing of the Election under Section 83(b) of the Code. A form
of Election under Section 83(b) is attached hereto as Exhibit C-5 for reference.

                      OPTIONEE ACKNOWLEDGES THAT IT IS OPTIONEE'S SOLE
RESPONSIBILITY AND NOT THE COMPANY'S TO FILE TIMELY THE ELECTION UNDER SECTION
83(b), EVEN IF OPTIONEE REQUESTS THE COMPANY OR ITS REPRESENTATIVE TO MAKE THIS
FILING ON OPTIONEE'S BEHALF.

                                      -5-
<PAGE>   18

        10. Entire Agreement; Governing Law. The Plan is incorporated herein by
reference. The Plan and this Option Agreement constitute the entire agreement of
the parties with respect to the subject matter hereof and supersede in their
entirety all prior undertakings and agreements of the Company and Optionee with
respect to the subject matter hereof, and may not be modified adversely to the
Optionee's interest except by means of a writing signed by the Company and
Optionee. This Option Agreement is governed by the internal substantive laws but
not the choice of law rules of California.

        11. No Guarantee of Continued Service. OPTIONEE ACKNOWLEDGES AND AGREES
THAT THE VESTING OF SHARES PURSUANT TO THE VESTING SCHEDULE HEREOF IS EARNED
ONLY BY CONTINUING AS A SERVICE PROVIDER AT THE WILL OF THE COMPANY (NOT THROUGH
THE ACT OF BEING HIRED, BEING GRANTED THIS OPTION OR ACQUIRING SHARES
HEREUNDER). OPTIONEE FURTHER ACKNOWLEDGES AND AGREES THAT THIS AGREEMENT, THE
TRANSACTIONS CONTEMPLATED HEREUNDER AND THE VESTING SCHEDULE SET FORTH HEREIN DO
NOT CONSTITUTE AN EXPRESS OR IMPLIED PROMISE OF CONTINUED ENGAGEMENT AS A
SERVICE PROVIDER FOR THE VESTING PERIOD, FOR ANY PERIOD, OR AT ALL, AND SHALL
NOT INTERFERE IN ANY WAY WITH OPTIONEE'S RIGHT OR THE COMPANY'S RIGHT TO
TERMINATE OPTIONEE'S RELATIONSHIP AS A SERVICE PROVIDER AT ANY TIME, WITH OR
WITHOUT CAUSE.

        Optionee acknowledges receipt of a copy of the Plan and represents that
he or she is familiar with the terms and provisions thereof, and hereby accepts
this Option subject to all of the terms and provisions thereof. Optionee has
reviewed the Plan and this Option in their entirety, has had an opportunity to
obtain the advice of counsel prior to executing this Option and fully
understands all provisions of the Option. Optionee hereby agrees to accept as
binding, conclusive and final all decisions or interpretations of the
Administrator upon any questions arising under the Plan or this Option. Optionee
further agrees to notify the Company upon any change in the residence address
indicated below.


                                      -6-
<PAGE>   19

OPTIONEE                                           COSINE COMMUNICATIONS, INC.

--------------------------                         -----------------------------
Signature                                          By

--------------------------                         -----------------------------
Print Name                                         Title


Residence Address:


--------------------------

--------------------------




<PAGE>   20


                                    EXHIBIT A

                                 1997 STOCK PLAN

                                 EXERCISE NOTICE

        CoSine Communications, Inc.
        1200 Bridge Parkway
        Redwood City, CA 94065

        Attention:  Secretary

        1. Exercise of Option. Effective as of today, ________________, ____,
the undersigned ("Optionee") hereby elects to exercise Optionee's option (the
"Option") to purchase ________________ shares of the Common Stock (the "Shares")
of CoSine Communications, Inc. (the "Company") under and pursuant to the 1997
Stock Plan (the "Plan") and the Stock Option Agreement dated (the "Option
Agreement").

        2. Delivery of Payment. Purchaser herewith delivers to the Company the
full purchase price of the Shares, as set forth in the Option Agreement.

        3. Representations of Optionee. Optionee acknowledges that Optionee has
received, read and understood the Plan and the Option Agreement and agrees to
abide by and be bound by their terms and conditions.

        4. Rights as Shareholder. Until the issuance of the Shares (as evidenced
by the appropriate entry on the books of the Company or of a duly authorized
transfer agent of the Company), no right to vote or receive dividends or any
other rights as a shareholder shall exist with respect to the optioned stock,
notwithstanding the exercise of the Option. The Shares shall be issued to the
Optionee as soon as practicable after the Option is exercised. No adjustment
shall be made for a dividend or other right for which the record date is prior
to the date of issuance except as provided in Section 12 of the Plan.

        5. Company's Right of First Refusal. Before any Shares held by Optionee
or any transferee (either being sometimes referred to herein as the "Holder")
may be sold or otherwise transferred (including transfer by gift or operation of
law), the Company or its assignee(s) shall have a right of first refusal to
purchase the Shares on the terms and conditions set forth in this Section (the
"Right of First Refusal").

               (a) Notice of Proposed Transfer. The Holder of the Shares shall
deliver to the Company a written notice (the "Notice") stating: (i) the Holder's
bona fide intention to sell or otherwise transfer such Shares; (ii) the name of
each proposed purchaser or other transferee ("Proposed Transferee"); (iii) the
number of Shares to be transferred to each Proposed Transferee; and (iv) the
bona fide cash price or other consideration for which the Holder proposes to
transfer the

<PAGE>   21


Shares (the "Offered Price"), and the Holder shall offer the Shares at the
Offered Price to the Company or its assignee(s).

               (b) Exercise of Right of First Refusal. At any time within thirty
(30) days after receipt of the Notice, the Company and/or its assignee(s) may,
by giving written notice to the Holder, elect to purchase all, but not less than
all, of the Shares proposed to be transferred to any one or more of the Proposed
Transferees, at the purchase price determined in accordance with subsection (c)
below.

               (c) Purchase Price. The purchase price ("Purchase Price") for the
Shares purchased by the Company or its assignee(s) under this Section shall be
the Offered Price. If the Offered Price includes consideration other than cash,
the cash equivalent value of the non-cash consideration shall be determined by
the Board of Directors of the Company in good faith.

               (d) Payment. Payment of the Purchase Price shall be made, at the
option of the Company or its assignee(s), in cash (by check), promissory note,
by cancellation of all or a portion of any outstanding indebtedness of the
Holder to the Company (or, in the case of repurchase by an assignee, to the
assignee), or by any combination thereof within 30 days after receipt of the
Notice or in the manner and at the times set forth in the Notice.

               (e) Holder's Right to Transfer. If all of the Shares proposed in
the Notice to be transferred to a given Proposed Transferee are not purchased by
the Company and/or its assignee(s) as provided in this Section, then the Holder
may sell or otherwise transfer such Shares to that Proposed Transferee at the
Offered Price or at a higher price, provided that such sale or other transfer is
consummated within 120 days after the date of the Notice, that any such sale or
other transfer is effected in accordance with any applicable securities laws and
that the Proposed Transferee agrees in writing that the provisions of this
Section shall continue to apply to the Shares in the hands of such Proposed
Transferee. If the Shares described in the Notice are not transferred to the
Proposed Transferee within such period, a new Notice shall be given to the
Company, and the Company and/or its assignees shall again be offered the Right
of First Refusal before any Shares held by the Holder may be sold or otherwise
transferred.

               (f) Exception for Certain Family Transfers. Anything to the
contrary contained in this Section notwithstanding, the transfer of any or all
of the Shares during the Optionee's lifetime or on the Optionee's death by will
or intestacy to the Optionee's immediate family or a trust for the benefit of
the Optionee's immediate family shall be exempt from the provisions of this
Section. "Immediate Family" as used herein shall mean spouse, lineal descendant
or antecedent, father, mother, brother or sister. In such case, the transferee
or other recipient shall receive and hold the Shares so transferred subject to
the provisions of this Section, and there shall be no further transfer of such
Shares except in accordance with the terms of this Section.

               (g) Termination of Right of First Refusal. The Right of First
Refusal shall terminate as to any Shares upon the first sale of Common Stock of
the Company to the general public pursuant to a registration statement filed
with and declared effective by the Securities and Exchange Commission under the
Securities Act of 1933, as amended.

                                      -2-
<PAGE>   22


        6. Tax Consultation. Optionee understands that Optionee may suffer
adverse tax consequences as a result of Optionee's purchase or disposition of
the Shares. Optionee represents that Optionee has consulted with any tax
consultants Optionee deems advisable in connection with the purchase or
disposition of the Shares and that Optionee is not relying on the Company for
any tax advice.

        7. Restrictive Legends and Stop-Transfer Orders.

               (a) Legends. Optionee understands and agrees that the Company
shall cause the legends set forth below or legends substantially equivalent
thereto, to be placed upon any certificate(s) evidencing ownership of the Shares
together with any other legends that may be required by the Company or by state
or federal securities laws:

                      THE SECURITIES REPRESENTED HEREBY HAVE NOT BEEN REGISTERED
                      UNDER THE SECURITIES ACT OF 1933 (THE "ACT") AND MAY NOT
                      BE OFFERED, SOLD OR OTHERWISE TRANSFERRED, PLEDGED OR
                      HYPOTHECATED UNLESS AND UNTIL REGISTERED UNDER THE ACT OR,
                      IN THE OPINION OF COMPANY COUNSEL SATISFACTORY TO THE
                      ISSUER OF THESE SECURITIES, SUCH OFFER, SALE OR TRANSFER,
                      PLEDGE OR HYPOTHECATION IS IN COMPLIANCE THEREWITH.


                      THE SHARES REPRESENTED BY THIS CERTIFICATE ARE SUBJECT TO
                      CERTAIN RESTRICTIONS ON TRANSFER AND RIGHT OF FIRST
                      REFUSAL OPTIONS HELD BY THE ISSUER OR ITS ASSIGNEE(S) AS
                      SET FORTH IN THE EXERCISE NOTICE BETWEEN THE ISSUER AND
                      THE ORIGINAL HOLDER OF THESE SHARES, A COPY OF WHICH MAY
                      BE OBTAINED AT THE PRINCIPAL OFFICE OF THE ISSUER. SUCH
                      TRANSFER RESTRICTIONS AND RIGHT OF FIRST REFUSAL ARE
                      BINDING ON TRANSFEREES OF THESE SHARES.


               (b) Stop-Transfer Notices. Optionee agrees that, in order to
ensure compliance with the restrictions referred to herein, the Company may
issue appropriate "stop transfer" instructions to its transfer agent, if any,
and that, if the Company transfers its own securities, it may make appropriate
notations to the same effect in its own records.

               (c) Refusal to Transfer. The Company shall not be required (i) to
transfer on its books any Shares that have been sold or otherwise transferred in
violation of any of the provisions of this Exercise Notice or (ii) to treat as
owner of such Shares or to accord the right to vote or pay dividends to any
purchaser or other transferee to whom such Shares shall have been so
transferred.

        8. Successors and Assigns. The Company may assign any of its rights
under this Exercise Notice to single or multiple assignees, and the terms and
conditions of this Exercise Notice shall inure to the benefit of the successors
and assigns of the Company. Subject to the restrictions on

                                      -3-
<PAGE>   23

transfer herein set forth, the terms and conditions of this Exercise Notice
shall be binding upon Optionee and his or her heirs, executors, administrators,
successors and assigns.

        9. Interpretation. Any dispute regarding the interpretation of this
Exercise Notice shall be submitted by Optionee or by the Company forthwith to
the Administrator which shall review such dispute at its next regular meeting.
The resolution of such a dispute by the Administrator shall be final and binding
on all parties.

        10. Governing Law; Severability. This Exercise Notice is governed by the
internal substantive laws, but not the choice of law rules, of California.

        11. Entire Agreement. The Plan and Option Agreement are incorporated
herein by reference. This Exercise Notice, the Plan, Option Agreement,
Investment Representation Statement, Note, Security Agreement, and Restricted
Stock Purchase Agreement constitute the entire agreement of the parties with
respect to the subject matter hereof and supersede in their entirety all prior
undertakings and agreements of the Company and Optionee with respect to the
subject matter hereof, and may not be modified adversely to the Optionee's
interest except by means of a writing signed by the Company and Optionee.

SUBMITTED BY:                                      ACCEPTED BY:

OPTIONEE                                           COSINE COMMUNICATIONS, INC.

--------------------------                         -----------------------------
Signature                                          By

--------------------------                         -----------------------------
Print Name                                         Its

Residence Address:                                 Address:

                                                   1200 Bridge Parkway
                                                   Redwood City, CA 94065

--------------------------

--------------------------

                                                   -----------------------------
                                                   Date Received


                                      -4-
<PAGE>   24

                                   EXHIBIT B-1

                       INVESTMENT REPRESENTATION STATEMENT

        OPTIONEE:
                             ---------------------------

        COMPANY:             CoSine Communications, Inc.

        SECURITY:            COMMON STOCK

        AMOUNT:

        DATE:

        In connection with the purchase of the above-listed Securities, the
undersigned Optionee represents to the Company the following:

        (a) Optionee is aware of the Company's business affairs and financial
condition and has acquired sufficient information about the Company to reach an
informed and knowledgeable decision to acquire the Securities. Optionee is
acquiring these Securities for investment for Optionee's own account only and
not with a view to, or for resale in connection with, any "distribution" thereof
within the meaning of the Securities Act of 1933, as amended (the "Securities
Act").

        (b) Optionee acknowledges and understands that the Securities constitute
"restricted securities" under the Securities Act and have not been registered
under the Securities Act in reliance upon a specific exemption therefrom, which
exemption depends upon, among other things, the bona fide nature of Optionee's
investment intent as expressed herein. In this connection, Optionee understands
that, in the view of the Securities and Exchange Commission, the statutory basis
for such exemption may be unavailable if Optionee's representation was
predicated solely upon a present intention to hold these Securities for the
minimum capital gains period specified under tax statutes, for a deferred sale,
for or until an increase or decrease in the market price of the Securities, or
for a period of one year or any other fixed period in the future. Optionee
further understands that the Securities must be held indefinitely unless they
are subsequently registered under the Securities Act or an exemption from such
registration is available. Optionee further acknowledges and understands that
the Company is under no obligation to register the Securities. Optionee
understands that the certificate evidencing the Securities will be imprinted
with a legend which prohibits the transfer of the Securities unless they are
registered or such registration is not required in the opinion of counsel
satisfactory to the Company, and with any other legend required under applicable
state securities laws.

        (c) Optionee is familiar with the provisions of Rule 701 and Rule 144,
each promulgated under the Securities Act, which, in substance, permit limited
public resale of "restricted securities"

<PAGE>   25

acquired, directly or indirectly from the issuer thereof, in a non-public
offering subject to the satisfaction of certain conditions. Rule 701 provides
that if the issuer qualifies under Rule 701 at the time of the grant of the
Option to the Optionee, the exercise will be exempt from registration under the
Securities Act. In the event the Company becomes subject to the reporting
requirements of Section 13 or 15(d) of the Securities Exchange Act of 1934,
ninety (90) days thereafter (or such longer period as any market stand-off
agreement may require) the Securities exempt under Rule 701 may be resold,
subject to the satisfaction of certain of the conditions specified by Rule 144,
including: (1) the resale being made through a broker in an unsolicited
"broker's transaction" or in transactions directly with a market maker (as said
term is defined under the Securities Exchange Act of 1934); and, in the case of
an affiliate, (2) the availability of certain public information about the
Company, (3) the amount of Securities being sold during any three month period
not exceeding the limitations specified in Rule 144(e), and (4) the timely
filing of a Form 144, if applicable.

               In the event that the Company does not qualify under Rule 701 at
the time of grant of the Option, then the Securities may be resold in certain
limited circumstances subject to the provisions of Rule 144, which requires the
resale to occur not less than one year after the later of the date the
Securities were sold by the Company or the date the Securities were sold by an
affiliate of the Company, within the meaning of Rule 144; and, in the case of
acquisition of the Securities by an affiliate, or by a non-affiliate who
subsequently holds the Securities less than two years, the satisfaction of the
conditions set forth in sections (1), (2), (3) and (4) of the paragraph
immediately above.

        (d) Optionee and his or her assignees, if any, hereby agrees that if so
requested by the Company or any representative of the underwriters in connection
with any registration of the offering of any securities of the Company under the
Securities Act, Optionee (and his or her assignees, if any) shall not sell, make
short sale of, loan, grant any options for the purchase of, or otherwise
transfer any of the Securities or other securities of the Company held by the
Optionee during the 180-day period following the effective date of a
registration statement of the Company filed under the Securities Act; provided,
however, that such restriction shall only apply to the first registration
statement of the Company to become effective under the Securities Act which
include securities to be sold on behalf of the Company to the public in a firm
underwritten public offering under the Securities Act. Optionee and his or her
assigns, if any, further agree to execute any agreement reflecting the foregoing
as may be requested by the underwriters at the time of the public offering. The
Company may impose stop-transfer instructions with respect to any securities
subject to the foregoing restrictions until the end of such 180-day period.

        (e) Optionee further understands that in the event all of the applicable
requirements of Rule 701 or 144 are not satisfied, registration under the
Securities Act, compliance with Regulation A, or some other registration
exemption will be required; and that, notwithstanding the fact that Rules 144
and 701 are not exclusive, the Staff of the Securities and Exchange Commission
has expressed its opinion that persons proposing to sell private placement
securities other than in a registered offering and otherwise than pursuant to
Rules 144 or 701 will have a substantial burden of proof in establishing that an
exemption from registration is available for such offers or sales, and that


                                      -2-
<PAGE>   26

such persons and their respective brokers who participate in such transactions
do so at their own risk. Optionee understands that no assurances can be given
that any such other registration exemption will be available in such event.

                                                   SIGNATURE OF OPTIONEE:


                                                   -----------------------------


                                                   Date:
                                                        ------------------------


                                      -3-
<PAGE>   27


                                   EXHIBIT B-2

                                      NOTE


$_______________                                        Redwood City, California

                                                       ------------------, -----


        FOR VALUE RECEIVED, _____________________ promises to pay to CoSine
Communications, Inc., a California corporation (the "Company"), or order, the
principal sum of _______________________ ($_____________), together with
interest on the unpaid principal hereof from the date hereof at the rate of
_______________ percent (____%) per annum, compounded semiannually.

        Principal and interest shall be due and payable on _______________,
_____. Payment of principal and interest shall be made in lawful money of the
United States of America.

        The undersigned may at any time prepay all or any portion of the
principal or interest owing hereunder.

        This Note is subject to the terms of the Option, dated as of
________________. This Note is secured in part by a pledge of the Company's
Common Stock under the terms of a Security Agreement of even date herewith and
is subject to all the provisions thereof.

        The holder of this Note shall have full recourse against the
undersigned, and shall not be required to proceed against the collateral
securing this Note in the event of default.

        In the event the undersigned shall cease to be an employee, director or
consultant of the Company for any reason, this Note shall, at the option of the
Company, be accelerated, and the whole unpaid balance on this Note of principal
and accrued interest shall be immediately due and payable.

        Should any action be instituted for the collection of this Note, the
reasonable costs and attorneys' fees therein of the holder shall be paid by the
undersigned.



                                          --------------------------------------


                                          --------------------------------------

<PAGE>   28

                                   EXHIBIT B-3

                               SECURITY AGREEMENT



        This Security Agreement is made as of __________, _____ between CoSine
Communications, Inc., a California corporation ("Pledgee"), and
_________________________ ("Pledgor").


                                    Recitals

        Pursuant to Pledgor's election to purchase Shares under the Option
Agreement dated (the "Option"), between Pledgor and Pledgee under Pledgee's 1997
Stock Plan, and Pledgor's election under the terms of the Option to pay for such
shares with his promissory note (the "Note"), Pledgor has purchased _________
shares of Pledgee's Common Stock (the "Shares") at a price of $________ per
share, for a total purchase price of $__________. The Note and the obligations
thereunder are as set forth in Exhibit B-2 to the Option.

        NOW, THEREFORE, it is agreed as follows:

        1. Creation and Description of Security Interest. In consideration of
the transfer of the Shares to Pledgor under the Option Agreement, Pledgor,
pursuant to the California Commercial Code, hereby pledges all of such Shares
(herein sometimes referred to as the "Collateral") represented by certificate
number ______, duly endorsed in blank or with executed stock powers, and
herewith delivers said certificate to the Secretary of Pledgee ("Pledgeholder"),
who shall hold said certificate subject to the terms and conditions of this
Security Agreement.

        The pledged stock (together with an executed blank stock assignment for
use in transferring all or a portion of the Shares to Pledgee if, as and when
required pursuant to this Security Agreement) shall be held by the Pledgeholder
as security for the repayment of the Note, and any extensions or renewals
thereof, to be executed by Pledgor pursuant to the terms of the Option, and the
Pledgeholder shall not encumber or dispose of such Shares except in accordance
with the provisions of this Security Agreement.

        2. Pledgor's Representations and Covenants. To induce Pledgee to enter
into this Security Agreement, Pledgor represents and covenants to Pledgee, its
successors and assigns, as follows:

               (a) Payment of Indebtedness. Pledgor will pay the principal sum
of the Note secured hereby, together with interest thereon, at the time and in
the manner provided in the Note.

               (b) Encumbrances. The Shares are free of all other encumbrances,
defenses and liens, and Pledgor will not further encumber the Shares without the
prior written consent of Pledgee.



<PAGE>   29

               (c) Margin Regulations. In the event that Pledgee's Common Stock
is now or later becomes margin-listed by the Federal Reserve Board and Pledgee
is classified as a "lender" within the meaning of the regulations under Part 207
of Title 12 of the Code of Federal Regulations ("Regulation G"), Pledgor agrees
to cooperate with Pledgee in making any amendments to the Note or providing any
additional collateral as may be necessary to comply with such regulations.

        3. Voting Rights. During the term of this pledge and so long as all
payments of principal and interest are made as they become due under the terms
of the Note, Pledgor shall have the right to vote all of the Shares pledged
hereunder.

        4. Stock Adjustments. In the event that during the term of the pledge
any stock dividend, reclassification, readjustment or other changes are declared
or made in the capital structure of Pledgee, all new, substituted and additional
shares or other securities issued by reason of any such change shall be
delivered to and held by the Pledgee under the terms of this Security Agreement
in the same manner as the Shares originally pledged hereunder. In the event of
substitution of such securities, Pledgor, Pledgee and Pledgeholder shall
cooperate and execute such documents as are reasonable so as to provide for the
substitution of such Collateral and, upon such substitution, references to
"Shares" in this Security Agreement shall include the substituted shares of
capital stock of Pledgor as a result thereof.

        5. Options and Rights. In the event that, during the term of this
pledge, subscription Options or other rights or options shall be issued in
connection with the pledged Shares, such rights, Options and options shall be
the property of Pledgor and, if exercised by Pledgor, all new stock or other
securities so acquired by Pledgor as it relates to the pledged Shares then held
by Pledgeholder shall be immediately delivered to Pledgeholder, to be held under
the terms of this Security Agreement in the same manner as the Shares pledged.

        6. Default. Pledgor shall be deemed to be in default of the Note and of
this Security Agreement in the event:

               (a) Payment of principal or interest on the Note shall be
delinquent for a period of 10 days or more; or

               (b) Pledgor fails to perform any of the covenants set forth in
the Option or contained in this Security Agreement for a period of 10 days after
written notice thereof from Pledgee.

        In the case of an event of Default, as set forth above, Pledgee shall
have the right to accelerate payment of the Note upon notice to Pledgor, and
Pledgee shall thereafter be entitled to pursue its remedies under the California
Commercial Code.

        7. Release of Collateral. Subject to any applicable contrary rules under
Regulation G, there shall be released from this pledge a portion of the pledged
Shares held by Pledgeholder hereunder upon payments of the principal of the
Note. The number of the pledged Shares which shall be released shall be that
number of full Shares which bears the same proportion to the initial


                                      -4-
<PAGE>   30

number of Shares pledged hereunder as the payment of principal bears to the
initial full principal amount of the Note.

        8. Withdrawal or Substitution of Collateral. Pledgor shall not sell,
withdraw, pledge, substitute or otherwise dispose of all or any part of the
Collateral without the prior written consent of Pledgee.

        9. Term. The within pledge of Shares shall continue until the payment of
all indebtedness secured hereby, at which time the remaining pledged stock shall
be promptly delivered to Pledgor, subject to the provisions for prior release of
a portion of the Collateral as provided in paragraph 7 above.

        10. Insolvency. Pledgor agrees that if a bankruptcy or insolvency
proceeding is instituted by or against it, or if a receiver is appointed for the
property of Pledgor, or if Pledgor makes an assignment for the benefit of
creditors, the entire amount unpaid on the Note shall become immediately due and
payable, and Pledgee may proceed as provided in the case of default.

        11. Pledgeholder Liability. In the absence of willful or gross
negligence, Pledgeholder shall not be liable to any party for any of his acts,
or omissions to act, as Pledgeholder.

        12. Invalidity of Particular Provisions. Pledgor and Pledgee agree that
the enforceability or invalidity of any provision or provisions of this Security
Agreement shall not render any other provision or provisions herein contained
unenforceable or invalid.

        13. Successors or Assigns. Pledgor and Pledgee agree that all of the
terms of this Security Agreement shall be binding on their respective successors
and assigns, and that the term "Pledgor" and the term "Pledgee" as used herein
shall be deemed to include, for all purposes, the respective designees,
successors, assigns, heirs, executors and administrators.

        14. Governing Law. This Security Agreement shall be interpreted and
governed under the internal substantive laws, but not the choice of law rules,
of California.

                                      -5-
<PAGE>   31


        IN WITNESS WHEREOF, the parties hereto have executed this Agreement as
of the day and year first above written.

                                            "PLEDGOR"

                                            ------------------------------------
                                            Signature

                                            ------------------------------------
                                            Print Name

                                            Address:

                                            ------------------------------------

                                            ------------------------------------

                                            "PLEDGEE"
                                            COSINE COMMUNICATIONS, INC.
                                            a California corporation


                                            ------------------------------------
                                            Signature

                                            ------------------------------------
                                            Print Name

                                            ------------------------------------
                                            Title


                                            "PLEDGEHOLDER"

                                            ------------------------------------
                                            Secretary of CoSine Communications,
                                            Inc.




<PAGE>   32

                                   EXHIBIT C-1

                           COSINE COMMUNICATIONS, INC.

                                 1997 STOCK PLAN

                       RESTRICTED STOCK PURCHASE AGREEMENT


        THIS AGREEMENT is made between _____________________________ (the
"Purchaser") and CoSine Communications, Inc. (the "Company") as of
__________________, ____.

        Unless otherwise defined herein, the terms defined in the 1997 Stock
Plan shall have the same defined meanings in this Agreement.

                                    RECITALS

        A. Pursuant to the exercise of the option (grant number ___) granted to
Purchaser under the Plan and pursuant to the Option Agreement dated by and
between the Company and Purchaser with respect to such grant (the "Option"),
which Plan and Option Agreement are hereby incorporated by reference, Purchaser
has elected to purchase _________ of those shares of Common Stock which have not
become vested under the vesting schedule set forth in the Option Agreement
("Unvested Shares"). The Unvested Shares and the shares subject to the Option
Agreement which have become vested are sometimes collectively referred to herein
as the "Shares."

        B. As required by the Option Agreement, as a condition to Purchaser's
election to exercise the option, Purchaser must execute this Agreement, which
sets forth the rights and obligations of the parties with respect to Shares
acquired upon exercise of the Option.

        1. Repurchase Option.

               (a) If Purchaser's status as a Service Provider is terminated for
any reason, including for cause, death, and Disability, the Company shall have
the right and option to purchase from Purchaser, or Purchaser's personal
representative, as the case may be, all of the Purchaser's Unvested Shares as of
the date of such termination at the price paid by the Purchaser for such Shares
(the "Repurchase Option").

               (b) Upon the occurrence of such termination, the Company may
exercise its Repurchase Option by delivering personally or by registered mail,
to Purchaser (or his transferee or legal representative, as the case may be),
within ninety (90) days of the termination, a notice in writing indicating the
Company's intention to exercise the Repurchase Option and setting forth a date
for closing not later than thirty (30) days from the mailing of such notice. The
closing shall take place at the Company's office. At the closing, the holder of
the certificates for the Unvested Shares being transferred shall deliver the
stock certificate or certificates evidencing the Unvested Shares, and the
Company shall deliver the purchase price therefor.

                                      -6-
<PAGE>   33

               (c) At its option, the Company may elect to make payment for the
Unvested Shares to a bank selected by the Company. The Company shall avail
itself of this option by a notice in writing to Purchaser stating the name and
address of the bank, date of closing, and waiving the closing at the Company's
office.

               (d) If the Company does not elect to exercise the Repurchase
Option conferred above by giving the requisite notice within ninety (90) days
following the termination, the Repurchase Option shall terminate.

               (e) The Repurchase Option shall terminate in accordance with the
vesting schedule contained in Optionee's Option Agreement.

        2. Transferability of the Shares; Escrow.

               (a) Purchaser hereby authorizes and directs the Secretary of the
Company, or such other person designated by the Company, to transfer the
Unvested Shares as to which the Repurchase Option has been exercised from
Purchaser to the Company.

               (b) To insure the availability for delivery of Purchaser's
Unvested Shares upon repurchase by the Company pursuant to the Repurchase Option
under Section 1, Purchaser hereby appoints the Secretary, or any other person
designated by the Company as escrow agent, as its attorney-in-fact to sell,
assign and transfer unto the Company, such Unvested Shares, if any, repurchased
by the Company pursuant to the Repurchase Option and shall, upon execution of
this Agreement, deliver and deposit with the Secretary of the Company, or such
other person designated by the Company, the share certificates representing the
Unvested Shares, together with the stock assignment duly endorsed in blank,
attached hereto as Exhibit C-2. The Unvested Shares and stock assignment shall
be held by the secretary in escrow, pursuant to the Joint Escrow Instructions of
the Company and Purchaser attached as Exhibit C-3 hereto, until the Company
exercises its Repurchase Option, until such Unvested Shares are vested, or until
such time as this Agreement no longer is in effect. As a further condition to
the Company's obligations under this Agreement, the spouse of the Purchaser, if
any, shall execute and deliver to the Company the Consent of Spouse attached
hereto as Exhibit C-4. Upon vesting of the Unvested Shares, the escrow agent
shall promptly deliver to the Purchaser the certificate or certificates
representing such Shares in the escrow agent's possession belonging to the
Purchaser, and the escrow agent shall be discharged of all further obligations
hereunder; provided, however, that the escrow agent shall nevertheless retain
such certificate or certificates as escrow agent if so required pursuant to
other restrictions imposed pursuant to this Agreement.

               (c) The Company, or its designee, shall not be liable for any act
it may do or omit to do with respect to holding the Shares in escrow and while
acting in good faith and in the exercise of its judgment.

               (d) Transfer or sale of the Shares is subject to restrictions on
transfer imposed by any applicable state and federal securities laws. Any
transferee shall hold such Shares subject to all the provisions hereof and the
Exercise Notice executed by the Purchaser with respect to any

                                      -2-
<PAGE>   34

Unvested Shares purchased by Purchaser and shall acknowledge the same by signing
a copy of this Agreement.

        3. Ownership, Voting Rights, Duties. This Agreement shall not affect in
any way the ownership, voting rights or other rights or duties of Purchaser,
except as specifically provided herein.

        4. Legends. The share certificate evidencing the Shares issued hereunder
shall be endorsed with the following legend (in addition to any legend required
under applicable federal and state securities laws):

               THE SHARES REPRESENTED BY THIS CERTIFICATE ARE SUBJECT TO CERTAIN
               RESTRICTIONS UPON TRANSFER AND RIGHTS OF REPURCHASE AS SET FORTH
               IN AN AGREEMENT BETWEEN THE COMPANY AND THE STOCKHOLDER, A COPY
               OF WHICH IS ON FILE WITH THE SECRETARY OF THE COMPANY.

        5. Adjustment for Stock Split. All references to the number of Shares
and the purchase price of the Shares in this Agreement shall be appropriately
adjusted to reflect any stock split, stock dividend or other change in the
Shares which may be made by the Company pursuant to Section 12 of the Plan after
the date of this Agreement.

        6. Notices. Notices required hereunder shall be given in person or by
registered mail to the address of Purchaser shown on the records of the Company,
and to the Company at their respective principal executive offices.

        7. Survival of Terms. This Agreement shall apply to and bind Purchaser
and the Company and their respective permitted assignees and transferees, heirs,
legatees, executors, administrators and legal successors.

        8. Section 83(b) Election. Purchaser hereby acknowledges that he or she
has been informed that, with respect to the exercise of an Option for Unvested
Shares, an election (the "Election") may be filed by the Purchaser with the
Internal Revenue Service, within 30 days of the purchase of the exercised
Shares, electing pursuant to Section 83(b) of the Code to be taxed currently on
any difference between the purchase price of the exercised Shares and their Fair
Market Value on the date of purchase. In the case of a Nonstatutory Stock
Option, this will result in a recognition of taxable income to the Purchaser on
the date of exercise, measured by the excess, if any, of the Fair Market Value
of the exercised Shares, at the time the Option is exercised over the purchase
price for the exercised Shares. Absent such an Election, taxable income will be
measured and recognized by Purchaser at the time or times on which the Company's
Repurchase Option lapses. In the case of an Incentive Stock Option, such an
Election will result in a recognition of income to the Purchaser for alternative
minimum tax purposes on the date of exercise, measured by the excess, if any, of
the Fair Market Value of the exercised Shares, at the time the option is
exercised, over the purchase price for the exercised Shares. Absent such an
Election, alternative minimum taxable income will be measured and recognized by
Purchaser at the time or times on which the Company's Repurchase Option lapses.
Purchaser is strongly encouraged to seek the advice of his or her own tax
consultants

                                      -3-
<PAGE>   35

in connection with the purchase of the Shares and the advisability of filing of
the Election under Section 83(b) of the Code. A form of Election under Section
83(b) is attached hereto as Exhibit C-5 for reference.

               PURCHASER ACKNOWLEDGES THAT IT IS PURCHASER'S SOLE RESPONSIBILITY
AND NOT THE COMPANY'S TO FILE TIMELY THE ELECTION UNDER SECTION 83(b) OF THE
CODE, EVEN IF PURCHASER REQUESTS THE COMPANY OR ITS REPRESENTATIVE TO MAKE THIS
FILING ON PURCHASER'S BEHALF.

        9. Representations. Purchaser has reviewed with his own tax advisors the
federal, state, local and foreign tax consequences of this investment and the
transactions contemplated by this Agreement. Purchaser is relying solely on such
advisors and not on any statements or representations of the Company or any of
its agents. Purchaser understands that he (and not the Company) shall be
responsible for his own tax liability that may arise as a result of this
investment or the transactions contemplated by this Agreement.

        10. Governing Law. This Agreement shall be governed by the internal
substantive laws, but not the choice of law rules, of California.

        Purchaser represents that he has read this Agreement and is familiar
with its terms and provisions. Purchaser hereby agrees to accept as binding,
conclusive and final all decisions or interpretations of the Board upon any
questions arising under this Agreement.

                                      -4-



<PAGE>   36


        IN WITNESS WHEREOF, this Agreement is deemed made as of the date first
set forth above.

OPTIONEE                                      COSINE COMMUNICATIONS, INC.


----------------------------------            ---------------------------------
Signature                                     By


----------------------------------            ---------------------------------
Print Name                                    Title

Residence Address:


--------------

--------------




Dated:           ,
      -----------  ----




<PAGE>   37

                                   EXHIBIT C-2

                      ASSIGNMENT SEPARATE FROM CERTIFICATE



        FOR VALUE RECEIVED I, __________________________, hereby sell, assign
and transfer unto CoSine Communications, Inc. ______________________
(__________) shares of the Common Stock of CoSine Communications, Inc. standing
in my name of the books of said corporation represented by Certificate No. _____
herewith and do hereby irrevocably constitute and appoint _______________ to
transfer the said stock on the books of the within named corporation with full
power of substitution in the premises.

        This Stock Assignment may be used only in accordance with the Restricted
Stock Purchase Agreement between CoSine Communications, Inc. and the undersigned
dated ______________, _____.


Dated:_______________,_____            Signature:_______________________________







        INSTRUCTIONS: Please do not fill in any blanks other than the signature
line. The purpose of this assignment is to enable the Company to exercise its
"repurchase option," as set forth in the Agreement, without requiring additional
signatures on the part of the Purchaser.



<PAGE>   38



                                   EXHIBIT C-3

                            JOINT ESCROW INSTRUCTIONS

                                                         -----------------, ----

Corporate Secretary
CoSine Communications, Inc.
1200 Bridge Parkway
Redwood City, CA 94065

Dear Mr. Secretary:

        As Escrow Agent for both CoSine Communications, Inc. (the "Company"),
and the undersigned purchaser of stock of the Company (the "Purchaser"), you are
hereby authorized and directed to hold the documents delivered to you pursuant
to the terms of that certain Restricted Stock Purchase Agreement (the
"Agreement") between the Company and the undersigned, in accordance with the
following instructions:

        1. In the event the Company and/or any assignee of the Company (referred
to collectively for convenience herein as the "Company") exercises the Company's
repurchase option set forth in the Agreement, the Company shall give to
Purchaser and you a written notice specifying the number of shares of stock to
be purchased, the purchase price, and the time for a closing hereunder at the
principal office of the Company. Purchaser and the Company hereby irrevocably
authorize and direct you to close the transaction contemplated by such notice in
accordance with the terms of said notice.

        2. At the closing, you are directed (a) to date the stock assignments
necessary for the transfer in question, (b) to fill in the number of shares
being transferred, and (c) to deliver the stock assignments, together with the
certificate evidencing the shares of stock to be transferred, to the Company or
its assignee, against the simultaneous delivery to you of the purchase price (by
cash, a check, or some combination thereof) for the number of shares of stock
being purchased pursuant to the exercise of the Company's repurchase option.

        3. Purchaser irrevocably authorizes the Company to deposit with you any
certificates evidencing shares of stock to be held by you hereunder and any
additions and substitutions to said shares as defined in the Agreement.
Purchaser does hereby irrevocably constitute and appoint you as Purchaser's
attorney-in-fact and agent for the term of this escrow to execute with respect
to such securities all documents necessary or appropriate to make such
securities negotiable and to complete any transaction herein contemplated,
including but not limited to the filing with any applicable state blue sky
authority of any required applications for consent to, or notice of transfer of,
the securities. Subject to the provisions of this paragraph 3, Purchaser shall
exercise all rights and privileges of a stockholder of the Company while the
stock is held by you.



<PAGE>   39

        4. Upon written request of the Purchaser, but no more than once per
calendar year, unless the Company's repurchase option has been exercised, you
will deliver to Purchaser a certificate or certificates representing so many
shares of stock as are not then subject to the Company's repurchase option.
Within 120 days after cessation of Purchaser's continuous employment by or
services to the Company, or any parent or subsidiary of the Company, you will
deliver to Purchaser a certificate or certificates representing the aggregate
number of shares held or issued pursuant to the Agreement and not purchased by
the Company or its assignees pursuant to exercise of the Company's repurchase
option.

        5. If at the time of termination of this escrow you should have in your
possession any documents, securities, or other property belonging to Purchaser,
you shall deliver all of the same to Purchaser and shall be discharged of all
further obligations hereunder.

        6. Your duties hereunder may be altered, amended, modified or revoked
only by a writing signed by all of the parties hereto.

        7. You shall be obligated only for the performance of such duties as are
specifically set forth herein and may rely and shall be protected in relying or
refraining from acting on any instrument reasonably believed by you to be
genuine and to have been signed or presented by the proper party or parties. You
shall not be personally liable for any act you may do or omit to do hereunder as
Escrow Agent or as attorney-in-fact for Purchaser while acting in good faith,
and any act done or omitted by you pursuant to the advice of your own attorneys
shall be conclusive evidence of such good faith.

        8. You are hereby expressly authorized to disregard any and all warnings
given by any of the parties hereto or by any other person or corporation,
excepting only orders or process of courts of law and are hereby expressly
authorized to comply with and obey orders, judgments or decrees of any court. In
case you obey or comply with any such order, judgment or decree, you shall not
be liable to any of the parties hereto or to any other person, firm or
corporation by reason of such compliance, notwithstanding any such order,
judgment or decree being subsequently reversed, modified, annulled, set aside,
vacated or found to have been entered without jurisdiction.

        9. You shall not be liable in any respect on account of the identity,
authorities or rights of the parties executing or delivering or purporting to
execute or deliver the Agreement or any documents or papers deposited or called
for hereunder.

        10. You shall not be liable for the outlawing of any rights under the
Statute of Limitations with respect to these Joint Escrow Instructions or any
documents deposited with you.

        11. You shall be entitled to employ such legal counsel and other experts
as you may deem necessary properly to advise you in connection with your
obligations hereunder, may rely upon the advice of such counsel, and may pay
such counsel reasonable compensation therefor.

                                      -2-
<PAGE>   40


        12. Your responsibilities as Escrow Agent hereunder shall terminate if
you shall cease to be an officer or agent of the Company or if you shall resign
by written notice to each party. In the event of any such termination, the
Company shall appoint a successor Escrow Agent.

        13. If you reasonably require other or further instruments in connection
with these Joint Escrow Instructions or obligations in respect hereto, the
necessary parties hereto shall join in furnishing such instruments.

        14. It is understood and agreed that should any dispute arise with
respect to the delivery and/or ownership or right of possession of the
securities held by you hereunder, you are authorized and directed to retain in
your possession without liability to anyone all or any part of said securities
until such disputes shall have been settled either by mutual written agreement
of the parties concerned or by a final order, decree or judgment of a court of
competent jurisdiction after the time for appeal has expired and no appeal has
been perfected, but you shall be under no duty whatsoever to institute or defend
any such proceedings.

        15. Any notice required or permitted hereunder shall be given in writing
and shall be deemed effectively given upon personal delivery or upon deposit in
the United States Post Office, by registered or certified mail with postage and
fees prepaid, addressed to each of the other parties thereunto entitled at the
following addresses or at such other addresses as a party may designate by ten
days' advance written notice to each of the other parties hereto.

        16. By signing these Joint Escrow Instructions, you become a party
hereto only for the purpose of said Joint Escrow Instructions; you do not become
a party to the Agreement.

        17. This instrument shall be binding upon and inure to the benefit of
the parties hereto, and their respective successors and permitted assigns.

        18. These Joint Escrow Instructions shall be governed by the internal
substantive laws, but not the choice of law rules, of California.

                                       -3-
<PAGE>   41


OPTIONEE                                           COSINE COMMUNICATIONS, INC.


-------------------------                          ----------------------------
Signature                                          By


-------------------------                          ----------------------------
Print Name                                         Title

Residence Address:


---------------

---------------




ESCROW AGENT

-----------------------
Corporate Secretary


Dated:                  ,
      ------------------ -----




<PAGE>   42

                                   EXHIBIT C-4

                                CONSENT OF SPOUSE


        I, ____________________, spouse of ___________________, have read and
approve the foregoing Restricted Stock Purchase Agreement (the "Agreement"). In
consideration of granting of the right to my spouse to purchase shares of
____________________________, as set forth in the Agreement, I hereby appoint my
spouse as my attorney-in-fact in respect to the exercise of any rights under the
Agreement and agree to be bound by the provisions of the Agreement insofar as I
may have any rights in said Agreement or any shares issued pursuant thereto
under the community property laws or similar laws relating to marital property
in effect in the state of our residence as of the date of the signing of the
foregoing Agreement.


Dated:              ,                        Signature:
      -------------- -----                             -------------------------




<PAGE>   43

                                   EXHIBIT C-5

                          ELECTION UNDER SECTION 83(b)
                      OF THE INTERNAL REVENUE CODE OF 1986

        The undersigned taxpayer hereby elects, pursuant to Sections 55 and
83(b) of the Internal Revenue Code of 1986, as amended, to include in taxpayer's
gross income or alternative minimum taxable income, as the case may be, for the
current taxable year the amount of any compensation taxable to taxpayer in
connection with taxpayer's receipt of the property described below:

1.      The name, address, taxpayer identification number and taxable year of
        the undersigned are as follows:

        NAME:                         TAXPAYER:                         SPOUSE:

        ADDRESS:

        IDENTIFICATION NO.:           TAXPAYER:                         SPOUSE:

        TAXABLE YEAR:

2.      The property with respect to which the election is made is described as
        follows: __________ shares (the "Shares") of the Common Stock of CoSine
        Communications, Inc. (the "Company").

3.      The date on which the property was transferred is:___________________,
        ______.

4.      The property is subject to the following restrictions:

        The Shares may not be transferred and are subject to forfeiture under
        the terms of an agreement between the taxpayer and the Company. These
        restrictions lapse upon the satisfaction of certain conditions contained
        in such agreement.

5.      The fair market value at the time of transfer, determined without regard
        to any restriction other than a restriction which by its terms will
        never lapse, of such property is: $_________________.

6.      The amount (if any) paid for such property is:  $_________________.

The undersigned has submitted a copy of this statement to the person for whom
the services were performed in connection with the undersigned's receipt of the
above-described property. The transferee of such property is the person
performing the services in connection with the transfer of said property.

The undersigned understands that the foregoing election may not be revoked
except with the consent of the Commissioner.

Dated:_______________________, _____               _____________________________
                                                   Taxpayer

The undersigned spouse of taxpayer joins in this election.

Dated:_______________________, _____               _____________________________
                                                   Spouse of Taxpayer
<PAGE>   44


                                                                    EXHIBIT 10.5

                          COSINE COMMUNICATIONS, INC.

                                 1997 STOCK PLAN

         STOCK OPTION AGREEMENT -- EARLY EXERCISE AND CHANGE OF CONTROL
                             (WITH PROMISSORY NOTE)

        Unless otherwise defined herein, the terms defined in the 1997 Stock
Plan shall have the same defined meanings in this Stock Option Agreement (the
"Option Agreement"), and shall be effective as of the Date of Grant set forth
below.

I. NOTICE OF STOCK OPTION GRANT

   ---------------------------

   ---------------------------

   ---------------------------


        You have been granted an option to purchase Common Stock of the Company,
subject to the terms and conditions of the Plan and this Option Agreement, as
follows:

        Grant Number
                                            ---------------------

        Date of Grant
                                            ---------------------

        Vesting Commencement Date
                                            ---------------------

        Exercise Price per Share            $
                                             --------------------

        Total Number of Shares Granted
                                            ---------------------

        Total Exercise Price                $
                                             --------------------

        Type of Option:                                Incentive Stock Option
                                            -----------

                                                       Nonstatutory Stock Option
                                            -----------

        Term/Expiration Date:
                                            ---------------------


        Exercise and Vesting Schedule:

        This Option shall be exercisable in whole or in part, and shall vest
according to the following vesting schedule:


<PAGE>   45


        25% OF THE SHARES SUBJECT TO THE OPTION SHALL VEST TWELVE MONTHS AFTER
THE VESTING COMMENCEMENT DATE, AND 1/48 OF THE SHARES SUBJECT TO THE OPTION
SHALL VEST EACH MONTH THEREAFTER, SUBJECT TO OPTIONEE'S CONTINUING TO BE A
SERVICE PROVIDER ON SUCH DATES. NOTWITHSTANDING THE ABOVE SCHEDULE, IN THE EVENT
OF A CHANGE OF CONTROL THIS OPTION MAY BE SUBJECT TO ACCELERATED VESTING AS
PROVIDED FOR IN SECTION 9 OF THIS AGREEMENT.

        Termination Period:

        This Option may be exercised, to the extent it is then vested, for three
months after Optionee ceases to be a Service Provider. Upon death or Disability
of the Optionee, this Option may be exercised, to the extent it is then vested,
for one year after Optionee ceases to be Service Provider. In no event shall
this Option be exercised later than the Term/Expiration Date as provided above.

II. AGREEMENT

        1. Grant of Option. The Administrator of the Company hereby grants to
the Optionee named in the Notice of Grant (the "Optionee"), an option (the
"Option") to purchase the number of Shares set forth in the Notice of Grant, at
the exercise price per Share set forth in the Notice of Grant (the "Exercise
Price"), and subject to the terms and conditions of the Plan, which is
incorporated herein by reference. Subject to Section 14(c) of the Plan, in the
event of a conflict between the terms and conditions of the Plan and this Option
Agreement, the terms and conditions of the Plan shall prevail.

                If designated in the Notice of Grant as an Incentive Stock
Option ("ISO"), this Option is intended to qualify as an Incentive Stock Option
as defined in Section 422 of the Code. Nevertheless, to the extent that it
exceeds the $100,000 rule of Code Section 422(d), this Option shall be treated
as a Nonstatutory Stock Option ("NSO").

        2. Exercise of Option. This Option shall be exercisable during its term
in accordance with the provisions of Section 9 of the Plan as follows:

                (a) Right to Exercise.

                        (i) Subject to subsections 2(a)(ii) and 2(a)(iii) below,
this Option shall be exercisable cumulatively according to the vesting schedule
set forth in the Notice of Grant. Alternatively, at the election of the
Optionee, this Option may be exercised in whole or in part at any time as to
Shares that have not yet vested. Vested Shares shall not be subject to the
Company's repurchase right (as set forth in the Restricted Stock Purchase
Agreement, attached hereto as Exhibit C-1).

                        (ii) As a condition to exercising this Option for
unvested Shares, the Optionee shall execute the Restricted Stock Purchase
Agreement.

                        (iii) This Option may not be exercised for a fraction of
a Share.

                                      -2-

<PAGE>   46

                (b) Method of Exercise. This Option shall be exercisable by
delivery of an exercise notice in the form attached as Exhibit A (the "Exercise
Notice") which shall state the election to exercise the Option, the number of
Shares with respect to which the Option is being exercised, and such other
representations and agreements as may be required by the Company. The Exercise
Notice shall be accompanied by payment of the aggregate Exercise Price as to all
Exercised Shares. This Option shall be deemed to be exercised upon receipt by
the Company of such fully executed Exercise Notice accompanied by the aggregate
Exercise Price.

                No Shares shall be issued pursuant to the exercise of an Option
unless such issuance and such exercise comply with Applicable Laws. Assuming
such compliance, for income tax purposes the Shares shall be considered
transferred to the Optionee on the date on which the Option is exercised with
respect to such Shares.

        3. Optionee's Representations. In the event the Shares have not been
registered under the Securities Act of 1933, as amended, at the time this Option
is exercised, the Optionee shall, if required by the Company, concurrently with
the exercise of all or any portion of this Option, deliver to the Company his or
her Investment Representation Statement in the form attached hereto as Exhibit
B-1.

        4. Lock-Up Period. Optionee hereby agrees that, if so requested by the
Company or any representative of the underwriters (the "Managing Underwriter")
in connection with any registration of the offering of any securities of the
Company under the Securities Act, Optionee shall not sell or otherwise transfer
any Shares or other securities of the Company during the 180-day period (or such
other period as may be requested in writing by the Managing Underwriter and
agreed to in writing by the Company) (the "Market Standoff Period") following
the effective date of a registration statement of the Company filed under the
Securities Act. Such restriction shall apply only to the first registration
statement of the Company to become effective under the Securities Act that
includes securities to be sold on behalf of the Company to the public in an
underwritten public offering under the Securities Act. The Company may impose
stop-transfer instructions with respect to securities subject to the foregoing
restrictions until the end of such Market Standoff Period.

        5. Method of Payment. Payment of the aggregate Exercise Price shall be
by any of the following, or a combination thereof, at the election of the
Optionee:

                (a) cash;

                (b) check;

                (c) consideration received by the Company under a formal
cashless exercise program adopted by the Company in connection with the Plan;

                (d) surrender of other Shares which, (i) in the case of Shares
acquired upon exercise of an option, have been owned by the Optionee for more
than six (6) months on the date of surrender, and (ii) have a Fair Market Value
on the date of surrender equal to the aggregate Exercise Price of the Exercised
Shares;


                                      -3-
<PAGE>   47

                (e) with the Administrator's consent, delivery of Optionee's
promissory note (the "Note") in the form attached hereto as Exhibit B-2, in the
amount of the aggregate Exercise Price of the Exercised Shares together with the
execution and delivery by the Optionee of the Security Agreement attached hereto
as Exhibit B-3. The Note shall bear interest at the "applicable federal rate"
prescribed under the Code and its regulations at time of purchase, and shall be
secured by a pledge of the Shares purchased by the Note pursuant to the Security
Agreement.

        6. Restrictions on Exercise. This Option may not be exercised until such
time as the Plan has been approved by the shareholders of the Company, or if the
issuance of such Shares upon such exercise or the method of payment of
consideration for such shares would constitute a violation of any Applicable
Law.

        7. Non-Transferability of Option. This Option may not be transferred in
any manner otherwise than by will or by the laws of descent or distribution and
may be exercised during the lifetime of Optionee only by Optionee. The terms of
the Plan and this Option Agreement shall be binding upon the executors,
administrators, heirs, successors and assigns of the Optionee.

        8. Term of Option. This Option may be exercised only within the term set
out in the Notice of Grant, and may be exercised during such term only in
accordance with the Plan and the terms of this Option.

        9. Accelerated Vesting Upon Termination Following a Change of Control.

                (a) If, at any time within 24 months following a Change of
Control (as defined in Section 10, below), Optionee's status as a Service
Provider with the Company or successor corporation terminates as the result of
Constructive Termination (as defined below) or for any reason other than Cause
(as defined below), the vesting and exercisability of this Option shall
accelerate in full. In such an event, this Option shall remain exercisable in
accordance with the Plan and this Option Agreement.

                (b) "CONSTRUCTIVE TERMINATION" shall mean for purposes of this
Option Agreement (i) without the Optionee's express written consent, a
significant reduction of the Optionee's duties, position or responsibilities, or
the removal of the Optionee from such position and responsibilities as in effect
immediately prior to the Change of Control, unless the Optionee is provided with
a comparable position (i.e., a position of equal or greater organizational
level, duties, authority, compensation and status); (ii) without the Optionee's
express written consent, a substantial reduction, without good business reasons,
of the facilities and perquisites (including office space and location)
available to the Optionee immediately prior to the Change of Control; (iii) a
significant reduction by the Company in the base compensation of the Optionee as
in effect immediately prior to the Change of Control; (iv) without Optionee's
express written consent, a material reduction by the Company in the kind or
level of employee benefits to which the Optionee was entitled immediately prior
to the Change of Control with the result that the Optionee's overall benefits
package is significantly reduced; (v) without the express written consent of
Optionee, the relocation of the Optionee to a facility or a location more than
50 miles from the Optionee's then present location; or


                                      -4-
<PAGE>   48

(vi) the failure of the Company to obtain the assumption of this Agreement by
any successors contemplated in Section 11(a) below.

                (c) "CAUSE" shall mean for purposes of this Option Agreement (i)
continued violations by Optionee of Optionee's duties as an employee or director
of the Company which are demonstrably willful and deliberate on Optionee's part
after there has been delivered to Optionee a written demand for performance from
the Company, other than violations resulting from Optionee's complete or partial
incapacity due to physical or mental illness or impairment, (ii) a willful act
by the Optionee which constitutes gross misconduct and which is injurious to the
Company, (iii) a willful breach by the Optionee of a material provision of any
agreement between the Optionee and the Company, (iv) the Optionee's conviction
of a felony applicable to the business of the Company, which the Company's Board
of Directors reasonably believes had or will have a material detrimental effect
on the Company's reputation or business, and (v) any act of personal dishonesty
taken by the Optionee in connection with his responsibilities as an employee or
director and intended to result in substantial personal enrichment of the
Optionee.

                (d) Notwithstanding the foregoing, if such vesting acceleration
provided in Section 9(a) above would cause a contemplated Change of Control
transaction that was intended to be accounted for as a "pooling-of-interests"
transaction to become ineligible for such accounting treatment under generally
accepted accounting principles, as determined by the Company's independent
accountants, or such successor accountants, prior to the Change of Control, this
Option shall not be subject to accelerated vesting as provided herein, and the
parties agree to rescind Sections 9 and 10 of this Option.

        10. Definition of Change of Control. "CHANGE OF CONTROL" shall mean for
the purposes of this Agreement the occurrence of any of the following events:

                (a) Any "PERSON" (as such term is used in Sections 13(d) and
14(d) of the Securities Exchange Act of 1934, as amended) becomes the
"BENEFICIAL OWNER" (as defined in Rule 13d-3 under said Act), directly or
indirectly, of securities of the Company representing fifty percent (50%) or
more of the total voting power represented by the Company's then outstanding
voting securities other than in a private financing transaction approved by the
Board;

                (b) The closing of a (i) merger or consolidation of the Company
with or into any other corporation or business entity, other than (x) a merger
or consolidation which would result in the voting securities of the Company
outstanding immediately prior thereto continuing to represent (either by
remaining outstanding or by being converted into voting securities of the
surviving entity) at least fifty percent (50%) of the total voting power
represented by the voting securities of the Company or such surviving entity
outstanding immediately after such merger or consolidation, (y) a merger
affected solely for the purpose of changing the Company's domicile, or (ii)
sale, lease or disposition by the Company of all or substantially all of the
Company's assets;

                (c) The approval by the shareholders of the Company of a plan of
complete liquidation of the Company or an agreement for the sale or disposition
by the Company of all or substantially all of the Company's assets; or


                                      -5-
<PAGE>   49

                (d) A change in the composition of the Board, as a result of
which fewer than a majority of the directors are Incumbent Directors. "Incumbent
Directors" shall mean directors who either (A) are directors of the Company as
of the date hereof, or (B) are elected, or nominated for election, to the Board
with the affirmative votes of at least a majority of those directors whose
election or nomination was not in connection with any transaction described in
subsections (a), (b) or (c) or in connection with an actual or threatened proxy
contest relating to the election of directors of the Company.

        11. Successors.

                (a) Company's Successors. Any successor to the Company (whether
direct or indirect and whether by purchase, merger, consolidation, liquidation
or otherwise) to all or substantially all of the Company's business and/or
assets shall assume the obligations under this Option Agreement and agree
expressly to perform the obligations under this Option Agreement in the same
manner and to the same extent as the Company would be required to perform such
obligations in the absence of a succession. For all purposes under this Option
Agreement, the term "COMPANY" shall include any successor to the Company's
business and/or assets which executes and delivers an assumption agreement
contemplated by this Section 11(a) or which becomes bound by the terms of this
Option Agreement by operation of law.

                (b) Optionee's Successors. The terms of this Option Agreement
and all rights of the Optionee hereunder shall inure to the benefit of, and be
enforceable by, the Optionee's personal or legal representatives, executors,
administrators, successors, heirs, distributes, devisees and legatees.

        12. Tax Consequences. Set forth below is a brief summary as of the date
of this Option of some of the federal tax consequences of exercise of this
Option and disposition of the Shares. THIS SUMMARY IS NECESSARILY INCOMPLETE,
AND THE TAX LAWS AND REGULATIONS ARE SUBJECT TO CHANGE. THE OPTIONEE SHOULD
CONSULT A TAX ADVISER BEFORE EXERCISING THIS OPTION OR DISPOSING OF THE SHARES.

                (a) Exercise of NSO. There may be a regular federal income tax
liability upon the exercise of an NSO. The Optionee will be treated as having
received compensation income (taxable at ordinary income tax rates) equal to the
excess, if any, of the Fair Market Value of the Exercised Shares on the date of
exercise over the Exercise Price. If Optionee is an Employee or a former
Employee, the Company will be required to withhold from Optionee's compensation
or collect from Optionee and pay to the applicable taxing authorities an amount
in cash equal to a percentage of this compensation income at the time of
exercise, and may refuse to honor the exercise and refuse to deliver Shares if
such withholding amounts are not delivered at the time of exercise.

                (b) Exercise of ISO. If this Option qualifies as an ISO, there
will be no regular federal income tax liability upon the exercise of the Option,
although the excess, if any, of the Fair Market Value of the Exercised Shares on
the date of exercise over the Exercise Price will be treated as an adjustment to
the alternative minimum tax for federal tax purposes and may subject the
Optionee to the alternative minimum tax in the year of exercise.


                                      -6-
<PAGE>   50

                (c) Exercise of ISO Following Disability. If the Optionee ceases
to be an Employee as a result of a disability that is not a total and permanent
disability as defined in Section 22(e)(3) of the Code, to the extent permitted
on the date of termination, the Optionee must exercise an ISO within three
months of such termination for the ISO to be qualified as an ISO.

                (d) Disposition of Shares. In the case of an NSO, if Shares are
held for at least one year, any gain realized on disposition of the Shares will
be treated as long-term capital gain for federal income tax purposes. In the
case of an ISO, if Shares transferred pursuant to the Option are held for at
least one year after exercise and at least two years after the Date of Grant,
any gain realized on disposition of the Shares will also be treated as long-term
capital gain for federal income tax purposes. If Shares purchased under an ISO
are disposed of within one year after exercise or two years after the Date of
Grant, any gain realized on such disposition will be treated as compensation
income (taxable at ordinary income rates) to the extent of the difference
between the Exercise Price of the Exercised Shares and the lesser of (i) the
Fair Market Value of the Exercised Shares on the date of exercise, or (ii) the
sale price of the Exercised Shares. Different rules may apply if the Shares are
subject to a substantial risk of forfeiture (within the meaning of Section 83 of
the Code) at the time of purchase. Any additional gain will be taxed as capital
gain, short-term depending on the period that the ISO Shares were held.

                (e) Notice of Disqualifying Disposition of ISO Shares. If the
Option granted to Optionee herein is an ISO, and if Optionee sells or otherwise
disposes of any of the Shares acquired pursuant to the ISO on or before the
later of (i) the date two years after the Date of Grant, or (ii) the date one
year after the date of exercise, the Optionee shall immediately notify the
Company in writing of such disposition. Optionee agrees that Optionee may be
subject to income tax withholding by the Company on the compensation income
recognized by the Optionee.

                (f) Section 83(b) Election for Unvested Shares Purchased
Pursuant to Options. With respect to the exercise of an Option for unvested
Shares, an election (the "Election") may be filed by the Optionee with the
Internal Revenue Service, within 30 days of the purchase of the Shares, electing
pursuant to Section 83(b) of the Code to be taxed currently on any difference
between the purchase price of the Shares and their Fair Market Value on the date
of purchase. In the case of an NSO, this will result in a recognition of taxable
income to the Optionee on the date of exercise, measured by the excess, if any,
of the Fair Market Value of the Exercised Shares, at the time the Option is
exercised over the purchase price for the Exercised Shares. Absent such an
election, taxable income will be measured and recognized by Optionee at the time
or times on which the Company's Repurchase Option lapses. In the case of an ISO,
such an election will result in a recognition of income to the Optionee for
alternative minimum tax purposes on the date of exercise, measured by the
excess, if any, of the Fair Market Value of the Exercised Shares, at the time
the Option is exercised, over the purchase price for the Exercised Shares.
Absent such an election, alternative minimum taxable income will be measured and
recognized by Optionee at the time or times on which the Company's Repurchase
Option lapses. Optionee is strongly encouraged to seek the advice of his or her
own tax consultants in connection with the purchase of the Shares and the
advisability of filing of the Election under Section 83(b) of the Code. A form
of Election under Section 83(b) is attached hereto as Exhibit C-5 for reference.


                                      -7-
<PAGE>   51

                OPTIONEE ACKNOWLEDGES THAT IT IS OPTIONEE'S SOLE RESPONSIBILITY
AND NOT THE COMPANY'S TO FILE TIMELY THE ELECTION UNDER SECTION 83(b), EVEN IF
OPTIONEE REQUESTS THE COMPANY OR ITS REPRESENTATIVE TO MAKE THIS FILING ON
OPTIONEE'S BEHALF.

        13. Entire Agreement; Governing Law. The Plan is incorporated herein by
reference. The Plan and this Option Agreement constitute the entire agreement of
the parties with respect to the subject matter hereof and supersede in their
entirety all prior undertakings and agreements of the Company and Optionee with
respect to the subject matter hereof, and may not be modified adversely to the
Optionee's interest except by means of a writing signed by the Company and
Optionee. This Option Agreement is governed by the internal substantive laws but
not the choice of law rules of California.

        14. No Guarantee of Continued Service. OPTIONEE ACKNOWLEDGES AND AGREES
THAT THE VESTING OF SHARES PURSUANT TO THE VESTING SCHEDULE HEREOF IS EARNED
ONLY BY CONTINUING AS A SERVICE PROVIDER AT THE WILL OF THE COMPANY (NOT THROUGH
THE ACT OF BEING HIRED, BEING GRANTED THIS OPTION OR ACQUIRING SHARES
HEREUNDER). OPTIONEE FURTHER ACKNOWLEDGES AND AGREES THAT THIS AGREEMENT, THE
TRANSACTIONS CONTEMPLATED HEREUNDER AND THE VESTING SCHEDULE SET FORTH HEREIN DO
NOT CONSTITUTE AN EXPRESS OR IMPLIED PROMISE OF CONTINUED ENGAGEMENT AS A
SERVICE PROVIDER FOR THE VESTING PERIOD, FOR ANY PERIOD, OR AT ALL, AND SHALL
NOT INTERFERE IN ANY WAY WITH OPTIONEE'S RIGHT OR THE COMPANY'S RIGHT TO
TERMINATE OPTIONEE'S RELATIONSHIP AS A SERVICE PROVIDER AT ANY TIME, WITH OR
WITHOUT CAUSE.

                Optionee acknowledges receipt of a copy of the Plan and
represents that he or she is familiar with the terms and provisions thereof, and
hereby accepts this Option subject to all of the terms and provisions thereof.
Optionee has reviewed the Plan and this Option in their entirety, has had an
opportunity to obtain the advice of counsel prior to executing this Option and
fully understands all provisions of the Option. Optionee hereby agrees to accept
as binding, conclusive and final all decisions or interpretations of the
Administrator upon any questions arising under the Plan or this Option. Optionee
further agrees to notify the Company upon any change in the residence address
indicated below.


                                      -8-
<PAGE>   52

OPTIONEE                                    COSINE COMMUNICATIONS, INC.


-----------------------------------         ------------------------------------
Signature                                   By


-----------------------------------         ------------------------------------
Print Name                                  Title


Residence Address:


-----------------------------------


-----------------------------------


-----------------------------------





                                      -9-
<PAGE>   53

                                    EXHIBIT A

                                 1997 STOCK PLAN

                                 EXERCISE NOTICE

CoSine Communications, Inc.
1200 Bridge Parkway
Redwood City, CA 94065

Attention:  Secretary

        1. Exercise of Option. Effective as of today, ________________, ____,
the undersigned ("Optionee") hereby elects to exercise Optionee's option (the
"Option") to purchase ________________ shares of the Common Stock (the "Shares")
of CoSine Communications, Inc. (the "Company") under and pursuant to the 1997
Stock Plan (the "Plan") and the Stock Option Agreement dated (the "Option
Agreement").

        2. Delivery of Payment. Purchaser herewith delivers to the Company the
full purchase price of the Shares, as set forth in the Option Agreement.

        3. Representations of Optionee. Optionee acknowledges that Optionee has
received, read and understood the Plan and the Option Agreement and agrees to
abide by and be bound by their terms and conditions.

        4. Rights as Shareholder. Until the issuance of the Shares (as evidenced
by the appropriate entry on the books of the Company or of a duly authorized
transfer agent of the Company), no right to vote or receive dividends or any
other rights as a shareholder shall exist with respect to the optioned stock,
notwithstanding the exercise of the Option. The Shares shall be issued to the
Optionee as soon as practicable after the Option is exercised. No adjustment
shall be made for a dividend or other right for which the record date is prior
to the date of issuance except as provided in Section 12 of the Plan.

        5. Company's Right of First Refusal. Before any Shares held by Optionee
or any transferee (either being sometimes referred to herein as the "Holder")
may be sold or otherwise transferred (including transfer by gift or operation of
law), the Company or its assignee(s) shall have a right of first refusal to
purchase the Shares on the terms and conditions set forth in this Section (the
"Right of First Refusal").

                (a) Notice of Proposed Transfer. The Holder of the Shares shall
deliver to the Company a written notice (the "Notice") stating: (i) the Holder's
bona fide intention to sell or otherwise transfer such Shares; (ii) the name of
each proposed purchaser or other transferee ("Proposed Transferee"); (iii) the
number of Shares to be transferred to each Proposed Transferee; and (iv) the
bona fide cash price or other consideration for which the Holder proposes to
transfer the


<PAGE>   54

Shares (the "Offered Price"), and the Holder shall offer the Shares at the
Offered Price to the Company or its assignee(s).

                (b) Exercise of Right of First Refusal. At any time within
thirty (30) days after receipt of the Notice, the Company and/or its assignee(s)
may, by giving written notice to the Holder, elect to purchase all, but not less
than all, of the Shares proposed to be transferred to any one or more of the
Proposed Transferees, at the purchase price determined in accordance with
subsection (c) below.

                (c) Purchase Price. The purchase price ("Purchase Price") for
the Shares purchased by the Company or its assignee(s) under this Section shall
be the Offered Price. If the Offered Price includes consideration other than
cash, the cash equivalent value of the non-cash consideration shall be
determined by the Board of Directors of the Company in good faith.

                (d) Payment. Payment of the Purchase Price shall be made, at the
option of the Company or its assignee(s), in cash (by check), promissory note,
by cancellation of all or a portion of any outstanding indebtedness of the
Holder to the Company (or, in the case of repurchase by an assignee, to the
assignee), or by any combination thereof within 30 days after receipt of the
Notice or in the manner and at the times set forth in the Notice.

                (e) Holder's Right to Transfer. If all of the Shares proposed in
the Notice to be transferred to a given Proposed Transferee are not purchased by
the Company and/or its assignee(s) as provided in this Section, then the Holder
may sell or otherwise transfer such Shares to that Proposed Transferee at the
Offered Price or at a higher price, provided that such sale or other transfer is
consummated within 120 days after the date of the Notice, that any such sale or
other transfer is effected in accordance with any applicable securities laws and
that the Proposed Transferee agrees in writing that the provisions of this
Section shall continue to apply to the Shares in the hands of such Proposed
Transferee. If the Shares described in the Notice are not transferred to the
Proposed Transferee within such period, a new Notice shall be given to the
Company, and the Company and/or its assignees shall again be offered the Right
of First Refusal before any Shares held by the Holder may be sold or otherwise
transferred.

                (f) Exception for Certain Family Transfers. Anything to the
contrary contained in this Section notwithstanding, the transfer of any or all
of the Shares during the Optionee's lifetime or on the Optionee's death by will
or intestacy to the Optionee's immediate family or a trust for the benefit of
the Optionee's immediate family shall be exempt from the provisions of this
Section. "Immediate Family" as used herein shall mean spouse, lineal descendant
or antecedent, father, mother, brother or sister. In such case, the transferee
or other recipient shall receive and hold the Shares so transferred subject to
the provisions of this Section, and there shall be no further transfer of such
Shares except in accordance with the terms of this Section.

                (g) Termination of Right of First Refusal. The Right of First
Refusal shall terminate as to any Shares upon the first sale of Common Stock of
the Company to the general public pursuant to a registration statement filed
with and declared effective by the Securities and Exchange Commission under the
Securities Act of 1933, as amended.

                                      -2-
<PAGE>   55
        6. Tax Consultation. Optionee understands that Optionee may suffer
adverse tax consequences as a result of Optionee's purchase or disposition of
the Shares. Optionee represents that Optionee has consulted with any tax
consultants Optionee deems advisable in connection with the purchase or
disposition of the Shares and that Optionee is not relying on the Company for
any tax advice.

        7. Restrictive Legends and Stop-Transfer Orders.

                (a) Legends. Optionee understands and agrees that the Company
shall cause the legends set forth below or legends substantially equivalent
thereto, to be placed upon any certificate(s) evidencing ownership of the Shares
together with any other legends that may be required by the Company or by state
or federal securities laws:

                        THE SECURITIES REPRESENTED HEREBY HAVE NOT BEEN
                        REGISTERED UNDER THE SECURITIES ACT OF 1933 (THE "ACT")
                        AND MAY NOT BE OFFERED, SOLD OR OTHERWISE TRANSFERRED,
                        PLEDGED OR HYPOTHECATED UNLESS AND UNTIL REGISTERED
                        UNDER THE ACT OR, IN THE OPINION OF COMPANY COUNSEL
                        SATISFACTORY TO THE ISSUER OF THESE SECURITIES, SUCH
                        OFFER, SALE OR TRANSFER, PLEDGE OR HYPOTHECATION IS IN
                        COMPLIANCE THEREWITH.


                        THE SHARES REPRESENTED BY THIS CERTIFICATE ARE SUBJECT
                        TO CERTAIN RESTRICTIONS ON TRANSFER AND RIGHT OF FIRST
                        REFUSAL OPTIONS HELD BY THE ISSUER OR ITS ASSIGNEE(S) AS
                        SET FORTH IN THE EXERCISE NOTICE BETWEEN THE ISSUER AND
                        THE ORIGINAL HOLDER OF THESE SHARES, A COPY OF WHICH MAY
                        BE OBTAINED AT THE PRINCIPAL OFFICE OF THE ISSUER. SUCH
                        TRANSFER RESTRICTIONS AND RIGHT OF FIRST REFUSAL ARE
                        BINDING ON TRANSFEREES OF THESE SHARES.


                (b) Stop-Transfer Notices. Optionee agrees that, in order to
ensure compliance with the restrictions referred to herein, the Company may
issue appropriate "stop transfer" instructions to its transfer agent, if any,
and that, if the Company transfers its own securities, it may make appropriate
notations to the same effect in its own records.

                (c) Refusal to Transfer. The Company shall not be required (i)
to transfer on its books any Shares that have been sold or otherwise transferred
in violation of any of the provisions of this Exercise Notice or (ii) to treat
as owner of such Shares or to accord the right to vote or pay dividends to any
purchaser or other transferee to whom such Shares shall have been so
transferred.

        8. Successors and Assigns. The Company may assign any of its rights
under this Exercise Notice to single or multiple assignees, and the terms and
conditions of this Exercise Notice shall inure to the benefit of the successors
and assigns of the Company. Subject to the restrictions on


                                      -3-
<PAGE>   56

transfer herein set forth, the terms and conditions of this Exercise Notice
shall be binding upon Optionee and his or her heirs, executors, administrators,
successors and assigns.

        9. Interpretation. Any dispute regarding the interpretation of this
Exercise Notice shall be submitted by Optionee or by the Company forthwith to
the Administrator which shall review such dispute at its next regular meeting.
The resolution of such a dispute by the Administrator shall be final and binding
on all parties.

        10. Governing Law; Severability. This Exercise Notice is governed by the
internal substantive laws, but not the choice of law rules, of California.

        11. Entire Agreement. The Plan and Option Agreement are incorporated
herein by reference. This Exercise Notice, the Plan, Option Agreement,
Investment Representation Statement, Note, Security Agreement, and Restricted
Stock Purchase Agreement constitute the entire agreement of the parties with
respect to the subject matter hereof and supersede in their entirety all prior
undertakings and agreements of the Company and Optionee with respect to the
subject matter hereof, and may not be modified adversely to the Optionee's
interest except by means of a writing signed by the Company and Optionee.

SUBMITTED BY:                               ACCEPTED BY:

OPTIONEE                                    COSINE COMMUNICATIONS, INC.


-----------------------------------         ------------------------------------
Signature                                   By


-----------------------------------         ------------------------------------
Print Name                                  Its


Residence Address:                           Address:

-----------------------------------                   1200 Bridge Parkway
                                                      Redwood City, CA 94065
-----------------------------------

-----------------------------------
                                            ------------------------------------
                                            Date Received


                                      -4-
<PAGE>   57

                                   EXHIBIT B-1

                       INVESTMENT REPRESENTATION STATEMENT

OPTIONEE              :
                             ---------------------------

COMPANY               :      CoSine Communications, Inc.

SECURITY              :      COMMON STOCK

AMOUNT                :

DATE                  :

In connection with the purchase of the above-listed Securities, the undersigned
Optionee represents to the Company the following:

                (a) Optionee is aware of the Company's business affairs and
financial condition and has acquired sufficient information about the Company to
reach an informed and knowledgeable decision to acquire the Securities. Optionee
is acquiring these Securities for investment for Optionee's own account only and
not with a view to, or for resale in connection with, any "distribution" thereof
within the meaning of the Securities Act of 1933, as amended (the "Securities
Act").

                (b) Optionee acknowledges and understands that the Securities
constitute "restricted securities" under the Securities Act and have not been
registered under the Securities Act in reliance upon a specific exemption
therefrom, which exemption depends upon, among other things, the bona fide
nature of Optionee's investment intent as expressed herein. In this connection,
Optionee understands that, in the view of the Securities and Exchange
Commission, the statutory basis for such exemption may be unavailable if
Optionee's representation was predicated solely upon a present intention to hold
these Securities for the minimum capital gains period specified under tax
statutes, for a deferred sale, for or until an increase or decrease in the
market price of the Securities, or for a period of one year or any other fixed
period in the future. Optionee further understands that the Securities must be
held indefinitely unless they are subsequently registered under the Securities
Act or an exemption from such registration is available. Optionee further
acknowledges and understands that the Company is under no obligation to register
the Securities. Optionee understands that the certificate evidencing the
Securities will be imprinted with a legend which prohibits the transfer of the
Securities unless they are registered or such registration is not required in
the opinion of counsel satisfactory to the Company, and with any other legend
required under applicable state securities laws.

                (c) Optionee is familiar with the provisions of Rule 701 and
Rule 144, each promulgated under the Securities Act, which, in substance, permit
limited public resale of "restricted


<PAGE>   58

securities" acquired, directly or indirectly from the issuer thereof, in a
non-public offering subject to the satisfaction of certain conditions. Rule 701
provides that if the issuer qualifies under Rule 701 at the time of the grant of
the Option to the Optionee, the exercise will be exempt from registration under
the Securities Act. In the event the Company becomes subject to the reporting
requirements of Section 13 or 15(d) of the Securities Exchange Act of 1934,
ninety (90) days thereafter (or such longer period as any market stand-off
agreement may require) the Securities exempt under Rule 701 may be resold,
subject to the satisfaction of certain of the conditions specified by Rule 144,
including: (1) the resale being made through a broker in an unsolicited
"broker's transaction" or in transactions directly with a market maker (as said
term is defined under the Securities Exchange Act of 1934); and, in the case of
an affiliate, (2) the availability of certain public information about the
Company, (3) the amount of Securities being sold during any three month period
not exceeding the limitations specified in Rule 144(e), and (4) the timely
filing of a Form 144, if applicable.

                        In the event that the Company does not qualify under
Rule 701 at the time of grant of the Option, then the Securities may be resold
in certain limited circumstances subject to the provisions of Rule 144, which
requires the resale to occur not less than one year after the later of the date
the Securities were sold by the Company or the date the Securities were sold by
an affiliate of the Company, within the meaning of Rule 144; and, in the case of
acquisition of the Securities by an affiliate, or by a non-affiliate who
subsequently holds the Securities less than two years, the satisfaction of the
conditions set forth in sections (1), (2), (3) and (4) of the paragraph
immediately above.

                (d) Optionee and his or her assignees, if any, hereby agrees
that if so requested by the Company or any representative of the underwriters in
connection with any registration of the offering of any securities of the
Company under the Securities Act, Optionee (and his or her assignees, if any)
shall not sell, make short sale of, loan, grant any options for the purchase of,
or otherwise transfer any of the Securities or other securities of the Company
held by the Optionee during the 180-day period following the effective date of a
registration statement of the Company filed under the Securities Act; provided,
however, that such restriction shall only apply to the first registration
statement of the Company to become effective under the Securities Act which
include securities to be sold on behalf of the Company to the public in a firm
underwritten public offering under the Securities Act. Optionee and his or her
assigns, if any, further agree to execute any agreement reflecting the foregoing
as may be requested by the underwriters at the time of the public offering. The
Company may impose stop-transfer instructions with respect to any securities
subject to the foregoing restrictions until the end of such 180-day period.

                (e) Optionee further understands that in the event all of the
applicable requirements of Rule 701 or 144 are not satisfied, registration under
the Securities Act, compliance with Regulation A, or some other registration
exemption will be required; and that, notwithstanding the fact that Rules 144
and 701 are not exclusive, the Staff of the Securities and Exchange Commission
has expressed its opinion that persons proposing to sell private placement
securities other than in a registered offering and otherwise than pursuant to
Rules 144 or 701 will have a substantial burden of proof in establishing that an
exemption from registration is available for such


                                      -2-
<PAGE>   59

offers or sales, and that such persons and their respective brokers who
participate in such transactions do so at their own risk. Optionee understands
that no assurances can be given that any such other registration exemption will
be available in such event.

                                            SIGNATURE OF OPTIONEE:


                                            ------------------------------------

                                            Date:
                                                 -------------------------------





                                      -3-

<PAGE>   60


                                   EXHIBIT B-2

                                      NOTE


$_______________                                       Redwood City, California
                                                       __________________, _____


FOR VALUE RECEIVED, _____________________ promises to pay to CoSine
Communications, Inc., a California corporation (the "Company"), or order, the
principal sum of _______________________ ($_____________), together with
interest on the unpaid principal hereof from the date hereof at the rate of
_______________ percent (____%) per annum, compounded semiannually.

Principal and interest shall be due and payable on _______________, _____.
Payment of principal and interest shall be made in lawful money of the United
States of America.

The undersigned may at any time prepay all or any portion of the principal or
interest owing hereunder.

This Note is subject to the terms of the Option, dated as of ________________.
This Note is secured in part by a pledge of the Company's Common Stock under the
terms of a Security Agreement of even date herewith and is subject to all the
provisions thereof.

The holder of this Note shall have full recourse against the undersigned, and
shall not be required to proceed against the collateral securing this Note in
the event of default.

In the event the undersigned shall cease to be an employee, director or
consultant of the Company for any reason, this Note shall, at the option of the
Company, be accelerated, and the whole unpaid balance on this Note of principal
and accrued interest shall be immediately due and payable.

Should any action be instituted for the collection of this Note, the reasonable
costs and attorneys' fees therein of the holder shall be paid by the
undersigned.



                                            ____________________________________

                                            ____________________________________


<PAGE>   61


                                   EXHIBIT B-3

                               SECURITY AGREEMENT


This Security Agreement is made as of __________, _____ between CoSine
Communications, Inc., a California corporation ("Pledgee"), and ("Pledgor").


                                    Recitals

Pursuant to Pledgor's election to purchase Shares under the Option Agreement
dated (the "Option"), between Pledgor and Pledgee under Pledgee's 1997 Stock
Plan, and Pledgor's election under the terms of the Option to pay for such
shares with his promissory note (the "Note"), Pledgor has purchased _________
shares of Pledgee's Common Stock (the "Shares") at a price of $________ per
share, for a total purchase price of $__________. The Note and the obligations
thereunder are as set forth in Exhibit B-2 to the Option.

NOW, THEREFORE, it is agreed as follows:

        1. Creation and Description of Security Interest. In consideration of
the transfer of the Shares to Pledgor under the Option Agreement, Pledgor,
pursuant to the California Commercial Code, hereby pledges all of such Shares
(herein sometimes referred to as the "Collateral") represented by certificate
number ______, duly endorsed in blank or with executed stock powers, and
herewith delivers said certificate to the Secretary of Pledgee ("Pledgeholder"),
who shall hold said certificate subject to the terms and conditions of this
Security Agreement.

        The pledged stock (together with an executed blank stock assignment for
use in transferring all or a portion of the Shares to Pledgee if, as and when
required pursuant to this Security Agreement) shall be held by the Pledgeholder
as security for the repayment of the Note, and any extensions or renewals
thereof, to be executed by Pledgor pursuant to the terms of the Option, and the
Pledgeholder shall not encumber or dispose of such Shares except in accordance
with the provisions of this Security Agreement.

        2. Pledgor's Representations and Covenants. To induce Pledgee to enter
into this Security Agreement, Pledgor represents and covenants to Pledgee, its
successors and assigns, as follows:

                (a) Payment of Indebtedness. Pledgor will pay the principal sum
of the Note secured hereby, together with interest thereon, at the time and in
the manner provided in the Note.

                (b) Encumbrances. The Shares are free of all other encumbrances,
defenses and liens, and Pledgor will not further encumber the Shares without the
prior written consent of Pledgee.


                                      -2-
<PAGE>   62

                (c) Margin Regulations. In the event that Pledgee's Common Stock
is now or later becomes margin-listed by the Federal Reserve Board and Pledgee
is classified as a "lender" within the meaning of the regulations under Part 207
of Title 12 of the Code of Federal Regulations ("Regulation G"), Pledgor agrees
to cooperate with Pledgee in making any amendments to the Note or providing any
additional collateral as may be necessary to comply with such regulations.

        3. Voting Rights. During the term of this pledge and so long as all
payments of principal and interest are made as they become due under the terms
of the Note, Pledgor shall have the right to vote all of the Shares pledged
hereunder.

        4. Stock Adjustments. In the event that during the term of the pledge
any stock dividend, reclassification, readjustment or other changes are declared
or made in the capital structure of Pledgee, all new, substituted and additional
shares or other securities issued by reason of any such change shall be
delivered to and held by the Pledgee under the terms of this Security Agreement
in the same manner as the Shares originally pledged hereunder. In the event of
substitution of such securities, Pledgor, Pledgee and Pledgeholder shall
cooperate and execute such documents as are reasonable so as to provide for the
substitution of such Collateral and, upon such substitution, references to
"Shares" in this Security Agreement shall include the substituted shares of
capital stock of Pledgor as a result thereof.

        5. Options and Rights. In the event that, during the term of this
pledge, subscription Options or other rights or options shall be issued in
connection with the pledged Shares, such rights, Options and options shall be
the property of Pledgor and, if exercised by Pledgor, all new stock or other
securities so acquired by Pledgor as it relates to the pledged Shares then held
by Pledgeholder shall be immediately delivered to Pledgeholder, to be held under
the terms of this Security Agreement in the same manner as the Shares pledged.

        6. Default. Pledgor shall be deemed to be in default of the Note and of
this Security Agreement in the event:

                (a) Payment of principal or interest on the Note shall be
delinquent for a period of 10 days or more; or

                (b) Pledgor fails to perform any of the covenants set forth in
the Option or contained in this Security Agreement for a period of 10 days after
written notice thereof from Pledgee.

        In the case of an event of Default, as set forth above, Pledgee shall
have the right to accelerate payment of the Note upon notice to Pledgor, and
Pledgee shall thereafter be entitled to pursue its remedies under the California
Commercial Code.

        7. Release of Collateral. Subject to any applicable contrary rules under
Regulation G, there shall be released from this pledge a portion of the pledged
Shares held by Pledgeholder hereunder upon payments of the principal of the
Note. The number of the pledged Shares which shall be released shall be that
number of full Shares which bears the same proportion to the initial


                                      -3-
<PAGE>   63

number of Shares pledged hereunder as the payment of principal bears to the
initial full principal amount of the Note.

        8. Withdrawal or Substitution of Collateral. Pledgor shall not sell,
withdraw, pledge, substitute or otherwise dispose of all or any part of the
Collateral without the prior written consent of Pledgee.

        9. Term. The within pledge of Shares shall continue until the payment of
all indebtedness secured hereby, at which time the remaining pledged stock shall
be promptly delivered to Pledgor, subject to the provisions for prior release of
a portion of the Collateral as provided in paragraph 7 above.

        10. Insolvency. Pledgor agrees that if a bankruptcy or insolvency
proceeding is instituted by or against it, or if a receiver is appointed for the
property of Pledgor, or if Pledgor makes an assignment for the benefit of
creditors, the entire amount unpaid on the Note shall become immediately due and
payable, and Pledgee may proceed as provided in the case of default.

        11. Pledgeholder Liability. In the absence of willful or gross
negligence, Pledgeholder shall not be liable to any party for any of his acts,
or omissions to act, as Pledgeholder.

        12. Invalidity of Particular Provisions. Pledgor and Pledgee agree that
the enforceability or invalidity of any provision or provisions of this Security
Agreement shall not render any other provision or provisions herein contained
unenforceable or invalid.

        13. Successors or Assigns. Pledgor and Pledgee agree that all of the
terms of this Security Agreement shall be binding on their respective successors
and assigns, and that the term "Pledgor" and the term "Pledgee" as used herein
shall be deemed to include, for all purposes, the respective designees,
successors, assigns, heirs, executors and administrators.

        14. Governing Law. This Security Agreement shall be interpreted and
governed under the internal substantive laws, but not the choice of law rules,
of California.


                                      -4-
<PAGE>   64

IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of the
day and year first above written.



                                        "PLEDGOR"


                                        ----------------------------------------
                                        Signature


                                        ----------------------------------------
                                        Print Name


                                        Address:
                                                --------------------------------

                                                --------------------------------

                                                --------------------------------


                                        "PLEDGEE"
                                        COSINE COMMUNICATIONS, INC.
                                        a California corporation



                                        ----------------------------------------
                                        Signature


                                        ----------------------------------------
                                        Print Name


                                        ----------------------------------------
                                        Title



                                        "PLEDGEHOLDER"


                                        ----------------------------------------

                                        Secretary of CoSine Communications, Inc.





                                      -5-
<PAGE>   65

                                   EXHIBIT C-1

                           COSINE COMMUNICATIONS, INC.

                                 1997 STOCK PLAN

                       RESTRICTED STOCK PURCHASE AGREEMENT


        THIS AGREEMENT is made between _____________________________ (the
"Purchaser") and CoSine Communications, Inc. (the "Company") as of
__________________, ____.

        Unless otherwise defined herein, the terms defined in the 1997 Stock
Plan shall have the same defined meanings in this Agreement.

                                    RECITALS

        A. Pursuant to the exercise of the option (grant number ___) granted to
Purchaser under the Plan and pursuant to the Option Agreement dated by and
between the Company and Purchaser with respect to such grant (the "Option"),
which Plan and Option Agreement are hereby incorporated by reference, Purchaser
has elected to purchase _________ of those shares of Common Stock which have not
become vested under the vesting schedule set forth in the Option Agreement
("Unvested Shares"). The Unvested Shares and the shares subject to the Option
Agreement which have become vested are sometimes collectively referred to herein
as the "Shares."

        B. As required by the Option Agreement, as a condition to Purchaser's
election to exercise the option, Purchaser must execute this Agreement, which
sets forth the rights and obligations of the parties with respect to Shares
acquired upon exercise of the Option.

        1. Repurchase Option.

                (a) If Purchaser's status as a Service Provider is terminated
for any reason, including for cause, death, and Disability, the Company shall
have the right and option to purchase from Purchaser, or Purchaser's personal
representative, as the case may be, all of the Purchaser's Unvested Shares as of
the date of such termination at the price paid by the Purchaser for such Shares
(the "Repurchase Option").

                (b) Upon the occurrence of such termination, the Company may
exercise its Repurchase Option by delivering personally or by registered mail,
to Purchaser (or his transferee or legal representative, as the case may be),
within ninety (90) days of the termination, a notice in writing indicating the
Company's intention to exercise the Repurchase Option and setting forth a date
for closing not later than thirty (30) days from the mailing of such notice. The
closing shall take place at the Company's office. At the closing, the holder of
the certificates for the Unvested Shares being transferred shall deliver the
stock certificate or certificates evidencing the Unvested Shares, and the
Company shall deliver the purchase price therefor.


<PAGE>   66


                (c) At its option, the Company may elect to make payment for the
Unvested Shares to a bank selected by the Company. The Company shall avail
itself of this option by a notice in writing to Purchaser stating the name and
address of the bank, date of closing, and waiving the closing at the Company's
office.

                (d) If the Company does not elect to exercise the Repurchase
Option conferred above by giving the requisite notice within ninety (90) days
following the termination, the Repurchase Option shall terminate.

                (e) The Repurchase Option shall terminate in accordance with the
vesting schedule contained in Optionee's Option Agreement.

        2. Transferability of the Shares; Escrow.

                (a) Purchaser hereby authorizes and directs the Secretary of the
Company, or such other person designated by the Company, to transfer the
Unvested Shares as to which the Repurchase Option has been exercised from
Purchaser to the Company.

                (b) To insure the availability for delivery of Purchaser's
Unvested Shares upon repurchase by the Company pursuant to the Repurchase Option
under Section 1, Purchaser hereby appoints the Secretary, or any other person
designated by the Company as escrow agent, as its attorney-in-fact to sell,
assign and transfer unto the Company, such Unvested Shares, if any, repurchased
by the Company pursuant to the Repurchase Option and shall, upon execution of
this Agreement, deliver and deposit with the Secretary of the Company, or such
other person designated by the Company, the share certificates representing the
Unvested Shares, together with the stock assignment duly endorsed in blank,
attached hereto as Exhibit C-2. The Unvested Shares and stock assignment shall
be held by the secretary in escrow, pursuant to the Joint Escrow Instructions of
the Company and Purchaser attached as Exhibit C-3 hereto, until the Company
exercises its Repurchase Option, until such Unvested Shares are vested, or until
such time as this Agreement no longer is in effect. As a further condition to
the Company's obligations under this Agreement, the spouse of the Purchaser, if
any, shall execute and deliver to the Company the Consent of Spouse attached
hereto as Exhibit C-4. Upon vesting of the Unvested Shares, the escrow agent
shall promptly deliver to the Purchaser the certificate or certificates
representing such Shares in the escrow agent's possession belonging to the
Purchaser, and the escrow agent shall be discharged of all further obligations
hereunder; provided, however, that the escrow agent shall nevertheless retain
such certificate or certificates as escrow agent if so required pursuant to
other restrictions imposed pursuant to this Agreement.

                (c) The Company, or its designee, shall not be liable for any
act it may do or omit to do with respect to holding the Shares in escrow and
while acting in good faith and in the exercise of its judgment.

                (d) Transfer or sale of the Shares is subject to restrictions on
transfer imposed by any applicable state and federal securities laws. Any
transferee shall hold such Shares subject to all the provisions hereof and the
Exercise Notice executed by the Purchaser with respect to any


                                      -2-
<PAGE>   67

Unvested Shares purchased by Purchaser and shall acknowledge the same by signing
a copy of this Agreement.

        3. Ownership, Voting Rights, Duties. This Agreement shall not affect in
any way the ownership, voting rights or other rights or duties of Purchaser,
except as specifically provided herein.

        4. Legends. The share certificate evidencing the Shares issued hereunder
shall be endorsed with the following legend (in addition to any legend required
under applicable federal and state securities laws):

                THE SHARES REPRESENTED BY THIS CERTIFICATE ARE SUBJECT TO
                CERTAIN RESTRICTIONS UPON TRANSFER AND RIGHTS OF REPURCHASE AS
                SET FORTH IN AN AGREEMENT BETWEEN THE COMPANY AND THE
                STOCKHOLDER, A COPY OF WHICH IS ON FILE WITH THE SECRETARY OF
                THE COMPANY.

        5. Adjustment for Stock Split. All references to the number of Shares
and the purchase price of the Shares in this Agreement shall be appropriately
adjusted to reflect any stock split, stock dividend or other change in the
Shares which may be made by the Company pursuant to Section 12 of the Plan after
the date of this Agreement.

        6. Notices. Notices required hereunder shall be given in person or by
registered mail to the address of Purchaser shown on the records of the Company,
and to the Company at their respective principal executive offices.

        7. Survival of Terms. This Agreement shall apply to and bind Purchaser
and the Company and their respective permitted assignees and transferees, heirs,
legatees, executors, administrators and legal successors.

        8. Section 83(b) Election. Purchaser hereby acknowledges that he or she
has been informed that, with respect to the exercise of an Option for Unvested
Shares, an election (the "Election") may be filed by the Purchaser with the
Internal Revenue Service, within 30 days of the purchase of the exercised
Shares, electing pursuant to Section 83(b) of the Code to be taxed currently on
any difference between the purchase price of the exercised Shares and their Fair
Market Value on the date of purchase. In the case of a Nonstatutory Stock
Option, this will result in a recognition of taxable income to the Purchaser on
the date of exercise, measured by the excess, if any, of the Fair Market Value
of the exercised Shares, at the time the Option is exercised over the purchase
price for the exercised Shares. Absent such an Election, taxable income will be
measured and recognized by Purchaser at the time or times on which the Company's
Repurchase Option lapses. In the case of an Incentive Stock Option, such an
Election will result in a recognition of income to the Purchaser for alternative
minimum tax purposes on the date of exercise, measured by the excess, if any, of
the Fair Market Value of the exercised Shares, at the time the option is
exercised, over the purchase price for the exercised Shares. Absent such an
Election, alternative minimum taxable income will be measured and recognized by
Purchaser at the time or times on which the Company's Repurchase Option lapses.
Purchaser is strongly encouraged to seek the advice of his or her own tax
consultants in connection


                                      -3-
<PAGE>   68

with the purchase of the Shares and the advisability of filing of the Election
under Section 83(b) of the Code. A form of Election under Section 83(b) is
attached hereto as Exhibit C-5 for reference.

                PURCHASER ACKNOWLEDGES THAT IT IS PURCHASER'S SOLE
RESPONSIBILITY AND NOT THE COMPANY'S TO FILE TIMELY THE ELECTION UNDER SECTION
83(b) OF THE CODE, EVEN IF PURCHASER REQUESTS THE COMPANY OR ITS REPRESENTATIVE
TO MAKE THIS FILING ON PURCHASER'S BEHALF.

        9. Representations. Purchaser has reviewed with his own tax advisors the
federal, state, local and foreign tax consequences of this investment and the
transactions contemplated by this Agreement. Purchaser is relying solely on such
advisors and not on any statements or representations of the Company or any of
its agents. Purchaser understands that he (and not the Company) shall be
responsible for his own tax liability that may arise as a result of this
investment or the transactions contemplated by this Agreement.

        10. Governing Law. This Agreement shall be governed by the internal
substantive laws, but not the choice of law rules, of California.

        Purchaser represents that he has read this Agreement and is familiar
with its terms and provisions. Purchaser hereby agrees to accept as binding,
conclusive and final all decisions or interpretations of the Board upon any
questions arising under this Agreement.


                                      -4-
<PAGE>   69

        IN WITNESS WHEREOF, this Agreement is deemed made as of the date first
set forth above.

OPTIONEE                                    COSINE COMMUNICATIONS, INC.


-----------------------------------         ------------------------------------
Signature                                   By


-----------------------------------         ------------------------------------
Print Name                                  Title

Residence Address:

-----------------------------------


-----------------------------------


-----------------------------------


Dated: ____________________, ______






                                      -5-
<PAGE>   70

                                   EXHIBIT C-2

                      ASSIGNMENT SEPARATE FROM CERTIFICATE



        FOR VALUE RECEIVED I, __________________________, hereby sell, assign
and transfer unto CoSine Communications, Inc. ______________________
(__________) shares of the Common Stock of CoSine Communications, Inc. standing
in my name of the books of said corporation represented by Certificate No. _____
herewith and do hereby irrevocably constitute and appoint _______________ to
transfer the said stock on the books of the within named corporation with full
power of substitution in the premises.

        This Stock Assignment may be used only in accordance with the Restricted
Stock Purchase Agreement between CoSine Communications, Inc. and the undersigned
dated______________, _____.


Dated: _______________, ____                Signature:
















INSTRUCTIONS: Please do not fill in any blanks other than the signature line.
The purpose of this assignment is to enable the Company to exercise its
"repurchase option," as set forth in the Agreement, without requiring additional
signatures on the part of the Purchaser.


<PAGE>   71


                                   EXHIBIT C-3

                            JOINT ESCROW INSTRUCTIONS


                                                         -----------------, ----

Corporate Secretary
CoSine Communications, Inc.
1200 Bridge Parkway
Redwood City, CA 94065

Dear Mr. Secretary:

        As Escrow Agent for both CoSine Communications, Inc. (the "Company"),
and the undersigned purchaser of stock of the Company (the "Purchaser"), you are
hereby authorized and directed to hold the documents delivered to you pursuant
to the terms of that certain Restricted Stock Purchase Agreement (the
"Agreement") between the Company and the undersigned, in accordance with the
following instructions:

        1. In the event the Company and/or any assignee of the Company (referred
to collectively for convenience herein as the "Company") exercises the Company's
repurchase option set forth in the Agreement, the Company shall give to
Purchaser and you a written notice specifying the number of shares of stock to
be purchased, the purchase price, and the time for a closing hereunder at the
principal office of the Company. Purchaser and the Company hereby irrevocably
authorize and direct you to close the transaction contemplated by such notice in
accordance with the terms of said notice.

        2. At the closing, you are directed (a) to date the stock assignments
necessary for the transfer in question, (b) to fill in the number of shares
being transferred, and (c) to deliver the stock assignments, together with the
certificate evidencing the shares of stock to be transferred, to the Company or
its assignee, against the simultaneous delivery to you of the purchase price (by
cash, a check, or some combination thereof) for the number of shares of stock
being purchased pursuant to the exercise of the Company's repurchase option.

        3. Purchaser irrevocably authorizes the Company to deposit with you any
certificates evidencing shares of stock to be held by you hereunder and any
additions and substitutions to said shares as defined in the Agreement.
Purchaser does hereby irrevocably constitute and appoint you as Purchaser's
attorney-in-fact and agent for the term of this escrow to execute with respect
to such securities all documents necessary or appropriate to make such
securities negotiable and to complete any transaction herein contemplated,
including but not limited to the filing with any applicable state blue sky
authority of any required applications for consent to, or notice of transfer of,
the securities. Subject to the provisions of this paragraph 3, Purchaser shall
exercise all rights and privileges of a stockholder of the Company while the
stock is held by you.


<PAGE>   72

        4. Upon written request of the Purchaser, but no more than once per
calendar year, unless the Company's repurchase option has been exercised, you
will deliver to Purchaser a certificate or certificates representing so many
shares of stock as are not then subject to the Company's repurchase option.
Within 120 days after cessation of Purchaser's continuous employment by or
services to the Company, or any parent or subsidiary of the Company, you will
deliver to Purchaser a certificate or certificates representing the aggregate
number of shares held or issued pursuant to the Agreement and not purchased by
the Company or its assignees pursuant to exercise of the Company's repurchase
option.

        5. If at the time of termination of this escrow you should have in your
possession any documents, securities, or other property belonging to Purchaser,
you shall deliver all of the same to Purchaser and shall be discharged of all
further obligations hereunder.

        6. Your duties hereunder may be altered, amended, modified or revoked
only by a writing signed by all of the parties hereto.

        7. You shall be obligated only for the performance of such duties as are
specifically set forth herein and may rely and shall be protected in relying or
refraining from acting on any instrument reasonably believed by you to be
genuine and to have been signed or presented by the proper party or parties. You
shall not be personally liable for any act you may do or omit to do hereunder as
Escrow Agent or as attorney-in-fact for Purchaser while acting in good faith,
and any act done or omitted by you pursuant to the advice of your own attorneys
shall be conclusive evidence of such good faith.

        8. You are hereby expressly authorized to disregard any and all warnings
given by any of the parties hereto or by any other person or corporation,
excepting only orders or process of courts of law and are hereby expressly
authorized to comply with and obey orders, judgments or decrees of any court. In
case you obey or comply with any such order, judgment or decree, you shall not
be liable to any of the parties hereto or to any other person, firm or
corporation by reason of such compliance, notwithstanding any such order,
judgment or decree being subsequently reversed, modified, annulled, set aside,
vacated or found to have been entered without jurisdiction.

        9. You shall not be liable in any respect on account of the identity,
authorities or rights of the parties executing or delivering or purporting to
execute or deliver the Agreement or any documents or papers deposited or called
for hereunder.

        10. You shall not be liable for the outlawing of any rights under the
Statute of Limitations with respect to these Joint Escrow Instructions or any
documents deposited with you.

        11. You shall be entitled to employ such legal counsel and other experts
as you may deem necessary properly to advise you in connection with your
obligations hereunder, may rely upon the advice of such counsel, and may pay
such counsel reasonable compensation therefor.


                                      -2-
<PAGE>   73

        12. Your responsibilities as Escrow Agent hereunder shall terminate if
you shall cease to be an officer or agent of the Company or if you shall resign
by written notice to each party. In the event of any such termination, the
Company shall appoint a successor Escrow Agent.

        13. If you reasonably require other or further instruments in connection
with these Joint Escrow Instructions or obligations in respect hereto, the
necessary parties hereto shall join in furnishing such instruments.

        14. It is understood and agreed that should any dispute arise with
respect to the delivery and/or ownership or right of possession of the
securities held by you hereunder, you are authorized and directed to retain in
your possession without liability to anyone all or any part of said securities
until such disputes shall have been settled either by mutual written agreement
of the parties concerned or by a final order, decree or judgment of a court of
competent jurisdiction after the time for appeal has expired and no appeal has
been perfected, but you shall be under no duty whatsoever to institute or defend
any such proceedings.

        15. Any notice required or permitted hereunder shall be given in writing
and shall be deemed effectively given upon personal delivery or upon deposit in
the United States Post Office, by registered or certified mail with postage and
fees prepaid, addressed to each of the other parties thereunto entitled at the
following addresses or at such other addresses as a party may designate by ten
days' advance written notice to each of the other parties hereto.

        16. By signing these Joint Escrow Instructions, you become a party
hereto only for the purpose of said Joint Escrow Instructions; you do not become
a party to the Agreement.

        17. This instrument shall be binding upon and inure to the benefit of
the parties hereto, and their respective successors and permitted assigns.

        18. These Joint Escrow Instructions shall be governed by the internal
substantive laws, but not the choice of law rules, of California.

OPTIONEE                                    COSINE COMMUNICATIONS, INC.


-----------------------------------         ------------------------------------
Signature                                   By


-----------------------------------         ------------------------------------
Print Name                                  Title


Residence Address:

-----------------------------------

-----------------------------------

-----------------------------------




                                      -3-
<PAGE>   74

ESCROW AGENT



-----------------------------------
Corporate Secretary


Dated: ______________________,_____




                                      -4-
<PAGE>   75

                                   EXHIBIT C-4

                                CONSENT OF SPOUSE



        I, ____________________, spouse of ___________________, have read and
approve the foregoing Restricted Stock Purchase Agreement (the "Agreement"). In
consideration of granting of the right to my spouse to purchase shares of
____________________________, as set forth in the Agreement, I hereby appoint my
spouse as my attorney-in-fact in respect to the exercise of any rights under the
Agreement and agree to be bound by the provisions of the Agreement insofar as I
may have any rights in said Agreement or any shares issued pursuant thereto
under the community property laws or similar laws relating to marital property
in effect in the state of our residence as of the date of the signing of the
foregoing Agreement.


Dated: ___________________,_____            Signature:





                                      -5-
<PAGE>   76

                                   EXHIBIT C-5

                          ELECTION UNDER SECTION 83(b)
                      OF THE INTERNAL REVENUE CODE OF 1986

The undersigned taxpayer hereby elects, pursuant to Sections 55 and 83(b) of the
Internal Revenue Code of 1986, as amended, to include in taxpayer's gross income
or alternative minimum taxable income, as the case may be, for the current
taxable year the amount of any compensation taxable to taxpayer in connection
with taxpayer's receipt of the property described below:

1. The name, address, taxpayer identification number and taxable year of the
undersigned are as follows:

        NAME:                         TAXPAYER:                         SPOUSE:

        ADDRESS:

        IDENTIFICATION NO.:           TAXPAYER:                         SPOUSE:

        TAXABLE YEAR:

2. The property with respect to which the election is made is described as
   follows: __________ shares (the "Shares") of the Common Stock of CoSine
   Communications, Inc. (the "Company").

3. The date on which the property was transferred is:___________________
   ,______.

4. The property is subject to the following restrictions:

  The Shares may not be transferred and are subject to forfeiture under the
  terms of an agreement between the taxpayer and the Company. These restrictions
  lapse upon the satisfaction of certain conditions contained in such agreement.

5. The fair market value at the time of transfer, determined without regard to
   any restriction other than a restriction which by its terms will never lapse,
   of such property is: $_________________.

6. The amount (if any) paid for such property is: $_________________.

The undersigned has submitted a copy of this statement to the person for whom
the services were performed in connection with the undersigned's receipt of the
above-described property. The transferee of such property is the person
performing the services in connection with the transfer of said property.

The undersigned understands that the foregoing election may not be revoked
except with the consent of the Commissioner.

Dated: ______________________, _____        ____________________________________
                                            Taxpayer

The undersigned spouse of taxpayer joins in this election.

Dated: _____________________, ______        ____________________________________
                                            Spouse of Taxpayer
]