This page will contain about information specific to Netgear WNDR 3700 [v2]. Although basic installation of DebWrt covers almost everything when it comes to this router, there are few things one has to figure out on their own.

User contributed images: http://www.debwrt.net/download/user/netgear/

Switch configuration

WNDR 3700 switch will not work with DebWrt default configuration. In order to make it work you will have to set it up on your own.

Devices

You can check out device layout in OpenWRT wiki: http://wiki.openwrt.org/toh/netgear/wndr3700#switch.ports.for.vlans You will notice that:

  • eth0 is the device behind LAN ports
  • eth1 is the device behind WAN port

This means, if you want to leave LAN ports and WAN port separate you don't have to configure more than one vlan.

Switch configuration

I've tried using robocfg, but I failed, thus will use swconfig instead, however will reuse the default DebWrt /etc/init.d/robocfg file. First, enable robocfg processing.

echo "ENABLED=1" > /etc/default/robocfg

Edit the /etc/init.d/robocfg file to make the do_start() and do_stop() functions look like this:

do_start()
{
        if ( ls -l /etc/network/interfaces | grep firstboot >/dev/null ); then
                log_action_end_msg 1
                echo "FIRSTBOOT - Please configure network in /etc/network first - robocfg did not configure switch"
                return
        fi

        # First set iface eth0 up, otherwist robocfg can't find the hardware
        /sbin/ifconfig eth0 up

        # Configure switch

        /usr/sbin/swconfig dev rtl8366s set reset
        /usr/sbin/swconfig dev rtl8366s vlan 1 set ports "0 1 2 3 5t"

        # Configure vlan
        /sbin/vconfig add eth0 1                      1>/dev/null

        # Configure nice name
        /sbin/ip link set dev eth0.1 name eth0_lan

        log_action_end_msg 0
}

do_stop()
{
        if ( ls -l /etc/network/interfaces | grep firstboot >/dev/null ); then
                log_action_end_msg 1
                echo "FIRSTBOOT - Please configure network in /etc/network first - robocfg did not configure switch"
                return
        fi

        /sbin/vconfig rem eth0_lan 1>/dev/null
        /usr/sbin/swconfig switch reset
}

I believe the do_stop() function could be improved, however it works for me as it is.

Now a change to the interfaces configuration file.

If you already have your interfaces file, edit it and add this (update as needed):

auto eth0_lan
iface eth0_lan inet static
    address 192.168.0.1
    netmask 255.255.255.0

Make sure there's nothing in your file for eth0 interface.

If you don't have your own config yet, you can create a new one:

cd /etc/network/
rm interfaces
touch interfaces.wndr3700
ln -s interfaces.wndr3700 interfaces

Now edit interfaces file (symlink) to make it look like this:

auto lo
iface lo inet loopback

# LAN ports config
auto eth0_lan
iface eth0_lan inet static
    address 192.168.0.1
    netmask 255.255.255.0

# WAN port config
auto eth1
iface eth1 inet static
    address 192.168.1.1
    netmask 255.255.255.0

I've left out the wlan0 and wlan1 configuration as this is strictly about LAN/WAN ports. You can add your own config to suit your needs.

Make sure the values you enter are appropriate for your network. Changes to this files may make your router unreachable from your network! It is wise to set the WAN port to a specific IP address so you can safely reach your router after all the changes.

After all of the work is done reboot the device.

Last modified 6 years ago Last modified on Apr 30, 2011, 1:55:43 AM