Re: [OpenWrt-Devel] 6in4 does not recover after wan outage

2014-09-01 Thread Weedy
On 26 Aug 2014 03:52, Richard Mortimer richm+open...@oldelvet.org.uk
wrote:

 Hi,


 On 23/08/2014 00:19, Weedy wrote:

 On Fri, Aug 22, 2014 at 9:15 AM, Richard Mortimer
 richm+open...@oldelvet.org.uk wrote:

 However I've noticed that if the ADSL line drops then when it recovers
my
 SiXXS 6in4 tunnel does not automatically re-establish the connection.


 Incase you need it fixed now, here's a workaround.
 Throw this in like /etc/hotplug.d/iface/99-6in4-fix.


 Many thanks. I've tested that and it does indeed workaround the problem.

 Best Regards

No problem.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 6in4 does not recover after wan outage

2014-08-26 Thread Richard Mortimer

Hi,

On 23/08/2014 00:19, Weedy wrote:

On Fri, Aug 22, 2014 at 9:15 AM, Richard Mortimer
richm+open...@oldelvet.org.uk wrote:

However I've noticed that if the ADSL line drops then when it recovers my
SiXXS 6in4 tunnel does not automatically re-establish the connection.


Incase you need it fixed now, here's a workaround.
Throw this in like /etc/hotplug.d/iface/99-6in4-fix.


Many thanks. I've tested that and it does indeed workaround the problem.

Best Regards

Richard
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] 6in4 does not recover after wan outage

2014-08-22 Thread Richard Mortimer
I'm testing BB rc3 on a Buffalo WBMR-HP-G300H and for the most part its 
working fine and I'm getting a rock solid ADSL connection with it.


However I've noticed that if the ADSL line drops then when it recovers 
my SiXXS 6in4 tunnel does not automatically re-establish the connection. 
There doesn't seem to be any magic config values to set either in the 
LUCI interface or at

http://wiki.openwrt.org/doc/uci/network#protocol.6in4.ipv6-in-ipv4.tunnel

Is this a missing feature or is there a bug lurking somewhere in the new 
event mechanism?


For reference I've got the following in my wan and wan6 configs 
(passwords and IP addresses suitably redacted).


config interface 'wan'
option _orig_ifname 'nas0'
option _orig_bridge 'false'
option proto 'pppoa'
option encaps 'vc'
option atmdev '0'
option vci '38'
option vpi '0'
option username 'auser'
option password 'apass'
option mtu '1458'
option peerdns '0'
option dns 'x.x.x.x'

config interface 'wan6'
option _orig_ifname '@wan'
option _orig_bridge 'false'
option proto '6in4'
option peeraddr 'y.y.y.y'
option ip6addr 'a:b:c::d'
option ip6prefix 'e:f::/48'

I'm happy to help debug etc where needed and will log a trac ticket if 
it isn't down to my stupidity!


Regards

Richard
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 6in4 does not recover after wan outage

2014-08-22 Thread Steven Barth

Hi Richard,

could you please post the output of:
ifstatus wan
and
ifstatus wan6

when said situation occurs?


Cheers,

Steven
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 6in4 does not recover after wan outage

2014-08-22 Thread Richard Mortimer

On 22/08/2014 15:06, Steven Barth wrote:

Hi Richard,

could you please post the output of:
ifstatus wan
and
ifstatus wan6

when said situation occurs?

Sure. during, after and before situation included below. I anonymised 
the IP addresses a little but tried to mark common prefixes just in case 
it matters to you.


Best Regards

Richard



During ADSL outage.

root@prison:/etc/config# ifstatus wan
{
up: false,
pending: false,
available: true,
autostart: false,
proto: pppoa,
data: {

}
}
root@prison:/etc/config# ifstatus wan6
{
up: false,
pending: true,
available: true,
autostart: true,
proto: 6in4,
data: {

},
errors: [
{
subsystem: 6in4,
code: NO_WAN_LINK
}
]
}


After ADSL recovers


root@prison:/etc/config# ifstatus wan
{
up: true,
pending: false,
available: true,
autostart: true,
uptime: 110,
l3_device: pppoa-wan,
proto: pppoa,
updated: [
addresses,
routes
],
metric: 0,
delegation: true,
ipv4-address: [
{
address: x.x.x.x,
mask: 32
}
],
ipv6-address: [

],
ipv6-prefix: [

],
ipv6-prefix-assignment: [

],
route: [
{
target: 0.0.0.0,
mask: 0,
nexthop: y.y.y.y,
source: 0.0.0.0\/0
}
],
dns-server: [
z.z.z.1,
z.z.z.2,
:x:x:x::e
],
dns-search: [

],
inactive: {
ipv4-address: [

],
ipv6-address: [

],
route: [

],
dns-server: [
62.24.134.1,
62.24.243.2
],
dns-search: [

]
},
data: {

}
}
root@prison:/etc/config# ifstatus wan6
{
up: false,
pending: true,
available: true,
autostart: true,
proto: 6in4,
data: {

},
errors: [
{
subsystem: 6in4,
code: NO_WAN_LINK
}
]
}


Just in case you need it. Here's the output before the outage.

root@prison:/etc/config# ifstatus wan
{
up: true,
pending: false,
available: true,
autostart: true,
uptime: 5561,
l3_device: pppoa-wan,
proto: pppoa,
updated: [
addresses,
routes
],
metric: 0,
delegation: true,
ipv4-address: [
{
address: x.x.x.x,
mask: 32
}
],
ipv6-address: [

],
ipv6-prefix: [

],
ipv6-prefix-assignment: [

],
route: [
{
target: 0.0.0.0,
mask: 0,
nexthop: y.y.y.y,
source: 0.0.0.0\/0
}
],
dns-server: [
z.z.z.1,
z.z.z.2,
x:x:x:x::e
],
dns-search: [

],
inactive: {
ipv4-address: [

],
ipv6-address: [

],
route: [

],
dns-server: [
62.24.134.1,
62.24.243.2
],
dns-search: [

]
},
data: {

}
}
root@prison:/etc/config# ifstatus wan6
{
up: true,
pending: false,
available: true,
autostart: true,
uptime: 5589,
l3_device: 6in4-wan6,
proto: 6in4,
updated: [
addresses,
routes,
prefixes
],
metric: 0,
delegation: true,
ipv4-address: [

],
ipv6-address: [
{
address: x:x:x:x::2,
mask: 128
}
],
ipv6-prefix: [
{
address: x:x:x::,
mask: 48,
class: wan6,
assigned: {
lan: {
address: x:x:x:x:1::,
mask: 64
},
wifi: {
address: 

Re: [OpenWrt-Devel] 6in4 does not recover after wan outage

2014-08-22 Thread Weedy
On Fri, Aug 22, 2014 at 9:15 AM, Richard Mortimer
richm+open...@oldelvet.org.uk wrote:
 However I've noticed that if the ADSL line drops then when it recovers my
 SiXXS 6in4 tunnel does not automatically re-establish the connection. There
 doesn't seem to be any magic config values to set either in the LUCI
 interface or at
 http://wiki.openwrt.org/doc/uci/network#protocol.6in4.ipv6-in-ipv4.tunnel

 Is this a missing feature or is there a bug lurking somewhere in the new
 event mechanism?


Incase you need it fixed now, here's a workaround.
Throw this in like /etc/hotplug.d/iface/99-6in4-fix.
Not tested, chopped down version of what I run for another reason.
The loop isn't 10 seconds. The failed ping takes about 7 seconds. So
this tests the wan int for about 1m30s.

#!/bin/sh
if [ $ACTION = ifup ]  [ $INTERFACE = wan ]; then
fix6in4 () {
. /lib/functions/network.sh
network_get_device wanIF wan
loop=0
ping=/bin/ping -W 3 -c 5 -q -I $wanIF
until [ $loop -gt 10 ] || $ping 8.8.8.8   /dev/null 21; do
let loop++
sleep 1
done
if [ $loop -lt 11 ]; then ifup wan6
else /usr/bin/logger -t 6in4-fix -p user.notice Failed to
reset 6in4 tunnel.; fi
}
fix6in4 
fi
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel