2
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?
2
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?
2
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
1What 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 – 2013-01-14T20:25:19.250man ip
would tell you all you need. – WeloSefer – 2013-01-14T22:53:06.810