[solved]Wired network stops working after reflashing the router

Hi,

I reflash my router (COMPEX WPJ563A) from CompexWRT to OpenWRT, but find the ethernet ports stop working. The WAN port cannot obtain IP from our campus DHCP server, and the LAN port doesn't give out IP to the connected computer.

The /etc/config/network looks like this:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd00:3c16:3d7d::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 0t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '3 0t'

And by using ip link | egrep '^[0-9]' to check the operation of network interfaces, I got this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
4: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
6: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
7: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000

I have been playing with OpenWrt for more than one year, it has been working good without this type of problem. No idea on what to do, great thanks to any suggestions!

Have you tried to reverse the cables? Does the WAN port give DHCP settings maybe?

By "reverse the cable", do you mean connecting my computer to the WAN port and expecting to obtain an IP from the WAN port?

I have not tried that before. Let me try it.

I use the WAN and LAN in a reverse way, it works for both.

I cannot believe it's because I remember the two interfaces wrong. Because with the initial CompexWRT, it is the LAN port that gives IP address.

Actually, before using this WPJ563, I have been using WPJ558 for all the time. The schematic for the two boards are almost the same, I cannot image they reverse the LAN and WAN on this board......

So it all works fine? Glad it was that simple.
If your problem is solved, feel free to mark the relevant post as the solution; and edit the title to add "[SOLVED]" to the beginning (click the pencil behind the topic).

grafik

1 Like

Thank you.

But could you please perhaps let me know why this can happen? It's counter-intuitive. After shifting from compexWRT to openWRT, the function of LAN and WAN will switch?

I have no idea, maybe the following output can shed some light.
ls -l /sys/class/net
swconfig list
use the name found, usually switch0 in the following command
swconfig dev switch0 show

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.