在 Debian Wheezy 下,永久网络配置发生在/etc/network/interfaces
文件中。是否可以在不配置其他网络参数(例如或)的情况下配置hwaddress
接口?就像是:address
netmask
root@1:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0
hwaddress ether DE:AD:BE:EF:69:01
# The primary network interface
auto eth0.100
iface eth0.100 inet static
address 10.1.1.2
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.7.1
root@1:~#
答案1
我在寻找iface eth0 inet manual
。这允许如下配置:
root@1:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
hwaddress ether DE:AD:BE:EF:69:01
# The primary network interface
auto eth0.100
iface eth0.100 inet static
address 10.1.1.2
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.7.1
root@1:~#