设置 VLAN
_nic=ens36
_vlan=11
_vnic_name="$_nic.$_vlan"
ip link add link "$_nic" name "$_vnic_name" type vlan id "$_vlan" 2>/dev/null
ip link set "$_vnic_name" up
_vnic_macvlan="vnic.static.101"
_ip_mask="192.168.11.1/24"
ip link add link "$_vnic_name" dev "$_vnic_macvlan" type macvlan mode private
ip addr add "$_ip_mask" dev "$_vnic_macvlan"
ip link set "$_vnic_macvlan" up