Arista Networks (ANET 2.33%) and Juniper Networks (JNPR -0.64%) are often overshadowed by Cisco (CSCO 0.37%) in the networking hardware market. But over the past three years, Arista's stock has surged more than 300% -- compared to Cisco's 90% gain and Juniper's anemic 10% growth.

Let's see why Arista constantly outperformed its industry peers as Juniper remained a laggard and whether that trend will continue in the future.

A network of cloud computing connections.

Image source: Getty Images.

The key differences between Arista and Juniper

Arista sells networking switches that are optimized for software-defined networking (SDN) solutions. This means that its switches are less powerful than Cisco's traditional switches, but they're cheaper and rely on its cloud-based EOS platform to do the heavy lifting. Arista also offers an open-source version of EOS to "white box" networks, which use generic hardware.

SDN solutions and white box networks are cheaper, more flexible, and more scalable than hardware and software bundles from companies like Cisco, which lock in enterprise customers with all-in-one proprietary solutions. Arista also believes that it can completely replace traditional routers with its FlexRoute software.

Juniper mainly sells traditional routers and switches. But like Arista, Juniper also expanded into the cloud market with its QFX switches for data centers. It also introduced new SDN solutions and launched SDN-optimized routers.

However, Juniper's transition from pricier hardware to cheaper cloud-based hardware throttled its revenue and earnings growth in recent years. Meanwhile, the rise of virtualization (which requires less on-site networking hardware), the growth of SDN players like Arista, and the rising adoption of white box hardware exacerbated the pain.

Servers in a data center.

Image source: Getty Images.

How fast are Arista and Juniper growing?

Arista's share of the global switching market rose from 5.5% to 6.6% between the second quarters of 2017 and 2018, according to IDC. The firm contributed that growth to Arista's growth in the hyperscale and public cloud provider markets. The company doesn't sell traditional routers.

During the same period, Juniper's share of the switching market fell from 4.3% to 3.8%. Its share of the enterprise and service provider router market also dropped from 14.6% to 12.8%. The company seems to be getting lost in the shuffle between bigger traditional networking hardware players like Cisco and Huawei on one end, and disruptive SDN players like Arista on the other.

That's why Arista's revenue and earnings growth consistently outpaced Juniper's numbers over the past year.

Arista:

Metric Q3 2017 Q4 2017 Q1 2018 Q2 2018
Revenue 51% 43% 41% 28%
Net income* 109% 77% 87% 48%

Year-over-year growth. *Non-GAAP. Data source: Quarterly reports.

Juniper:

Metric Q3 2017 Q4 2017 Q1 2018 Q2 2018
Revenue (2%) (11%) (11%) (8%)
Net income* (5%) (22%) (44%) (23%)

Year-over-year growth. *Non-GAAP. Data source: Quarterly reports.

Arista also has consistently higher gross margins than Juniper, since it doesn't sell lower-margin routers.

ANET Gross Profit Margin (TTM) Chart

ANET Gross Profit Margin (TTM) data by YCharts.

Based on those numbers, Arista clearly looks like a stronger investment than Juniper. However, Arista faces three headwinds: decelerating growth, a premium valuation, and tougher competition.

Wall Street expects Arista's revenue and earnings to grow 29% and 31%, respectively, this year. But at $260, the stock already trades at 35 times this year's earnings -- indicating that its upside potential could be limited. Arista will likely keep buying smaller companies (like its recent acquisition of Mojo Networks) to keep growing, but that strategy could throttle its earnings growth.

In the meantime, Arista faces tougher competition in the SDN market from bigger competitors like Cisco, which will likely strengthen its cloud networking arm Meraki to counter Arista's switches.

Juniper, though, faces much lower expectations than Arista. Analysts still expect its sales to fall 6% this year as its earnings drop 16%, but both figures are expected to return to growth next year on the strength of its QFX switches, which it now bundles with its Contrail Enterprise Multicloud platform for cloud service providers.

At $30, Juniper trades at 17 times this year's earnings estimate. That's not really cheap, since Cisco -- which is expected to post positive earnings growth this year -- trades at 16 times this year's earnings. However, Juniper still pays a decent forward dividend yield of 2.4%.

The winner: Arista Networks (but wait for a pullback)

Arista has some flaws, but it's still a forward-thinking disruptor of the networking hardware market, which lacks the legacy baggage of companies like Juniper and Cisco. Its strong growth, stable margins, and ability to keep stealing market share away from bigger competitors make it a compelling long-term buy. But investors should probably wait for Arista's stock to cool off a bit before starting a new position.