Skip to content

Latest commit

 

History

History
116 lines (113 loc) · 4.21 KB

agent-install-sample-config-bond-sriov.adoc

File metadata and controls

116 lines (113 loc) · 4.21 KB

Example: Bonds and SR-IOV dual-nic node network configuration

The following agent-config.yaml file is an example of a manifest for dual port NIC with a bond and SR-IOV interfaces:

apiVersion: v1alpha1
kind: AgentConfig
rendezvousIP: 10.10.10.14
hosts:
  - hostname: worker-1
    interfaces:
      - name: eno1
        macAddress: 0c:42:a1:55:f3:06
      - name: eno2
        macAddress: 0c:42:a1:55:f3:07
    networkConfig: (1)
      interfaces: (2)
        - name: eno1 (3)
          type: ethernet (4)
          state: up
          mac-address: 0c:42:a1:55:f3:06
          ipv4:
            enabled: true
            dhcp: false (5)
          ethernet:
            sr-iov:
              total-vfs: 2 (6)
          ipv6:
            enabled: false
        - name: sriov:eno1:0
          type: ethernet
          state: up (7)
          ipv4:
            enabled: false (8)
          ipv6:
            enabled: false
            dhcp: false
        - name: sriov:eno1:1
          type: ethernet
          state: down
        - name: eno2
          type: ethernet
          state: up
          mac-address: 0c:42:a1:55:f3:07
          ipv4:
            enabled: true
          ethernet:
            sr-iov:
              total-vfs: 2
          ipv6:
            enabled: false
        - name: sriov:eno2:0
          type: ethernet
          state: up
          ipv4:
            enabled: false
          ipv6:
            enabled: false
        - name: sriov:eno2:1
          type: ethernet
          state: down
        - name: bond0
          type: bond
          state: up
          min-tx-rate: 100 (9)
          max-tx-rate: 200 (10)
          link-aggregation:
            mode: active-backup (11)
            options:
              primary: sriov:eno1:0 (12)
            port:
              - sriov:eno1:0
              - sriov:eno2:0
          ipv4:
            address:
              - ip: 10.19.16.57 (13)
                prefix-length: 23
            dhcp: false
            enabled: true
          ipv6:
            enabled: false
          dns-resolver:
            config:
              server:
                - 10.11.5.160
                - 10.2.70.215
          routes:
            config:
              - destination: 0.0.0.0/0
                next-hop-address: 10.19.17.254
                next-hop-interface: bond0 (14)
                table-id: 254
  1. The networkConfig field contains information about the network configuration of the host, with subfields including interfaces,dns-resolver, and routes.

  2. The interfaces field is an array of network interfaces defined for the host.

  3. The name of the interface.

  4. The type of interface. This example creates an ethernet interface.

  5. Set this to false to disable DHCP for the physical function (PF) if it is not strictly required.

  6. Set this to the number of SR-IOV virtual functions (VFs) to instantiate.

  7. Set this to up.

  8. Set this to false to disable IPv4 addressing for the VF attached to the bond.

  9. Sets a minimum transmission rate, in Mbps, for the VF. This sample value sets a rate of 100 Mbps.

    • This value must be less than or equal to the maximum transmission rate.

    • Intel NICs do not support the min-tx-rate parameter. For more information, see BZ#1772847.

  10. Sets a maximum transmission rate, in Mbps, for the VF. This sample value sets a rate of 200 Mbps.

  11. Sets the desired bond mode.

  12. Sets the preferred port of the bonding interface. The primary device is the first of the bonding interfaces to be used and is not abandoned unless it fails. This setting is particularly useful when one NIC in the bonding interface is faster and, therefore, able to handle a bigger load. This setting is only valid when the bonding interface is in active-backup mode (mode 1) and balance-tlb (mode 5).

  13. Sets a static IP address for the bond interface. This is the node IP address.

  14. Sets bond0 as the gateway for the default route.