OpenWrt as a switch problems

Good afternoon. A wr740n v6 router with openwrt + luci installed is used as a switch. From a home router, a patch cord is plugged into one of the LAN interfaces (settings below).

The ping 8.8.8.8 command (for example) via SSH works correctly, but opkg update returns the error "Failed to establish connection". (Screenshot below)

LAN settings ( on the main router, the address 192.168.1.2 is reserved for this port, 192.168.1.1 - is a main router )
screen 1

SSH output
screen 2
I don’t know, but I can’t load screenshots using standard tools!!!

You probably have not set the gateway and/or dns. Please post your /etc/config/network file.

4 Likes

I took a screenshot of the adapter settings from LuCi

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 'fdf5:6c95:484d::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.2'
        option gateway '192.168.1.1'
        option delegate '0'
        option _orig_ifname 'eth0 wlan0'
        option _orig_bridge 'true'
        option ifname 'eth0 eth1'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 0'

Gateway is there. What about dns?

From an ssh session to the router, try pinging 8.8.8.8 and then google.com

I solved my problem =) Thanks. Helped
option dns '8.8.8.8'

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