WEBVTT

00:00:00.000 --> 00:00:06.300
Welcome back to vSphere 8 in the real world. Now we're going to discuss virtual networking basics.

00:00:06.300 --> 00:00:11.200
So some basic vocabulary when you're discussing virtual networking with vSphere.

00:00:11.200 --> 00:00:16.299
So the virtual adapter, when you create a virtual machine, if you want to have the kind of network connectivity,

00:00:16.299 --> 00:00:26.200
you're going to need to assign to it a virtual adapter. And that virtual adapter obviously will act like a physical machine's physical adapter to give that virtual machine connectivity to the networking.

00:00:26.200 --> 00:00:34.099
You will have virtual switches and virtual switches work very much like what your physical switches would function like in your physical environment.

00:00:34.099 --> 00:00:44.799
Virtual switches are used to gather the virtual NICs on your virtual machines together and, you know, to find policies and things like that.

00:00:44.799 --> 00:00:50.799
Then those virtual switches are going to be connected to the host physical NICs, right?

00:00:50.900 --> 00:01:04.000
So if your host has four physical NICs, then you might assign all four to your virtual switch or maybe you assign two to one virtual switch and you create another virtual switch that has two different ones.

00:01:04.000 --> 00:01:10.400
And the reason why you'd separate them might be there's different types of traffic traveling over both of them, maybe ones like your iSCSI storage.

00:01:10.400 --> 00:01:18.000
And so you want those NICs completely separated from your virtual machine. Or maybe you have different workloads and so you create different virtual switches for that.

00:01:18.000 --> 00:01:29.000
You could also use the same host NICs and create different policies on them by creating what we're going to discuss in just a moment called a port group.

00:01:29.000 --> 00:01:31.900
So a port group will allow you to create policies also for your NICs.

00:01:31.900 --> 00:01:44.300
So you don't even need to create multiple different switches and assign different NICs if you want to actually use different physical NICs for different VM workloads and not just for different policies of the VM workloads.

00:01:44.300 --> 00:01:48.199
So we'll discuss that more in just a little bit.

00:01:48.199 --> 00:01:52.199
So here's kind of a basic architecture that might look like a kind of a concept.

00:01:52.199 --> 00:01:59.699
You have your virtual machines. Your virtual machines have virtual adapters. The virtual adapters are going to connect to the virtual switch, okay?

00:01:59.699 --> 00:02:04.400
Now, when you assign the virtual NIC to something, you actually don't assign it to a switch.

00:02:04.400 --> 00:02:08.899
You're going to assign it to a port group, which we'll discuss here again in just a moment.

00:02:08.899 --> 00:02:14.000
But what you'll show the representation of is the representation of it being connected to the virtual switch.

00:02:14.000 --> 00:02:20.100
Then that virtual switch has a link to physical adapters on the physical host.

00:02:20.100 --> 00:02:30.100
So virtual NICs connect to switches, and switches give you connectivity to the physical adapters on those hosts.

00:02:30.100 --> 00:02:36.800
Here they're showing that the physical NICs on the host then are going to obviously connect to the physical switch in your environment.

00:02:36.800 --> 00:02:42.899
So if you have multiple VLANs going from different port groups, for example, on a virtual switch,

00:02:42.899 --> 00:02:48.399
and then going to the physical NIC on your host, and then going to your physical switch,

00:02:48.399 --> 00:02:55.000
you would need to trunk the port going from the physical NIC on the host to the port on the switch.

00:02:55.000 --> 00:02:59.699
That switch port would be trunked, and you would then allow the VLANs that the VMs are using.

00:02:59.699 --> 00:03:03.300
So if your VMs are using VLANs 10 and 20, you would trunk 10 and 20.

00:03:03.399 --> 00:03:09.000
If you also had a VM kernel port that was using VLAN 15, you'd have to trunk 10, 15, and 20,

00:03:09.000 --> 00:03:19.000
all on the interface going from the NIC on the server to your switch, or from the NICs on your server to your switch.

00:03:19.000 --> 00:03:21.600
So we also have what's called a port group, all right?

00:03:21.600 --> 00:03:28.300
So on your virtual switch, you can assign things like a VLAN tag.

00:03:28.300 --> 00:03:32.899
You can decide how the NICs that are attached to that switch are to be used.

00:03:32.899 --> 00:03:38.300
Like if one's going to be your active adapter, and if your second one's going to be standby.

00:03:38.300 --> 00:03:41.199
If they're both active, you can specify that.

00:03:41.199 --> 00:03:45.500
If you have four on there, you can say these three are active, and this fourth one's standby,

00:03:45.500 --> 00:03:47.899
or however you want to do that, you know, two and two.

00:03:47.899 --> 00:03:53.000
You can configure all those things on the switch, the virtual switch.

00:03:53.000 --> 00:03:57.000
Then when you create a port group, the port group can inherit those settings from the switch,

00:03:57.000 --> 00:04:00.300
or it can override those settings, and you can set different settings

00:04:00.300 --> 00:04:05.600
for like how the adapters are going to be utilized, or what causes a failover, you know,

00:04:05.600 --> 00:04:08.699
from one adapter to another, and what happens when the adapter comes back online.

00:04:08.699 --> 00:04:10.699
We'll discuss all those things more.

00:04:10.699 --> 00:04:15.300
So the port groups are going to live within a virtual switch.

00:04:15.300 --> 00:04:19.799
So when you assign a virtual machine to a virtual switch, you actually assign it to a port group,

00:04:19.799 --> 00:04:22.600
and that port group is on a virtual switch.

00:04:22.600 --> 00:04:26.399
And then on that port group, you'll have configurations like a VLAN tag.

00:04:26.399 --> 00:04:31.399
You'll have configurations like which adapters are used, and what order the adapters are used in

00:04:31.399 --> 00:04:36.000
for failover and for failback, and all that kind of stuff will be set on –

00:04:36.000 --> 00:04:39.100
you can be set on the switch, and you can also then set something different

00:04:39.100 --> 00:04:41.700
to be overridden by the port group.

00:04:41.700 --> 00:04:42.700
Okay?

00:04:42.700 --> 00:04:46.799
So connection methods, VLAN tags, and bandwidth.

00:04:46.799 --> 00:04:50.600
So you can do traffic shaping and things like that on your port groups,

00:04:50.600 --> 00:04:55.399
and the traffic shaping policies can be different than the policies on the virtual switches.

00:04:55.399 --> 00:04:59.399
All right, so there are different types of switches.

00:04:59.399 --> 00:05:04.299
There's a standard, which just basically means it only lives on that host.

00:05:04.299 --> 00:05:09.000
There is a distributed, which means you've created it in vSphere on a data center,

00:05:09.000 --> 00:05:11.200
and then you assign hosts to it.

00:05:11.200 --> 00:05:13.799
And there's also an NSX distributed switch.

00:05:13.799 --> 00:05:18.899
So if you have NSX in your environment, then you're using distributed virtual switches,

00:05:18.899 --> 00:05:23.200
and those are basically the same type of switches that you would have with a distributed switch,

00:05:23.200 --> 00:05:28.200
but only they're living in NSX, and there's a whole ton of security, you know, available.

00:05:28.200 --> 00:05:33.100
NSX is a whole entire software-defined networking product that's very robust.

00:05:33.100 --> 00:05:37.600
It's got tons of features, and it's way beyond the scope of just this one class.

00:05:40.500 --> 00:05:42.799
So here they're showing we have a host.

00:05:42.799 --> 00:05:44.399
The host has some VMs.

00:05:44.399 --> 00:05:50.000
The network adapters on those two VMs happen to both be assigned to the same port group.

00:05:50.000 --> 00:05:51.899
The port group is on a virtual switch.

00:05:51.899 --> 00:05:57.200
The virtual switch then has the physical adapter on the host assigned to it,

00:05:57.200 --> 00:06:01.399
and that physical adapter is connected to a virtual switch, right?

00:06:01.399 --> 00:06:06.000
So it's kind of similar how you'd have in your environment where you'd have a physical server,

00:06:06.000 --> 00:06:11.399
network adapter plugs into a physical switch, and then that switch has VLANs configured.

00:06:11.399 --> 00:06:14.600
Only a port group is a lot more than just a VLAN tag.

00:06:14.600 --> 00:06:17.600
It's also traffic shaping.

00:06:17.600 --> 00:06:18.799
It's also security.

00:06:18.799 --> 00:06:22.700
Like, are you going to allow MAC address, a forged transmiss, are you going to allow

00:06:22.700 --> 00:06:24.799
promiscuous mode, things like that.

00:06:24.799 --> 00:06:25.899
There's a bunch of different policies.

00:06:25.899 --> 00:06:27.500
We'll get into all that in just a little bit.

00:06:30.899 --> 00:06:34.700
So virtual switches are going to be local to a host.

00:06:34.700 --> 00:06:36.600
They only exist on a host.

00:06:36.600 --> 00:06:40.100
When you create a virtual switch, if you have five hosts, you have to create five virtual

00:06:40.100 --> 00:06:43.700
switches on five different hosts at least.

00:06:43.700 --> 00:06:47.500
Now, of course, when you install your host, you actually do get a virtual switch by default,

00:06:47.500 --> 00:06:51.600
and you get the default port group called VM network, right?

00:06:51.600 --> 00:06:52.899
So there is some default settings.

00:06:52.899 --> 00:06:57.299
You actually could start functioning and not create anything, but most of the time in most

00:06:57.299 --> 00:07:00.500
environments, you're going to want to do some configuration.

00:07:00.500 --> 00:07:08.700
So the local host has the virtual switch on it, and you can configure, as we mentioned,

00:07:08.700 --> 00:07:10.200
but not only things like load balance.

00:07:10.200 --> 00:07:13.899
If we have multiple NICs, how is the load balance across those NICs?

00:07:14.299 --> 00:07:17.299
Are two of them going to be in an active mode and one standby?

00:07:17.299 --> 00:07:20.000
Is only one active and the rest are standby?

00:07:20.000 --> 00:07:24.500
You can also set a physical adapter on a switch to be not used, right?

00:07:24.500 --> 00:07:31.000
So what you could do is you could say we have three NICs on a virtual switch, and then I

00:07:31.000 --> 00:07:36.200
create a port group and say NIC one is active, NIC two is standby, and NIC three is not used.

00:07:36.200 --> 00:07:41.600
On my next port group, I might say two is active, three is standby, and one is not used

00:07:41.600 --> 00:07:42.500
or something like that.

00:07:42.600 --> 00:07:47.200
So you can, you know, kind of tap on different port groups, different adapters that are

00:07:47.200 --> 00:07:50.100
available to use, some that are not used, certain ones are active, other ones are

00:07:50.100 --> 00:07:54.000
standby, and they can be different for each one on the port group that's on that

00:07:54.000 --> 00:07:55.000
virtual switch.

00:07:57.799 --> 00:08:02.500
So here's kind of what it looks like inside of these on the ESXi host and vCenter.

00:08:02.500 --> 00:08:08.200
So you can see you have on the right, you have your adapters and the adapters being

00:08:08.200 --> 00:08:09.600
linked to the virtual switch.

00:08:09.600 --> 00:08:11.500
That's the box in the middle.

00:08:11.500 --> 00:08:14.200
And then on the left, you have the different port groups.

00:08:14.200 --> 00:08:17.799
You have a management network port group, and that has your VM kernel port in it, and

00:08:17.799 --> 00:08:19.399
then you have a VM network.

00:08:19.399 --> 00:08:22.799
And on this example here, they're showing just two virtual machines on the VM network

00:08:22.799 --> 00:08:25.200
port group, but there is no VLAN tag configured.

00:08:29.299 --> 00:08:34.000
So distributed virtual switches, those are not created on a host-by-host basis.

00:08:34.000 --> 00:08:40.799
Those are created in vSphere, right, in your vCenter server on a data center, and

00:08:40.799 --> 00:08:43.099
then hosts are assigned to it.

00:08:43.099 --> 00:08:48.799
So that allows me to create a distributed virtual switch, then I get to create port

00:08:48.799 --> 00:08:52.099
groups on that distributed virtual switch and create policies for those different port

00:08:52.099 --> 00:08:54.599
groups on those distributed virtual switches.

00:08:54.599 --> 00:09:00.700
Then when I assign a host to that distributed virtual switch, and all I have to do is say

00:09:00.700 --> 00:09:06.200
this distributed virtual switch has three uplinks, I'm going to say the three uplinks

00:09:06.200 --> 00:09:08.400
on the distributed virtual switch need three NICs.

00:09:08.400 --> 00:09:13.700
So when I assign the distributed virtual switch to the physical host, I'm going to say which

00:09:13.700 --> 00:09:18.200
three NICs on that host are going to be connected to the distributed virtual switch.

00:09:18.200 --> 00:09:24.200
Now the host has all the port groups on it, it has all the port group policies, and

00:09:24.200 --> 00:09:26.599
everything's already done.

00:09:26.599 --> 00:09:31.700
One of the nice things, besides not having to configure this over and over and over again,

00:09:31.700 --> 00:09:35.599
is they're all named exactly the same, they're configured exactly the same.

00:09:35.599 --> 00:09:42.099
I should expect very consistent performance and very consistent behaviors from my virtual

00:09:42.099 --> 00:09:46.400
machine's traffic on the networks across all my hosts, because they all have the same exact

00:09:46.400 --> 00:09:48.599
policies pulled from one source.

00:09:48.599 --> 00:09:54.000
So for example, if I have a virtual machine connected to a port group, and that port group

00:09:54.000 --> 00:10:00.799
was called accounting, and I want to vMotion that virtual machine from one host to another,

00:10:00.799 --> 00:10:06.299
I want to have a port group named the exact same thing on the target machine it's going to.

00:10:06.299 --> 00:10:10.000
Now with the newer versions of vSphere, I can't actually change the port group it's

00:10:10.000 --> 00:10:12.700
attached to, I can give them one with a different name and things like that.

00:10:12.700 --> 00:10:15.500
But if I don't want to worry about going and changing it and connecting to it, I just want

00:10:15.500 --> 00:10:17.299
it to automatically be on the same network.

00:10:17.299 --> 00:10:22.299
If I want DRS to automatically just put it on the right network, or HA to automatically

00:10:22.400 --> 00:10:28.400
put it on the right network, then I want them named exactly the same across all my hosts.

00:10:28.400 --> 00:10:31.000
And a distributed virtual switch gives me that.

00:10:31.000 --> 00:10:35.599
In older versions, when they had to be named exactly the same, and we couldn't even choose

00:10:35.599 --> 00:10:41.000
to change it during the vMotion, if accounting had a capital A on one host and a lowercase

00:10:41.000 --> 00:10:44.000
A on another, it would say that port group doesn't exist.

00:10:44.000 --> 00:10:48.099
It was case-sensitive, had to be named exactly the same, the spaces had to be exactly the

00:10:48.099 --> 00:10:51.799
same if there's any spaces or anything like that, had to be identical.

00:10:51.799 --> 00:10:56.400
So, a distributed virtual switch made that really, really simple because now I got the

00:10:56.400 --> 00:10:59.599
exact same configuration across all my hosts.

00:10:59.599 --> 00:11:02.700
So, that's why they say it's really good for large environments because I can configure

00:11:02.700 --> 00:11:09.599
the virtual networking on 10 or 15 or 20 or, you know, a very large number of hosts just

00:11:09.599 --> 00:11:12.500
by assigning them and saying, use these adapters.

00:11:12.500 --> 00:11:14.500
On this host, use these adapters.

00:11:14.500 --> 00:11:16.200
On host 2, use the adapters.

00:11:16.200 --> 00:11:18.000
On host 3, use these adapters.

00:11:18.000 --> 00:11:21.700
Then once I've done and assigned all that, everything else gets pushed out to it.

00:11:21.700 --> 00:11:25.400
And it, again, has all the port groups and all the policies for the port groups, all

00:11:25.400 --> 00:11:30.099
the VLAN taggings on there, all the configuration is done, and it's identical across them all.

00:11:32.900 --> 00:11:35.700
So, here's some basic architecture of a virtual switch.

00:11:35.700 --> 00:11:41.299
So, we have that virtual switch, and I can create multiple different port groups.

00:11:41.299 --> 00:11:43.900
I can create, you know, a port group for accounting VMs.

00:11:43.900 --> 00:11:46.400
I can create a port group for HR VMs.

00:11:46.400 --> 00:11:51.400
I can then also create a VM kernel port, and that VM kernel port can have a different VLAN.

00:11:51.400 --> 00:11:53.200
So, one port group has VLAN 10.

00:11:53.200 --> 00:11:55.599
As I mentioned, another one has VLAN 20.

00:11:55.599 --> 00:11:59.099
My VM kernel port has VLAN 15.

00:11:59.099 --> 00:12:05.500
All those VLANs, when a machine sends traffic from one, you know, from itself to the switch,

00:12:05.500 --> 00:12:09.700
the switch can say, oh, this is from this port group with, you know, VLAN 10, and the

00:12:09.700 --> 00:12:14.299
traffic leaving the virtual switch going to the physical adapter is going to be on VLAN 10.

00:12:14.299 --> 00:12:20.900
So, my physical switch has to be set to allow VLAN 10 on that interface, and if my other

00:12:20.900 --> 00:12:26.000
machines from, you know, a different port group are VLAN 20, those packets, when they

00:12:26.000 --> 00:12:31.000
reach the virtual switch, say, oh, this is from port group 2 over here, and that's VLAN

00:12:31.000 --> 00:12:36.299
20, and it'll tag those packets with VLAN 20 going to that physical switch.

00:12:36.299 --> 00:12:41.400
So, again, those interfaces would all need to be tagged on this example for VLAN 10,

00:12:41.400 --> 00:12:45.599
VLAN 20, and 30 that shows on the slide here, or if my VM kernel port was 15, as I had

00:12:45.599 --> 00:12:47.200
mentioned, VLAN 15.

00:12:49.900 --> 00:12:53.099
So, that's a quick overview of virtual networking.

00:12:53.099 --> 00:12:56.200
There's a lot more details to go into in the next lesson.

00:12:56.200 --> 00:12:58.799
So, this is just some basic virtual networking concepts.

00:12:58.799 --> 00:13:00.700
We discussed virtual adapters.

00:13:00.700 --> 00:13:02.299
We discussed virtual switches.

00:13:02.299 --> 00:13:06.599
We gave you a quick intro to distributed virtual switches, and we also discussed port groups.