A motion rejecting the referendum was approved yesterday by 272 MPs from the country's mainstream parties against 43 votes from Catalonian nationalist groups and some leftist politicians.
It calls on the government to ensure compliance with the law and the constitution, under which only the central government can call a referendum.
The Barcelona-based regional government of Catalonia plans to hold the referendum on November 9 but the Spanish government has made it clear it will not be allowed.
Polls indicate that Catalans are roughly evenly split on independence.
The Spanish prime minister Mariano Rajoy previously said he would not let Catalonia hold an independence referendum.
Mr Rajoy said: "As long as I am prime minister there will not be independence."
Mr Rajoy has also asserted an independent Scotland would be "left outside the EU" and required to negotiate membership from scratch with all 28 member states in the event of a Yes vote.