27 lines
720 B
Django/Jinja
27 lines
720 B
Django/Jinja
#!/bin/bash
|
|
|
|
INF="$1"
|
|
STA="$2"
|
|
|
|
logger "$0 called for interface named $INF with $STA ..."
|
|
|
|
if [ "$INF" == "enp130s0" ]
|
|
then
|
|
logger "$0: Interface $INF with $STA ,Set $INF VF And Vlan ..."
|
|
echo 4 > /sys/class/net/enp130s0/device/sriov_numvfs
|
|
sleep 0.5
|
|
ip link set enp130s0 vf 0 vlan 4095
|
|
ip link set enp130s0 vf 1 vlan 4095
|
|
ip link set enp130s0 vf 2 vlan 3816
|
|
ip link set enp130s0 vf 3 vlan 3817
|
|
ip link set enp130s0 vf 0 trust on
|
|
ip link set enp130s0 vf 1 trust on
|
|
ip link set enp130s0 vf 2 trust on
|
|
ip link set enp130s0 vf 3 trust on
|
|
ip link set enp130s0 vf 0 spoofchk off
|
|
sleep 1
|
|
ip link set enp130s2 up
|
|
ip link set enp130s2f1 up
|
|
ip link set enp130s2f2 up
|
|
ip link set enp130s2f3 up
|
|
fi |