1

                                                                     Exhibit 5.1


                                HALE AND DORR LLP
                               Counsellors at Law
                                 60 State Street
                           Boston, Massachusetts 02109

                                October 20, 1997

Shiva Corporation
28 Crosby Drive
Bedford, Massachusetts 01730

Ladies and Gentlemen:

         We have assisted in the preparation of a Registration Statement on Form
S-8 (the "Registration Statement") to be filed with the Securities and Exchange
Commission relating to 1,000,000 shares (the "Shares") of Common Stock, $.01 par
value per share, of Shiva Corporation, a Massachusetts corporation ("Shiva"),
issuable under the 1997 Employee Stock Incentive Plan (the "Plan").

         We have examined the Restated Articles of Organization of the Company,
as amended, the Restated By-laws of the Company, as amended, and originals, or
copies certified to our satisfaction, of all pertinent records of the meetings
of the directors and stockholders of the Company, the Registration Statement and
such other documents relating to the Company as we have deemed material for the
purposes of this opinion.

         In examination of the foregoing documents, we have assumed the
genuineness of all signatures and the authenticity of all documents submitted to
us as originals, the conformity to original documents of all documents submitted
to us as certified, photostatic or facsimile copies, and the authenticity of the
originals of any such documents.

         Based upon and subject to the foregoing, we are of the opinion that the
Shares have been duly authorized for issuance, and the Shares, when issued and
paid for in accordance with the terms of the Options at a price per share at
least equal to the par value per share for such Shares, will be legally issued,
fully paid and nonassessable.

         We hereby consent to the filing of this opinion with the Securities and
Exchange Commission in connection with the Registration Statement.

                                         Very truly yours,

                                         /s/ Hale and Dorr LLP

                                         HALE AND DORR LLP