I was wondering how it would be possible to have multiple IPv6 default gateways on CentOS linux. I currently have two interfaces with IPv6 (venet0 and tb0), both with different blocks routed to them. I was wondering if I could have have one application (which routes from the tun0 interface to the IPv6 one for IPv6 traffic), and use the tb0 interface. Then for everything else, like the general system and other programs, use the main venet0 interface. Is there some way to do this by filtering the packets using IPTables or iproute2?

In other words, there are two interfaces with IPv6 with different blocks routed to them, and I would like to have one application running on the server use the one interface, while everything else uses the other. However, when setting the default gateway for IPv6, the opposite interface is not routed properly and does not work. (I am using route -A inet6 to check.)

  • Ideally the gateway should be what fans out the traffic to the different routes it should take. If for some reason you really need to do it this way (meaing having the different networks converge on the host rather than on a router) you can do so with policy based routing. Here is a fix I found for IPv4 on RHEL/CentOS. I would imagine IPv6 would be very similar. – Bratchley Jun 16 '15 at 19:57
  • Actually looking at Christopher's post, it looks like he found the same basic answer. His question involves the steps for Debian as well, though. – Bratchley Jun 16 '15 at 20:00
  • Thanks, it seems to be working now with an iproute2 table and a few default gateway changes! I had another question however, what if the two IPv6 blocks were on the one default interface (venet0) instead of two, would there be a way to use the tables for that scenario? – AwesomeMarioFan Jun 16 '15 at 23:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.