Arista Networks (ANET 1.43%) and Cisco Systems (CSCO 0.06%) represent two different ways to invest in the networking hardware and services market.

Cisco is the world's largest manufacturer of routers and switches, and bundles various enterprise software and security services with its products. Arista mainly sells switches, and it aims to replace traditional routers with a combination of switches and software-defined networking solutions.

Over the past 12 months, Arista's stock price has rallied nearly 50% as Cisco's stock price has advanced about 20%. Let's see why the underdog outperformed the market leader -- and if that trend will continue in the future.

A visualization of networking connections across the globe.

Image source: Getty Images.

The state of the networking market

Cisco controlled 49.9% of the global ethernet switch market in the third quarter of 2020, according to IDC, and 35.5% of the router market. It lost ground in both markets compared to a year earlier, when it held 51.3% and 37.9% of the switch and router markets, respectively. Arista controlled 6.4% of the switching market in the third quarter, compared to its 7.6% share a year earlier.

Cisco designs custom chips for its hardware, but Arista's hardware mainly runs on cheaper third-party chips. That key difference enables Arista to provide customers with more flexible networking solutions than Cisco, which locks its customers into a walled garden of its own hardware, software, and services.

Cisco and Arista could both be losing customers to Huawei, which controlled 10.4% and 28.3% of the switching and router markets, respectively, in the third quarter. The Chinese tech giant expanded in both markets throughout the year, even as the U.S. tried to curb its growth with blacklists and sanctions.

Which company is growing faster?

Cisco's revenue fell 5% to $49.3 billion in fiscal 2020, which ended last July, as its adjusted EPS grew 4%.

Its infrastructure platforms revenue, which mainly comes from switches and routers, dropped 10% due to postponed upgrades during the pandemic, tougher competition, and its loss of orders in China amid the trade war. However, its 12% growth in security revenue partly cushioned that blow.

In the first six months of fiscal 2021, Cisco's revenue fell another 5% year over year to $23.9 billion as a 10% drop in its infrastructure revenue erased its 8% growth in security revenue. Its adjusted EPS also slipped 4%, even as it continued to repurchase shares through the pandemic.

Cisco's revenue has declined year over year for five straight quarters, but it expects that losing streak to end in the third quarter as its revenue rises 3.5%-5.5% and its adjusted earnings increase 1%-4%.

Arista's revenue dropped 4% to $2.32 billion in fiscal 2020, which aligns with the calendar year, as it struggled with the same sluggish enterprise spending, competition, and pandemic-related headwinds as Cisco. Its adjusted earnings dropped 7%.

However, Arista returned to growth before Cisco, as its fourth-quarter revenue and adjusted earnings grew 17% and 8%, respectively. It expects its first-quarter revenue to rise 20%-22% year over year.

Gauging their strengths and weaknesses

Arista's networking solutions can help enterprise and cloud companies reduce their expenses by replacing traditional routers with a flexible combination of switches, its software platform EOS, and other services.

It expects robust demand from cloud giants like Microsoft and the secular shift toward seamless cloud environments to drive its long-term growth. It also expects a rising mix of higher-margin software and services to boost its profits as cyclical demand for network upgrades heats up again.

Analysts expect Arista's revenue and earnings to increase 16% and 11%, respectively, this year. However, its stock isn't cheap at 28 times forward earnings, and it doesn't pay a dividend.

Two IT professionals walk through a data center.

Image source: Getty Images.

Cisco's main advantages are its reputation and scale, which enable it to bundle additional applications (such as Webex) and security software with its networking hardware. It's a walled garden, but it's still a cost-efficient one for many companies.

It also has $30.6 billion in cash, cash equivalents, and investments, which gives it plenty of room for future investments, acquisitions, and massive buybacks. Arista only had $2.9 billion in cash, cash equivalents, and marketable securities at the end of 2020.

Cisco probably won't win back many customers in China, but steady demand for its products in other markets -- especially its Nexus 9K data center switches and Cat 9K switches for enterprise customers -- should cushion that blow. It should also continue to expand its higher-margin services segment while leveraging its takeover of Acacia Communications to streamline its supply chain and sell faster networking hardware to data center customers.

Wall Street expects Cisco's revenue and earnings to stay flat this year. But in fiscal 2022, analysts expect its revenue and earnings to rise 4% and 6%, respectively, as its core infrastructure business recovers. The stock trades at just 15 times forward earnings and pays a forward dividend yield of 2.9%.

The winner: Cisco

Arista's earlier recovery seems to have impressed investors over the past year, but Cisco could benefit more from rising bond yields and the resulting rotation from growth to value stocks.

Arista is still a solid long-term investment, but Cisco's superior scale, better-diversified business, lower valuation, and attractive dividend all make it a more compelling buy right now.