Pro-Palestine rallies have been packed by thousands of attendees in Sydney and Melbourne, after political leaders warned demonstrators to keep the peace.