In the previous video, we already learn about what is vlan and why we need to use vlan. 2
Next in this video, we are going to practice about vlan. 3
This is topology that we are going to use to practice vlan. 4
I already configure the ip address of pc 1 pc 2 and pc 3, but not for pc 4. 5
Now let’s configure the ip address of pc 4, so the ip address is 192.168.1.4. 6
Let’s make sure the ip address of pc 1, okay the ip address is correct. 7
Pc 2 also correct, and pc 3 also correct. 8
Now let’s try to ping from pc 1 to pc 2, here let’s go to simulation mode first. 9
And here let’s ping or send packet from pc 1 to pc 2. 10
Here, pc 1 will send arp packet first. 11
Remember that arp packet is used to ask the mac address of the destination. 12
In this case, pc 1 is ask for the mac address of pc 2. 13
Here let’s continue. 14
The arp packet is received by switch. 15
And then the switch will be broadcast the arp packet to all pc. But here we can see 16
that there is x in pc 3 and pc 4. 17
This is means that these 2 pc will not reply for the arp packet. 18
Because the arp packet is to ask the mac address of pc 2. 19
But here we can see that pc 2 will be reply. 20
And finally the arp packet is back to the pc 1. 21
After the arp is complete like this, now pc 1 know the mac address of pc 2. 22
And then they will communicate with icmp protocol 23
Icmp protocol is the protocol that used in ping. 24
Okay finally here we can see that the ping is success. 25
What I want to show you is, that the arp packet will be forwarded or broadcasted to all pc. 26
why? 27
This is because, by default, all of interface in the switch is in the same vlan, 28
which is vlan 1. 29
Vlan 1 is the default vlan. 30
Because all interface is in the same vlan, so the arp packet will be forwarded to all pc 31
Here let’s check it in the switch, to show the vlan information, 32
we can use command show vlan brief. 33
Okay here we can see that all of interface is in the same vlan, which is vlan 1. 34
This is why the arp packet will be forwarded to all pc. 35
In the previous video, I already said that one of the advantage if we use vlan is that 36
separation of broadcast domain. 37
Now let’s try it. 38
We will configure so pc 1 and pc 2 will be in the vlan 10, and the pc 3 and pc 4 will be in 39
the vlan 20. 40
Actually you don’t need to use vlan number 10 and 20, the number of vlan is between 1-4095, 41
so you are free to use any number between 1 and 4095. 42
But in this example, I will use vlan 10 and 20. 43
Okay let’s start the configuration, open the switch. 44
Always remember that if we want to doing any configuration, 45
we need to enter global configuration mode first. 46
So here let’s type conf t or configure terminal. 47
Next let’s create the vlan, vlan 10, and then let’s set the name of the vlan, 48
let’s say the name is accounting. Exit. 49
Now let’s verify it first, do show vlan brief. 50
Okay here we can see that we have vlan 10 and the name is accounting. 51
Next let’s create for vlan 20. 52
And the name let’s say marketing. Exit. 53
Do show vlan brief again to verify. 54
Okay here we can see that now we have vlan 10 and vlan 20. 55
But if we see here, all of interface is still in the vlan 1. 56
There is no interface in vlan 10 and vlan 20. 57
So now, we need to assign the interface to the vlan. 58
Here fa0/2 and fa0/3 will be assign to vlan 10, 59
And then here fa0/1 and fa0/4 will be assign to vlan 20. 60
Okay let’s start the configuration. 61
First let’s configure for fa0/2, interface fa0/2, and then change the mode to access. 62
If you do not know about mode access, don’t worry, 63
I will explain about this later in the next video. 64
Okay then let’s set the access vlan to 10. 65
This is means that we assign interface fa0/2 to vlan 10, and then exit. 66
Let’s verify, do show vlan brief. 67
Okay here we can see that now, fa0/2 is already in the vlan 10. 68
Next let’s configure for fa0/3, this will also assigned to vlan 10. 69
So go to interface fa0/3, switchport mode access and then switchport access vlan 10. Exit. 70
Let’s verify again, okay here we can see that now, fa0/2 and fa0/3 is in the vlan 10. 71
Next, let’s configure for vlan 20. 72
So here fa0/1 and fa0/4 will be assigned to vlan 20. 73
Go to fa0/1, switchport mode access, switchport access vlan 20, so here we assign fa0/1 to vlan 20. 74
Next let’s assign for fa0/4, here interface fa0/4, switchport mode access, oh sorry there 75
is a typo, so switchport mode access, and then switchport access vlan 20. 76
Now let’s verify it. 77
Do show vlan brief. 78
Okay here we can see that fa0/2 and fa0/3 is in the vlan 10, 79
and then fa0/1 and fa0/4 is in the vlan 20. 80
If we have done configuring vlan like this, now we have 2 logical switch or virtual switch. 81
So here we have virtual switch for vlan 10, and then we also have virtual switch for vlan 20 82
So physically, we have 1 switch. 83
But logically, we have 2 switch. 84
Which is switch for vlan 10 and switch for vlan 20. 85
So now we have separation of broadcast domain. 86
This is mean, when pc1 send arp packet, the arp packet will not forwarded to pc 3 and pc 4, 87
but only forwarded to pc 2. Let’s try it. 88
But before that, we need to remove the arp table in all pc. ARP table is the mapping 89
of ip address and mac address, is the pc already have arp table, 90
so the pc will not send an arp packet. 91
Okay here in the pc 1 still have arp table, now let’s remove it. 92
Okay now the arp table is empty. 93
Pc 2, here we have arp table, let’s remove it, okay now the arp table is empty. 94
Let’s check in the switch, in the switch the name is not arp table, 95
but mac address table. 96
Okay here there is some entry in the mac address table, let’s delete it. 97
Okay now the mac address table is empty. 98
now let’s send packet from pc 1 to pc 2. 99
Here we can see that pc 1 will send arp packet. 100
Continue, the arp packet will be forwarded to switch, let’s check it, here we can see 101
that the arp packet will be forwarded only to fa0/3, 102
which is the interface that connected to pc 2. 103
The arp packet will not forwarded to pc 3 and pc 4, why? 104
Because pc 3 and pc 4 is in the different vlan, or in the different broadcast domain. 105
Let’s continue, here we can see that the arp packet only forwarded to pc 2. 106
Pc 2 will answer the arp packet, and then forwarded to pc 1. 107
After the arp is complete like this, pc 1 will send icmp packet, 108
remember that icmp packet is the ping. 109
And now successful, 110
Okay I hope you understand. 111
For testing again, let’s add one pc again to vlan 10. 112
Here let’s add one pc and then connecting to the switch. 113
Here we can see that the interface is fa0/5, by default this interface is in the vlan 1, 114
let’s check it. 115
Do show vlan brief. 116
Here we can see that fa0/5 is in the vlan 1. 117
Now let’s assign this interface to vlan 10. 118
Interface fa0/5, switchport mode access and then switchport access vlan 10. 119
Let’s show the vlan again, show vlan brief, okay here we can see that now, 120
fa0/5 is in the vlan 10. 121
So now, if pc 1 send arp packet, the arp packet will be broadcasted to pc 2 and pc 10, why? 122
Because pc 2 and pc 10 now is in the same vlan as pc 1, which is vlan 10. 123
The case is same if we add one more pc, and then assign the pc to vlan 10, 124
so the arp packet will also broadcasted to this new pc. 125
Let’s try it. 126
Here we can see the interface is fa0/6. 127
Let’s assign this interface to vlan 10. 128
So interface fa0/6, switchport mode access, and switchport access vlan 10. 129
Let’s verify it, do show vlan brief. 130
Okay here we can see that fa0/2, fa0/3, fa0/5, and fa0/6 is in the vlan 10. 131
Now let’s see the arp packet. 132
But before that let’s clear the arp table first. 133
Here we can see some entry in the arp table, let’s clear it, okay now this is empty. 134
PC 2, here also have arp table, let’s clear it, okay now this is empty. 135
In the switch, here we have some entry in mac address table, let’s clear it, 136
and okay now it is empty. 137
Okay now let’s try to send packet from pc 1 to pc 2, here we can see that pc 1 send a arp 138
packet to ask the mac address of 192.168.1.2, which is pc 2. 139
Continue, the arp packet will be forwarded to the switch, here we can see that switch 140
receive arp packet from pc 1, and then will be broadcasted to fa0/3, fa0/5, and fa0/6. 141
This is means that the arp packet will be broadcasted to all pc in the vlan 10. 142
Continue, here we can see that the arp packet is broadcasted to pc 2, pc 10, and pc 11. 143
But pc 10 and pc 11 will not reply it. 144
The only one will reply this arp packet is pc 2. 145
The arp reply will sent to switch, and from switch will sent to the pc 1. 146
Next pc 1 will send icmp. 147
The icmp will be sent to pc 2, the pc 2 will reply the icmp to pc 1, and this is successful. 148
Okay I think enough for this video. 149
I hope you understand about vlan. 150
Thankyou for watching and see you on the next video