Who can help me?
I configured my router but then i found out that my wired connection did not worked.
So i made a backup,reset the router and put the lines below in the network.config file
config device
option name 'office'
option type 'bridge'
list ports 'lan3'
list ports 'lan4'
config interface 'office'
option device 'office'
option proto 'static'
option ipaddr '192.168.13.1'
option netmask '255.255.255.0'
But when i put my wire in lan 4 i don't get internet, i set my firewal to accept all 3, what is wrong why can't i have a connection?
What device is this? What version of OpenWrt? What is upstream of this OpenWrt device?
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
cat /etc/config/network
cat /etc/config/firewall
ubus call system board
Plug and unplug the "LAN4" cable then check the last few lines of the kernel log to see which port actually went up and down. On some hardware, the OpenWrt software port names may not match the writing on the outside of the box.
# ... in /etc/config/network
config device
option name 'br-home'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
config device
option name 'office'
option type 'bridge'
list ports 'lan3'
list ports 'lan4'
config interface 'home'
option device 'br-home'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
config interface 'office'
option device 'office'
option proto 'static'
option ipaddr '192.168.13.1'
option netmask '255.255.255.0'
Then i made this
config interface 'lan4'
option proto 'static'
option device 'lan4'
option ipaddr '192.168.4.1'
option netmask '255.255.255.0'
option type 'bridge'
This works for my lan port i got a connection but when attaching a wifi accespoint i did not get acces with wifi.
I think i'm doing something really stupids, i have some knowledge of computers and network but openwrt is new for me and i'm learning every time a little bit more.
There's a lot more to this than just assigning the port. Did you setup a DHCP server for that network? Did you assign it to a firewall zone and ensure it has appropriate settings?
When i make a bridge in device and a interface connecting to it, then i add a lan port to the device and in wireless i make a wifi accespoint connecting to that interface the wifi works but not the wired lan port.
under this is my original network.config, problem is that i don't get a connection wired with a lanport, wifi is working good
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
config device
option name 'wan'
option macaddr
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config device
option type '8021q'
option ifname 'lan4'
option vid '40'
option name 'x'
config interface 'guest'
option proto 'static'
option ipaddr '192.168.10.1'
option netmask '255.255.255.0'
option type 'bridge'
option device 'br-guest'
config interface 'home'
option proto 'static'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
option type 'bridge'
option device 'br-home'
config interface 'iot'
option proto 'static'
option ipaddr '192.168.3.1'
option netmask '255.255.255.0'
option type 'bridge'
option device 'br-iot'
config interface 'x'
option proto 'static'
option ipaddr '192.168.40.1'
option netmask '255.255.255.0'
option type 'bridge'
option device 'br-x'
config interface 'secure'
option proto 'static'
option ipaddr '192.168.4.1'
option netmask '255.255.255.0'
option type 'bridge'
option device 'br-secure'
config device
option type 'bridge'
option name 'br-x'
list ports 'lan4'
config device
option type 'bridge'
option name 'br-guest'
list ports 'lan1'
config device
option type 'bridge'
option name 'br-home'
list ports 'lan2'
config device
option type 'bridge'
option name 'br-iot'
list ports 'lan3'
config device
option type 'bridge'
option name 'br-secure'
list ports 'lan4
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
Using official build, connect LAN port to start Luci, connect WAN port to your ISP router to connect internet, just plug the wires.
If you want to use WiFi to connect internet, set up wifi in luci, no CLI needed.
I agree with @RadioOperator that you should reset to defaults and then work from there. If you have too many variables in play and things aren't working, it becomes much harder to diagnose than a simple, nearly default config.
If you want each individual physical LAN port to be assigned to a different network, that is totally possible to manage. But you should start simple and build upon good foundations. The default configuration will have a single LAN. From there, you can add one additional network and assign it to one of the ethernet ports to verify that the config is correct and that everything is working as you want. Once that is proven, it is easy to repeat the process for each additional network.
Have you verified that the port lights up properly in the default configuration? It is good to rule out physical issues such as a damaged port, bad cable, or bad/disconnected downstream device.