7.7. NIC 파티션 구성 예
Red Hat OpenStack Platform SR-IOV 환경에서 NIC를 분할하려면 다음 예제 구성을 참조하십시오.
VF를 통한 Linux 본딩
다음 예제에서는 VF를 통한 Linux 본딩을 구성하고, 스푸핑 검사를 비활성화하고, VLAN 태그를 sriov_vf 에 적용합니다.
- type: linux_bond
name: bond_api
bonding_options: "mode=active-backup"
members:
- type: sriov_vf
device: eno2
vfid: 1
vlan_id:
get_param: InternalApiNetworkVlanID
spoofcheck: false
- type: sriov_vf
device: eno3
vfid: 1
vlan_id:
get_param: InternalApiNetworkVlanID
spoofcheck: false
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
routes:
list_concat_unique:
- get_param: InternalApiInterfaceRoutes
- type: linux_bond
name: bond_api
bonding_options: "mode=active-backup"
members:
- type: sriov_vf
device: eno2
vfid: 1
vlan_id:
get_param: InternalApiNetworkVlanID
spoofcheck: false
- type: sriov_vf
device: eno3
vfid: 1
vlan_id:
get_param: InternalApiNetworkVlanID
spoofcheck: false
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
routes:
list_concat_unique:
- get_param: InternalApiInterfaceRoutes
VF의 OVS 브리지
다음 예제는 VF에서 OVS 브리지를 구성합니다.
- type: ovs_bridge
name: br-bond
use_dhcp: true
members:
- type: vlan
vlan_id:
get_param: TenantNetworkVlanID
addresses:
- ip_netmask:
get_param: TenantIpSubnet
routes:
list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- type: ovs_bond
name: bond_vf
ovs_options: "bond_mode=active-backup"
members:
- type: sriov_vf
device: p2p1
vfid: 2
- type: sriov_vf
device: p2p2
vfid: 2
- type: ovs_bridge
name: br-bond
use_dhcp: true
members:
- type: vlan
vlan_id:
get_param: TenantNetworkVlanID
addresses:
- ip_netmask:
get_param: TenantIpSubnet
routes:
list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- type: ovs_bond
name: bond_vf
ovs_options: "bond_mode=active-backup"
members:
- type: sriov_vf
device: p2p1
vfid: 2
- type: sriov_vf
device: p2p2
vfid: 2
VF의 OVS 사용자 브릿지
다음 예제는 VF에서 OVS 사용자 브릿지를 구성하고 VLAN 태그를 ovs_user_bridge 에 적용합니다.
- type: ovs_user_bridge
name: br-link0
use_dhcp: false
mtu: 9000
ovs_extra: "set port br-link0 tag={{ lookup('vars', networks_lower['Tenant'] ~ '_vlan_id') }}"
addresses:
- ip_netmask:
list_concat_unique:
- get_param: TenantInterfaceRoutes
members:
- type: ovs_dpdk_bond
name: dpdkbond0
mtu: 9000
ovs_extra:
- set port dpdkbond0 bond_mode=balance-slb
members:
- type: ovs_dpdk_port
name: dpdk0
members:
- type: sriov_vf
device: eno2
vfid: 3
- type: ovs_dpdk_port
name: dpdk1
members:
- type: sriov_vf
device: eno3
vfid: 3
- type: ovs_user_bridge
name: br-link0
use_dhcp: false
mtu: 9000
ovs_extra: "set port br-link0 tag={{ lookup('vars', networks_lower['Tenant'] ~ '_vlan_id') }}"
addresses:
- ip_netmask:
list_concat_unique:
- get_param: TenantInterfaceRoutes
members:
- type: ovs_dpdk_bond
name: dpdkbond0
mtu: 9000
ovs_extra:
- set port dpdkbond0 bond_mode=balance-slb
members:
- type: ovs_dpdk_port
name: dpdk0
members:
- type: sriov_vf
device: eno2
vfid: 3
- type: ovs_dpdk_port
name: dpdk1
members:
- type: sriov_vf
device: eno3
vfid: 3