Installing OpenWRT in a X86 System in a partition, having both WIN11 and OpenWRT

@Exio0 @iplaywithtoys - can one of you guys post to the output for the following commands while either booted into some recent Live Linux like Arch Linux ISO?

/lib/ld-linux-x86-64.so.2 --help | grep supported

And

gcc -c -Q -march=native --help=target | grep '  -march=' | awk '{ print $2}'

Alright. Downloading the ISO now. I'll stick it on my ZM-VE300 and boot the T8 from it.

1 Like

1 Like

Thank you! seems like we can build with -march=x86-64-v3 to gain some optimization for this CPU. I see the ISO does not ship with gcc. Can you:

pacman -Syy
pacman -S base-devel

That will install gcc to the live ISO.

alderlake
valid
1 Like

Thanks again. So Alderlake-N is really just -march=alderlake... if you're building your own image, I believe adding the following will give the most optimization:

CONFIG_BUSYBOX_CONFIG_EXTRA_CFLAGS="-march=alderlake -mtune=alderlake -O2 -pipe"
CONFIG_TARGET_OPTIMIZATION="-march=alderlake -mtune=alderlake -O2 -pipe"
1 Like

oooops

Ill try wireless drivers now!

Edit: Ups... My bad

Yeah, check the timestamps. Looks to me like rc2 is currently being uploaded (today), and the front page will be probably be updated later today or tomorrow to announce rc2's availability.

1 Like

Mate... Sorry for bother you again but i had configured a tp-link RE200 with OpenWRT to connect my router with the T8 with the Ethernet port it has, but in the T8 i dont get any IP (eth0 or eth1 doesnt matter) so i havent internet access in the T8 like you. Im reading and reading your response and trying so so many things and... nope...

The RE200 does have internet, ping 8.8.8.8 successfull...

could you help me, please?

If you're going to daisy-chain more than one OpenWRT device together, each one has to have a different IP address configuration, otherwise networking becomes... challenging.

Here is an example of two OpenWRT devices daisy-chained WAN-to-LAN (or LAN-to-WAN), in a routed configuration, showing a configuration will won't work (or will be awkward at best) and a configuration which will (or should) work:

If your RE200 is configured to behave as a router (Wi-Fi is WAN, Ethernet is LAN) then the above concept should work for you.

If your RE200 is configured to behave as a bridge/repeater, then the above concept might not be necessary and some different troubleshooting might be needed.

What are the contents of /etc/config/firewall, /etc/config/network, and /etc/config/dhcp on your RE200?

I'll start telling you i need all, repeat ALL the network devices in the same net (192.168.1.0/24), so that IP 192.168.2.1 in your diagram doesnt "help" me much.

Next, i give you the: cat /etc/config/firewall command

root@OpenWrt:~# cat /etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
        list network 'wwan'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

Then the cat /etc/config/network

root@OpenWrt:~# cat /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 'fda4:c002:0408::/48'

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

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

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

config interface 'wwan'
        option proto 'dhcp'

And finally cat /etc/config/dhcp

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
        list server '192.168.1.1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option ignore '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

Note: In the main (actual, it will be the T8 before i configure it correctly) DHCP server, i configured the pool from 192.168.1.10 to 192.168.1.199, so i can make so many static leases i will need.

If your topology is routed, then you can't have all devices in the same subnet, whether you want to or not.

If your topology is bridged, then you might be able to have all devices in the same subnet. Hence asking for the configuration files; they may help to identify whether your setup is currently routed or bridged. The distinction is important.

And, unless I miss my guess, it looks like your topology is routed. On the RE200, you haven't bridged the Ethernet (lan) and Wi-Fi (wwan) networks together.

Also, your RE200's firewall doesn't have any zones and policies defined for the wwan interface.

On the RE200, you have disabled the DHCP service on the LAN interface, which will stop the T8 from picking up an address automatically. (If you intend for another device to be the DHCP server, then keep the RE200's DHCP server disabled; this is an explanation of why it's not working for you, not a suggestion that you should change it.)

None of this is insurmountable, and I reckon it should be reasonably straightforward to fix.

I think, fingers crossed, that one change should sort you out: on the RE200, add wwan to the br-lan bridge.

Should i do it via commands or can i do it from GUI?

Im trying to do it but

image

Reverting changes :man_facepalming:t2:

From now, sorry for my ignorance...

there's a small arrow next to the save & apply button, click it and select save unchecked.

1 Like

The GUI offers some safety nets which the command line might not. It's not impossible to break things by using the GUI, but it's harder to do. The GUI has to strike a balance between functionality, usability, and safety, especially for novices.

That said, my own view is that it's always worth comparing the GUI with the command line so that you can see the effects of one on the other. And that way you'll learn more of the command line syntax and structure, which will help future troubleshooting and configuration efforts.

OpenWRT is capable of more than the GUI reveals; you might find that something you want to do requires you to work on the command line.

Yup, knew that. I meant that the changes i did, wasnt correct :sweat_smile:

Okay, will investigate how to add wwan to br-lan

Problem solved:

root@OpenWrt:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=120 time=15.336 ms
64 bytes from 8.8.8.8: seq=1 ttl=120 time=12.849 ms
64 bytes from 8.8.8.8: seq=2 ttl=120 time=14.832 ms
64 bytes from 8.8.8.8: seq=3 ttl=120 time=14.571 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 12.849/14.397/15.336 ms

Question number (141515 ? xD): Can i make DHCP pools with OpenWRT?

Or this is another question i have to ask in another Thread (if there is not one yet)

Yes, but if you're used to dnsmasq's usual configuration then you might be surprised by how OpenWRT handles it.

Every interface which does not have the "ignore" flag set for DHCP, will issue IP addresses in the scope relevant for that interface, and it's automatic and seamless to the operator. All you have to configure is the start address and size of the pool and the lease duration.

The default DHCP configuration has one pool from 192.168.1.100 to 192.168.1.249. If you add another interface, e.g. 192.168.2.1/24, and enable the DHCP server, you'll get a second pool for 192.168.2.100-192.168.2.249. And so on.

What I do not know - and have never investigated - is whether it's possible to use OpenWRT to hold DHCP pools for subnets which aren't directly connected. I know dnsmasq itself can - I use dnsmasq as the DHCP server for my entire network - but I haven't fully tested OpenWRT's implementation of it. It might the case that yes, it's possible, but you'll have to get your command line hands dirty.

1 Like

Another question... to add more space to package partition (and dont waste 240gb...) what is the partition i have to expand for it?

Command (m for help): p
Disk /dev/sda: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: FPT310M4SSD256G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: BF7A017B-4794-7EEB-750B-7774328FBD00

Device      Start    End Sectors  Size Type
/dev/sda1     512  33279   32768   16M Linux filesystem
/dev/sda2   33280 246271  212992  104M Linux filesystem
/dev/sda128    34    511     478  239K BIOS boot

Partition table entries are not in disk order.

What im trying to do is:

  1. Create a partition for a "Mini" NAS as i commented days before

  2. Expand package partition that actually has 100 mb aprox, as you can see here: