How to change WAN interface to bridged LAN interface?

This device uses cellular as WAN and I would like to gain a LAN port. I did the following

  1. Delete WAN IPV6 interface
  2. Tried with protocol set to unmanaged and relay bridge
  3. Bridged eth0 and eth1 in physical settings

I get network device is not present even after restarting the interface

You do not want to bridge with the WAN interface -- it should be done within the br-lan.

Please post your network config file:

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network

I restored my backup so at the moment the WAN is configured as it shipped

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 'fd96:da86:ea48::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option hostname 'GL-X300B-7c9'
        option ipaddr '10.23.1.1'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'
        option hostname 'GL-X300B-7c9'
        option metric '10'
        option ipv6 '0'

config interface 'wan6'
        option ifname 'eth0'
        option proto 'dhcpv6'
        option disabled '1'

config interface 'guest'
        option ifname 'guest'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.9.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'modem_1_1'
        option ifname '3g-modem'
        option service 'umts'
        option apn 'b2b.static'
        option proto '3g'
        option device '/dev/ttyUSB3'
        option node '1-1:1.3'
        option auth 'NONE'
        option metric '40'
        option disabled '0'

You basically want to take eth0 out of wan and wan6 and put it in the lan bridge. Should be pretty simple.

You may need to create an explicit br-lan stanza for eth0 and eth1.

What version of OpenWrt are you using?
ubus call system board

Yes if it is official OpenWrt version 21 you would.

If its the GL firmware, check with them. Though it is likely similar to OpenWrt 19, where you would keep using the old syntax with option ifname 'eth0 eth1'

Take all those option hostnames out and set the hostname in /etc/config/system.

1 Like
{
        "kernel": "4.14.241",
        "hostname": "ST0023",
        "system": "Qualcomm Atheros QCA9533 ver 2 rev 0",
        "model": "GL.iNet GL-X300B (NOR)",
        "board_name": "glinet,gl-x300b-nor",
        "release": {
                "distribution": "OpenWrt",
                "version": "19.07.8",
                "revision": "r11364-ef56c85848",
                "target": "ath79/nand",
                "description": "OpenWrt 19.07.8 r11364-ef56c85848"
        }
}

yea its GL (19)

So

  1. Delete WAN and WAN IPV6
  2. Remove hostnames
  3. Add something like
config interface 'br-lan'
        option type 'bridge'
        option ifname 'eth0 eth1'

yeah... give that a shot.