<PAGE>   1

                                                                    Exhibit 10.5


                           METROWEB TECHNOLOGIES, INC.

                           RESTRICTED STOCK AGREEMENT

     AGREEMENT made this 23rd day of October, 1998, between MetroWeb
Technologies, Inc., a Delaware corporation (the "Company"), and ____________
(the "Employee").

     For valuable consideration, receipt of which is acknowledged, the parties
hereto agree as follows:

     1.   PURCHASE OF SHARES.

     The Company shall issue and sell to the Employee, and the Employee shall
purchase from the Company, subject to the terms and conditions set forth in this
Agreement 1,213,000 shares (the "Shares") of common stock, $.001 par value, of
the Company ("Common Stock"), at a purchase price of $.001 per share. The
aggregate purchase price for the Shares shall be paid by the Employee by check
payable to the order of the Company or such other method as may be acceptable to
the Company. Upon receipt by the Company of payment for the Shares, the Company
shall issue to the Employee one or more certificates in the name of the Employee
for that number of Shares purchased by the Employee. The Employee agrees that
the Shares shall be subject to the purchase option set forth in Section 2 of
this Agreement and the restrictions on transfer set forth in Section 4 of this
Agreement.

     2.   PURCHASE OPTION.

     (a)  In the event that the Employee ceases to be employed by the Company
for any reason or no reason, with or without cause, prior to January 1, 2003 the
Company shall have the right and option (the "Purchase Option") to purchase from
the Employee, for a purchase price of $.001 per share (the "Option Price"), some
or all of the Unvested Shares (as defined below).

     "Unvested Shares" means the total number of Shares multiplied by the
Applicable Percentage at the time the Purchase Option becomes exercisable by the
Company. The "Applicable Percentage" shall be (i) 100% as of the date of this
Agreement; (ii) reduced by 25% on the date of the closing of the Company's
initial sale of Series A Convertible Preferred Stock (the "Equity Financing");
(iii) reduced by 2.083% on the first day of each month following the first
anniversary of the Equity Financing for as long as the Employee remains employed
by the Company and (iv) reduced to 0% on the fourth anniversary of the Equity
Financing.

     (b)  Notwithstanding the foregoing, immediately prior to an Acquisition (as
defined below) pursuant to which the Employee is not offered employment with the
surviving entity for a period that terminates after the date that is six months
prior to the fourth anniversary of the Equity Financing with an annual salary
greater than or equal to that in effect prior to the Acquisition, and upon such
other terms and conditions substantially similar in all material respects to the
terms and conditions in effect prior to the Acquisition (a "Qualified Offer"),
or a Qualified IPO (as defined below) or upon the death or disability of the
Employee, the Applicable Percentage shall be reduced to 0%. In the event of an
Acquisition in connection with which the

<PAGE>   2


Employee receives a Qualified Offer, the Applicable Percentage shall be reduced
by 12.50%; provided, however, that to the extent some or all of the
consideration to be delivered to holders of capital stock of the Company
consists of cash or cash equivalents, the Employee shall be entitled to receive,
at the time such consideration is delivered to holders of Shares not subject to
the Purchase Option, all such cash or cash equivalents as applicable with
respect to the Employee's Shares whether or not such Shares are Unvested Shares.

     (c)  "Disability" shall mean the inability of the Employee, due to a
physical or mental disability, for a period of 90 days, whether or not
consecutive, during any 360-day period to carry out his or her duties as an
Employee of the Company. A determination of disability shall be made by a
physician satisfactory to both the Employee and the Company, PROVIDED THAT if
the Employee and the Company do not agree on a physician, the Employee and the
Company shall each select a physician and these two together shall select a
third physician, whose determination as to disability shall be binding on all
parties.

     (d)  "Acquisition" shall mean (i) the consolidation or merger of the
Company (other than a merger to reincorporate the Company in a different
jurisdiction) into or with any other entity or entities in which the shares of
the Company outstanding immediately prior to the closing of such event represent
or are converted into shares of the surviving or resulting entity that represent
less than a majority of the total number of shares of the surviving or resulting
entity that are outstanding or are reserved for issuance upon the exercise or
conversion of outstanding securities immediately after the closing of such
event, or (ii) the sale or transfer after the Company's initial sale of its
Series A Convertible Preferred Stock of fifty percent (50%) or more of the
capital stock of the Company in a single transaction or series of related
transactions or (iii) the sale of all or substantially all of the assets of the
Company. A "Qualified IPO" shall mean the first underwritten public offering
pursuant to an effective registration statement on Form S-1 (or its then
equivalent) under the Securities Act of 1993, as amended, (the "Securities Act")
pursuant to which the aggregate price paid by the public for the purchase of the
Company's Common Stock is at least $20,000,000 and the price per share is at
least $5.00.

     (e)  For purposes of this Agreement, employment with the Company shall
include employment with a parent or subsidiary of the Company.

     3.   EXERCISE OF PURCHASE OPTION AND CLOSING.

     (a)  The Company may exercise the Purchase Option by delivering or mailing
to the Employee (or his estate), within 60 days after the termination of the
employment of the Employee with the Company, a written notice of exercise of the
Purchase Option. Such notice shall specify the number of Shares to be purchased.
If and to the extent the Purchase Option is not so exercised by the giving of
such a notice within such 60-day period, the Purchase Option shall automatically
expire and terminate effective upon the expiration of such 60-day period.

     (b)  Within 10 days after delivery to the Employee of the Company's notice
of the exercise of the Purchase Option pursuant to subsection (a) above, the
Employee (or his estate) shall tender to the Company at its principal offices
the certificate or certificates representing the Shares which the Company has
elected to purchase in accordance with the terms of this Agreement, duly
endorsed in blank or with duly endorsed stock powers attached thereto, all in


                                      -2-

<PAGE>   3


form suitable for the transfer of such Shares to the Company. Promptly following
its receipt of such certificate or certificates, the Company shall pay to the
Employee the aggregate Option Price for such Shares (provided that any delay in
making such payment shall not invalidate the Company's exercise of the Purchase
Option with respect to such Shares).

     (c)  After the time at which any Shares are required to be delivered to the
Company for transfer to the Company pursuant to subsection (b) above, the
Company shall not pay any dividend to the Employee on account of such Shares or
permit the Employee to exercise any of the privileges or rights of a stockholder
with respect to such Shares, but shall, in so far as permitted by law, treat the
Company as the owner of such Shares.

     (d)  The Option Price may be payable, at the option of the Company, in
cancellation of all or a portion of any outstanding indebtedness of the Employee
to the Company or in cash (by check) or both.

     (e)  The Company shall not purchase any fraction of a Share upon exercise
of the Purchase Option, and any fraction of a Share resulting from a computation
made pursuant to Section 2 of this Agreement shall be rounded to the nearest
whole Share (with any one-half Share being rounded upward).

     (f)  The Company may assign its Purchase Option to one or more persons or
entities.

     4.   RESTRICTIONS ON TRANSFER.

     The Employee shall not sell, assign, transfer, pledge, hypothecate or
otherwise dispose of, by operation of law or otherwise (collectively "transfer")
any Shares, or any interest therein, that are subject to the Purchase Option,
except that the Employee may transfer such Shares to or for the benefit of any
spouse, child or grandchild, or to a trust for their benefit, PROVIDED that such
Shares shall remain subject to this Agreement (including without limitation the
restrictions on transfer set forth in this Section 4 and the Purchase Option)
and such permitted transferee shall, as a condition to such transfer, deliver to
the Company a written instrument confirming that such transferee shall be bound
by all of the terms and conditions of this Agreement.

     5.   AGREEMENT IN CONNECTION WITH PUBLIC OFFERING.

     The Employee agrees, in connection with the initial underwritten public
offering of the Company's securities pursuant to a registration statement under
the Securities Act, (i) not to sell, make short sale of, loan, grant any options
for the purchase of, or otherwise dispose of any shares of Common Stock held by
the Employee (other than those shares included in the offering) without the
prior written consent of the Company or the underwriters managing such initial
underwritten public offering of the Company's securities for a period of 180
days from the effective date of such registration statement, and (ii) to execute
any agreement reflecting clause (i) above as may be requested by the Company or
the managing underwriters at the time of such initial offering.

     6.   EFFECT OF PROHIBITED TRANSFER.


                                      -3-

<PAGE>   4


     The Company shall not be required (a) to transfer on its books any of the
Shares which shall have been sold or transferred in violation of any of the
provisions set forth in this Agreement, or (b) to treat as owner of such Shares
or to pay dividends to any transferee to whom any such Shares shall have been so
sold or transferred.

     7.   RESTRICTIVE LEGENDS.

     All certificates representing Shares shall have affixed thereto legends in
substantially the following form, in addition to any other legends that may be
required under federal or state securities laws:

          "The shares of stock represented by this certificate are subject to
          restrictions on transfer and an option to purchase set forth in a
          certain Restricted Stock Agreement between the corporation and the
          registered owner of these shares (or his predecessor in interest), and
          such Agreement is available for inspection without charge at the
          office of the Secretary of the corporation."

          "The shares represented by this certificate have not been registered
          under the Securities Act of 1933, as amended, and may not be sold,
          transferred or otherwise disposed of in the absence of an effective
          registration statement under such Act or an opinion of counsel
          satisfactory to the corporation to the effect that such registration
          is not required."

     8.   ADJUSTMENTS FOR STOCK SPLITS, STOCK DIVIDENDS, ETC.

     (a)  If from time to time there is any stock split, stock dividend, stock
distribution or other reclassification of the Common Stock of the Company, any
and all new, substituted or additional securities to which the Employee is
entitled by reason of his ownership of the Shares shall be immediately subject
to the purchase options, the restrictions on transfer and the other provisions
of this Agreement in the same manner and to the same extent as the Shares, and
the Option Price shall be appropriately adjusted.

     (b)  If the Shares are converted into or exchanged for, or stockholders of
the Company receive by reason of any distribution in total or partial
liquidation, securities of another corporation, or other property (including
cash), pursuant to any merger of the Company or acquisition of its assets, then
the rights of the Company under this Agreement shall inure to the benefit of the
Company's successor and this Agreement shall apply to the securities or other
property received upon such conversion, exchange or distribution in the same
manner and to the same extent as to the Shares.

     9.   INVESTMENT REPRESENTATIONS.

     The Employee represents, warrants and covenants as follows:

     (a)  The Employee is purchasing the Shares for his own account for
investment only, and not with a view to, or for sale in connection with, any
distribution of the Shares in violation of the Securities Act, or any rule or
regulation under the Securities Act.


                                      -4-

<PAGE>   5

     (b)  The Employee has had such opportunity as he has deemed adequate to
obtain from representatives of the Company such information as is necessary to
permit him to evaluate the merits and risks of his investment in the Company.

     (c)  The Employee has sufficient experience in business, financial and
investment matters to be able to evaluate the risks involved in the purchase of
the Shares and to make an informed investment decision with respect to such
purchase.

     (d)  The Employee can afford a complete loss of the value of the Shares and
is able to bear the economic risk of holding such Shares for an indefinite
period.

     (e)  The Employee understands that (i) the Shares have not been registered
under the Securities Act and are "restricted securities" within the meaning of
Rule 144 under the Securities Act, (ii) the Shares cannot be sold, transferred
or otherwise disposed of unless they are subsequently registered under the
Securities Act or an exemption from registration is then available; (iii) in any
event, the exemption from registration under Rule 144 will not be available for
at least one year and even then will not be available unless a public market
then exists for the Common Stock, adequate information concerning the Company is
then available to the public, and other terms and conditions of Rule 144 are
complied with; and (iv) there is now no registration statement on file with the
Securities and Exchange Commission with respect to any stock of the Company and
the Company has no obligation or current intention to register the Shares under
the Securities Act.

     10.  WITHHOLDING TAXES; SECTION 83(b) ELECTION.

     (a)  The Employee acknowledges and agrees that the Company has the right to
deduct from payments of any kind otherwise due to the Employee any federal,
state or local taxes of any kind required by law to be withheld with respect to
the purchase of the Shares by the Employee or the lapse of the Purchase Option.

     (b)  The Employee acknowledges that he has been informed of the
availability of making an election in accordance with Section 83(b) of the
Internal Revenue Code of 1986, as amended; that such election must be filed with
the Internal Revenue Service within 30 days of the transfer of shares to the
Employee; and that the Employee is solely responsible for making such election.

     11.  NO RIGHTS TO EMPLOYMENT. Nothing contained in this Agreement shall be
construed as giving the Employee any right to be retained, in any position, as
an employee of the Company.

     12.  SEVERABILITY.

The invalidity or unenforceability of any provision of this Agreement shall not
affect the validity or enforceability of any other provision of this Agreement,
and each other provision of this Agreement shall be severable and enforceable to
the extent permitted by law.


                                      -5-

<PAGE>   6


     13.  WAIVER.

     Any provision for the benefit of the Company contained in this Agreement
may be waived, either generally or in any particular instance, by the Board of
Directors of the Company.

     14.  BINDING EFFECT.

     This Agreement shall be binding upon and inure to the benefit of the
Company and the Employee and their respective heirs, executors, administrators,
legal representatives, successors and assigns, subject to the restrictions on
transfer set forth in Section 4 of this Agreement.

     15.  NOTICE.

     All notices required or permitted hereunder shall be in writing and deemed
effectively given upon personal delivery or five days after deposit in the
United States Post Office, by registered or certified mail, postage prepaid,
addressed to the other party hereto at the address shown beneath his or its
respective signature to this Agreement, or at such other address or addresses as
either party shall designate to the other in accordance with this Section 15.

     16.  PRONOUNS.

     Whenever the context may require, any pronouns used in this Agreement shall
include the corresponding masculine, feminine or neuter forms, and the singular
form of nouns and pronouns shall include the plural, and vice versa.

     17.  ENTIRE AGREEMENT.

     This Agreement constitutes the entire agreement between the parties, and
supersedes all prior agreements and understandings, relating to the subject
matter of this Agreement.

     18.  AMENDMENT.

     This Agreement may be amended or modified only by a written instrument
executed by both the Company and the Employee.

     19.  GOVERNING LAW.

     This Agreement shall be construed, interpreted and enforced in accordance
with the internal laws of the State of Delaware without regard to any applicable
conflicts of laws.

                                      -6-

<PAGE>   7


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

                                   METROWEB TECHNOLOGIES, INC.


                                   By:
                                      --------------------------------------
                                   Title:
                                         -----------------------------------
                                   Address:
                                           ---------------------------


                                   Employee ______________

                                   Address:



                                      -7-

<PAGE>   8



                       QUANTUM BRIDGE COMMUNICATIONS, INC.

                  AMENDMENT NO. 1 TO RESTRICTED STOCK AGREEMENT

     This Amendment No. 1 made this 12th day of June, 2000, between Quantum
Bridge Communications, Inc., a Delaware corporation (the "Company") and
_________ (the "Employee").

     WHEREAS, on October 23, 1998, MetroWeb Technologies, Inc. and the Employee
entered into a certain Restricted Stock Agreement (the "Agreement");

     WHEREAS, Quantum Bridge Communications, Inc. is the successor in interest
of MetroWeb Technologies, Inc. and thus has succeeded to the rights and
responsibilities of MetroWeb Technologies, Inc. as set forth in the Agreement;
and

     WHEREAS, the Company and the Employee each desire to amend the Agreement.

     NOW THEREFORE, for good and valuable consideration, the parties hereby
agree as follows:

     1.   Section 2 of the Agreement is hereby amended by inserting after
paragraph (e) thereof the following paragraph (f):

     "(f) Notwithstanding the above, in the event that the Employee's employment
with the Company is terminated by the Company without Cause (as defined below)
or by the Employee with Good Reason (as defined below), prior to January 1,
2003, then, the Applicable Percentage shall be reduced to 0%.

     For the purposes of this Agreement, "Cause" for termination shall mean (a)
the Employee's gross negligence or willful or intentional misconduct in the
performance of his duties on behalf of the Company and, in the case of
misconduct, the failure to refrain from such misconduct after written notice
thereof; (b) any act of dishonesty which materially and adversely affects the
Company or any act or omission which constitutes a knowing and intentional
violation of law on the part of the Employee and which materially and adversely
affects the Company; (c) such Employee's breach of his fiduciary duty of loyalty
or care to the Company; or (d) the substantial and continuing, after reasonable
written notice thereof, failure of the Employee to render services to the
Company in accordance with his assigned duties, which materially and adversely
affects or is reasonably likely to materially and adversely affect the business,
financial condition, operations, property or affairs of the Company;

     For the purposes of this Agreement, "Good Reason" shall exist upon (i)
mutual agreement of the Employee and the Board of Directors of the Company that
Good Reason exists; (ii) the Employee being required by the Company to relocate
from the area within fifty (50) miles of the intersection of Interstates 93 and
495, prior to October 23, 2001 without the consent of the Employee; (iii)
relocation of the Employee's primary place of business to a location that


<PAGE>   9


results in an increase in the Employee's daily one way commute of at least 35
miles prior to October 23, 2001; (iv) reduction of the Employee's annual base
salary or health insurance and similar benefits; (v) any material breach by the
Company or any successor thereto of any agreement to which the Employee and the
Company are parties, which breach is not cured within 10 days after written
notice thereof; or (vi) demotion of the Employee to a position below that of
Vice President and/or requiring the Employee to report to an employee of the
Company other than the then-current Chief Executive Officer of the Company."

     2.   Except as amended hereby, the Agreement shall remain in full force and
effect.

     3.   This Amendment may be executed in counterparts, each of which shall be
an original, but such counterparts together constitute but one and the same
instrument.


<PAGE>   10


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



                                    QUANTUM BRIDGE COMMUNICATIONS, INC.

                                    By:
                                       ----------------------------------
                                    Print name:
                                    Title:

                                    -------------------------------------
                                    Employee