V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ps1aniuge
V2EX  ›  Alpine Linux

有牛人么? alpine 改用 networkmanager 问题。

  •  
  •   ps1aniuge · 2020-04-19 15:28:21 +08:00 · 3014 次点击
    这是一个创建于 1458 天前的主题,其中的信息可能已经有所发展或是发生改变。
    目的:不用 networking 管理网卡,而用 networkmanager 管理网卡
    linux:alpine 3.11

    源:
    cat /etc/apk/repositories
    https://mirrors.huaweicloud.com/alpine/edge/main/
    https://mirrors.huaweicloud.com/alpine/edge/community/
    https://mirrors.nju.edu.cn/alpine/edge/main/
    https://mirrors.nju.edu.cn/alpine/edge/community/

    命令:
    apk update
    /bin/mv '/etc/network/interfaces' '/opt'
    apk add networkmanager ifupdown
    addgroup root plugdev
    #rc-update add wpa_supplicant default

    rc-update add networkmanager boot
    rc-update del networking boot
    rc-service networking stop #这条命令之后,则网断了,不能从终端管理了,但可以在 linux 本机管理。
    rc-service networkmanager start

    cat /etc/NetworkManager/NetworkManager.conf
    [main]
    dhcp=dhcpcd


    -------故障现象:-----------------
    nmcli d
    DEVICE TYPE STATE CONNECTION
    eth0 ethernet unmanaged --
    lo loopback unmanaged --


    nmcli connection add type ethernet con-name lan1 ifname eth0 ip4 $ip gw4 $gw
    #正常


    nmcli device conn eth0
    #返回:
    Error: Failed to add/activate new connection: Connection 'eth0' is not available on device eth0 because device is strictly unmanaged


    nmcli connection up lan1
    #返回
    Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1005 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 22:09 · PVG 06:09 · LAX 15:09 · JFK 18:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.