Router works only wired (modem in bridge mode)

Hello,

I'd like to use my ISP's modem/router in bridge mode and connect with my own router.

A new connection was set up in modem as bridge-mode.
Modem doesn't have an option (I think) to remove the default DSL connection that is set up. I can turn off the wifi from modem but haven't done so to troubleshoot.
So this means, I connect to the internet via my modem or via my router (with PPPoE).

If I connect through the router I can only do so by cable.If I connect wirelessly I can't as I don't get a local IP.

Also I improvised by reading something I didn't understand :smiley: and gave my modem an .2.1 IP and my router a .1.1

Please find my settings below.

/etc/config/network

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 'fdd4:2e81:e182::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

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

config device
        option name 'wan'
        option macaddr 'xxx'

config interface 'wan'
        option device 'wan'
        option proto 'pppoe'
        option username 'xxx'
        option password 'xxx'
        option ipv6 'auto'
        option type 'bridge'

/etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option force '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config host
        option name 'xxx'
        option ip '192.168.2.238'
        option mac 'A0:CE:C8:E6:A8:5C'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
        option channel '36'
        option band '5g'
        option htmode 'xxx'
        option country 'xxx'
        option cell_density '0'
        option distance 'xxx'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'wan'
        option mode 'ap'
        option ssid 'xxx'
        option encryption 'xxx'
        option macaddr 'xxx'
        option key 'xxx'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option country 'FR' <- this doesn't match with radio0.
        option disabled '1'

What hardware we're talking about?

Hi thank you for the reply.

modem: ZTE 1600
router: Linksys WRT1900

Change option network to 'lan' and remove option type 'bridge' from the wan interface.

1 Like

Hi pavelgl, I've changed the above settings but still doesn't like it. Should I run something that might tell you more?
Thank you again.

Please post the output of:

brctl show; /etc/init.d/log restart; /etc/init.d/dnsmasq restart; \
sleep 3; netstat -nlp | grep 67; logread -e dnsmasq-dhcp

cheers,

bridge name	bridge id	 STP enabled	interfaces
br-lan		xxx		     no		        lan4
						                lan2
						                phy0-ap0
						                lan3
						                lan1

udp	   0	   0 0.0.0.0:67	   0.0.0.0:*	3711/dnsmasq
-ash: logreaed: not found                                                                                                                                 

Copy/paste the whole block and press Enter.
Do not redact anything, there is no sensitive information here.

1 Like
bridge name     bridge id               STP enabled     interfaces
br-lan          7fff.c4411e31e2d7       no              lan4
                                                        lan2
                                                        phy0-ap0
                                                        lan3
                                                        lan1
udp        0      0 0.0.0.0:67              0.0.0.0:*                           4014/dnsmasq
-ash: logreaed: not found

I don't get how the logread command could change during copy and paste, but never mind.
Let's assume the DHCP pool is available because you claim it works for wired clients.

First verify that the clients are indeed connecting wirelessly by checking the logs.

logread -e STA

Pay attention when entering the commands. If you see -ash: ...: not found, something is wrong.
If the wireless clients do connect but don't get an IP, you'll need to check what's going on using tcpdump.

opkg update; opkg install tcpdump; tcpdump -nnvvti br-lan port 67

logreaed

maybe I messed up the .txt I was using to lose the format.

verified clients are connecting

interestingly: my linux machine doesn't connect, but my phone does.

user@OpenWrt:~# logread -e STA
Tue Feb 20 10:43:26 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:27 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:28 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:34 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: deauthenticated due to local deauth request
Tue Feb 20 10:43:38 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: authenticated
Tue Feb 20 10:43:38 2024 daemon.notice hostapd: phy0-ap0: STA-OPMODE-MAX-BW-CHANGED xxx 40
Tue Feb 20 10:43:38 2024 daemon.notice hostapd: phy0-ap0: STA-OPMODE-N_SS-CHANGED xxx 3
Tue Feb 20 10:43:38 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: associated (aid 2)
Tue Feb 20 10:43:38 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:39 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:40 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:41 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:47 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: deauthenticated due to local deauth request
Tue Feb 20 10:43:52 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: authenticated
Tue Feb 20 10:43:52 2024 daemon.notice hostapd: phy0-ap0: STA-OPMODE-MAX-BW-CHANGED xxx 40
Tue Feb 20 10:43:52 2024 daemon.notice hostapd: phy0-ap0: STA-OPMODE-N_SS-CHANGED xxx 3
Tue Feb 20 10:43:52 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: associated (aid 2)
Tue Feb 20 10:43:52 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:53 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:54 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:55 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:43:55 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: disassociated
Tue Feb 20 10:43:56 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Tue Feb 20 10:44:02 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: authenticated
Tue Feb 20 10:44:02 2024 daemon.notice hostapd: phy0-ap0: STA-OPMODE-MAX-BW-CHANGED xxx 40
Tue Feb 20 10:44:02 2024 daemon.notice hostapd: phy0-ap0: STA-OPMODE-N_SS-CHANGED xxx 3
Tue Feb 20 10:44:02 2024 daemon.info hostapd: phy0-ap0: STA xxx IEEE 802.11: associated (aid 2)
Tue Feb 20 10:44:02 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:44:03 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:44:04 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
Tue Feb 20 10:44:05 2024 daemon.notice hostapd: phy0-ap0: AP-STA-POSSIBLE-PSK-MISMATCH xxx
user@OpenWrt:~# logread -e dnsmasq-dhcp
Tue Feb 20 10:43:25 2024 daemon.info dnsmasq-dhcp[1]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Tue Feb 20 10:43:25 2024 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
user@OpenWrt:~# opkg update; opkg install tcpdump; tcpdump -nnvvti br-lan port 67
Downloading https://downloads.openwrt.org/releases/23.05.0/targets/mvebu/cortexa9/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/23.05.0/targets/mvebu/cortexa9/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/luci/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/telephony/Packages.sig
Signature check passed.
Installing tcpdump (4.99.4-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/base/tcpdump_4.99.4-1_arm_cortex-a9_vfpv3-d16.ipk
Installing libpcap1 (1.10.4-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a9_vfpv3-d16/base/libpcap1_1.10.4-1_arm_cortex-a9_vfpv3-d16.ipk
Configuring libpcap1.
Configuring tcpdump.
tcpdump: listening on br-lan, link-type EN10MB (Ethernet), snapshot length 262144 bytes

NEW update: my windows PC can connect as well - this is the PC I use to connect to the router via ethernet. what part of the above command made WinPC to connect?

This means that the station that is trying to connect is using a wrong password.

2 Likes

Oh! That's easy then! : )

Between editing the 2 lines you suggested initially, and now that my devices can connect wirelessly, what made it work?

Thank you for all your help.

1 Like

Attaching the lan network to the SSID should be enough.
The possibilities are that you forgot to restart the network service or the router needed a reboot.

1 Like

Perfect thanks, I marked first reply as the solution.
So after every change, in the config files, is it enough to run:

/etc/init.d/log restart

or is the dnsmasq restart also needed?

For such a change, you only need to restart the network service.

/etc/init.d/network restart

You must restart dnsmasq (after the network service) if you change the IP address of an interface that has a DHCP server enabled.

The purpose of restarting log and then dnsmasq was just to collect the latest DHCP info.

1 Like

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