zoukankan      html  css  js  c++  java
  • Debian 中 allow-hotplug 与 auto 的区别(转)

    转自:https://blog.starryvoid.com/archives/299.html

    Debian 中 allow-hotplug 与 auto 的区别冷不丁没注意还真是小坑了一下,所以在此记录


    1、allow-hotplug 与 auto 的理论区别

    auto

    在系统启动的时候启动网络接口,无论网络接口有无连接 (插入网线)。如果该接口配置了 DHCP,则无论有无网线,系统都会去获取 DHCP。并且如果没有插入网线,则等该接口超时后才会继续 DHCP。

    allow-hotplug

    只有当内核从网络接口检测到热插拔事件后才会启动该接口。如果系统开机时该接口没有插入网线,则系统不会启动该接口。系统启动后,如果插入网线,系统会自动启动该接口。

    2、allow-hotplug 与 auto 的简单说明

    auto

    配置这个命令,仅仅是用于开机启动时启动网络接口,如果不配置重启自动不会启动网络接口,就直接导致远程登录失败。

    allow-hotplug

    配置这个命令,是为了保证端口状态及时更新,或者避免由于手动操作导致的重启 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、参考链接

    https://wiki.archlinux.org/index.php/Network_configuration_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

    http://wiki.ubuntu.org.cn/Ubuntu%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%85%A5%E9%97%A8%E6%8C%87%E5%8D%97

  • 相关阅读:
    win10 uwp 异步进度条
    win10 uwp 异步进度条
    win10 uwp 简单MasterDetail
    win10 uwp 简单MasterDetail
    如何使用PHP验证客户端提交的表单数据
    PHP 表单和用户输入讲解
    什么是PHP 面向对象
    PHP 命名空间(namespace)定义
    PHP 魔术常量介绍
    archer 安装
  • 原文地址:https://www.cnblogs.com/arci/p/14977135.html
Copyright © 2011-2022 走看看