This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tsg-tsg-os-buildimage/tsg-9140-scripts/roles/system-init/templates/setup.enp1s0.ips.toml.j2
2021-05-08 06:49:19 -04:00

27 lines
738 B
Django/Jinja

#!/bin/bash
INF="$1"
STA="$2"
logger "$0 called for interface named $INF with $STA ..."
if [ "$INF" == "enp1s0" ]
then
logger "$0: Interface $INF with $STA ,Set $INF VF And Vlan ..."
modprobe 8021q
echo 3 > /sys/class/net/enp1s0/device/sriov_numvfs
sleep 0.5
echo add 0,3813,3814 > /sys/class/net/enp1s0/device/sriov/0/trunk
ip link set enp1s0 vf 1 vlan 3813
ip link set enp1s0 vf 2 vlan 3814
ip link set enp1s0 vf 0 trust on
ip link set enp1s0 vf 1 trust on
ip link set enp1s0 vf 2 trust on
ip link set enp1s0 vf 0 spoofchk off
ip link set enp1s0 vf 0 mac 00:0e:c6:d6:72:c1
ip link set enp1s0 vf 1 mac fe:65:b7:03:50:bd
sleep 1
ip link set enp1s2 up
ip link set enp1s2f1 up
ip link set enp1s2f2 up
fi