New OpenWrt as modem please help

Hello all,

I really need help to setup a new router (redmi ac2100 White one) as modem. I flashed the routers with the new firmware (snapshot) and didnt made a internet conection right away, but after 4 days of searching The internet i setup the router as a dumb AP from "https://gist.github.com/braian87b/bba9da3a7ac23c35b7f1eecafecdd47d" and i notice when i set the UCI set network.lan.type='bridge' with a static ap IT make a connection.
Then i installed luci and try to set the vlans for t mobile:

Gate 1 Trunk vlan 300 en vlan 640 Tagged
Gate 2 VLAN 300 Untagged
Gate 3-7 VLAN 640 Untagged
Gate 8 VLAN 1 Untagged

Except the option under network -> switch is gone? And i cant find it. I have reset the router erease all setting but if i do that luci is gone to and in cant make a internet conection anymore.

So im stuck in this state i cant find anyting on the internet (mostly because i dunno where im searching for).

Does anyone knows where i searching for?
Or mayby the solution?

Thanks in advance

For my understanding vlans is some virtual lan ports that is something in the software not the hardwar, but i could be wrong.

Greetings from Mike :slight_smile:

AC2100 is a router, doesn't have any modem.

There is official guide for dumbAP.

What is the output of uci export network ?

Please use the "Preformatted text </>" button for logs, scripts, configs and general console output.
grafik

this is the uci export network after the first boot, but no internet connection.

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 packet_steering '1'
        option ula_prefix 'fd07:313e:83ee::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'lan1 lan2 lan3'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'wan'
        option proto 'dhcpv6'

this is the uci export network after i installed update, with internet connection:

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 packet_steering '1'
        option ula_prefix 'fd07:313e:83ee::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option dns '192.168.1.1'
        option ifname 'lan1 lan2 lan3 wan'

config interface 'wan'
        option ifname 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'wan'
        option proto 'dhcpv6'

the uci export network for the luci setup is comming up, i have trouble with update opkg i have a internet connection exept not trough the shell.

This is DSA, so there isn't a separate switch configuration. It is supposed to work to tag VLANs on a port directly in the config with option ifname 'wan.300' for example. But I don't know if that has been implemented / fixed for the MT7621 yet.

In your second "working" configuration, you have simply bridged the WAN port with the LAN ports and the wifi-- so the router actually isn't doing anything but acting as a layer 2 bridge. Your PC(s) are talking directly to the modem. So don't do that. The WAN port should only be in the wan network.

This suggests that the modem is also issuing private IPs and doing routing, and it may simply be an IP overlap (both networks are 192.168.1.X) causing a failure to route.

2 Likes

Do you want to use the router as dumbAP only? Then from your working configuration do the following:

  1. Delete wan interface. wan port is already under lan interface.
  2. Adapt the IP/MASK of lan interface to the subnet that your ISP router is using.
  3. Add gateway and DNS the router of your ISP.
  4. Switch off DHCP service on lan.

If you want to use this as a router the default configuration will work, provided you connect the AC2100 to the ISP router from the wan (internet) port.

1 Like

The final idea is to replace my zyxel t50 router that my profider gave me, with the redmi ac2100 router.
and then the second and third router (also a redmi ac2100) as just a dumbAP.

But when i installed openwrt included the sysupgrade the router can't make a connection to the internet. The start point is a fiberglas media converter then the first remi router and then the dumbAP's with wifi. Its possible in the guide from my internet profider says some vlans need to be made:

(8 lan gate example)
gate 1 Trunk vlan 300 en vlan 640 Tagged
gate 2 VLAN 300 Untagged
gate 3-7 VLAN 640 Untagged
gate 8 VLAN 1 Untagged

i think that:
gate 1 is the wan port
gate 2 is the internet output that makes the real connection
gate 3 - 7 is just a lan gate for the IPTV
gate 8 is just a lan gate maybe telephone or something else

the bottom line is im not knowing what im doing, only when i change the lan.ifname , lan.dns. i get a internet connection. if someone know what i need to search on google that would be fine to, its always fun to figure things out. thanks for all the responses

AMAZING THANKS you are right with the:

This suggests that the modem is also issuing private IPs and doing routing, and it may simply be an IP overlap (both networks are 192.168.1.X) causing a failure to route.

i changed it to 192.168.2.1 and it works now :slight_smile:
only the vlans now :blush:

Which "gate" of the ONT (fiber converter) is your router plugged in to? It looks like you're supposed to use 2 for Internet, and 3 through 7 for TV boxes, and 8 is for internal access to the ONT. The trunk port 1 would be used if you needed to expand the system by having Internet and TV networks on the same cable to another part of the house.

If ports 2-8 leave the fiber converter untagged as described, use an ordinary connection that doesn't require tagging by the router. Port 1 is tagged.

when im searching for my problems on this forum your name shows up a lot, i was searching to understand the question, but now i think i understand your question.

This is DSA, so there isn't a separate switch configuration. It is supposed to work to tag VLANs on a port directly in the config with option ifname 'wan.300' for example. But I don't know if that has been implemented / fixed for the MT7621 yet.

now im gonna try to setup the vlans trough uci like you told me so in the first place. like:

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 packet_steering '1'
        option ula_prefix 'fd07:313e:83ee::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'lan1.640 lan2.300 lan3.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'wan.300'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'wan.300'
        option proto 'dhcpv6'

I hope that this will work, so that i can connect the IPTV on lan port1 with vlan640. the wan port is tagged with vlan 300 and lan port 2 is have id 300 for the rest of the house AP's and PC's. and lan port 3 for another setup like this but never use it?

The profider says Trunk vlan 300 en vlan 640 Tagged but i really dont know how to do that.
i only hope this setup will work eventually.

thanks for all your help again :slight_smile:

config interface 'wan1'
        option type 'bridge'
        option ifname 'wan.300 lan2.300'
        option proto 'dhcp'

config interface 'wan2'
        option type 'bridge'
        option ifname 'wan.640 lan1.640'
        option proto 'dhcp'

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

This looks more correct to me.
Make sure you allow intrazone forward traffic between the wan interfaces.

I have set everything like:

config interface 'wan1'
        option type 'bridge'
        option ifname 'wan.300 lan2.300'
        option proto 'dhcp'

config interface 'wan2'
        option type 'bridge'
        option ifname 'wan.640 lan1.640'
        option proto 'dhcp'

config interface 'lan'
        option type 'bridge'
        option ifname 'lan3'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

I dont know if vlans are supported for the redmi ac2100. I cant reach lan port 1 (no ip) and on port 2 and port 3 there is no internet. The internet light on the router is lightning up (so there is something). Anyone ideas what i'm doing wrong?
Thanks for all the help.

Are the devices that you connect on port 1 aware of vlans? If not, you'll need to untag port 1.

config interface 'wan2'
        option type 'bridge'
        option ifname 'wan.640 lan1'
        option proto 'dhcp'

The same applies to vlan300 too.

Thanks a lot!! Gonna try it :slight_smile:
Where you learned this?

At university and at work.

Thanks for all the help guys (or girls) but after all the effort i dont think its possible, at least not with the snapshot version of the ac2100 :blush:

After all there may be some hope left after following this tutorial: https://openwrt.org/docs/guide-user/network/vlan/switch_configuration.

I think i made a huge failure in the testing, i was testing after every change i made but al my lan wires are the same color :$. so i think i did all the tests again until this point. but with this network config:

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 packet_steering '1'
	option ula_prefix 'fde1:daae:a513::/48'

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

config interface 'wan'
	option ifname 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option ifname 'wan'
	option proto 'dhcpv6'

config 'switch' 'eth0'
        option 'reset' '1'
        option 'enable_vlan' '1'

config 'switch_vlan' 'lan1'
        option 'device' 'eth0'
        option 'vlan' '640'
        option 'ports' '1'
 
config 'switch_vlan' 'lan2'
        option 'device' 'eth0'
        option 'vlan' '300'
        option 'ports' '2'

config 'switch_vlan' 'lan3'
        option 'device' 'eth0'
        option 'vlan' '1'
        option 'ports' '3'

  
config 'switch_port'
        option 'device' 'eth0'
        option 'port' '3'
        option 'pvid' '3'

config device
	option type '8021q'
	option ifname 'eth0'
	option vid '640'
	option name 'lan1'
 
config device
	option type '8021q'
	option ifname 'eth0'
	option vid '300'
	option name 'lan2'

config interface 'wan'
	option ifname 'lan2'
	option proto 'dhcp'

config interface 'eerste'
	option type 'bridge'
	option ifname 'eth0.640 lan1'
        option proto 'dhcp'

config interface 'tweede'
	option type 'bridge'
	option ifname 'eth0.300 lan2'        
        option proto 'dhcp'

the tv box was proceeding a couple of steps further it says it makes a connection with the server. but it is stuck on setting the system clock. the step "setting the system clock" takes like 2 min and after that the screen blackends. also on port 1 and 2 i can make a connection to the ap's but there is no internet connection whats so ever. i dont know if that is the dhcp setting but yeahh.

the other setup:

config interface 'wan1'
        option type 'bridge'
        option ifname 'wan.300 lan2.300'
        option proto 'dhcp'

config interface 'wan2'
        option type 'bridge'
        option ifname 'wan.640 lan1.640'
        option proto 'dhcp'

config interface 'lan'
        option type 'bridge'
        option ifname 'lan3'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

the tv box is only proceeding on port 3 like the step above, and port 1 and 2 dont do anything,

also when im installing luci there arnt any vlans options below network. like:

that would make every test a lot easyer. i am still on a snapshot version of the firmware. but on https://openwrt.org/toh/hwdata/xiaomi/xiaomi_redmi_router_ac2100 under the vlan option it says it has vlan.

Knipsel

anyone knows how to get to this option?
thanks to all that read this and help me :smile:

the whole purpose of this is to replace the provided router from t-mobile. in the instuctions from tmobile stands that i need to create some vlans to make the router work.

8 lan port example from a switch not the ac2100 that have only 3 lan ports one wan and 2 wlans:
port 1 Trunk vlan 300 and vlan 640 Tagged
port 2 VLAN 300 Untagged
port 3-7 VLAN 640 Untagged
port 8 VLAN 1 Untagged

and this is the ls -l /sys/class/net output from the first boot

lrwxrwxrwx    1 root     root             0 Aug 10 13:58 br-lan -> ../../devices/virtual/net/br-lan
lrwxrwxrwx    1 root     root             0 Jan  1  1970 eth0 -> ../../devices/platform/1e100000.ethernet/net/eth0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan1 -> ../../devices/platform/1e100000.ethernet/mdio_bus/mdio-bus/mdio-bus:1f/net/lan1
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan2 -> ../../devices/platform/1e100000.ethernet/mdio_bus/mdio-bus/mdio-bus:1f/net/lan2
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan3 -> ../../devices/platform/1e100000.ethernet/mdio_bus/mdio-bus/mdio-bus:1f/net/lan3
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx    1 root     root             0 Jan  1  1970 wan -> ../../devices/platform/1e100000.ethernet/mdio_bus/mdio-bus/mdio-bus:1f/net/wan
lrwxrwxrwx    1 root     root             0 Aug 10 13:58 wlan0 -> ../../devices/platform/1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0/net/wlan0
lrwxrwxrwx    1 root     root             0 Aug 10 13:58 wlan1 -> ../../devices/platform/1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan1

The snapshots have DFS.

Yes there is a hardware switch but you don't configure it directly. Also there is a CPU ethernet port but again you don't refer to it directly. Everything is indirect like @trendy posted;

config interface 'tv_640'
   option type 'bridge'
   option ifname 'wan.640 lan1.640'
   option proto none

If DFS works as designed, this is all you should need to hardware switch one VLAN from the modem to the TV (Repeat if the TV uses more than one VLAN). You're making it way too complicated.

Edit: I meant DSA not DFS.

i don't think DFS is working as designed then (i'm not sure). but the network config setup is the same as yours i create different gray interfaces in luci, and im not sure if that is the way to do it? but i found a guy that lives in the same country as me (Netherlands) and has the same internet profider and got it working but he using a edge router, its from this (full english) site: https://sig-io.nl/nl/posts/tmobilethuis-with-own-router/

Now i dont know the port numbers of mine router, LUCI isnt helpfull no network -> switch, swconfig or any kind of interface to see what's plugged into differt lan ports. So i found on openwrt a uci command that shows my ip connections. ip link this is the output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether **MAC-ADRESS** brd ff:ff:ff:ff:ff:ff
3: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether **MAC-ADRESS** brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether **MAC-ADRESS** brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether **MAC-ADRESS** brd ff:ff:ff:ff:ff:ff
6: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether **MAC-ADRESS** brd ff:ff:ff:ff:ff:ff
7: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether **MAC-ADRESS** brd ff:ff:ff:ff:ff:ff
8: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether **MAC-ADRESS** brd ff:ff:ff:ff:ff:ff
9: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether **MAC-ADRESS** brd ff:ff:ff:ff:ff:ff

i thought that the numbers before each link represent the port number so i changed his /etc/config/network to:

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 packet_steering '1'
  option ula_prefix 'fde2:208d:209d::/48'

config interface 'lan'
  option type 'bridge'
  option ifname 'lan1 lan2 lan3'
  option proto 'static'
  option ipaddr '192.168.2.1'
  option netmask '255.255.255.0'
  option ip6assign '60'

config interface 'wan'
  option ifname 'wan'
  option proto 'dhcp'

config interface 'wan6'
  option ifname 'wan'
  option proto 'dhcpv6'

config internet
  option name 'internet'
  option reset '1'
  option enable_vlan '1'

config tv
  option name 'tv'
  option reset '1'
  option enable_vlan '1'

config watch
  option name 'watch'
  option reset '1'
  option enable_vlan '1'

config internet
  option name 'internet'
  option reset '1'
  option enable_vlan '1'

config internet_vlan
  option device 'internet'
  option vlan '300'
  option vid '300'
  option ports '4 9t'

config tv_vlan
  option device 'tv'
  option vlan '640'
  option vid '640'
  option ports '5 9t'

config watch_vlan
  option device 'watch'
  option vlan '100'
  option vid '100'
  option ports '6 9t'

config tv_vlan
  option device 'tv'
  option vlan '640'
  option vid '640'
  option ports '1t 9t'

config internet_vlan
  option device 'tv'
  option vlan '300'
  option vid '300'
  option ports '1t 9t'

config watch_vlan
  option device 'watch'
  option vlan '100'
  option vid '100'
  option ports '1t 9t'

but i doubt that the numbers before each link (form ip link) represent the port numbers :expressionless:

If by gray you mean the colour of the interface (where lan is green and wan is red), then you have not assigned it to a firewall zone. This means that it won't be able to forward traffic to any other zone and will use the default zone policies.

1 Like

The numbers in the first column of ip link show are an index in the kernel's internal table of links. They have no relation to actual hardware.

What you are looking for is the status of either NO-CARRIER, which means the port is not connected, versus LOWER_UP, which means there is a live Ethernet device on the other end of the cable. Plug and unplug the cables one at a time to map out the ports. You may want to make labels for the ports if they don't match how the manufacturer marked them. I don't think they're marked at all on an Xaiomi.

The old swconfig like configuration simply does not apply to a DSA system. What you are trying there is not going to work.

1 Like