Ubuntu 20.04.2....绑定 NIC 作为 TRUNK 接口...将特定 VLAN 的 IP 分配给绑定 NIC?

Ubuntu 20.04.2....绑定 NIC 作为 TRUNK 接口...将特定 VLAN 的 IP 分配给绑定 NIC?

我正在尝试设置 BONDED NIC(2x 10G)。我们总共有 6 个 NIC,4x 1G 和 2x 10G,目前不打算使用 1G 连接。

看起来我已经绑定了 NIC(networkctl 命令中没有错误,并且 2 个交换机(Cisco Nexus)显示两个端口均可运行,而不是暂停)。

我已经安装了 KVM,并且启动了一个 VM 来测试 BONDED 接口上的 VLAN 功能,它似乎可以工作(我需要启动几个来测试不同的 VLAN)。

但是,我似乎无法弄清楚如何为 BONDED 接口分配静态 IP,以便我们可以通过 SSH 连接到该 IP 进行管理。此时,我必须为其中一个 1G NIC 分配一个 IP,以便能够通过 SSH 连接到它。

10.100.60.x = VLAN760 仅供参考....

我遗漏了什么?请帮忙。

谢谢 Dirk

编辑:更新配置和 networkctl 结果:

network:
  version: 2
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no
      optional: true
      addresses:
      - 10.100.60.21/24
      gateway4: 10.100.60.120
      nameservers:
        addresses:
        - 192.168.160.100
        search:
        - aperia.local
        - ddsos.ofc
#    eno2:
#      dhcp4: no
#      dhcp6: no
#      optional: true
#    eno3:
#      dhcp4: no
#      dhcp6: no
#      optional: true
#    eno4:
#      dhcp4: no
#      dhcp6: no
#      optional: true
    ens5f0:
      dhcp4: no
      dhcp6: no
    ens5f1:
      dhcp4: no
      dhcp6: no
  bonds:
    bond0:
      dhcp4: no
      dhcp6: no
      interfaces: [ens5f0, ens5f1]
      parameters:
        mode: 802.3ad
        transmit-hash-policy: layer3+4
        mii-monitor-interval: 100
        min-links: 1
  vlans:
    vlan701:
      accept-ra: no
      id: 701
      link: bond0
    vlan702:
      accept-ra: no
      id: 702
      link: bond0
    vlan703:
      accept-ra: no
      id: 703
      link: bond0
    vlan704:
      accept-ra: no
      id: 704
      link: bond0
    vlan705:
      accept-ra: no
      id: 705
      link: bond0
    vlan711:
      accept-ra: no
      id: 711
      link: bond0
    vlan712:
      accept-ra: no
      id: 712
      link: bond0
    vlan713:
      accept-ra: no
      id: 713
      link: bond0
    vlan714:
      accept-ra: no
      id: 714
      link: bond0
    vlan715:
      accept-ra: no
      id: 715
      link: bond0
    vlan721:
      accept-ra: no
      id: 721
      link: bond0
    vlan722:
      accept-ra: no
      id: 722
      link: bond0
    vlan723:
      accept-ra: no
      id: 723
      link: bond0
    vlan724:
      accept-ra: no
      id: 724
      link: bond0
    vlan725:
      accept-ra: no
      id: 725
      link: bond0
    vlan760:
      accept-ra: no
      id: 760
      link: bond0
    vlan100:
      accept-ra: no
      id: 100
      link: bond0
    vlan101:
      accept-ra: no
      id: 101
      link: bond0
    vlan111:
      accept-ra: no
      id: 111
      link: bond0
    vlan115:
      accept-ra: no
      id: 115
      link: bond0
    vlan210:
      accept-ra: no
      id: 210
      link: bond0
    vlan125:
      accept-ra: no
      id: 125
      link: bond0
  bridges:
    br0:
      interfaces: [bond0]
#      parameters:
#           stp: true
#           forward-delay: 4
      dhcp4: no
      dhcp6: no
  bridges:
    br100:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan100 ]
    br101:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan101 ]
    br111:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan111 ]
    br115:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan115 ]
    br125:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan125 ]
    br210:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan210 ]
    br701:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan701 ]
    br702:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan702 ]
    br703:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan703 ]
    br704:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan704 ]
    br705:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan705 ]
    br711:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan711 ]
    br712:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan712 ]
    br713:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan713 ]
    br714:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan714 ]
    br715:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan715 ]
    br721:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan721 ]
    br722:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan722 ]
    br723:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan723 ]
    br724:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan724 ]
    br725:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan725 ]
    br760:
      dhcp4: no
      dhcp6: no
      interfaces: [ vlan760 ]
IDX LINK       TYPE     OPERATIONAL SETUP
  1 lo         loopback carrier     unmanaged
  2 eno1       ether    routable    configured
  3 eno2       ether    off         unmanaged
  4 eno3       ether    off         unmanaged
  5 ens5f0     ether    enslaved    configured
  6 eno4       ether    off         unmanaged
  7 ens5f1     ether    enslaved    configured
  8 virbr0     bridge   no-carrier  unmanaged
  9 virbr0-nic ether    off         unmanaged
 10 bond0      bond     enslaved    configured
 11 br0        bridge   degraded    configured
 12 br100      bridge   degraded    configured
 13 br101      bridge   degraded    configured
 14 br111      bridge   degraded    configured
 15 br115      bridge   degraded    configured
 16 br125      bridge   degraded    configured
 17 br210      bridge   degraded    configured
 18 br701      bridge   degraded    configured
 19 br702      bridge   degraded    configured
 20 br703      bridge   degraded    configured
 21 br704      bridge   degraded    configured
 22 br705      bridge   degraded    configured
 23 br711      bridge   degraded    configured
 24 br712      bridge   degraded    configured
 25 br713      bridge   degraded    configured
 26 br714      bridge   degraded    configured
 27 br715      bridge   degraded    configured
 28 br721      bridge   degraded    configured
 29 br722      bridge   degraded    configured
 30 br723      bridge   degraded    configured
 31 br724      bridge   degraded    configured
 32 br725      bridge   degraded    configured
 33 br760      bridge   degraded    configured
 34 vlan713    vlan     enslaved    configured
 35 vlan725    vlan     enslaved    configured
 36 vlan100    vlan     enslaved    configured
 37 vlan701    vlan     enslaved    configured
 38 vlan705    vlan     enslaved    configured
 39 vlan723    vlan     enslaved    configured
 40 vlan712    vlan     enslaved    configured
 41 vlan714    vlan     enslaved    configured
 42 vlan721    vlan     enslaved    configured
 43 vlan704    vlan     enslaved    configured
 44 vlan724    vlan     enslaved    configured
 45 vlan722    vlan     enslaved    configured
 46 vlan711    vlan     enslaved    configured
 47 vlan702    vlan     enslaved    configured
 48 vlan101    vlan     enslaved    configured
 49 vlan715    vlan     enslaved    configured
 50 vlan703    vlan     enslaved    configured
 51 vlan210    vlan     enslaved    configured
 52 vlan760    vlan     enslaved    configured
 53 vlan111    vlan     enslaved    configured
 54 vlan125    vlan     enslaved    configured
 55 vlan115    vlan     enslaved    configured

55 links listed.

相关内容