Hewlett-Packard Co. agreed to buy Aruba Networks Inc. for about $2.7 billion in an all-cash deal aimed at bolstering the tech company's wireless networking operations.

Aruba--based in Sunnyvale, Calif.--had revenues of $729 million last year, and it has reported compound annual revenue growth of 30% over the past five years, Hewlett-Packard said.

The deal values Aruba at $24.67 share, or about $3.0 billion, including cash and debt. Both companies' boards of directors have approved the deal.

Write to Tess Stynes at tess.stynes@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires