How long in advance do I need to book to secure a fixed seat on the ferry?

On long-distance routes, it is advisable to book at least 2 days in advance.