No stable openwrt version for GL-MT300N?

@projects, I am not at all sure what GLi is specifically doing to address (Repeater) Bridge, but as you want to use standard OpenWrt without the GLi GUI, you are pretty much back in OpenWrt land.

Not clear if you are using wireless or wired as you only include the network file. If you are running wired between the Gli and “upstream” device, then you may want to see this wiki. [OpenWrt Wiki] Wireless Access Point / Dumb Access Point You can do this in Luci.

If the GLi device is wireless on both sides then you should read the following WIKIs:

https://wiki.openwrt.org/doc/howto/clientmode#bridgedclientmodeissues

https://wiki.openwrt.org/doc/recipes/relayclient

Relayd is only needed if both sides of the same radio are wireless.

If you have control of the “upstream” DHCP device you have more options depending on hardware (see first wiki). Using relayd pretty much allows you to confine all config to a device you have control over (yours), and your best alternative from a support perspective, though definitely more complex.

UCI or editing files should be the same, though some elements in the network file are chipset dependent (ifnames I think). Luci also works for most of this. I edit files in Windows using WinSCP or use Luci.

While it seems unrelated ATM, I strongly suggest setting a fixed IP for the device. If you let the main DHCP router assign the IP it may change after a reboot and you may have trouble accessing the device if needed. May or may not be relevant in your config environment. Have not done this in a year so it’s a bit foggy.

I think @projects means bridging using Ethernet cable. If yes, it should be easier.

/etc/config/network

config interface ‘lan’
option ifname ‘eth0.1 eth0.2’
option force_link ‘1’
option type ‘bridge’
option proto ‘dhcp’

config interface ‘wan’
option ifname ‘eth0.2’
option force_link ‘1’
option proto ‘dhcp’

/etc/config/dhcp

add “option ignore 1” to “lan” section.

The above config will do the job.

You can set up a fixed address for LAN so that you can access the router. Make sure the ipaddr is in the same subnet as your real gateway.

/etc/config/network

config interface ‘lan’
option ifname ‘eth0.1 eth0.2’
option force_link ‘1’
option type ‘bridge’
option proto ‘static’

option ipaddr 'xxx.xxx.xxx.xxx'

option gateway 'xxx.xxx.xxx.xxx'

 

Yes, the other person is not understanding my need and what he is saying is much more complicated than what I am asking.

I simply need to bridge the two interfaces together, with the device acting as a DHCP client (no dhcp server or firewall is installed on device) so that I can inspect packets between the two interfaces.

The file is, as you know, in files/etc/config/network

…when I build the new image.

Can you just post exactly the file I should use. I’m not clear on what you are suggesting.
Once I see it done, I’ll know what you mean, can use it and can save the note.

I wills tart new posts for different questions.

I already marked what should be change in bold or strikethrough, just change these in your config.

Sorry but that is not clear to me.

Are you saying the file in files/etc/config/network should look like the following then. No other content, just this.

config interface ‘lan’
option ifname ‘eth0.1 eth0.2’
option force_link ‘1’
option type ‘bridge’
option proto ‘dhcp’

config interface ‘wan’
option force_link ‘1’
option proto ‘dhcp’

just leave other contents as is and only change the lan I marked.

Don’t delete all the other lines.

LOL, I created the file as I thought you meant and built a new firmware. I got locked out of the device which ended up having no network what so ever. The only way I was able to recover was the user TTL and to send echo commands of each line into the network file. Eventually, I was able to reboot it, gain network again then fix the problem.

It was interesting that I could not make it go into any factory default mode where it would look for a firmware by tftp however.

So, to prevent making that mistake again, I will post the contents of the file. I’ve asked you if you could post the full content so I don’t make any error because it is not clear what you are telling me when you are highlighting and crossing things out :).

New file will look like…

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 ifname ‘eth0.1 eth0.2’
option force_link ‘1’
option type ‘bridge’
option proto ‘dhcp’

config interface ‘wan’
option force_link ‘1’
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 ‘2’
option ports ‘0 6t’

config switch_vlan
option device ‘switch0’
option vlan ‘1’
option ports ‘1 2 3 4 6t’

 

Can anyone confirm the above please?

Yes. I confirm it looks OK. But I am travelling and cannot test it.

Actually there is one line in /etc/config/dhcp you need to change. I have said above.

But let’s make it more easily.

  1. Don’t change the network, just use your current settings.

  2. Download two script and compile in your firmware. They are:

http://www.gl-inet.com/download/script/switch_mode

http://www.gl-inet.com/download/script/BTN_1

The first file is to switch between router and AP bridge mode. It should be /usr/bin/switch_mode

The 2nd file is script assigned to the hardware switch. It should be rename /etc/rc.button/BTN_1

So, when you change the switch to the left, it is router mode, when you move the switch to the right, it is bridge mode.

DO NOT forget to change the two files to executable by using “chmod +x”

Thanks for the reply.

Actually, I will never need a router mode, I only ever need the device in bridge mode. It should have only two ways of connecting it.

One, connecting to LAN when only wanting to use the device as a client, no pass-through.

Two, pass-through, connecting LAN side of network to the LAN port of the device, then connecting the upstream router/modem/firewall with DHCP server to the WAN port of the device. This will allow us to use tcpdump on the device to do troubleshooting. The device could remain in place this way.

Also, the dhcp option, ignore 1, is this basically to prevent the dhcp server from starting on the device? I don’t need a dhcp server on the device, I only need the device to be a dhcp client. I built using the above, without a dhcp file so have the factory default.

 

The device does pick up a dhcp address from the upstream. The only dhcp process I see running on the device is;

udhcpc -p /var/run/udhcpc-br-lan.pid -s /lib/netifd/dhcp.script -f -t 0 -i br-lan -C

 

 

Now, there is a team forked the openwrt as a new project - LEDE, would you pleases try to submit the patch to the LEDE team?

@Tedaz, are you asking me? I’m not the hardware dev, this is a temporary position for me so am not really sure what you are asking.

There is a LEDE Trunk version available here: Index of /snapshots/targets/ramips/mt7620/

lede-ramips-mt7620-gl-mt300n-squashfs-sysupgrad.

If you plan to use packages with the trunk build, you should also download all the packages in the subfolder packages (try wget) and also the packages for the architecture here: Index of /snapshots/packages/mipsel_24kc/ LEDE manages packages differently than OpenWrt.

They should be from the same build event or they may not install. You will need to search on how to manage your package repository. I usually just FTP (WINSCP) them to the tmp folder. This is a stripped image and will not include Luci, USB, etc.

Not tried these.

There is no date on LEDE stable versions, but as there is trunk there should be stable when available.

 

Ok, thanks for the input. Mainly, I just need/want to confirm that my final configuration is as best as it can be.