All,
Just realized that lcr module does not support IPv6 yet. Is there already any work going on here? Otherwise we'd take this task over.
Andreas
Andreas Granig writes:
Just realized that lcr module does not support IPv6 yet. Is there already any work going on here? Otherwise we'd take this task over.
i don't know of such work. if you decide to do it, try to not cause any performance hit for current ipv4 usage.
-- juha
Hello Juha,
On 12/15/2011 01:22 PM, Juha Heinanen wrote:
Just realized that lcr module does not support IPv6 yet. Is there already any work going on here? Otherwise we'd take this task over.
i don't know of such work. if you decide to do it, try to not cause any performance hit for current ipv4 usage.
Please find attached the patch against git master, courtesy of my colleague Richard Fuchs <rfuchs at sipwise.com>.
Please review and apply if acceptable.
Andreas
Andreas Granig writes:
Please find attached the patch against git master, courtesy of my colleague Richard Fuchs <rfuchs at sipwise.com>.
Please review and apply if acceptable.
andreas,
based on the patch i got impression that it uses current ip_addr column of lcr_gw table to store also ipv6 address? if so, then also the schema file would need to be changed.
-- juha
Hi Juha,
On 12/21/2011 02:11 PM, Juha Heinanen wrote:
based on the patch i got impression that it uses current ip_addr column of lcr_gw table to store also ipv6 address? if so, then also the schema file would need to be changed.
Exactly. Sorry, forgot that part. Since the patch supports optional surrounding square brackets, the max. length of an IPv6 address is 47.
So it's either 8*4+7+2 for normal IPv6, like "[0000:0000:0000:0000:0000:0000:0000:0000]", or (6*4+5)+1+(4*3+3)+2 for tunneling, like "[0000:0000:0000:0000:0000:0000:192.168.100.100]".
We could argue whether to not support square brackets and just allow plain IP format, I've no strong opinions on that. We just wanted to make it as flexible as possible.
Should I adapt the patch to reflect the schema change as well, or could you maybe change it manually in lib/srdb1/schema/lcr_gw.xml?
Andreas
Andreas Granig writes:
Exactly. Sorry, forgot that part. Since the patch supports optional surrounding square brackets, the max. length of an IPv6 address is 47.
So it's either 8*4+7+2 for normal IPv6, like "[0000:0000:0000:0000:0000:0000:0000:0000]", or (6*4+5)+1+(4*3+3)+2 for tunneling, like "[0000:0000:0000:0000:0000:0000:192.168.100.100]".
We could argue whether to not support square brackets and just allow plain IP format, I've no strong opinions on that. We just wanted to make it as flexible as possible.
i cannot comment on storing ipv6 address, because i don't know anything about them. one possibility is to add a new column ipv6_addr to lcr_gw table and take the address from the one which is not empty (if any).
-- juha
On 12/21/2011 02:43 PM, Juha Heinanen wrote:
We could argue whether to not support square brackets and just allow plain IP format, I've no strong opinions on that. We just wanted to make it as flexible as possible.
i cannot comment on storing ipv6 address, because i don't know anything about them. one possibility is to add a new column ipv6_addr to lcr_gw table and take the address from the one which is not empty (if any).
Well, the question was not where to store the IPv6 address, rather than in which format. As it is now, it'll allow it both with and without surrounding square brackets. That's where I have no strong opinions.
However, with the current implementation, it'll re-use the ip_addr column, because in my opinion there is no point in adding another one. If I want to add an IPv6 gateway, I put the IPv6 address there, otherwise the IPv4 address. If a gateway supports both, I can insert the gateway twice and control via lcr_rule_target the priority and weight in order to have a fall-back or whatever. I'd highly favor keeping that approach.
Andreas
Andreas Granig writes:
Well, the question was not where to store the IPv6 address, rather than in which format. As it is now, it'll allow it both with and without surrounding square brackets. That's where I have no strong opinions.
ok, then push also change to lcr_gw schema and include an upgrade script in wiki (or where ever that are nowadays stored).
-- juha
On 12/21/2011 03:47 PM, Juha Heinanen wrote:
Well, the question was not where to store the IPv6 address, rather than in which format. As it is now, it'll allow it both with and without surrounding square brackets. That's where I have no strong opinions.
ok, then push also change to lcr_gw schema and include an upgrade script in wiki (or where ever that are nowadays stored).
Alright, I'll figure that out.
Andreas
2011/12/21 Andreas Granig agranig@sipwise.com:
We could argue whether to not support square brackets and just allow plain IP format, I've no strong opinions on that.
I agree. IPv6 has no brackets, that's just a notation for using in URI's.