-: IP and VLAN settings. 2 2
In this video, we're going to discuss IP and VLAN settings. 3 3
First, let's talk about IP settings. 4 4
This can occur when you have the incorrect IP address, 5 5
subnet mask, gateway or DNS server IP address 6 6
assigned to a client 7 7
and it will cause issues for you with your IP settings. 8 8
Remember from your lessons on DHCP, 9 9
we talked about the fact that every network client 10 10
needs four key pieces of information 11 11
in order to communicate properly on the network. 12 12
This is their IP address, their subnet mask, 13 13
the IP of their default gateway 14 14
and the IP of their DNS server. 15 15
Now let's take a look at a static assignment 16 16
on this OSX client. 17 17
Notice here, we have three key pieces of information shown. 18 18
The IP address, the subnet mask 19 19
and the router or default gateway. 20 20
The DNS server IP is on a different tab, 21 21
and it really doesn't matter for this example, 22 22
as long as we don't need to conduct name resolutions. 23 23
So, you were called to troubleshoot this client 24 24
because they can't access the internet. 25 25
Let's assume you already tried to ping the server 26 26
at 8.8.8.8 and it failed. 27 27
So, you know you have some kind of a routing issue here. 28 28
What could the problem be? 29 29
Now, I want you to go ahead and pause the video here 30 30
and look at it and see if you can figure out the issue. 31 31
All right, I'm going to count to five. 32 32
One, two, three, four, five. 33 33
All right, you're back? 34 34
Did you figure out the issue? 35 35
In this case, 36 36
the issue is that we have the wrong default gateway. 37 37
Notice the IP address is 192.168.1.200, 38 38
and it has a subnet mask of 255.255.255.0. 39 39
With this subnet mask, 40 40
the default gateway would have to be an IP 41 41
of 192.168.1 dot something 42 42
because it's in this 192.168.1.0/24 network 43 43
for us to be able to reach it. 44 44
Now, if the default gateway 45 45
is set 10.0.1.1 and this is truly the IP of my router, 46 46
then I have an incorrect IP address. 47 47
Because again, my subnet mask of 255.255.255.0, 48 48
if applied to the router's IP address of 10.0.1.1 49 49
would tell me I need to have something 50 50
in the network of 10.0.1.0/24. 51 51
So to get this client to connect to the internet 52 52
and have its traffic properly routed, 53 53
I need to change either the default gateway to 192.168.1.1 54 54
or change the IP address to 10.0.1.200 55 55
or something like that. 56 56
All right, let's take a look at another example. 57 57
This one comes from a Windows client. 58 58
Just like our last example, 59 59
this client cannot ping 8.8.8.8 successfully. 60 60
So you see the client has a statically assigned IP address 61 61
of 192.168.1.200. 62 62
Its subnet mask is 255.255.255.128 63 63
and the default gateway here is 192.168.1.1. 64 64
All right, go ahead and pause the video. 65 65
I want to see if you can identify the issue 66 66
and think about how you're going to fix 67 67
this client's network connectivity issues. 68 68
Pause the video and come back 69 69
in one, two, three, four, five. 70 70
All right, you're back? 71 71
Did you figure this one out? 72 72
Let's take a closer look at that subnet mask. 73 73
Notice it wasn't a class full class C of 255.255.255.0 74 74
So this isn't the 192.168.1.0/24 network 75 75
and it doesn't have 254 usable IP addresses. 76 76
Instead we have a subnet mask of 255.255.255.128. 77 77
This gives us a /25 network using CIDR notation. 78 78
That means we only have 126 usable IP addresses. 79 79
So if our gateway is 192.168.1.1, 80 80
and we have a subnet mask of 255.255.255.128, 81 81
then our network ID is 192.168.1.0 82 82
And our broadcast is going to be 192.168.1.127. 83 83
Everything between those two ranges 84 84
is going to be usable IPs. 85 85
But our client was assigned 192.168.1.200. 86 86
And that means it's assigned into a range 87 87
that's in another network. 88 88
So that IP address and gateway aren't on the same sub-net. 89 89
This would explain why we can't route our traffic 90 90
to the network because we can't reach our default gateway. 91 91
This is going to be a problem for us. 92 92
So our solution would be to change our IP address 93 93
to something on the same sub-net as that default gateway, 94 94
like 192.168.1.100 95 95
or we could see if there's a gateway 96 96
on the same sub-net as our client. 97 97
This means we need a gateway 98 98
with an IP address of 192.168.1.129 99 99
or something between there and 192.168.1.254, 100 100
because our network ID will be 192.168.1.128. 101 101
and the broadcast will be 192.168.1.255 102 102
if we're using the subnet mask for a /25 network 103 103
of 255.255.255.128. 104 104
All right, now, if you're going to connect to a website 105 105
by its domain name and that isn't working, 106 106
we need to look at the DNS IP server configuration. 107 107
In this case, you'd want to ensure 108 108
you have a working DNS server 109 109
and the IP has been properly entered on the client. 110 110
If you don't have your own DNS server, 111 111
you can always set your DNS server's IP to 8.8.8.8 112 112
which is the public DNS server hosted by Google. 113 113
So here you could see the DNS server 114 114
is set to 192.168.1.1 as the primary 115 115
and 192.168.1.2 as the secondary. 116 116
This is fine as long as the DNS servers there 117 117
are running on those IP addresses. 118 118
Now, if you don't have DNS servers, 119 119
then you want to reconfigure those to the public DNS servers 120 120
at 8.8.8.8 and 8.8.4.4, 121 121
both of those are Google's DNS servers. 122 122
Next let's talk about VLAN settings. 123 123
Remember when it comes to VLANs 124 124
you need to route the traffic between the VLANs 125 125
otherwise your devices aren't going to be able to communicate. 126 126
So let's pretend I have two VLANs, 127 127
one called IT and one called HR, 128 128
even though both IT and HR 129 129
are connected to switch one and switch two physically, 130 130
they can't communicate with each other 131 131
until I route traffic between them using a router. 132 132
Also, if you're going to have devices in the same VLAN 133 133
they need to be in the same logical sub-net. 134 134
So in this example, 135 135
all of my clients are part of the IT VLAN, 136 136
and they should be using the same sub-net of 192.168.1.0/24. 137 137
And all of my HR VLAN clients should use their own sub-net 138 138
something like 192.168.2.0/ 24. 139 139
So let's take a look at this 140 140
using a basic network logical diagram. 141 141
Here, we see one IT client and one HR client. 142 142
Each one is assigned an IP address in a /24 network. 143 143
The IT client is assigned to the IT sub-net 144 144
of 192.168.1.0/24 in VLAN 100. 145 145
And the HR client is going to be assigned 146 146
to 192.168.2.0/24 as it's network in VLAN 200. 147 147
To simplify this topology, 148 148
I left out all the other IT and HR clients, 149 149
but there could be 50 or 60 of these 150 150
connected there as well, either to switch one or two. 151 151
It really doesn't matter for our purposes, 152 152
as long as they're configured into the proper VLAN. 153 153
Now, as this is a logical diagram 154 154
and how we see it set up here, 155 155
the IT client cannot communicate to the HR client 156 156
and neither of those clients 157 157
can communicate with the internet. 158 158
Why is that? 159 159
All right, I want you to pause the video here 160 160
and I'm going to count to five 161 161
and I want you to come back and give me the answer. 162 162
One, two, three, four, five. 163 163
All right, you're back? 164 164
Did you figure out the issue? 165 165
Well, this issue is all going to come down to the fact 166 166
that there are no gateways 167 167
for the IT or HR clients to communicate with. 168 168
Notice in this logical topology, we only have one router 169 169
and that router has an interface IP of 10.0.0.1 170 170
in the 10.0.0.0/24 network. 171 171
This means it's the default VLAN, VLAN 1 172 172
and its network isn't on the same logical network 173 173
as either the IT or HR VLANs. 174 174
So for us to allow the IT and HR clients to communicate, 175 175
they're going to need a place to route traffic 176 176
between switch one and switch two. 177 177
Then to allow both of them to communicate with the internet, 178 178
we need to connect them to a new router 179 179
that's connected to the internet as well. 180 180
Now our easiest and cheapest solution in this case 181 181
would be to remove the connection 182 182
between switch one and switch two. 183 183
Then we can connect switch one to router one 184 184
and assign it a new interface 185 185
on an IP address in the IT VLAN. 186 186
We could also connect switch two directly to router one 187 187
and assign it an interface with the HR VLAN. 188 188
Now we can use router one to route traffic between VLAN 100, 189 189
the IT VLAN and VLAN 200, the HR VLAN. 190 190
And we can route both of those VLANs out to the internet, 191 191
going through router one as well. 192 192
So remember, if you start having devices 193 193
that can't communicate with each other, 194 194
like one of the IT clients can't communicate 195 195
with one of the HR clients, 196 196
it could be an improper VLAN configuration. 197 197
Make sure you check your configuration 198 198
and that there's a proper routing setup 199 199
between the different VLANs 200 200
because the number one cause of issues 201 201
when you're dealing with VLANs that won't communicate 202 202
is people aren't routing the traffic right. 203 203
Another common mistake people make when dealing with VLANs 204 204
is simply that they don't use them. 205 205
Now, if you don't use VLANs 206 206
all of your traffic will end up in the default VLAN, VLAN 1. 207 207
When this occurs, 208 208
you're going to have a really large single broadcast domain. 209 209
For example, 210 210
if you have a server that's operating in VLAN 1 , 211 211
the default VLAN, 212 212
it can experience slow load times 213 213
because there's too many devices located inside VLAN 1 214 214
and the number of broadcasts 215 215
are going to slow down the entire VLAN. 216 216
Instead, this server, which currently has an untagged port, 217 217
and therefore it's assigned to VLAN 1 by default, 218 218
should be added to the server VLAN with the other servers. 219 219
This will segregate them from all the other client villains 220 220
and increase their speed dramatically.