Available : D-link DSL2650U router, which has a built-in DSL modem, a 4-port switch and one USB input and a non-DSL provider (regular twisted pair and DHCP on that end of the wire). Revision of the router: D, Board ID: 96358VW2.
Problem : There is no place to insert the twisted pair of the provider, since there is no Ethernet WAN port, but simply the switch does not work with the provider.
Solution : Reconfigure one of the LAN ports as a WAN.
The article will be in step-by-step instructions on how to solve this problem. Since I spent relatively much time searching for and browsing information, I decided to write a post about it in order to systematize and help people solve a similar problem.
We assemble the firmware
In the standard firmware, there is nothing similar about the Ethernet WAN port, so the Internet has been examined for the presence of custom firmware. OpenWRT was found supported (DD-WRT does not support), but there is no official support. This means that there are no ready assemblies and you need to patch and compile it yourself from the sources.
On the wiki page there is a
page with a description of the router and a patch for the sources. The whole point of the patch is to add a new build platform to the Makefile, while the platform description is already in the trunk version.
- shrinking source code with SVN
svn co svn.openwrt.org/openwrt/branches/backfire backfire
- add two lines with our router
# D-Link DSL-2650U
$(call Image/Build/CFE,$(1),96358VW2,6358,DSL2650U)
after
# D-Link DSL-2740B
$(call Image/Build/CFE,$(1),96358GW,6358,DSL2740B)
to target/linux/brcm63xx/image/Makefile
- do
make menuconfig
to configure the build (perhaps an optional item, but I did it), and replace the generated .config
file with the one from the release: downloads.openwrt.org/backfire/10.03.1-rc5/brcm63xx/config
downloads.openwrt.org/backfire/10.03.1-rc5/brcm63xx/config
(you need to download the config
file and rename it to .config
) - After that, just
make
and wait for the build to complete.
It will take a long time to compile, because the toolchain, all dependencies and the necessary utilities are automatically built. After the build, a folder
bin/brcm63xx
will appear with images for all supported routers. We need the file
openwrt-DSL2650U-squashfs-cfe.bin
.
Flashing router
The first attempt to feed this file to update the firmware via the web interface of the router failed - the web interface returned a non-informative error stating that this image could not be flashed.
There was also an attempt to flash through tftp. The principle is simple, consists in the fact that when booting, the bootloader launches the tftp server, and if you catch the moment, you can fill the firmware. How many times I have not played with rebooting the router, there was no result. You can
read here .
At this stage, my hands have already dropped and I accepted the purchase of a new router, when I found on the Internet that there was a firmware mode without checking the correctness of the firmware.
To call this mode, you need to
hold down the
reset button, turn on / reboot the router and hold the (reset) button for 10 seconds. After that, when entering the web interface, the router will offer to download the firmware. Having decided to take a chance (there is an opportunity to make a brick out of the router), we load the firmware there, wait for two minutes and about a miracle, on our OpenWRT router.

')
Customization
We have a router with OpenWRT, without a web interface, although the web server works and shows emptiness.
First you need to log into the router via
telnet
, and, after running the
passwd
command, assign a root password. After that, we can communicate with the router via ssh:
ssh root@192.168.1.1
.
As it turned out, it was not the biggest problem to flash the router, because you still need to configure the network in a smart way. Break a lot of documentation, we understand what needs to be done through VLANs - virtual networks. It is necessary to break the ports of the switch into separate subnets, and configure forwarding. Following this wiki
page , we edit the
/etc/config/network
file.
Our switch interface coincides with the one suggested in the manual - this is eth1, and we want to transfer the fourth LAN port to a separate subnet, so we can copy most of the config from the documentation. The only difference is that we do not have a current WAN port (it is, but it is not derived with iron), so we do not create a separate
extranet , but edit the
wan section by changing
ifname eth0
to
ifname eth1.1
. The advantage of this change is that everything in the router is initially configured to distribute the Internet from
wan to
lan .
Full config:
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 127.0.0.1
option netmask 255.0.0.0
config interface lan
option type bridge
option ifname eth1.0
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
option nat 1
config interface wan
option ifname eth1.1
option proto dhcp
Restart the network service by executing the command
/etc/init.d/network restart
It was experimentally revealed that
port 3 in the config corresponds to the real first port. Since I was satisfied with this option, I did not try again, but I suspect that
port 0 will be the real fourth port.
We stick the Internet wire into the first wire, and we are happy with the distribution of the Internet. If you need to connect via VPN, firmware and this can.
Finishing touches
To configure Wifi, you need to edit the file
/etc/config/wireless
. Wi-Fi setup is described
here .
The most common web interface is Luci. To install, with the Internet connected, you need to run:
opkg update
opkg install luci
As a result, we have a full-fledged linux on the router, where you can raise torrent clients, all sorts of caching services, proxies, etc. And since there is a USB connector, you can make network storage or an Internet rocking chair.
The disadvantage of OpenWRT is that we are losing the function of the DSL modem, but since the lack of DSL and prompted such a decision, it is not critical.
Useful links: