source /etc/network/interfaces.d/* # Network is managed by Network manager # You can choose one of the following two IP setting methods: # Use # to disable another setting method # 01. Enable dynamic DHCP to assign IP ###auto eth0 ###iface eth0 inet dhcp ### hwaddress ether 9E:61:79:AA:4C:AA # Ethernet adapter 0 auto eth0 allow-hotplug eth0 #no-auto-down eth0 iface eth0 inet static address 192.168.9.254 netmask 255.255.255.0 gateway 192.168.9.1 Metric 1000 dns-nameservers 8.8.8.8 168.95.1.1 hwaddress ether 9E:61:79:AA:4C:AA # 02. Enable static IP settings(IP is modified according to the actual) #auto eth0 #allow-hotplug eth0 #iface eth0 inet static #address 192.168.1.100 #netmask 255.255.255.0 #gateway 192.168.1.6 #dns-nameservers 192.168.1.6 #-------------------------------------------------- #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓以下是更改USB3.0網卡↓↓↓↓↓↓↓↓↓↓↓↓ # Ethernet adapter 2 auto eth1 allow-hotplug eth1 no-auto-down eth1 iface eth1 inet static address 192.168.1.254 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 168.95.1.1 hwaddress ether 5c:92:5e:d6:64:8d #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑以上是更改USB3.0網卡↑↑↑↑↑↑↑↑↑↑↑↑ #-------------------------------------------------- # 03. Docker install OpenWrt and communicate with each other #allow-hotplug eth0 #no-auto-down eth0 #auto eth0 #iface eth0 inet manual # #auto macvlan #iface macvlan inet dhcp # hwaddress ether 9E:61:79:AA:4C:AA # pre-up ip link add macvlan link eth0 type macvlan mode bridge # post-down ip link del macvlan link eth0 type macvlan mode bridge # #auto lo #iface lo inet loopback #---------以下是2023-02-21增加給pppoeconf用------ ## Local loopback #auto lo #iface lo inet loopback #auto dsl-provider #iface dsl-provider inet ppp #pre-up /bin/ip link set eth1 up # line maintained by pppoeconf #provider dsl-provider #---------以上是2023-02-21增加給pppoeconf用------