Networks in the CNS consist of neural modules that are connected in a repetitive array. Whereas individual modules contain guidance information along which axons track within the unit, these guidance cues hinder axon extension across module boundaries. We investigated how axons solve this 'boundary problem' by analyzing the longitudinal connections of neuromeres in Drosophila melanogaster. The initial trajectory of the longitudinal axons is guided by Netrin, which is localized on commissural axons by its receptor, Frazzled. The Netrin cue on the commissure of the next segment can act as a barrier to longitudinal axons, inhibiting their extension and misguiding them contralaterally along the commissure. We show that, before reaching the segmental boundary, the longitudinal axons' responsiveness to Netrin presented on the commissure is suppressed by Roundabout (ROBO), through counteracting Gq signaling. The absence of suppression causes the robo phenotype: longitudinal axons project toward the midline, as if running around a roundabout (rotary).