26 lines
494 B
Plaintext
26 lines
494 B
Plaintext
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
ifconfig ens1 up
|
||
|
|
|
||
|
|
|
||
|
|
modprobe 8021q
|
||
|
|
vconfig add ens1 100
|
||
|
|
vconfig set_flag ens1.100 1 1
|
||
|
|
ifconfig ens1.100 192.168.100.2 netmask 255.255.255.0 up
|
||
|
|
|
||
|
|
echo 0 > /sys/class/net/ens1/device/sriov_numvfs
|
||
|
|
sleep 1
|
||
|
|
echo 3 > /sys/class/net/ens1/device/sriov_numvfs
|
||
|
|
sleep 1
|
||
|
|
|
||
|
|
ifconfig ens1f3 up
|
||
|
|
ip link set ens1 vf 2 vlan 200
|
||
|
|
ifconfig ens1f3 192.168.200.2 netmask 255.255.255.0
|
||
|
|
|
||
|
|
ifconfig enp7s0 up
|
||
|
|
ifconfig enp8s0 up
|
||
|
|
ifconfig ens1f1 up
|
||
|
|
ifconfig ens1f2 up
|
||
|
|
ifconfig ens1f3 up
|
||
|
|
|