• 请不要在回答技术问题时复制粘贴 AI 生成的内容
sr0miao
V2EX  ›  程序员

ubuntu16.04 配置了 vlan 后只能重启主机么,重启网络服务没有用啊

  •  
  •   sr0miao · Jul 25, 2019 · 2170 views
    This topic created in 2504 days ago, the information mentioned may be changed or developed.

    之前在 ubuntu16 上用一个网口连接了多个 vlan,设立了多个 vlan 段的 IP,发现写好配置文件后,ifup、/etc/init.d/networking restart 都不管用,只能 reboot,感觉有些奇怪,有没有什么不用重启机器就能让 vlan 配置文件生效的办法?

    6 replies    2019-07-26 11:11:43 +08:00
    julyclyde
        1
    julyclyde  
       Jul 25, 2019
    你写的哪儿的配置文件
    sr0miao
        2
    sr0miao  
    OP
       Jul 25, 2019
    @julyclyde 在 /etc/network/interfaces.d/里面新建的
    julyclyde
        3
    julyclyde  
       Jul 25, 2019
    sr0miao
        5
    sr0miao  
    OP
       Jul 26, 2019
    @julyclyde 因该没啥关系,我现在的做法是先用 vconfigl 临时配置创建 vlan,同时写配置文件保存配置。这样关机前使用的是临时配置的 vlan,重启后就读取配置文件的 vlan,还不影响其他网络配置。
    sr0miao
        6
    sr0miao  
    OP
       Jul 26, 2019
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3278 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 14:12 · PVG 22:12 · LAX 07:12 · JFK 10:12
    ♥ Do have faith in what you're doing.