No IP address on wired connection in AP-bridge mode

The problem is really similar to the one described here: [Solved] Wireless works but wired doesn't (OpenWrt 18.06) However, mine connection does not start to work magically after restart...

I have a bridged configuration created based on the wiki & some internet tutorials. The router is TL-WDR300. It works, when I connect devices wirelessly, but when I connect my PC or NAS with a wire - they do not get an IP address assigned.

Requirements:

  • OpenWRT connects the neighour's AP for the Internet connection (192.168.1.1/24) with 2.4GHz network
  • It creates a LAN network for my apartment (10.0.0.1/24)
  • It broadcasts my own SSIDs for both 2.4 and 5 GHz
  • The wired connections are working

I have managed to achieve all but the last. Have no idea what went wrong.

root@OpenWrt:~# cat /etc/config/network 

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 'fd66:52ea:2399::/48'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option ipaddr '10.0.0.1'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ifname 'eth0 eth0.1'

config device 'wan_eth0_2_dev'
	option name 'eth0.2'
	option macaddr 'c4:6e:1f:b9:fa:1d'

config switch
	option name 'switch0'
	option reset '1'

config interface 'wwan'
	option proto 'dhcp'

config interface 'bridger'
	option proto 'static'
	option type 'bridge'
	option netmask '255.255.255.0'
	option ipaddr '10.0.1.1'
	option ifname 'eth0.1
root@OpenWrt:~# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/ahb/18100000.wmac'
	option htmode 'HT20'
	option disabled '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option mode 'ap'
	option key 'XXX'
	option ssid 'MySsid24'
	option encryption 'psk2'
	option network 'lan'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option htmode 'HT40'
	option channel 'auto'
	option disabled '0'

config wifi-iface 'wifinet3'
	option device 'radio1'
	option mode 'ap'
	option ssid 'MySsid5'
	option key 'XXX'
	option encryption 'psk2'
	option network 'lan'

config wifi-iface 'wifinet4'
	option device 'radio0'
	option mode 'sta'
	option ssid 'YYY'
	option key 'XXX'
	option encryption 'psk2'
	option network 'wwan bridger'
root@OpenWrt:~# cat /etc/config/dhcp 

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	option localservice '1'

config dhcp 'lan'
	option interface 'lan'
	option limit '150'
	option dhcpv6 'server'
	option ra 'server'
	option start '10'
	option ra_management '1'
	option leasetime '72h'

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 dhcp 'bridger'
	option start '100'
	option leasetime '12h'
	option limit '150'
	option interface 'bridger'

Wifinet4 is in both networks: wwan and bridger, at the same time eth0.1 is in lan and bridger. Is that correct ?
I thought your wan would be wwan, lan your private network, and you would have the firewall between the 2. Why do you need bridger ?

3 Likes

In your /etc/config/network:
VLAN configuration is missing. This may explain why wired does not work.
bridger interface does not do anything. You cannot bridge a STA interface.

3 Likes

Thank you for the hints. I must have used some weird tutorial when configuring this... Done everything from scratch based on this article: https://openwrt.org/docs/guide-user/network/wifi/connect_client_wifi and everything seems to be working as expected.

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