OpenWRT can see and use only one ETH interface at a time

Other interface is in disabled state after reboot and start to work only if I enable it manually like

ifconfig eth0 up

And only WAN interface is up, never LAN interface. I can ping www.goggle.com, update packages, etc. but I can not connect any client to OpenWRT.

Here is dmesg | grep eth

Here is cat /etc/config/network

here is ifconfig (after I enabled eth0 via ifconfig eth0 up)

P.S. Forgive me for posting pictures, but since I have only WAN interface it is a bit problematic to use putty.

a few things here...

First, it would be really useful if we knew what device you're working with. It would appear to be x86 or a RPi or similar, but without details we cannot know for sure what is going on. We'll also need to know what kind of network cards are in use here and if you've loaded the appropriate drivers (if necessary).

Next, there is no need to have a bridge on the wan. The device under the wan interface should just use eth1 directly. Delete br-wan.

I also see that you have the wan interface setup as dhcp, but you have a netmask specified. Delete that line, as it shouldn't be there.

After making the two changes, restart your device and see if the lan comes up (btw, what is connected to eth0 and how is it configured)?

1 Like

Thank you!
It is ASRock G31M-VS2 basebord and some Dual Core CPU that I use

I was thinking that /etc/config/network is completely proper and no need to change it. Since it worked perfectly for another two machines.

I change it as you said

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

config globals 'globals'
        option ula_prefix 'fdc9:68bb:252a::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.4.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
#        option name 'br-wan'
        option type 'bridge'
        list ports 'eth1'

config interface 'wan'
#        option device 'br-wan'
        option proto 'dhcp'
#        option netmask '255.255.255.0'

like so?

Netwok card model is: Gembird NIC-R1 based on RTL8139D for which I have already installed drivers.

P.S. I now have only interfaces configured, no connections

UPD: Topic can be closed, guys. Thank you for all your support. I really appreciate it, for it is most tolerant and friendliest community in dark and evil waves of unholy Internet.
The thing is that I've found Elitegroup 945GCT-M2 in a garbage can and the miracle happen - Integrated Network Card in this baseboard is based on THE SAME Realtek chip like discrete Network Card Gembird NIC-R1. Everithing works fine now. You're breathtaking :slight_smile: Cheers.

You still have WAN as a bridge - you merely deleted its name. You can return this to its original default.

I guess your making note that br-lan no longer appears?

Is the hash/pound still at the beginning of your br-lan device config?

I edited config several times and rebooted every time after it. Because it happen that /etc/init.d/network reload is not always work properly, only reboot helps.

Now config looks like

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

config globals 'globals'
        option ula_prefix 'fd11:d566:7bd7::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.4.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'br-wan'
        option type 'bridge'
        list ports 'eth1'

config interface 'wan'
        option device 'br-wan'
        option proto 'dhcp'
#       option netmask '255.255.255.0'

Everything is working ok. Many Thanks! I try to remove br-wan option but in reseult I unded up with no connections at all, only interfaces were listed in ifconfig

1 Like

In the future you can try:

/etc/init.d/network restart

1 Like