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

请教一个 centos8 命令 brctl 问题

  •  
  •   logic3579 · Dec 29, 2020 · 2620 views
    This topic created in 1951 days ago, the information mentioned may be changed or developed.

    centos6 中可以使用 brctl 命令管理本地网桥 例如:brctl delbr xxx, brctl addif xxx xxx

    但在 centos8 中貌似使用了 nmcli 命令替代,请问大佬知道如何用 nmcli 创建虚拟网桥以及挂载网桥吗?

    2 replies    2020-12-29 07:54:57 +08:00
    billlee
        1
    billlee  
       Dec 29, 2020
    可以用 nmuti. nmcli 和 nmtui 都只是 NetworkManager 的前端。一定要用 cli 的话大概是

    nmcli connection add connection.id br0 connection.type bridge bridge.stp true ipv4.method manual ipv4.addr 192.0.2.100/24 ipv4.dns 1.1.1.1 ipv4.gateway 192.0.2.1
    nmcli connection modify eth0 connection.master br0

    参见
    //developer.gnome.org/NetworkManager/stable/nmcli.html
    //developer.gnome.org/NetworkManager/stable/nm-settings-nmcli.html
    logic3579
        2
    logic3579  
    OP
       Dec 29, 2020
    @billlee 好的,感谢。我看一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   969 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 23:40 · PVG 07:40 · LAX 16:40 · JFK 19:40
    ♥ Do have faith in what you're doing.