Non-lactone carbocyclic and heterocyclic antagonists and agonists of bacterial quorum sensing. Pharmaceutical composition containing antagonists. Methods employing antagonists and agonists for modulation of quorum sensing. Compounds are exemplified by those of formula:A-[Z]n-L1-[Y]q-W-[V]m-L2-HG,where A is an acyclic aliphatic group, and HG is an optionally substituted phenyl group. Compounds include those where m and n are both 0, W is —NH—, Y is present and is —CO—CH2—CO—, and L1 and L2 independently are —[CH2]p1— and —[CH2]p2—, where p1 and p2, independently, are 0 or integers ranging from 1-10.