在这个例子中,auto eth0 指令告诉系统尝试在启动时启动 eth0 接口,而 allow-hotplug eth0 则允许系统在该接口热插拔时自动处理它。iface eth0 inet dhcp 指定了 eth0 接口使用DHCP获取IP配置。 提供allow-hotplug eth0 命令的使用示例 如前所述,allow-hotplug 通常不是作为一个独立命令在命令行中使用
iface eth0 inet dhcp 第一行说明 eth0 将会在您启动时自动激活。第二行说明该接口 (“iface”) eth0 将有得到一个 IPv4 地址空间 (如果是一个 IPv6 的设备将须将 “inet” 用“inet6” 代替) 并且它将自动从 DHCP 中自动获得它的配置。假定您的网络和 DHCP 服务都已经被正确配置,该机的网络将不需要...
配置这个命令,是为了保证端口状态及时更新,或者避免由于手动操作导致的重启 network 失败。 3、interface 中的具体使用 auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 4、参考链接 ht...