Files
nearxos 10c200f994 Enhance network boot provisioning with support for extra LAN IPs and VLAN configuration</message>
<message>Update documentation and scripts to include configuration for extra LAN IPs on eth1 and VLAN interface eth1.40, allowing the LXC to serve multiple subnets and provide NAT for internet access. Modify nftables NAT configuration to accommodate these changes and ensure proper DHCP and DNS setup on eth1. This improves the overall network boot functionality and user experience for the CM4 eMMC provisioning service.
2026-03-04 19:28:53 +02:00

1.5 KiB
Raw Permalink Blame History

LXC config (network boot: eth1 = LAN, eth0 = WAN)

Config files for the provisioning LXC when using eth1 as a provisioning LAN (DHCP + TFTP for network boot, NAT for internet).

LAN subnet: When you deploy with DEPLOY_LXC_LAN_SUBNET (e.g. 10.100.1.1/24), the deploy script writes /opt/cm4-provisioning/lan-subnet.conf inside the LXC with LAN_GW, LAN_CIDR, and DHCP_RANGE_START/DHCP_RANGE_END. The setup script and toggle script read this file so dnsmasq, NAT, and PXE options all use the same subnet. If the file is missing, defaults are 10.20.50.1/24 and 10.20.50.10010.20.50.200.

File Purpose
dnsmasq-network-boot.conf Template: dnsmasq DHCP + TFTP on eth1. Setup script writes /etc/dnsmasq.d/network-boot.conf using values from lan-subnet.conf.
nft-nat-lan.conf Template: nftables NAT for LAN→WAN (primary + extra subnets + VLAN 40). Setup script writes /etc/nftables.d/nat-lan.conf.
70-cm4-extra-lan Extra LAN IPs on eth1 (192.168.30.1, 192.168.127.1) and VLAN eth1.40 (192.168.0.1/24). Installed to /etc/network/interfaces.d/ by setup script.
toggle-network-boot-dhcp.sh Enable/disable PXE (TFTP) on the LXC; copied to /opt/cm4-provisioning/ by setup script.

Setup is done by running (from your machine):

./emmc-provisioning/scripts/setup-network-boot-on-lxc.sh root@<LXC-IP>

See ../docs/NETWORK-BOOT-LXC.md for full documentation.