FireBrick 3G Dongle: Difference between revisions

From AAISP Support Site
Tags: Mobile edit Mobile web edit
(33 intermediate revisions by 3 users not shown)
Line 1: Line 1:
#REDIRECT [[:Category:FireBrick_USB_Dongles]]

[[File:2700-small.png|link=:Category:FireBrick]]
[[File:2700-small.png|link=:Category:FireBrick]]
[[File:Zoom_Dongle_Small.png]]


[[File:Zoom4598.jpg|right]]
=3G Fallback=
=3G Fallback=
The 2700 model has a usb port that can be used with a 3G dongle for connectivity and/or fallback. The FireBrick 2500 does not have a USB port. By using a 3G dongle with 1 or more FTTC/ADSL lines from AAISP you'll be able to fall back to using 3G in the case of the FTTC/ADSL going down - this includes routing of your public IPv4 blocks and IPv6 blocks (IPv6 via a tunnel)
The 2700 model has a USB port that can be used with a 3G dongle for connectivity and/or fallback. The FireBrick 2500 does not have a USB port. By using a 3G dongle with 1 or more FTTC/ADSL lines from AAISP you'll be able to fall back to using 3G in the case of the FTTC/ADSL going down - this includes routing of your public IPv4 blocks and IPv6 blocks (IPv6 via a tunnel).


==Supported Dongles==
==Supported Dongles==
Dongles do vary, and drivers may need to be written to support a particular dongle. Contact us if you have one which is not working. The following dongles are known to work on a FireBrick 2700:
Dongles do vary, and drivers may need to be written to support a particular dongle. Contact us if you have one which is not working. The following dongles are known to work on a FireBrick 2700:
*[[Zoom_USB_dongle|ZOOM model 4598]] (Available from AAISP)
*[[Zoom USB dongle|ZOOM model 4598]] (Available from AAISP)
*Huawei E353 (Three branding)
*Huawei E353 (Three branding)
*Huawei E170 (BT Branding)
*Huawei E170 (BT Branding)
Line 15: Line 17:


==A Note on Bonding 3G SIMs==
==A Note on Bonding 3G SIMs==
Multiple USB Dongles can used via a USB hub - however the benefits of bonding multiple 3G are small, as you'll typically be contending with yourself and so there will be little or no added bandwidth.
Multiple USB dongles can used via a USB hub - however the benefits of bonding multiple 3G are small, as you'll typically be contending with yourself and so there will be little or no added bandwidth.
Using multiple dongles with SIMs from different providers may provide extra resilience in the case of one having a problem.
Using multiple dongles with SIMs from different providers may provide extra resilience in the case of one having a problem.


=Basic 3G Config=
=Basic Config=
If you have an AA data SIM, the FireBrick can configured to use this as a backup connection, by using a 3G dongle plugged into the USB port. Any routed legacy IP blocks will continue to work across this link, but so far IPv6 isn't supported (without using a tunnel).
If you have an AAISP data SIM, the FireBrick can be configured to use this as a backup connection, by using a 3G dongle plugged into the USB port. Any routed legacy IPv4 blocks will continue to work across this link, but so far IPv6 isn't supported (without using a tunnel).
The example below is all you need to get the dongle configured. If your main broadband connection goes down, the FireBrick will automatically switch to use the 3G connection, then back again once your main connection is back.
The basic config is:

<syntaxhighlight>
<syntaxhighlight>
<usb>
<usb>
<dongle username="me@a.3" password="secret"/>
<dongle username="me@a.2" password="secret"/>
</usb>
</usb>
</syntaxhighlight>
</syntaxhighlight>


Provided you use your AA username and password, then that's all you need to get the dongle configured. If your main broadband connection goes down, the FireBrick will automatically switch to use the 3G connection, then back again once your main connection is back.


=Tunneled IPv6 Fallback=
If the dongle is not using a AAISP SIM, (and therefore your IPv4 blocks won't be re-routed down the dongle, then include NAT="true" on the dongle line.
If using AAISP, then the options for IPv6 routing on the [[:Category:Control Pages|Control Pages]] allow an IPv6 block to be routed to a tunnel endpoint if the main routing (i.e. ADSL/FTTC) goes down. This means IPv6 can be routed to the 3G dongle if the main broadband(s) go down. The MTU will be limited though. For more configuration options see [[FireBrick 2700 Configuration]].


== Config with Tunnelled IPv6 Fallback==
==Example Config==
LAN Interface for IPv6 tunnel over 3G dongle (with MTU 1500):
If using AAISP, then the options for IPv6 routing on the [[:Category:Control Pages|Control Pages]] allow an IPv6 block to be routed to a tunnel endpoint if the main routing (ie ADSL/FTTC) goes down. - This means IPv6 can be routed to the 3G dongle if the main broadband(s) go down. The MTU will be limited though.
<syntaxhighlight>
<interface name="LAN" port="LAN" ra-client="false">
<subnet ip="2001:8b0::1/64 10.0.0.1/24" ra="true" ra-mtu="1480" ra-dns="2001:8b0::2020 2001:8b0::2021"/>
</interface>
</syntaxhighlight>
LAN Interface for IPv6 tunnel over 3G dongle (with MTU 1492):
<syntaxhighlight>
<interface name="LAN" port="LAN" ra-client="false">
<subnet ip="2001:8b0::1/64 10.0.0.1/24" ra="true" ra-mtu="1472" ra-dns="2001:8b0::2020 2001:8b0::2021"/>
</interface>
</syntaxhighlight>
Connect to AAISP over PPPoE session (3G dongle tweaks and NAT):
<syntaxhighlight>
<ppp name="AAISP" port="WAN" username="me@a.1" password="secret" nat="true" lcp-rate="1" lcp-timeout="5" graph="AAISP" log="default"/>
</syntaxhighlight>
Connect to AAISP over 3G dongle (with NAT):
<syntaxhighlight>
<dongle name="AAISP-3G" username="me@a.2" password="secret" nat="true" graph="AAISP-3G" log="default"/>
</syntaxhighlight>
3G dongle IPv6 default route using IPv4 tunnel:
<syntaxhighlight>
<route ip="::/0" gateway="81.187.81.6" comment="IPv6 default route using IPv4 tunnel"/>
</syntaxhighlight>



Here we have some profiles to manage the 3G, and also add logging.
=Turning the dongle off outside of office hours=
Sometimes we don't want the dongle to be online 24x7 and want it turned off outside of office hours.
This example brings the dongle online for quick fallback during office hours, and leaves it powered up but disconnected.
Fallback still works outside of office hours but takes a few seconds longer to set up.
Note that both <usb> and <dongle> elements can be based on profiles.
Leaving <usb> active but disabling <dongle> will leave the dongle powered up but disconnected.
Disabling <usb> will physically turn off the USB port and therefore also the dongle.
Cold starts take a lot longer!


<syntaxhighlight>
<syntaxhighlight>
<usb>
<usb log="true" profile="No_PPPoE">
<dongle name="3G" username="me@a.3" password="secret" nat="false" graph="Backup" comment="AAISP data SIM"/>
<dongle name="AAISP-3G" username="me@a.3" password="secret" graph="AAISP-3G" profile="AAISP-3G"/>
</usb>
</usb>


<profile name="Office-Hours" comment="Office hours">
<route name="6in4" profile="No_DSL" graph="6in4" ip="::/0" gateway="81.187.81.6" comment="IPv6 Default route when AAISP DSL is down" />
<time days="Mon Tue Wed Thu Fri" start="08:00:00" stop="18:00:00"/>

</profile>
<profile name="DSL" ppp="AAISP" comment="Monitoring the PPP link named AAISP"/>


<profile name="No_DSL" timeout="PT5S" recover="PT1S" not="DSL"/ comment="Just the not of the previous profile">
<profile name="No-DSL" ppp="ADSL1 ADSL2" invert="true"/>
<profile name="AAISP-3G" or="Office-Hours No-DSL" comment="Backup active during office hours, or if there is no DSL outside of office hours"/>
</syntaxhighlight>
</syntaxhighlight>


This example is taken from a site which has 2 ADSL lines - hence the No-DSL profile being based on ADSL1 and ADSL2 being up.
= 3G based on profiles - turning the dongle off overnight=
The AAISP-3G profile is then active during office hours, but it will become active if both of the ADSL lines are down outside of office hours.
Sometimes we don't want the dongle to be online 24x7 as it's not clear whether the dongle has got into a strange state or not. It's also not clear whether some of these devices are designed to be left connected all of the time.


This example brings the dongle online for quick fallback during office hours, and leaves it powered up but disconnected. Fallback still works out of office hours but takes a few seconds longer to set up.


=Ping test example of falling back=
Note that both <usb> and <dongle> elements can be based on profiles. Leaving <usb> active but disabling <dongle> will leave the dongle powered up but disconnected. Disabling <usb> will physically turn off the USB port and therefore also the dongle. Cold starts take a lot longer!

<syntaxhighlight>
<usb>
<dongle name="Backup" username="example@a.3" password="password" nat="false" graph="3G" profile="3G"/>
</usb>
<profile name="Working_hours" comment="Office working times">
<time days="Mon Tue Wed Thu Fri" start="08:00:00" stop="18:00:00"/>
</profile>
<profile name="No_PPP" ppp="ADSL1 ADSL2" invert="true"/>
<profile name="3G" or="Working_hours No_PPP" comment="Backup active during the working day, or if there's no PPP at night"/>
</syntaxhighlight>

This example is taken from a site which has 2 ADSL lines - hence the No_PPP profile being based on ADSL1 and ADSL2 being up.
The 3G profile is then active during the Working hours, but it will become active if both of the ADSL lines are down out of hours.

= Ping test example of falling back =


Here we ping an IP on the LAN, behind the FB2700, and get the ADSL router to re-sync. The ADSL went down, the 3G kicked in with only a single ping lost, then shortly after the ADSL came back on and took over the routing again.
Here we ping an IP on the LAN, behind the FB2700, and get the ADSL router to re-sync. The ADSL went down, the 3G kicked in with only a single ping lost, then shortly after the ADSL came back on and took over the routing again.
Line 103: Line 121:
</pre>
</pre>


You can tell when the swap over happened as the latency increases and then decreases again when the DSL came back online
You can tell when the swap over happened as the latency increases and then decreases again when the DSL came back online.


= Telnet Commands =


=Telnet Commands=

Reset the USB controller and re-detect everything from scratch:
<pre>clear usb</pre>
<pre>clear usb</pre>
Will reset the usb controller and re-detect everything from scratch.



Show dongle information:
<pre>show dongle</pre>
<pre>show dongle</pre>
To show info


You can turn on debug logging to get more info

<pre>set command log level debug</pre>
-there will be lots of info coming out!



[[Category:Data SIM Devices]]
[[Category:FireBrick]] [[Category:3G]] [[Category:Mobile]]
[[Category:3G Router]]

Revision as of 02:54, 22 August 2019

2700-small.png Zoom Dongle Small.png

3G Fallback

The 2700 model has a USB port that can be used with a 3G dongle for connectivity and/or fallback. The FireBrick 2500 does not have a USB port. By using a 3G dongle with 1 or more FTTC/ADSL lines from AAISP you'll be able to fall back to using 3G in the case of the FTTC/ADSL going down - this includes routing of your public IPv4 blocks and IPv6 blocks (IPv6 via a tunnel).

Supported Dongles

Dongles do vary, and drivers may need to be written to support a particular dongle. Contact us if you have one which is not working. The following dongles are known to work on a FireBrick 2700:

A Note on Bonding 3G SIMs

Multiple USB dongles can used via a USB hub - however the benefits of bonding multiple 3G are small, as you'll typically be contending with yourself and so there will be little or no added bandwidth. Using multiple dongles with SIMs from different providers may provide extra resilience in the case of one having a problem.

Basic Config

If you have an AAISP data SIM, the FireBrick can be configured to use this as a backup connection, by using a 3G dongle plugged into the USB port. Any routed legacy IPv4 blocks will continue to work across this link, but so far IPv6 isn't supported (without using a tunnel). The example below is all you need to get the dongle configured. If your main broadband connection goes down, the FireBrick will automatically switch to use the 3G connection, then back again once your main connection is back.

<usb>
<dongle username="me@a.2" password="secret"/>
</usb>


Tunneled IPv6 Fallback

If using AAISP, then the options for IPv6 routing on the Control Pages allow an IPv6 block to be routed to a tunnel endpoint if the main routing (i.e. ADSL/FTTC) goes down. This means IPv6 can be routed to the 3G dongle if the main broadband(s) go down. The MTU will be limited though. For more configuration options see FireBrick 2700 Configuration.

Example Config

LAN Interface for IPv6 tunnel over 3G dongle (with MTU 1500):

<interface name="LAN" port="LAN" ra-client="false">
<subnet ip="2001:8b0::1/64 10.0.0.1/24" ra="true" ra-mtu="1480" ra-dns="2001:8b0::2020 2001:8b0::2021"/>
</interface>

LAN Interface for IPv6 tunnel over 3G dongle (with MTU 1492):

<interface name="LAN" port="LAN" ra-client="false">
<subnet ip="2001:8b0::1/64 10.0.0.1/24" ra="true" ra-mtu="1472" ra-dns="2001:8b0::2020 2001:8b0::2021"/>
</interface>

Connect to AAISP over PPPoE session (3G dongle tweaks and NAT):

<ppp name="AAISP" port="WAN" username="me@a.1" password="secret" nat="true" lcp-rate="1" lcp-timeout="5" graph="AAISP" log="default"/>

Connect to AAISP over 3G dongle (with NAT):

<dongle name="AAISP-3G" username="me@a.2" password="secret" nat="true" graph="AAISP-3G" log="default"/>

3G dongle IPv6 default route using IPv4 tunnel:

<route ip="::/0" gateway="81.187.81.6" comment="IPv6 default route using IPv4 tunnel"/>


Turning the dongle off outside of office hours

Sometimes we don't want the dongle to be online 24x7 and want it turned off outside of office hours. This example brings the dongle online for quick fallback during office hours, and leaves it powered up but disconnected. Fallback still works outside of office hours but takes a few seconds longer to set up. Note that both <usb> and <dongle> elements can be based on profiles. Leaving <usb> active but disabling <dongle> will leave the dongle powered up but disconnected. Disabling <usb> will physically turn off the USB port and therefore also the dongle. Cold starts take a lot longer!

<usb>
<dongle name="AAISP-3G" username="me@a.3" password="secret" graph="AAISP-3G" profile="AAISP-3G"/>
</usb>

<profile name="Office-Hours" comment="Office hours">
<time days="Mon Tue Wed Thu Fri" start="08:00:00" stop="18:00:00"/>
</profile>

<profile name="No-DSL" ppp="ADSL1 ADSL2" invert="true"/>
<profile name="AAISP-3G" or="Office-Hours No-DSL" comment="Backup active during office hours, or if there is no DSL outside of office hours"/>

This example is taken from a site which has 2 ADSL lines - hence the No-DSL profile being based on ADSL1 and ADSL2 being up. The AAISP-3G profile is then active during office hours, but it will become active if both of the ADSL lines are down outside of office hours.


Ping test example of falling back

Here we ping an IP on the LAN, behind the FB2700, and get the ADSL router to re-sync. The ADSL went down, the 3G kicked in with only a single ping lost, then shortly after the ADSL came back on and took over the routing again.

64 bytes from 81.187.xx.xxx: icmp_req=120 ttl=57 time=17.6 ms
64 bytes from 81.187.xx.xxx: icmp_req=121 ttl=57 time=18.1 ms
64 bytes from 81.187.xx.xxx: icmp_req=122 ttl=57 time=17.0 ms
64 bytes from 81.187.xx.xxx: icmp_req=123 ttl=57 time=20.4 ms
64 bytes from 81.187.xx.xxx: icmp_req=124 ttl=57 time=17.3 ms
64 bytes from 81.187.xx.xxx: icmp_req=125 ttl=57 time=17.2 ms
64 bytes from 81.187.xx.xxx: icmp_req=126 ttl=57 time=17.3 ms
From 90.155.53.12 icmp_seq=132 Time to live exceeded
64 bytes from 81.187.xx.xxx: icmp_req=133 ttl=57 time=792 ms <- Now on 3G
64 bytes from 81.187.xx.xxx: icmp_req=134 ttl=57 time=291 ms
64 bytes from 81.187.xx.xxx: icmp_req=135 ttl=57 time=451 ms
64 bytes from 81.187.xx.xxx: icmp_req=136 ttl=57 time=426 ms
64 bytes from 81.187.xx.xxx: icmp_req=137 ttl=57 time=338 ms

Some successful pings omitted as it took a while to sync again.

64 bytes from 81.187.xx.xxx: icmp_req=180 ttl=57 time=176 ms
64 bytes from 81.187.xx.xxx: icmp_req=181 ttl=57 time=276 ms
64 bytes from 81.187.xx.xxx: icmp_req=182 ttl=57 time=216 ms
64 bytes from 81.187.xx.xxx: icmp_req=183 ttl=57 time=174 ms
64 bytes from 81.187.xx.xxx: icmp_req=184 ttl=57 time=212 ms
64 bytes from 81.187.xx.xxx: icmp_req=187 ttl=57 time=16.3 ms  <- Now back on ADSL!
64 bytes from 81.187.xx.xxx: icmp_req=188 ttl=57 time=16.5 ms
64 bytes from 81.187.xx.xxx: icmp_req=189 ttl=57 time=16.2 ms
64 bytes from 81.187.xx.xxx: icmp_req=190 ttl=57 time=16.5 ms
64 bytes from 81.187.xx.xxx: icmp_req=191 ttl=57 time=16.6 ms
64 bytes from 81.187.xx.xxx: icmp_req=192 ttl=57 time=16.0 ms
64 bytes from 81.187.xx.xxx: icmp_req=193 ttl=57 time=16.8 ms

You can tell when the swap over happened as the latency increases and then decreases again when the DSL came back online.


Telnet Commands

Reset the USB controller and re-detect everything from scratch:

clear usb

Show dongle information:

show dongle