SAN FRANCISCO — Long-time outside counsel sat on both sides of the table as Cisco Systems Inc. struck a deal to acquire cybersecurity company Sourcefire Inc. for $2.7 billion.

The networking equipment giant was represented by San Francisco-based partner Douglas Cogen and others at Fenwick & West. Northern Virginia partners Lawrence Yanowitch and Charles Katz led the Morrison & Foerster team that advised Sourcefire, which offers firewall and malware protection, among other cybersecurity services.