V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
blueboyggh
V2EX  ›  问与答

一个关于 Ubuntu 的 netplan 的配置问题

  •  
  •   blueboyggh · 2022-03-05 22:19:40 +08:00 · 1153 次点击
    这是一个创建于 776 天前的主题,其中的信息可能已经有所发展或是发生改变。

    之前用 debian ,用 /etc/network/interfaces 配置网络,现在改了 ubuntu ,是 netplan 配置网络 在 debian 里的配置文件里,有如下配置

    auto eth0 iface eth0 inet manual auto macvlan iface macvlan inet dhcp pre-up ip link add macvlan link eth0 type macvlan mode bridge post-down ip link del macvlan link eth0 type macvlan mode bridge

    上述配置如何在 netplan 里实现同样的效果?

    第 1 条附言  ·  2022-03-05 23:03:40 +08:00
    auto eth0
    iface eth0 inet manual
    auto macvlan
    iface macvlan inet dhcp
    pre-up ip link add macvlan link enp0s3 type macvlan mode bridge
    post-down ip link del macvlan link eth0 type macvlan mode bridge
    5 条回复    2022-03-05 23:15:21 +08:00
    titanium98118
        1
    titanium98118  
       2022-03-05 22:53:55 +08:00 via Android
    我是搞不懂 netplan ,用回 ifup/down
    blueboyggh
        2
    blueboyggh  
    OP
       2022-03-05 23:02:16 +08:00
    @titanium98118 ubuntu 从 netplan 改回 /etc/network/interfaces 有啥副作用吗?
    blueboyggh
        3
    blueboyggh  
    OP
       2022-03-05 23:03:03 +08:00
    auto eth0
    iface eth0 inet manual
    auto macvlan
    iface macvlan inet dhcp
    pre-up ip link add macvlan link enp0s3 type macvlan mode bridge
    post-down ip link del macvlan link eth0 type macvlan mode bridge
    blueboyggh
        4
    blueboyggh  
    OP
       2022-03-05 23:03:27 +08:00
    怎么主题里的配置文件都合并到一块了呢,各位大佬看 3 楼吧
    titanium98118
        5
    titanium98118  
       2022-03-05 23:15:21 +08:00 via Android
    @blueboyggh 应该没啥副作用吧,不过我
    只是用来配 he 的 ipv6 tunnel
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1062 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 18:46 · PVG 02:46 · LAX 11:46 · JFK 14:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.