In the context of a polymicrobial infection, treating a specific pathogen poses challenges because of unknown consequences on other members of the community. The presence of ecological interactions between microbes can change their physiology and response to treatment. For example, in the cystic fibrosis lung polymicrobial infection, antimicrobial susceptibility testing on clinical isolates is often not predictive of antibiotic efficacy. Novel approaches are needed to identify the interrelationships within the microbial community to better predict treatment outcomes. Here we used an ecological networking approach on the cystic fibrosis lung microbiome characterized using 16S rRNA gene sequencing and metagenomics. This analysis showed that the community is separated into three interaction groups: Gram-positive anaerobes, Pseudomonas aeruginosa, and Staphylococcus aureus. The P. aeruginosa and S. aureus groups both anti-correlate with the anaerobic group, indicating a functional antagonism. When patients are clinically stable, these major groupings were also stable, however, during exacerbation, these communities fragment. Co-occurrence networking of functional modules annotated from metagenomics data supports that the underlying taxonomic structure is driven by differences in the core metabolism of the groups. Topological analysis of the functional network identified the non-mevalonate pathway of isoprenoid biosynthesis as a keystone for the microbial community, which can be targeted with the antibiotic fosmidomycin. This study uses ecological theory to identify novel treatment approaches against a polymicrobial disease with more predictable outcomes.