Lyon's win over La Rochelle confirmed it will have a home quarter-final in the Top 14 play-offs.
Perpignan was already relegated and it was heavily beaten in its final home fixture as Racing ran in eight tries to move up to fourth in the table.
Six of those scores were shared equally between two men — Louis Dupichot and Simon Zebo each grabbing hat-tricks — while Dominic Bird and Finn Russell also touched down.
Jonathan Wisniewski's 19 points with the boot helped Lyon to a 29-19 victory that saw La Rochelle slip out of the top four.
Charlie Ngatai's try saw Lyon move ahead in the 51st minute, with Wisniewski slotting over two conversions, four penalties and a drop goal in a fine individual performance.
Castres also moved above La Rochelle into fifth as Wilfrid Hounkpatin and Loic Jacquet crossed either side of half-time in a 17-10 success over Agen.
Pau ensured its safety with a 22-0 triumph over Grenoble, which will contest a relegation play-off.