hello everyone welcome to pm networking today in this video i am going to show you how to configure intervillain routing using router how to configure intervillain routing using router guys as you can see over here i have one land network this is my land but in my land there there is two department first department is hr team and second department is a content team right so in my lane there is two departments so how we separate these two departments with the help of vlan what we what i will do i will configure vlan 10 and vlan 20 on this switch right and then i will make the member of vlan 10 to these two port right that is fast ethernet 0 slash 1 and 0 slash 2 and then i will make member member of vlan 20 to these two ports that is fast ethernet 0 slash 3 and 0 slash 4 then the broadcast message which is generated from the from this these user from vlan 10 will never goes in vlan 20 right so this pc will not able to communicate with this pc right but initially this all pc can communicate together right so guys just wait let me show you is there any vlan on switch so vlan so yes there is two vlan first one is vlan 10 i name to vlan 10 is hr right but there is no any port all right in vlan 10 and in the same way there is one more vlan that is 20 and name of this vlan is a content and there is no any port in vlan 20 by default right now all the member of this switch all the port of this switch are member of vlan 1 sorry all the port of this switch are member of vlan 1 So, guys I am going to configure step by step. I am going to configure inter VLAN routing step by step. In step 1, I will configure IP address to the PC. In step 2, I will configure VLAN on this switch.
In step 3, I will configure IP address to the PC. In step 3, I will make member of VLAN 10 to these two users. And I will make member of VLAN 20 to these two users. Then I will configure trunk port to fastethernet 0 slash 5. So that this link can carry traffic of multiple VLAN. So by default, all port of switch is access port.
That means every port can carry the traffic of single VLAN only right single VLAN so but this link will carry the traffic of VLAN 10 VLAN 20 right so we need to configure trunk port right we need to make trunk port to fast ethernet 0 slash 5 so in a step 4 I will configure trunk port right on this switch and in a step 7 I will configure configure I will configure sub interface on the router right i will create two sub interface right from fast ethernet 0 0 i will create two sub interface first one is fast ethernet 0 0.1 and fast ethernet 0 0.2 right and i will configuration encapsulation protocol that is encapsulation dot 1 q for vlan 10 fast ethernet 0 0.1 to vlan 10 and fast ethernet 0 0.2 for vlan 20 right then And we need to configure IP address to sub interface as well. So I will configure IP address to this to this sub interface is 192.168.10.11 IP address from this network from VLAN to a 10 right and I will configure IP address to this sub interface fastethernet 0 slash 0.2 is 192.168.10.19 right this is the IP address from this network right. and then you will see this these pc can communicate with this pc this pc right so let me configure ip address to the pc first ip address okay actually i already configure ip address to the pca right so ip address of this pc is 192.168.10.9 right submit mask is 255.255.255.248 because i am using slash 29 right and default gateway is 192.168.10.11 right for these user default gateway will be 10.11 and for these user default gateway will be 10.9 right so let me check IP address on PC to so yes IP address is assigned on PC to as well that is 10.17 and default gateway is 10.19 right so we don't need to configure anything on PC right you can see this PC is able to ping species able to ping all PCs right Let me ping 192.168.10.10 first.
Let me ping PC1 first from PC0. So, yes, it's pinging. Let me ping 10.17.
IP address of 10.17 is IP address of PC2, which is present in a content team. So, just wait for some time. just wait let me check VLAN on switch why it's not pinging so VLAN so all port are member of VLAN 1 so it should be ping so interface trunk so there is no any interface configure as trunk right so why it's not pinging why it's not pinging because of default gateway right because because of default gateway because of default gateway actually i am using default gateway over here is over here is 192.168.10.11 and i am using default gateway here is 10 dot 10.19 right so that's the reason this pc is not able to communicate with this pc right that is by default if if you remove remove default gateway from these all pc then they will communicate to each other right so now how communication will possible right so to make communication possible between vlan 10 and vlan 20 i i will configure intervillain routing right so first first of all we need to make the member of vlan 10 to this port right port so let me let me let me make the member of vlan 10 at 20 to the switch port so let me show you interface range fast ethernet 0 slash 1 2 0 slash 1 2 2 right switch port mode access Now, switch port access VLAN 10. Now, these two ports are member of VLAN 10. And interface range fast ethernet 0 slash 3 to 4. Switch port mode access.
Switch port mode. Switch port access full. VLAN 10 switch port access for VLAN 20 sorry for VLAN 20. Now let me show you the VLAN wait wait stuck it will take takes five to six second Till then let me configure router.
First of all we need to run no shutdown command on physical interface of router. Then I will create sub interface. First no enable global configure mode. Now interface fastethernet 0 slash 0 no shutdown.
Now we need to create two sub interface on this router. So first interface is interface fastethernet 0 slash 0 dot 1. and encapsulation dot 1 cube for which vlan for vlan 10 right for vlan 10 i am creating sub interface 0 slash 0 dot 1 now ip address ip address is 192 dot 168 dot 10.11 for VLAN 10 right and subnet mask will be 255.255.255.248 because I am using slash 29 over here fine now let me create one more sub interface over here fast ethernet 0 slash 0.2 right encapsulation dot 1 cube for which VLAN for VLAN 20 and IP address is 192.168. 10.19 right and submit mask is 255.255.255.248 right so now we don't know when nothing more configuration is required on router one right so configuration of router is done now let me configure let me configure trunk port on the switch so first let me show you vlan so vlan okay so vlan you can see guys there is two vlan which i created recently that is 10 and 20. so in 10 name is hr there is two port first one is first ethernet 0 slash 0 and first ethernet 0 slash 2 are the member of vlan 10 and these two ports are member of vlan 20 right so Let me show you trunk port.
So interface trunk right. So there is no any port configured as trunk right. So we need to configure fastethernet 0 slash 5 switchport mode trunk fine. So interface trunk yes There is one port that is fastethernet0 slash 0 mode is on encapsulation protocol is 802.1 queue and status is trunking right.
Now let me see let me show you this user is able to ping or not. So let me ping my default gateway first. So my default gateway is my default gateway is 192.168.10.11. 10.11 so yes it's pinging i am able to ping my default gateway yeah right now ping pc2 so ip address of pc2 is 192.168.10.17 right just wait for some time because arp is resolving then it will ping right you can see over here it's pinging right now these users are able to communicate with this user via router right so how communication is possible actually what happened what is happening over here guys when i run ping command on this interface i run ping and 192.168.10.17 right so icmp traffic generated at this pc so what will be the source ip source ip will be 192.168.10.9 and destination ip is 190.268.10.16 right this information hit at switch on the interface of fast ethernet 0 slash 1. now what switch will check switch will check on which interface i receive this traffic so switch c on fast ethernet 0 slash 0 so switch will check okay fast ethernet 0 slash 0 is member of which vlan right then switch We will get to know that this port is member of VLAN 10. So I will forward this traffic to the port who is member of VLAN 10 or who is member of trunk port.
So this PC will forward this traffic on trunk port. So this is the port at layer 2. At first time R packet is broadcasted. So destination MAC address is all F. So switch will forward this traffic to router and from this interface.
Then router has encapsulation to sub interface and both are encapsulated with VLAN 10 and 20. So before sending a traffic on trunk port switch add tag. Switch to tagging. so now router will understand tagging because i am running encapsulation dot 1q so router will remove tagging and then again router will add tag for vlan 20 and then how communication will possible from this pc to this pc right now this user can communicate with each other now all computer can communicate with each other right so that's it that's all for today if you are understanding and you are getting my point please hit the like button and if you haven't subscribed my channel please subscribe this channel thank you thank you so much for watching bye bye