Kann das Tool mit ifdownup2 nicht gleichzeitig statische IPv4 und DHCP konfigurieren, um IPv6 -Adressen für eine Schnitt
Posted: 28 Mar 2025, 12:21
IPv4 ist eine statische Adresse in der Konfigurationsdatei, während IPv6 DHCP ist. Nach IFUP/DOWN wird die statische Adresse nicht wirksam und wird immer noch von DHCP erhalten. Die spezifischen Informationen sind wie folgt < /p>
Code: Select all
root@PICOS:/home/admin# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*.int
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 dhcp
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 0.0.0.0
root@PICOS:/home/admin# ifquery --running eth0
auto eth0
iface eth0 inet dhcp
auto eth0
iface eth0 inet6 dhcp6
root@PICOS:/home/admin# ifquery --check eth0
auto eth0
iface eth0 inet6 dhcp [pass]
auto eth0
iface eth0 inet static [fail]
address 192.168.1.1/24 [fail]
root@PICOS:/home/admin#