3

When I try to add an IP rule for IPv6 on my Linux system, it errors out:

$ ip -6 rule add fwmark 0xfab lookup 0xf RTNETLINK answers: Address family not supported by protocol 

I checked out the IP rule code; it issues a netlink message to the kernel. Probably I need to load some module, but I don't know which. What do I need to do to fix this?

I am using linux 2.6.37.3 built from kernel sources

Solution: By default linux build doesn't support multiple routing tables for IPv6. You need to enable CONFIG_IPV6_MULTIPLE_TABLES for multiple IPv6 routing table support.

1
  • Solution given in question works. Commented Mar 29, 2013 at 22:11

2 Answers 2

1

IPv6 functionality is available to the system by the ipv6 kernel module. To check if this module is currently loaded in your system, issue the following command as root:

lsmod | grep ipv6

If you see ipv6 in its output, then the module is loaded.

Check your /etc/modprobe.conf and see if ipv6 is disabled.

alias ipv6 off options ipv6 disable=1 

It should be

alias net-pf-10 ipv6 

Further check the interface specific configuration file: (If you are using a RedHat style distribution like Fedora, CentOS etc.,)

In /etc/sysconfig/network-scripts/ifcfg-eth0

IPV6INIT=yes IPV6_AUTOCONF=yes 

In /etc/sysconfig/network file, if it exists:

NETWORKING_IPV6=yes 

And then restart network service And restart the system for cleanly loading the ipv6 kernel module.

1
  • Nikhil, In fact Ipv6 is enabled in my linux box, and I have configured Ipv6 address too. Everything works fine , but I am trying to add an ip rule for Ipv6 which is failing. Commented Jan 4, 2012 at 7:21
1

I don't see lookup as a valid option to any ip object. Action for rules include table, nat, prohibit recject, unreachable or realms. From the form of your command I expect you want table. Try

ip -6 rule add fwmark 0xfab table 0xf 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.