Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For IPv4 we use:

ip rule add from (ipv4 address) table 60
ip route -net (ipv4 address) mask (ipv4 mask) (interface number)

How do I use the ip rule and ip route commands for IPv6 addresses?

share|improve this question
What happens when you use the exact same syntax for an IPv6 rule and route, but with the -6 option or -family inet6 where appropriate? – Zoredache Jan 14 '13 at 20:25
man ip would tell you all you need. – WeloSefer Jan 14 '13 at 22:53

The equivalent IPv6 versions require you to use "-6":

Add rule:

ip -6 rule add from 1234:5678:9abc:def0::/64 table 60 

Add route:

ip -6 route 1234:5678:9abc:def0::/64 dev eth0
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.