Cisco Systems Inc. on Tuesday said it agreed to buy closely held OpenDNS for $635 million, the latest move by the networking giant to boost its security business.

OpenDNS, founded in 2006, maintains a network of domain name servers to help route Web traffic in competition with those provided by Internet service providers and telecommunications carriers. Individuals and companies use OpenDNS services to reach websites more quickly, among other purposes. The San Francisco-based company claims 65 million users and operates from...