Cannot access internet via ethernet cable

Just to confirm, you are logging in to the router by WiFi and expect to use the Ethernet port only as the WAN connection, right?

I see something (your ISP modem?) is plugged into and linked at 100 Mb on port 0, but VLAN 2 is active on port 4. So your WAN connection has no path to outside.

The simplest change to get it working would be to remove eth0.1 from the lan and place it in wan instead, and don't use eth0.2 for anything. The lan config would have no option ifname. This is OK because the wifi AP references the lan network in /etc/config/wireless, so you still have a way to connect to lan by wifi.

In this setup the unit would operate as the main router, routing multiple wifi users out to the Internet directly to a modem. There is no need for any other network.

I'm confused now... you have a WAN and a LAN interface, but just one ethernet port? How is this supposed to work (unless you also have a managed switch)? Can you explain us the complete picture, please?

1 Like

here is a c&p of the network configs when openwrt is installed.

root@OpenWrt:~# ip a
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
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/ether 80:3f:5d:c3:67:34 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::823f:5dff:fec3:6734/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 80:3f:5d:c3:67:35 brd ff:ff:ff:ff:ff:ff
4: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 80:3f:5d:c3:67:36 brd ff:ff:ff:ff:ff:ff
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 80:3f:5d:c3:67:34 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd38:7f75:ca71::1/60 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::823f:5dff:fec3:6734/64 scope link
       valid_lft forever preferred_lft forever
6: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 80:3f:5d:c3:67:34 brd ff:ff:ff:ff:ff:ff
7: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 80:3f:5d:c3:67:35 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::823f:5dff:fec3:6735/64 scope link
       valid_lft forever preferred_lft forever

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 'fd38:7f75:ca71::/48'

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

config device 'lan_eth0_1_dev'
        option name 'eth0.1'
        option macaddr '80:3f:5d:c3:67:34'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config device 'wan_eth0_2_dev'
        option name 'eth0.2'
        option macaddr '80:3f:5d:c3:67:35'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

Your current configuration corresponds to a device with one WAN port and four LAN ports... if it has only one ethernet port, there is something very wrong.

Now, what do you have connected to that.ethernet port? How is the rest of your network configured?

2 Likes

You are right. I kept only 1 port and flush the rest. Now it's working.
Thanks to all of you who tried to help me out with this issue.

1 Like

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