I can not see any network interface except loopback

automatically generated /etc/config/network is:

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 'fdc9:68bb:252a::/48'

config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'

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

command ip list show
results with nothing but loopback interface

command ifconfig also return only loopback

does your hw attend AA meetings, where it can stay anonymous ?
this isn't one of those meetings ...

1 Like

Only on sundays, you know.
P.S. It is happen that there CAN be two dead network adapters in PC at a time. Well.

Are you going to ask a question?
So far you have not even told us which device it is, or which OpenWrt version you are using...

One possibility is that you use a device (like PC) into which you have added network ports via extension cards (or something like that), and you have not included the correct kernel drivers into the build.

3 Likes

Thanks a lot. I bought a brand new network card and OpenWRT does not recognize it, even can not create interface, like eth1
My device is Gigabyte GA-G31M-S2L and build in network card works just fine. But none of descrete PCI Network card are visible in system. Here is dmesg log
openwrt_dmesg_log - Pastebin.com
I will try to add drivers as you propose. Thank you, friend!

P.S. PCI network cards I did try to use are:

  1. RTL8139D (Have no idea about manufacturer is chip name)
  2. Gembird NIC-R1 (RTL8139D Also)
    I guess I have bad luck with unsupported chip, or may be broken PCI slot in baseboard

UPD:
Looks like I already have all necessary drivers

root@OpenWrt:~# opkg install kmod-r8169
Package kmod-r8169 (5.15.167-1) installed in root is up to date.
root@OpenWrt:~# opkg install kmod-e1000
Package kmod-e1000 (5.15.167-1) installed in root is up to date.
root@OpenWrt:~# opkg install kmod-igb
Package kmod-igb (5.15.167-1) installed in root is up to date.
root@OpenWrt:~#

I'd recommend to install usbutils and run lsusb.
So you can see if the cards are even recognized by the system.

For those you need either kmod-8139too or kmod-8139cp (i'm not sure which one, they're both ancient).

lsusb
I installed everything as you proposed

Signature check passed.
root@OpenWrt:~# opkg install kmod-8139too
Installing kmod-8139too (5.15.167-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/packages/kmod-8139too_5.15.167-1_x86_64.ipk
Configuring kmod-8139too.
root@OpenWrt:~# opkg install kmod-8139cp
Installing kmod-8139cp (5.15.167-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/packages/kmod-8139cp_5.15.167-1_x86_64.ipk
Configuring kmod-8139cp.
root@OpenWrt:~# opkg install usbutils
Installing usbutils (014-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/packages/usbutils_014-1_x86_64.ipk
Installing libatomic1 (12.3.0-4) to root...
Downloading https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/packages/libatomic1_12.3.0-4_x86_64.ipk
Installing libusb-1.0-0 (1.0.26-3) to root...
Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/base/libusb-1.0-0_1.0.26-3_x86_64.ipk
Installing libevdev (1.13.0-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/packages/libevdev_1.13.0-1_x86_64.ipk
Installing libudev-zero (1.0.1-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/packages/libudev-zero_1.0.1-1_x86_64.ipk
Configuring libevdev.
Configuring libatomic1.
Configuring libusb-1.0-0.
Configuring libudev-zero.
Configuring usbutils.
root@OpenWrt:~# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux 5.15.167 uhci_hcd UHCI Host Controller
Bus 004 Device 002: ID 046d:c31c Logitech USB Keyboard
Bus 004 Device 001: ID 1d6b:0001 Linux 5.15.167 uhci_hcd UHCI Host Controller
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.167 ehci_hcd EHCI Host Controller
Bus 003 Device 001: ID 1d6b:0001 Linux 5.15.167 uhci_hcd UHCI Host Controller
Bus 005 Device 001: ID 1d6b:0001 Linux 5.15.167 uhci_hcd UHCI Host Controller
root@OpenWrt:~#

I'm sorry, i made a mistake.
I meant pciutils, not usbutils.
Could you please also install pciutils and run lspci?

Probably an x86 based PC motherboard, then. Right?
From OpenWrt perspective PCs are just one generic target, and you need to install the necessary drivers, exactly correct ones.
(For proper routers with embedded fixed chips, the right combination of drivers for the device is defines in the device recipe, but naturally not for PCs)

8169 is not 8139...
I doubt that they use the same driver.

Looking at the x86 download dir from kmods, there are separately r8101, r8125, r8126, r8168, r8169 drivers as well as 8139cp and 8139too drivers.

Looking at the source code, you likely need one of the 8139 drivers for your 8139 chip...

Edit:
I noticed after writing the answer to your earlier message, that you have already installed also those 8139 kmods.
Have you since the cold-booted the device? Or at least rebooted? Kmod drivers are not taken into use without reboot, or insmod <kmodname> command

And possibly there are more variants of that really old 8139 chip than is supported here, so it is quite possible that your chip variant is not supported. And as 8139 is from early 2000s, it does not support any modern/newr network standards, so you will be crippled with it in any case. Newer PCI card might be a better solution.

2 Likes

Thanks a lot! I installed drivers

opkg update 
opkg install kmod-8139too 
opkg install kmod-8139cp

Then enabled eth1 like

ifconfig eth1 enable

Configured network like vim /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 'fdc9:68bb:252a::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

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

config device
        option name 'br-wan'
        option type 'bridge'
        list ports 'eth1'

config interface 'wan'
        option device 'br-wan'
        option proto 'dhcp'
        option netmask '255.255.255.0'

And everything works fine. You are a saviour, kind sir.

2 Likes

I try

root@OpenWrt:~# opkg install pciutils
Unknown package 'pciutils'.
Collected errors:
 * opkg_install_cmd: Cannot install package pciutils.

but suddenly happen that my filesystem in Read Only State.

root@OpenWrt:df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               147.1G     18.9M    147.1G   0% /
tmpfs                   991.2M    372.0K    990.8M   0% /tmp
/dev/sda1                15.7M      5.6M      9.8M  36% /boot
/dev/sda1                15.7M      5.6M      9.8M  36% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~# df -T
Filesystem           Type       1K-blocks      Used Available Use% Mounted on
/dev/root            ext4       154273496     19328 154237784   0% /
tmpfs                tmpfs        1014960       372   1014588   0% /tmp
/dev/sda1            ext4           16084      5692     10068  36% /boot
/dev/sda1            ext4           16084      5692     10068  36% /boot
tmpfs                tmpfs            512         0       512   0% /dev
root@OpenWrt:~# ls -l
-rw-r--r--    1 root     root          1197 Mar 22 08:04 expand-root.sh

may be this is the case...

UDP: Or possibly, I hope, it was just a bug. Now everithing works fine. I updated opkg and installed Midnight Commander with no problems

I did reboot several times, yes. Everything seems to work ok.

1 Like

That's possible, since there's plenty of space on your harddisk.

I just wonder, how much power this quite antique PC consumes while running OpenWrt...maybe 35-40W?

1 Like

Presumably between 90-120 watts, idle.

Power-efficiency only really started with sandy-bridge, dropping that to ~60-70 watts, with a bigger improvement only starting with >=haswell (those you might get under 20 watts idle).

Out of curiosity i just put some old parts together...an intel board with a Pentium Dual E2180, 4GB RAM, a 320G hdd and a 400W psu.
Running a live linux from a stick, the system draws approx. 43 W idle.

It will draw some more when moving data packets, but i don't think it will reach more than 60-65W.
But from the economical view, that's still much to much compared to a cheap (used) plastic router who will be satisfied with 10% of the power.

Maybe the OP hasn't have to pay for the electricity or it's only a quarter compared to the prices here in Germany.