Originally Posted by
aljames2
At present, I have 2 NICs on the KVM host but neither support SR-IOV. I can run 2 cables between my dumb switch & the host but this doesn't seem to achieve the goal. I would have each VM on a separate NIC but there would be no isolation as I see it. The switch is not VLAN smart and cannot help control traffic. I prefer not to have a managed switch.
@MAFoElffen, I did just order that PCIe Dell quad port device for the KVM host. I do know that my MB supports SR-IOV & IOMMU. Not sure I'll know how to use it when I get it, LOL... Will I even need to deal with using a VLAN if I can get this virtual networking set up right on the host?
I figure with a KVM host, you can never have enough network ports to play with!!!
VLANs -- Though I have trained on them and done them, while training for CISCO CCNA... I don't find a need for them here. Besides, then to get out of that VLAN to something else, then you have to route to there.
For SR-IOV, at first I did via a vfio.conf file in modules, excluding... But then after doing that that way, I found I severely overthought that!!! It can be done a lot simpler and easier...
First your find the ID of the NIC in lspci
Code:
mafoelffen@msi-ubuntu:~$ lspci -nnnk | grep -E 'Ethernet'
DeviceName: Onboard - Ethernet
06:00.0 Ethernet controller [0200]: Intel Corporation Device [8086:125c] (rev 04)
07:00.0 Ethernet controller [0200]: Intel Corporation 82576 Gigabit Network Connection [8086:10c9] (rev 01)
Then in the GRUB_CMDLINE_LINUX_DEFAULT line of /etc/default/grub:
Code:
mafoelffen@msi-ubuntu:~$ grep 'GRUB_CMDLINE_LINUX_DEFAULT' /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="-- splash intel_iommu=on iommu=pt igb.max_vfs=7"
Then, after a reboot, I do 'ip a' to confirm it's split out, then do my netplan file
Code:
mafoelffen@msi-ubuntu:~$ grep . /etc/netplan/00-installer-config.yaml
# This is the custom network config written by MAFoElffen
network:
version: 2
renderer: networkd
ethernets:
enp6s0:
dhcp4: false
dhcp6: false
addresses:
- 10.0.0.5/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
routes:
- to: default
via: 10.0.0.1
metric: 100
on-link: true
mtu: 1500
## Begin SR-IOV on enp7s0f0
enp7s0f0:
virtual-function-count: 7
dhcp4: false
dhcp6: false
optional: yes
enp7s0f0v0:
link: enp7s0f0
addresses:
- 10.0.0.10/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: false
dhcp6: false
optional: yes
enp7s0f0v1:
link: enp7s0f0
addresses:
- 10.0.0.11/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: false
dhcp6: false
optional: yes
enp7s0f0v1:
link: enp7s0f0
addresses:
- 10.0.0.11/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: false
dhcp6: false
optional: yes
enp7s0f0v2:
link: enp7s0f0
addresses:
- 10.0.0.12/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: false
dhcp6: false
optional: yes
enp7s0f0v3:
link: enp7s0f0
addresses:
- 10.0.0.13/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: false
dhcp6: false
optional: yes
enp7s0f0v4:
link: enp7s0f0
addresses:
- 10.0.0.14/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: false
dhcp6: false
optional: yes
enp7s0f0v5:
link: enp7s0f0
addresses:
- 10.0.0.15/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: false
dhcp6: false
optional: yes
enp7s0f0v6:
link: enp7s0f0
addresses:
- 10.0.0.16/8
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
dhcp4: false
dhcp6: false
optional: yes
## End SR-IOV on enp7s0f0
## Begin Bridge on enp7s0f1
enp7s0f1:
dhcp4: false
dhcp6: false
optional: yes
bridges:
br0:
interfaces: [enp7s0f1]
addresses: [10.0.0.6/8]
routing-policy:
- from: 10.0.0.6
table: 10
# ** ADDITIONAL ROUTING POLICY **
- to: 172.16.1.0/24
table: 172
# *******************************
routes:
- to: 0.0.0.0/0
via: 10.0.0.1
table: 10
nameservers:
addresses: [8.8.8.8, 8.8.4.4, 1.1.1.1, 1.0.0.1]
parameters:
stp: true
forward-delay: 4
dhcp4: no
dhcp6: no
optional: yes
## End Bridge on enp7s0f1
Then apply
Code:
sudo netplan generate
sudo netplan apply
Done.
Bookmarks