Este conteúdo não está disponível no idioma selecionado.

10.7. VLAN on Bond and Bridge Using the NetworkManager Command Line Tool, nmcli


To use VLANs over bonds and bridges, proceed as follows:
  1. Add a bond device:
    ~]$ nmcli connection add type bond con-name Bond0 ifname bond0 bond.options "mode=active-backup,miimon=100" ipv4.method disabled ipv6.method ignore
    Copy to Clipboard Toggle word wrap
    Note that in this case a bond connection serves only as a "lower interface" for VLAN, and does not get any IP address. Therefore, the ipv4.method disabled and ipv6.method ignore parameters have been added on the command line.
  2. Add ports to the bond device:
    ~]$ nmcli connection add type ethernet con-name Slave1 ifname em1 master bond0 slave-type bond
    ~]$ nmcli connection add type ethernet con-name Slave2 ifname em2 master bond0 slave-type bond
    Copy to Clipboard Toggle word wrap
  3. Add a bridge device:
    ~]$ nmcli connection add type bridge con-name Bridge0 ifname br0 ipv4.method manual ipv4.addresses 192.0.2.1/24
    Copy to Clipboard Toggle word wrap
  4. Add a VLAN interface on top of bond, assigned to the bridge device:
    ~]$ nmcli connection add type vlan con-name Vlan2 ifname bond0.2 dev bond0 id 2 master br0 slave-type bridge
    Copy to Clipboard Toggle word wrap
  5. View the created connections:
    ~]$ nmcli connection show
     NAME     UUID                                  TYPE            DEVICE
     Bond0    f05806fa-72c3-4803-8743-2377f0c10bed  bond            bond0
     Bridge0  22d3c0de-d79a-4779-80eb-10718c2bed61  bridge          br0
     Slave1   e59e13cb-d749-4df2-aee6-de3bfaec698c  802-3-ethernet  em1
     Slave2   25361a76-6b3c-4ae5-9073-005be5ab8b1c  802-3-ethernet  em2
     Vlan2    e2333426-eea4-4f5d-a589-336f032ec822  vlan            bond0.2
    Copy to Clipboard Toggle word wrap
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat