Let the Good Times Roll !
Ici et là, au gré des vents – Daymz.com

Here is a little background information.

I am running two 5.0M/800k DSL lines in my home as my internet connection (not that it matters really but for the sake of information: one is on my phone line, the other is a dry line).  In order to use these as a single bonded connection, I’ve setup an Asus WL-520GU running Tomato/MLPPP v1.21-mp3alpha4.   I won’t get into any details as to how to set-up a multi-link MLPPP connection using that specific firmware as tons of documentation and howtos can easily be found using Google.

There is one problem with a multi-link MLPPP connection using Tomato/MLPPP v1.21-mp3alpha4 though.  While it’s possible to access one of the two DSL modems from the LAN (using the Basic -> Network : Route Modem IP option), it’s impossible to access the second DSL modem (at least using a Thompson ST516 DSL modem since it’s supposedly impossible to change its IP address).  Believing that last bit of information, I tried to fiddle with various routing and masquerading options, which all failed.

I was about to give up when I thought I should validate every piece of information I had assumed was true.  Starting with changing the IP address of a ST516.  Needless to say, I should have done that earlier.  It’s perfectly possible, and valid, to change/add/delete IP settings on a ST516.  At least using firmware revision 6.2.29.2 (which is what I’m running).  Once you’ve logged in the CLI through telnet, type « ip iplist » :

{user}=>ip iplist
Interface                            Type            IP-address       P-t-P IP | Mask
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.0.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet       *192.168.1.254    255.255.255.0
0   loop. . . . . . . . . . . . . .  Internal        127.0.0.1        255.255.255.255

Now, you can add a new IP address to the modem’s interface by typing « ip ipadd » :

{user}=>ip ipadd
intf = LocalNetwork
addr = 10.0.1.138
[netmask] = 255.255.255.0
[pointopoint] =
[addroute] =
:ip ipadd intf=LocalNetwork addr=10.0.1.138/24

You can verify everything by entering the « ip iplist » command again :

{user}=>ip iplist
Interface                            Type            IP-address       P-t-P IP | Mask
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.0.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.1.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet       *192.168.1.254    255.255.255.0
0   loop. . . . . . . . . . . . . .  Internal        127.0.0.1        255.255.255.255

Now that you’re back at the CLI prompt, and if you’re satisfied with the settings, type « saveall » and when the prompt returns, power the DSL modem off, wait a couple of seconds, and power it back on.  Once the modem has booted and launched all its daemons and services, you will be able to telnet to the modem again, and enter the « ip iplist » command to verify that the IP information was indeed saved properly.

OK.  So, the ST516 can indeed (at least nowadays) let the user modify IP settings. Great news.

Note that all this information is available on the Thompson ST5x6 CLI User Manual (PDF).

If you can’t seem to be able to use the « ipadd » command, then I would suggest you attempt to update your ST516’s firmware to the version I’m using: v6.2.29.2, or maybe a later one would work as well if you can’t locate this specific revision.

Now, let’s go on with the topic of this article.

1. Topology

For the sake of this article, let us assume that your LAN is on the ever popular 192.168.1.0/24 subnet, and that your Tomato/MLPPP router is at 192.168.1.1.  By factory defaults, each one of the Thompson DSL modems will be assigned two IP addresses: 192.168.1.254/24 and 10.0.0.138/24.  The interface names your modems are connected to within Tomato/MLPPP will vary according to the hardware you are running.  In my case, on the Asus WL-520GU, I used the WAN and LAN1 ports, which leads to interfaces « br0 » and « br1 » (pay attention to this, I originally lost a lot of time thinking they were « br1 » and « vlan1 » as per many, many web pages articles and forum discussions).

                                 [ 192.168.1.254 ]
                                 [   10.0.0.138  ]
                                 [ DSL MODEM # 1 ] <---->  ( Dry DSL Line )
                                       | (br1/wan port)
                                       |
[       LAN      ]   <========>  [ MLPPP ROUTER ] 
[ 192.168.1.0/24 ]               [ 192.168.1.1  ]
                                       | (br0/lan1 port)
                                       |
                                 [ DSL MODEM # 2 ] <---->  ( Phone DSL Line )
                                 [ 192.168.1.254 ]
                                 [   10.0.0.138  ]

2. Objectives

What we want to do here is to be able to reach DSL Modem #1 and DSL Modem #2, each on a unique IP address, from both the router’s shell and from the LAN.   If possible, we will want to retain the router’s factory default settings of 10.0.0.138 and 192.168.1.254 as well, in case we ever forget these new IP settings, or whatever else.  This is the topology we want (note that you can feel free to change IP subnets and addresses I’ve used, it shouldn’t change anything in the end, just make sure they end up as new unused subnets so routing is easily done):

                                 [   10.0.1.138  ]
                                 [ 192.168.1.254 ]
                                 [   10.0.0.138  ]
                                 [ DSL MODEM # 1 ] <---->  ( Dry DSL Line )
                                       | (br1/wan port)
                                       |
[       LAN      ]   <========>  [ MLPPP ROUTER ] 
[ 192.168.1.0/24 ]               [ 192.168.1.1  ]
                                       | (br0/lan1 port)
                                       |
                                 [ DSL MODEM # 2 ] <---->  ( Phone DSL Line )
                                 [   10.0.2.138  ]
                                 [ 192.168.1.254 ]
                                 [   10.0.0.138  ]

What I’ve done here is basically setting an objective of setting one additional unique IP address and subnet on each modem:
– DSL Modem # 1 will carry the 10.0.1.138 (on its own unique 10.0.1.0/24 subnet)
– DSL Modem # 2 will carry the 10.0.2.138 (on its own unique 10.0.2.0/24 subnet)

You could choose another 192.168.X subnet instead of the 10.0.X subnet (.2.0/24 and .3.0/24) as long as they are encompassed in the default gateway routing of your LAN’s PCs (and that the default gateway is the MLPPP router – if that is not the case, you will need to set explicit routing rules on each of your PC you want access to the modem).

3. Howto

3.1  Setting up DSL Modem #1’s additional IP address and subnet

Let’s get started. If you used the « Route Modem IP » option set to 10.0.0.138 on the MLPPP Router (in Basic -> Network), you should be able to connect to one of the two DSL modems.  So let’s start with this one. We will want to add a new IP address within a new subnet (10.0.1.138 in 10.0.1.0/24) :

user@mlppp-router# telnet 10.0.0.138

Escape character is '^]'.

Username : user
Password : ***********
------------------------------------------------------------------------

                             ______  SpeedTouch 5x6
                         ___/_____/\
                        /         /\  6.2.29.2
                  _____/__       /  \
                _/       /\_____/___ \  Copyright (c) 1999-2007, THOMSON
               //       /  \       /\ \
       _______//_______/    \     / _\/______
      /      / \       \    /    / /        /\
   __/      /   \       \  /    / /        / _\__
  / /      /     \_______\/    / /        / /   /\
 /_/______/___________________/ /________/ /___/  \
 \ \      \    ___________    \ \        \ \   \  /
  \_\      \  /          /\    \ \        \ \___\/
     \      \/          /  \    \ \        \  /
      \_____/          /    \    \ \________\/
           /__________/      \    \  /
           \   _____  \      /_____\/
            \ /    /\  \    /___\/
             /____/  \  \  /
             \    \  /___\/
              \____\/

------------------------------------------------------------------------

{user}=>ip iplist
Interface                            Type            IP-address       P-t-P IP | Mask
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.0.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet       *192.168.1.254    255.255.255.0
0   loop. . . . . . . . . . . . . .  Internal        127.0.0.1        255.255.255.255

{user}=>ip ipadd
intf = LocalNetwork
addr = 10.0.1.138
[netmask] = 255.255.255.0
[pointopoint] =
[addroute] =
:ip ipadd intf=LocalNetwork addr=10.0.1.138/24

{user}=>ip iplist
Interface                            Type            IP-address       P-t-P IP | Mask
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.0.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.1.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet       *192.168.1.254    255.255.255.0
0   loop. . . . . . . . . . . . . .  Internal        127.0.0.1        255.255.255.255

{user}=>saveall
{user}=>

3.2  Setting up DSL Modem #2’s additional IP address and subnet

Now that we’re done setting up DSL Modem #1, we will want to setup DSL Modem #2. You can either connect the DSL Modem’s ethernet port directly into your LAN (in a switch port) or, as I did, just swap the DSL Modem #1 and DSL Modem #2’s ethernet cables on the router (eg: the cables on the WAN and LAN1 ports of the router if you use an Asus WL-520GU like myself).

Repeat the above steps on DSL Modem #2 above, except we will setup the 10.0.2.138 address on subnet 10.0.2.0/24 (or 255.255.255.0 if you prefer this notation).  When you do the « iplist » below, make sure you don’t see a « 10.0.1.138 » line, if this is the case, then you are connected to the wrong modem, so double check your cables.  Before trying to connect, wait for about 30-45 seconds as the DSL modem will somehow re-initialize itself and will not start answering telnet requests right after you plug the Ethernet cable in.

user@mlppp-router# telnet 10.0.0.138

Escape character is '^]'.

Username : user
Password : ***********
------------------------------------------------------------------------

                             ______  SpeedTouch 5x6
                         ___/_____/\
                        /         /\  6.2.29.2
                  _____/__       /  \
                _/       /\_____/___ \  Copyright (c) 1999-2007, THOMSON
               //       /  \       /\ \
       _______//_______/    \     / _\/______
      /      / \       \    /    / /        /\
   __/      /   \       \  /    / /        / _\__
  / /      /     \_______\/    / /        / /   /\
 /_/______/___________________/ /________/ /___/  \
 \ \      \    ___________    \ \        \ \   \  /
  \_\      \  /          /\    \ \        \ \___\/
     \      \/          /  \    \ \        \  /
      \_____/          /    \    \ \________\/
           /__________/      \    \  /
           \   _____  \      /_____\/
            \ /    /\  \    /___\/
             /____/  \  \  /
             \    \  /___\/
              \____\/

------------------------------------------------------------------------

{user}=>ip iplist
Interface                            Type            IP-address       P-t-P IP | Mask
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.0.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet       *192.168.1.254    255.255.255.0
0   loop. . . . . . . . . . . . . .  Internal        127.0.0.1        255.255.255.255

{user}=>ip ipadd
intf = LocalNetwork
addr = 10.0.2.138
[netmask] = 255.255.255.0
[pointopoint] =
[addroute] =
:ip ipadd intf=LocalNetwork addr=10.0.2.138/24

{user}=>ip iplist
Interface                            Type            IP-address       P-t-P IP | Mask
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.0.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet        10.0.2.138       255.255.255.0
1   LocalNetwork. . . . . . . . . .  Ethernet       *192.168.1.254    255.255.255.0
0   loop. . . . . . . . . . . . . .  Internal        127.0.0.1        255.255.255.255

{user}=>saveall
{user}=>

3.3  Setting up the MLPPP router to properly route packets to/from the DSL modems

Now, each one of the modem has been properly setup.  Restore the cables as they were before (eg: swap them again).

Login to your Tomato/MLPPP router’s web interface and go to Administration -> Scripts.   In the « Init » tab, add the following lines:

# Wait until system has booted and is settled down, all services up and running
sleep 5
# Add route to 10.0.1.138 (DSL Modem #1) on BR1
ip addr add 10.0.1.10/24 dev br1 brd +

# Add route to 10.0.2.138 (DSL Modem #2) on BR0
ip addr add 10.0.2.10/24 dev br0 brd +

What we just did here is we added a new IP address on the same subnet as each one of the modems, on their respective interfaces (br1 has a new IP address of 10.0.1.10 on the 10.0.1.0/24 subnet used by the 10.0.1.138 DSL Modem #1 ; and same thing with br0 for DSL Modem #2 on 10.0.2.0/24 subnet)

Remember that the interfaces names (br1 and br0) may vary in your setup, so feel free to experiment a bit with other interfaces if this doesn’t work (both for the script in this « Init » tab and for the « Firewall » tab just below here)

Now, hit the « Save » button at the bottom-right of the page.  Wait until the settings are saved (the MLPPP router will display a message on a yellow background next to the « Save » button when it’s done saving).

Click the « Firewall » tab and add the following to the firewall script:

# Add 10.0.1.138 route to DSL Modem #1 on BR1
/usr/sbin/iptables -I POSTROUTING -t nat -o br1 -d 10.0.1.0/24 -j MASQUERADE  

# Add 10.0.2.138 route to DSL Modem #2 on BR0
/usr/sbin/iptables -I POSTROUTING -t nat -o br0 -d 10.0.2.0/24 -j MASQUERADE

This will allow your LAN to access both DSL modems using their 10.0.X.138 addresses.   Hit the « Save » button and wait until the settings are saved.

3.4  Verifying connectivity

Now let’s test things out.  Login the MLPPP router and connect to DSL Modem #1 by issuing the « telnet 10.0.1.138 » shell command.  Once logged in to DSL Modem #1, issue the « ip iplist » command and verify that it’s all good as set (eg: 10.0.0.138, 10.0.1.138, 192.168.1.254 and 127.0.0.1).  Do the same for DSL Modem #2 with « telnet 10.0.2.138 » and verify the IP list (which should be 10.0.0.138, 10.0.2.138, 192.168.1.254 and 127.0.0.1)

Repeat the test by logging to each of the two DSL modems from a computer on your LAN (you can use the free Putty SSH and Telnet client).

It’s now time to make sure all your settings were properly saved throughout this article.  Power off the MLPPP router.  Power off DSL Modem #1 and DSL Modem #2.  Wait a few seconds.  Power DSL Modem #1 and DSL Modem #2 back on.  Power the MLPPP router back on.  Wait until everything has settled down (about 30-45 seconds, maybe more) and try the telnet to 10.0.1.138 and 10.0.2.138 again from a PC on your LAN.

If something goes wrong, make sure you read this article properly.  Feel free to ask questions here but note that you will have to rely on other people’s comments as I don’t plan to support this method very much (which doesn’t mean I won’t, but don’t expect it!).

4. Connecting with DMT

Now that both your DSL modems are accessible from your LAN, you can use DMT to connect to the modems and monitor pertinent data.  I’m personally using DMT v7.35 for Thompson SpeedTouch 516, 536, 546, 585, 608, 706, 716 and 780.

Enter the IP address of DSL Modem #1 (10.0.1.138), your user name and password, and hit « Connect« .  Once connected, disconnect and repeat for DSL Modem #2 (10.0.2.138).

DMT stores the last connected IP and restores it when the program is restarted, so if you want to avoid having to change a digit in the IP address, or for any other reason, just make copy the DMT folder as DMT.Dry for example, and make a shortcut to DMT.exe in each folder so that the shortcut reads DMT Phone and DMT Dry for instance.  This you will have access to both modems easily.

5. Conclusion

I hope this article helps.  The reason I wrote all this down is that I searched for a while for a solution on the net, but nothing I could find would work with the ST516 — mainly because everyone assumed it was impossible to change or add IP addresses and/or used conflicting IP addresses and subnets.

If you appreciated this, feel free to drop a « Thanks! » comment below.

------

Articles similaires

 

2 commentaires à propos de «How to set up multiple Thompson ST516 DSL modems routing using Tomato/MLPPP in multi-link»

  1. A very damn good tutorial and write up. The Speedtouch is a great modem and has a lot of options as well.
    And a very versatile setup.

  2. Thank you P. I appreciate the feedback.

Répondre à cet article

Tags HTML autorisés: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>