V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
blueboyggh
V2EX  ›  问与答

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

  •  
  •   blueboyggh · Mar 5, 2022 · 2216 views
    This topic created in 1522 days ago, the information mentioned may be changed or developed.

    之前用 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 里实现同样的效果?

    Supplement 1  ·  Mar 5, 2022
    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 replies    2022-03-05 23:15:21 +08:00
    titanium98118
        1
    titanium98118  
       Mar 5, 2022 via Android
    我是搞不懂 netplan ,用回 ifup/down
    blueboyggh
        2
    blueboyggh  
    OP
       Mar 5, 2022
    @titanium98118 ubuntu 从 netplan 改回 /etc/network/interfaces 有啥副作用吗?
    blueboyggh
        3
    blueboyggh  
    OP
       Mar 5, 2022
    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
       Mar 5, 2022
    怎么主题里的配置文件都合并到一块了呢,各位大佬看 3 楼吧
    titanium98118
        5
    titanium98118  
       Mar 5, 2022 via Android
    @blueboyggh 应该没啥副作用吧,不过我
    只是用来配 he 的 ipv6 tunnel
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3708 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 10:39 · PVG 18:39 · LAX 03:39 · JFK 06:39
    ♥ Do have faith in what you're doing.