Merge pull request #7 from lars18th/LAN-IF

LAN_IF "host" mode
This commit is contained in:
Albrecht Lohofener
2024-10-02 19:59:26 +02:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -18,11 +18,13 @@ services:
CPU_COUNT: 2
# Define which physical or virtual interfaces shall be attach direct to OpenWrt
# If WAN_IF is missing then "host" mode is selected
# If WAN_IF/LAN_IF is missing then "host" mode is selected
# -
WAN_IF: "host" # Usage of container host Ethernet connection as WAN. WARNING: Bad performace because of user space Ethernet implementation.
#WAN_IF: "none" # No WAN interface defined. This is useful if OpenWrt WAN acts a USB Wi-Fi client or as USB cellular modem
#WAN_IF: "enx00e04c0407a6" # Use this option to define a specific physical Ethernet interface
# -
#LAN_IF: "host" # Usage of container host Ethernet connection as LAN. WARNING: Bad performace because of user space Ethernet implementation.
LAN_IF: "veth" # veth pair between OpenWrt and host system
#LAN_IF: "enx00e04d68033f" # Use this option to define a specific physical Ethernet interface
+1 -1
View File
@@ -148,7 +148,7 @@ fi
# Attach physical PHY to container
LAN_ARGS=""
if [[ -z "${LAN_IF}" ]]; then
if [[ -z "${LAN_IF}" || $LAN_IF = "host" ]]; then
LAN_ARGS="-device virtio-net,netdev=qlan0 -netdev user,id=qlan0,net=192.168.1.0/24"
elif [[ $LAN_IF = "veth" ]]; then
attach_veth_if veth-openwrt0 veth1 qlan1