1 00:00:00,230 --> 00:00:06,791 In the previous video, we already learn about what is vlan and why we need to use vlan. 2 00:00:07,410 --> 00:00:11,881 Next in this video, we are going to practice about vlan. 3 00:00:12,501 --> 00:00:16,211 This is topology that we are going to use to practice vlan. 4 00:00:16,790 --> 00:00:24,921 I already configure the ip address of pc 1 pc 2 and pc 3, but not for pc 4. 5 00:00:25,221 --> 00:00:33,899 Now let’s configure the ip address of pc 4, so the ip address is 192.168.1.4. 6 00:00:34,578 --> 00:00:40,480 Let’s make sure the ip address of pc 1, okay the ip address is correct. 7 00:00:41,019 --> 00:00:47,231 Pc 2 also correct, and pc 3 also correct. 8 00:00:47,690 --> 00:00:55,270 Now let’s try to ping from pc 1 to pc 2, here let’s go to simulation mode first. 9 00:00:55,650 --> 00:01:00,899 And here let’s ping or send packet from pc 1 to pc 2. 10 00:01:01,638 --> 00:01:04,630 Here, pc 1 will send arp packet first. 11 00:01:04,630 --> 00:01:10,161 Remember that arp packet is used to ask the mac address of the destination. 12 00:01:10,700 --> 00:01:15,752 In this case, pc 1 is ask for the mac address of pc 2. 13 00:01:16,491 --> 00:01:18,430 Here let’s continue. 14 00:01:18,930 --> 00:01:21,921 The arp packet is received by switch. 15 00:01:22,381 --> 00:01:29,491 And then the switch will be broadcast the arp packet to all pc. But here we can see 16 00:01:29,491 --> 00:01:33,501 that there is x in pc 3 and pc 4. 17 00:01:34,260 --> 00:01:39,731 This is means that these 2 pc will not reply for the arp packet. 18 00:01:40,151 --> 00:01:44,851 Because the arp packet is to ask the mac address of pc 2. 19 00:01:45,750 --> 00:01:49,601 But here we can see that pc 2 will be reply. 20 00:01:50,081 --> 00:01:54,210 And finally the arp packet is back to the pc 1. 21 00:01:54,909 --> 00:02:02,270 After the arp is complete like this, now pc 1 know the mac address of pc 2. 22 00:02:02,510 --> 00:02:06,900 And then they will communicate with icmp protocol 23 00:02:07,459 --> 00:02:11,631 Icmp protocol is the protocol that used in ping. 24 00:02:12,530 --> 00:02:16,752 Okay finally here we can see that the ping is success. 25 00:02:18,000 --> 00:02:25,951 What I want to show you is, that the arp packet will be forwarded or broadcasted to all pc. 26 00:02:27,309 --> 00:02:28,210 why? 27 00:02:28,210 --> 00:02:34,781 This is because, by default, all of interface in the switch is in the same vlan, 28 00:02:35,261 --> 00:02:37,330 which is vlan 1. 29 00:02:37,530 --> 00:02:39,831 Vlan 1 is the default vlan. 30 00:02:40,870 --> 00:02:47,919 Because all interface is in the same vlan, so the arp packet will be forwarded to all pc 31 00:02:48,641 --> 00:02:54,025 Here let’s check it in the switch, to show the vlan information, 32 00:02:54,025 --> 00:02:56,825 we can use command show vlan brief. 33 00:02:59,761 --> 00:03:06,591 Okay here we can see that all of interface is in the same vlan, which is vlan 1. 34 00:03:06,711 --> 00:03:11,112 This is why the arp packet will be forwarded to all pc. 35 00:03:11,871 --> 00:03:19,000 In the previous video, I already said that one of the advantage if we use vlan is that 36 00:03:19,000 --> 00:03:21,401 separation of broadcast domain. 37 00:03:22,160 --> 00:03:23,849 Now let’s try it. 38 00:03:24,289 --> 00:03:32,730 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 00:03:32,730 --> 00:03:34,451 the vlan 20. 40 00:03:35,051 --> 00:03:45,602 Actually you don’t need to use vlan number 10 and 20, the number of vlan is between 1-4095, 41 00:03:46,341 --> 00:03:51,982 so you are free to use any number between 1 and 4095. 42 00:03:52,561 --> 00:03:57,212 But in this example, I will use vlan 10 and 20. 43 00:03:58,051 --> 00:04:02,649 Okay let’s start the configuration, open the switch. 44 00:04:02,649 --> 00:04:06,123 Always remember that if we want to doing any configuration, 45 00:04:06,123 --> 00:04:09,791 we need to enter global configuration mode first. 46 00:04:10,090 --> 00:04:15,423 So here let’s type conf t or configure terminal. 47 00:04:16,461 --> 00:04:23,680 Next let’s create the vlan, vlan 10, and then let’s set the name of the vlan, 48 00:04:23,900 --> 00:04:29,107 let’s say the name is accounting. Exit. 49 00:04:29,607 --> 00:04:34,142 Now let’s verify it first, do show vlan brief. 50 00:04:34,841 --> 00:04:40,521 Okay here we can see that we have vlan 10 and the name is accounting. 51 00:04:41,251 --> 00:04:44,559 Next let’s create for vlan 20. 52 00:04:45,617 --> 00:04:49,999 And the name let’s say marketing. Exit. 53 00:04:50,430 --> 00:04:53,181 Do show vlan brief again to verify. 54 00:04:53,740 --> 00:04:58,672 Okay here we can see that now we have vlan 10 and vlan 20. 55 00:04:59,331 --> 00:05:04,740 But if we see here, all of interface is still in the vlan 1. 56 00:05:05,060 --> 00:05:09,061 There is no interface in vlan 10 and vlan 20. 57 00:05:09,401 --> 00:05:13,804 So now, we need to assign the interface to the vlan. 58 00:05:14,383 --> 00:05:22,420 Here fa0/2 and fa0/3 will be assign to vlan 10, 59 00:05:22,799 --> 00:05:31,661 And then here fa0/1 and fa0/4 will be assign to vlan 20. 60 00:05:32,760 --> 00:05:35,791 Okay let’s start the configuration. 61 00:05:36,251 --> 00:05:47,532 First let’s configure for fa0/2, interface fa0/2, and then change the mode to access. 62 00:05:48,351 --> 00:05:52,532 If you do not know about mode access, don’t worry, 63 00:05:52,532 --> 00:05:56,022 I will explain about this later in the next video. 64 00:05:56,841 --> 00:06:01,030 Okay then let’s set the access vlan to 10. 65 00:06:01,590 --> 00:06:09,700 This is means that we assign interface fa0/2 to vlan 10, and then exit. 66 00:06:10,478 --> 00:06:13,912 Let’s verify, do show vlan brief. 67 00:06:14,371 --> 00:06:21,122 Okay here we can see that now, fa0/2 is already in the vlan 10. 68 00:06:22,380 --> 00:06:30,860 Next let’s configure for fa0/3, this will also assigned to vlan 10. 69 00:06:31,240 --> 00:06:42,289 So go to interface fa0/3, switchport mode access and then switchport access vlan 10. Exit. 70 00:06:42,930 --> 00:06:54,251 Let’s verify again, okay here we can see that now, fa0/2 and fa0/3 is in the vlan 10. 71 00:06:55,010 --> 00:06:58,450 Next, let’s configure for vlan 20. 72 00:06:58,910 --> 00:07:06,601 So here fa0/1 and fa0/4 will be assigned to vlan 20. 73 00:07:07,120 --> 00:07:21,618 Go to fa0/1, switchport mode access, switchport access vlan 20, so here we assign fa0/1 to vlan 20. 74 00:07:22,451 --> 00:07:35,669 Next let’s assign for fa0/4, here interface fa0/4, switchport mode access, oh sorry there 75 00:07:35,669 --> 00:07:45,520 is a typo, so switchport mode access, and then switchport access vlan 20. 76 00:07:47,516 --> 00:07:49,460 Now let’s verify it. 77 00:07:49,640 --> 00:07:51,643 Do show vlan brief. 78 00:07:53,341 --> 00:08:01,418 Okay here we can see that fa0/2 and fa0/3 is in the vlan 10, 79 00:08:01,598 --> 00:08:08,291 and then fa0/1 and fa0/4 is in the vlan 20. 80 00:08:09,130 --> 00:08:16,021 If we have done configuring vlan like this, now we have 2 logical switch or virtual switch. 81 00:08:16,660 --> 00:08:25,288 So here we have virtual switch for vlan 10, and then we also have virtual switch for vlan 20 82 00:08:25,869 --> 00:08:28,921 So physically, we have 1 switch. 83 00:08:29,180 --> 00:08:32,360 But logically, we have 2 switch. 84 00:08:32,360 --> 00:08:37,302 Which is switch for vlan 10 and switch for vlan 20. 85 00:08:38,001 --> 00:08:42,131 So now we have separation of broadcast domain. 86 00:08:42,591 --> 00:08:51,291 This is mean, when pc1 send arp packet, the arp packet will not forwarded to pc 3 and pc 4, 87 00:08:51,291 --> 00:08:56,517 but only forwarded to pc 2. Let’s try it. 88 00:08:56,731 --> 00:09:04,460 But before that, we need to remove the arp table in all pc. ARP table is the mapping 89 00:09:04,460 --> 00:09:10,545 of ip address and mac address, is the pc already have arp table, 90 00:09:10,545 --> 00:09:14,322 so the pc will not send an arp packet. 91 00:09:15,301 --> 00:09:22,052 Okay here in the pc 1 still have arp table, now let’s remove it. 92 00:09:22,671 --> 00:09:25,911 Okay now the arp table is empty. 93 00:09:26,231 --> 00:09:34,070 Pc 2, here we have arp table, let’s remove it, okay now the arp table is empty. 94 00:09:34,330 --> 00:09:40,409 Let’s check in the switch, in the switch the name is not arp table, 95 00:09:40,548 --> 00:09:42,762 but mac address table. 96 00:09:43,541 --> 00:09:48,944 Okay here there is some entry in the mac address table, let’s delete it. 97 00:09:50,721 --> 00:09:54,381 Okay now the mac address table is empty. 98 00:09:54,681 --> 00:09:59,003 now let’s send packet from pc 1 to pc 2. 99 00:10:00,581 --> 00:10:04,651 Here we can see that pc 1 will send arp packet. 100 00:10:05,130 --> 00:10:12,951 Continue, the arp packet will be forwarded to switch, let’s check it, here we can see 101 00:10:12,951 --> 00:10:18,956 that the arp packet will be forwarded only to fa0/3, 102 00:10:19,256 --> 00:10:22,802 which is the interface that connected to pc 2. 103 00:10:23,341 --> 00:10:29,379 The arp packet will not forwarded to pc 3 and pc 4, why? 104 00:10:29,379 --> 00:10:36,961 Because pc 3 and pc 4 is in the different vlan, or in the different broadcast domain. 105 00:10:37,600 --> 00:10:43,320 Let’s continue, here we can see that the arp packet only forwarded to pc 2. 106 00:10:43,660 --> 00:10:48,741 Pc 2 will answer the arp packet, and then forwarded to pc 1. 107 00:10:49,160 --> 00:10:55,114 After the arp is complete like this, pc 1 will send icmp packet, 108 00:10:55,574 --> 00:10:58,700 remember that icmp packet is the ping. 109 00:10:59,384 --> 00:11:01,102 And now successful, 110 00:11:01,900 --> 00:11:03,972 Okay I hope you understand. 111 00:11:05,030 --> 00:11:09,861 For testing again, let’s add one pc again to vlan 10. 112 00:11:10,221 --> 00:11:14,681 Here let’s add one pc and then connecting to the switch. 113 00:11:15,321 --> 00:11:24,771 Here we can see that the interface is fa0/5, by default this interface is in the vlan 1, 114 00:11:25,909 --> 00:11:27,210 let’s check it. 115 00:11:27,749 --> 00:11:29,281 Do show vlan brief. 116 00:11:30,000 --> 00:11:34,922 Here we can see that fa0/5 is in the vlan 1. 117 00:11:35,700 --> 00:11:39,503 Now let’s assign this interface to vlan 10. 118 00:11:40,402 --> 00:11:48,940 Interface fa0/5, switchport mode access and then switchport access vlan 10. 119 00:11:49,919 --> 00:11:54,241 Let’s show the vlan again, show vlan brief, okay here we can see that now, 120 00:11:54,241 --> 00:11:58,871 fa0/5 is in the vlan 10. 121 00:11:59,550 --> 00:12:08,142 So now, if pc 1 send arp packet, the arp packet will be broadcasted to pc 2 and pc 10, why? 122 00:12:08,721 --> 00:12:17,049 Because pc 2 and pc 10 now is in the same vlan as pc 1, which is vlan 10. 123 00:12:17,808 --> 00:12:25,026 The case is same if we add one more pc, and then assign the pc to vlan 10, 124 00:12:25,026 --> 00:12:29,761 so the arp packet will also broadcasted to this new pc. 125 00:12:30,360 --> 00:12:31,471 Let’s try it. 126 00:12:31,831 --> 00:12:36,330 Here we can see the interface is fa0/6. 127 00:12:36,570 --> 00:12:39,601 Let’s assign this interface to vlan 10. 128 00:12:40,080 --> 00:12:48,510 So interface fa0/6, switchport mode access, and switchport access vlan 10. 129 00:12:48,890 --> 00:12:52,621 Let’s verify it, do show vlan brief. 130 00:12:53,081 --> 00:13:06,000 Okay here we can see that fa0/2, fa0/3, fa0/5, and fa0/6 is in the vlan 10. 131 00:13:06,959 --> 00:13:09,171 Now let’s see the arp packet. 132 00:13:09,490 --> 00:13:13,322 But before that let’s clear the arp table first. 133 00:13:14,067 --> 00:13:22,161 Here we can see some entry in the arp table, let’s clear it, okay now this is empty. 134 00:13:22,161 --> 00:13:29,791 PC 2, here also have arp table, let’s clear it, okay now this is empty. 135 00:13:30,191 --> 00:13:38,088 In the switch, here we have some entry in mac address table, let’s clear it, 136 00:13:41,144 --> 00:13:43,822 and okay now it is empty. 137 00:13:44,841 --> 00:13:53,600 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 00:13:53,600 --> 00:14:00,887 packet to ask the mac address of 192.168.1.2, which is pc 2. 139 00:14:01,726 --> 00:14:08,210 Continue, the arp packet will be forwarded to the switch, here we can see that switch 140 00:14:08,210 --> 00:14:20,891 receive arp packet from pc 1, and then will be broadcasted to fa0/3, fa0/5, and fa0/6. 141 00:14:21,491 --> 00:14:27,802 This is means that the arp packet will be broadcasted to all pc in the vlan 10. 142 00:14:28,701 --> 00:14:37,010 Continue, here we can see that the arp packet is broadcasted to pc 2, pc 10, and pc 11. 143 00:14:37,269 --> 00:14:40,771 But pc 10 and pc 11 will not reply it. 144 00:14:41,451 --> 00:14:45,832 The only one will reply this arp packet is pc 2. 145 00:14:46,151 --> 00:14:52,172 The arp reply will sent to switch, and from switch will sent to the pc 1. 146 00:14:52,571 --> 00:14:55,781 Next pc 1 will send icmp. 147 00:14:55,781 --> 00:15:04,652 The icmp will be sent to pc 2, the pc 2 will reply the icmp to pc 1, and this is successful. 148 00:15:05,531 --> 00:15:08,030 Okay I think enough for this video. 149 00:15:08,030 --> 00:15:10,960 I hope you understand about vlan. 150 00:15:11,360 --> 00:15:14,838 Thankyou for watching and see you on the next video