Project

General

Profile

Característica #207

IPv6 throw routes

Added by Pau Escrich over 6 years ago. Updated 3 days ago.

Status:
Nou
Priority:
Normal
Assignee:
-
Category:
Init scripts
Target version:
Start date:
02/12/2013
Due date:
% Done:

0%


Description

A new approach in the IPv6 throw routes should be considered.
The current one (bmx6 adding throw rules to the routing table) is not compatible at all with IPv6.
There have been a discussion in the mailing list, this is the last mail from Axel which explains mostly what should be done.

You can not have the same route with the same metric. But with a different metric it is possible!
udhcpc for example allows setting the metric via /etc/config/network interface metric option
(look at UPCc6-ab: where I tested: uci set network.wan0.metric=2048, and that worked).
After a /etc/init.d/network restart ip r shows:
  root@UPCc6-ab:~# ip r
  169.254.171.0/29 dev wlan0  proto kernel  scope link  src 169.254.171.1
  10.228.205.0/28 dev br-lan  proto kernel  scope link  src 10.228.205.1
  10.228.207.0/24 dev eth0  proto kernel  scope link  src 10.228.207.3
  default via 10.228.207.1 dev eth0  metric 2048

instead of:
  default via 10.228.207.1 dev eth0
where no metric means metric=0

and bluntly adding another default route:
root@UPCc6-ab:~# ip r add default via 10.228.207.123 dev eth0 metric 10000
root@UPCc6-ab:~# ip r
169.254.171.0/29 dev wlan0  proto kernel  scope link  src 169.254.171.1
10.228.205.0/28 dev br-lan  proto kernel  scope link  src 10.228.205.1
10.228.207.0/24 dev eth0  proto kernel  scope link  src 10.228.207.3
default via 10.228.207.1 dev eth0  metric 2048
default via 10.228.207.123 dev eth0  metric 10000

Since bmx6 is by default using metric 1024 (higher priority than 2048)
a second (bmx6) default (tunnel) route would be possible and
preferred over the dhcp default route. But all other local
networks (e.g. 10.228.205.0/28 dev br-lan) have a metric=0
thus a higher priority than bmx6 routes.

If this is what's needed then no code changes are needed. Just:
uci set network.wan0.metric=2048
uci set bmx6.ipVersion.throwRoutes=0
uci set bmx6.ipVersion.tableTun=254

ip rules can be left as they are and no dedicated bmx6 tableTunDef parameter is needed!

History

#1 Updated by Roger Pueyo Centelles 3 days ago

  • Target version set to 5.0

Also available in: Atom PDF