I've installed the latest generic x86 build onto an old Zotac mini pc, with a TP link ue300 usb adapter.
The on board nic was set up as eth1 as my Wan port and the ue300 was set up as eth0 as my Lan port.
When I shut it down the ports flipped. the on board nic became my lan port and the ue300 became my Wan port. I cannot get it to stay stable between power cycle, it looks like the interface bindings are changing, not the devices themselves
i had a similar problem with another other fork (immortalwrt) , so I'm not sure if this is a hardware problem or something I'm doing wrong in the setup.
I have zero Linux experience, so I'll need some instructions on how to get the logs and config files.
I'm using the console only right now as im not able to access the Web interface from my pc without unplugged the Internet from it.
Thats a known issue especially with usb lan adapter on OpenWRT.
Timing during boot often causes random order.
The only proper way to deal with it, is to use customized start scripts that rename the interfaces accordingly. Sadly such premade scripts are not part of OpenWRT default images.
/etc/init.d/staticet
Insert the following content:
first hurdle problem.
I'm not sure how to do this. do I have to type this into the console line by line, or is there a text editor that I type this into and then save it like there is on DOS.
I've seen a lot of wiki entries that seem relevant but most presume a much higher level of understanding than I currently have.
Hence why I am here asking for help.
I'm using the console as I cannot currently access the gui and the Internet at the same time from my pc as I need to keep swapping the cables over.
Of course. At boot, USB hardware is not detected immediately, so the onboard NIC, which is the only networking device on the system at the time, gets identified as eth0. Later in the boot process, when USB is activated, the dongle gets detected and, since eth0 is already assigned, gets assigned eth1.
This is one of many reasons you do not, ever, use USB for networking, unless it's an ad-hoc measure on a client device. Other reasons include latency and stability. So save yourself some time, get rid of your setup and replace it with something that's better suited to the task at hand.
Alternatively, get a cheap managed switch (something like Netgear GS305E) and set up a router-on-a-stick. I have to warn you though: the learning curve on that path is pretty steep...
No problem, OpenWrt can feel pretty intimidating at first if you have little Linux experience.
Yes, there is a text editor included called vi. It works entirely in the console.
To create the file, type:
vi /etc/init.d/staticeth
and press Enter.
vi has two main modes:
command mode
insert/edit mode
When the editor opens:
Press i
This puts vi into INSERT mode so you can type or paste text.
Paste the script from the wiki.
When finished, press the ESC key once.
This exits INSERT mode.
Now type:
:wq
and press Enter.
That means:
w = write/save
q = quit
After that, make the script executable:
chmod +x /etc/init.d/staticeth
Then enable it:
service staticeth enable
You will also need to create the MAC address assignments in the same way.
vi /etc/config/mac-static-interfaces
Before rebooting, I strongly recommend checking the MAC addresses carefully first using:
ip link
or:
ifconfig
because if the interfaces are mapped incorrectly you may temporarily lose network access again after reboot.
Also, since you are currently swapping cables around manually, it may help to keep a copy of the commands in a text file on your PC so you can paste them into the console instead of typing everything by hand.
I can see the logic in that. My takeaway from this is to always use the onboard NIC as Eth0, and to set it to the LAN port, because that way if it freaks out it will default to something still leaves me with easy access to the router through SSH.
I'm curious though, what would make it flip back again some boots?
Second that, I converted a really old PC (10 years old but at that time a powerhouse with a whopping 4 GB Ram) into a very usable testbed, installed proxmox and added a couple of VM's for testing, the only thing I added was a $10 TP link network card which worked right out of the box.
There are M.2 Key A+E based PCIe ethernet cards that can be mounted instead of a WLAN card (and routed to the outside with a short cable to the unused cutout for serial- or VGA connectors)
that as may be, I'm using an old zotac mini pc, everything except the ram is soldered to the board. there isn't even a header socket for a fan. it's fully soldered.