D-Link on non-DSL Internet Provider

D-Link DSL-2650U with non-DSL Internet Provider

Spread the love


So, recently I’ve got in the no very pleasure situation when the electricity was not stable in our area, there were several current jumps in the power network and several power outages and after that my router D-Link DIR-825 with custom firmware from OpenWRT stopped working. There were only two light-emitting diodes lighting, one with the D-Link logo (bright blue) and the Power light (orange). Sometimes the other lights of the Ethernet ports were blinking but that’s all, no signs of life at all.

From all of these I understood that it is a time to change the router (and maybe little bit to think about the power battery, to be safe in the future), and since I did not have another working router for Ethernet (RJ-45) provider but I had a DSL router (D-Link DSL-2650U), so there were a temporary decision made (as you know, there’s nothing so permanent as temporary) by myself – I should try to use the DSL router with Ethernet (non-DSL) Internet Provider.

That old D-Link DSL-2650U WiFi router used to work with another Internet Provider in Kyiv, Ukraine called “ОГО” (Ukrtelecom) few years ago, ADSL2 WAN port, but now I don’t have a landline phone line, only Ethernet provider, so the DSL port can not be used as an Incoming Internet port anymore, but I have 4 other Ethernet ports (RJ-45) in that router, they used as a Ethernet ports for a local network routing, and I’ve decided to try to use one of those Ethernet ports as an Incoming Internet port for my Ethernet (RJ-45) Internet Provider.

So what I have:

  1. Old router D-Link DSL-2650U (hardware v. D1, which perfectly matches the requirements of the custom firmware of OpenWRT)
  2. Internet Provider with Ethernet (RJ-45) cable
  3. OpenWRT firmware
  4. Original D-Link firmware
  5. Laptop with the Ethernet (RJ-45) port
  6. Ethernet RJ-45 cable

What needs to be done:

  1. Flash the custom OpenWRT firmware to the DSL router
  2. Configure vlan of the router so the first Ethernet port will be used as WAN port (receive the incoming Internet and routes to the local network)
  3. Configure the WAN port for a static IP address (my Internet Provider specific requirements), so it won’t listen the DHCP (the option with DHCP is described below as well)

Let’s get started

Download new firmware OpenWRT from its SVN repository – here.
I have tried dosen times to flash this firmware without success, not sure why, maybe because it was already on the custom firmware and there are some limits of flashing memory, or maybe I was doing something wrong, however on the 11th time I finally flashed OpenWRT firmware.

Download, in case if something goes wrong, the official D-Link firmware for this router – here.

How to flash:

  1. Change the settings of the Laptop’s Ethernet port to a static address, mask, gateway
  2. Connect the Laptop to the router using the ethernet cable, preferably not to the 1st Ethernet port on the router, otherwise we would not be able to continue our settings since that port will be used for WAN and the connection with the Laptop will be lost
  3. Press and hold “Reset” button and power on the router, hold the reset button after it’s powered on for at least 10 seconds and then release
  4. Open in the Internet Explorer browser (ideally in very old IE, version 7 or so, since the web interface of the router for flashing the firmware is very old)
  5. We should see the very primitive web form for firmware flashing, select the OpenWRT firmware and flash it
  6. We should see the message about the flashing process can take about 2 minutes (for standard firmware, so please give it a bit more time for custom OpenWRT firmware since it is usually bigger than standard) and then the router will be restarted automatically, but to be honest it is very difficult to realize when exactly the firmware is uploaded and the router flashed it, so just wait, or you can try to send a pings from your Laptop to the router on address:
    ping -t

    I’m not sure it will help you to catch the moment, but anyway, it worth to try.

  7. When the router is restarted, open telnet terminal on your Laptop and type the router address – Be patient, the router may start a bit longer for the first time after the firmware flash, that’s why the telnet may not be able to open the connection to the router’s address immediately, so try for about 3-4 times (5-10 seconds interval) until you finally see the welcome message from OpenWRT. If you still can’t connect it might mean that the router has not started or flashed properly so you need to repeat steps 1-7.
  8. If the firmware flash did not succeeded, there are most common reasons why it can hepped:
    • The Ethernet port on your Laptop, which is connected to the router, is not configured properly (IP address, Mask, Gateway)
    • You are trying to flash the wrong version of the firmware to your router. This is most dangerous option since you may “brick” your router.
    • Your router is already “bricked” or other way broken, in this case try to flash the original D-Link firmware and continue from there. If you were able to flash the original D-Link firmware and then were able to open the address in your browser and see the welcome page – then you still have a chance to flash the OpenWRT, your device is not broken, so try the steps 1-7 again (but maybe try different firmware version).
  9. Once the firmware successfully flashed and you connected to the router via telnet and see OpenWRT welcome message, change the root password, type: passwd
    Enter new password twice
    Close telnet
  10. Connect to the router via SSH client (I’m using Putty), as a login type root, as a password use your password entered above, you should see something similar to this:

Let’s set it up

All the settings from the command line is about the following:

  1. Configure the local ethernet interfaces so the first one is used as a WAN port, the others as usually
  2. Install and configure luci – web-UI for OpenWRT

Let’s configure local ethernet interfaces

  1. Open the file on your router /etc/config/network for editing.
    I used WinSCP file manager.
  2. The file should look like this:
    # Custom network for DSL-2650U without DLS WAN
    config 'switch' 'eth1'
    option 'enable' '1'
    option 'enable_vlan' '1'
    option 'reset' '1'
    config 'switch_vlan'
    option 'vlan' '0'
    option 'device' 'eth1'
    option 'ports' '0 1 2 5t'
    config 'switch_vlan'
    option 'vlan' '1'
    option 'device' 'eth1'
    option 'ports' '3 5t'
    config 'switch_port'
    option 'port' '3'
    option 'pvid' '1'
    config interface loopback
    option ifname lo
    option proto static
    option ipaddr
    option netmask
    config interface lan
    option type bridge
    option ifname eth1.0
    option proto static
    option ipaddr
    option netmask
    option nat 1
    config interface wan
    option ifname eth1.1
    option proto dhcp

    With this settings, the WAN port will be listening to the DHCP and take the IP, Gateway, Mask and DNS from DHCP, but I need WAN port to be configured to the static IP address (that is the requirement of my Internet Provider), so I will change a config interface wan section of the network file:

    config interface wan
    option ifname eth1.1
    option proto static
    option ipaddr '***.***.***.***'
    option netmask '255.255.255.***'
    option gateway '***.***.***.***'
    option dns ''
    option macaddr '**:**:**:**:**:**'

    Of course all asterisks *** should be replaced on your values (feel free to change these settings as you need, as your provider requires).

  3. Apply network changes without router reboot:
    /etc/init.d/network reload
    # or
    /etc/init.d/network restart
  4. To check that the network settings were applied properly:
    ping google.com

Now let’s install luci:

opkg update
opkg install luci
/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable

After this, entering the address in your browser you should see the new web-interface of OpenWRT (luci).

For all further router settings I will be using the luci web-interface, however if you are more comfortable with SSH, or telnet – who can stop you 🙂

This is basically all what I need to make the DSL router work with Ethernet (non-DSL) Internet Provider. In my case everything was working as expected, and I did not have to compile my own custom OpenWRT firmware (as many other OpenWRT community members were doing), all the magic is about only the proper settings of the vlan of the router. More about this is here, here and here.

Used materials:
OpenWRT dsl-2650u
OpenWRT LuCI Essentials
OpenWRT Configuration
OpenWRT Internet Connection
OpenWRT Network Configuration
OpenWRT Switch Documentation
OpenWRT Linux Network Interfaces
OpenWRT TRUNK for brcm63xx chipset