1 00:00:09,430 --> 00:00:16,510 One of the questions I've received is how to configure a layer 3 switch in GNS3. For 2 00:00:16,510 --> 00:00:17,410 this demonstration. 3 00:00:17,410 --> 00:00:27,970 I'm gonna use an IOS V layer 2 switch the IOS V Layer 2 supports both Layer 2 as well as Layer 4 00:00:27,970 --> 00:00:38,630 3 switching what I'll also do is use two routers as PCs in the topology these devices take a while to boot 5 00:00:38,630 --> 00:00:38,900 up. 6 00:00:38,900 --> 00:00:43,420 So I'll start them and open up console's to them. 7 00:00:44,310 --> 00:00:49,620 As you can see in the output here we've got IOS V booting on the three devices. 8 00:00:51,950 --> 00:00:58,900 What I'll do now is connect the routers to the switch. 9 00:01:00,580 --> 00:01:09,040 So at the moment we've got two routers connected to this layer 3switch, the routers in this example are 10 00:01:09,060 --> 00:01:21,010 acting as PCs. So I'm simply gonna use them to demonstrate VLANs and layer 3 configuration on this 11 00:01:21,010 --> 00:01:22,390 layer 3 switch. 12 00:01:25,500 --> 00:01:36,650 The focus of this video will be the configuration of VLANs on the switch and the configuration of 13 00:01:37,070 --> 00:01:38,900 inter VLAN routing. 14 00:01:38,930 --> 00:01:47,340 In other words, getting the switch to act as a layer 3 device so the switch is booted up show IP interface 15 00:01:47,340 --> 00:01:48,480 brief. 16 00:01:48,480 --> 00:01:51,580 There are various interfaces available on the switch. 17 00:01:51,690 --> 00:01:58,400 Show VLAN brief shows us that only the default VLAN exist on the switch. 18 00:01:58,440 --> 00:02:07,430 So what I'll do is give the switch a name switch 1 and then I'll create two VLANs on the switch. 19 00:02:07,800 --> 00:02:17,820 So show VLAN brief we've got VLAN 1, VLAN 2 and VLAN 3 configured on the switch 20 00:02:17,820 --> 00:02:18,640 at the moment. 21 00:02:19,810 --> 00:02:27,250 The routers are booted so I'll bypass the initial config on those two routers acting as our PCs in the topology. 22 00:02:29,600 --> 00:02:33,790 Now notice show interface gigabit 00 switch port. 23 00:02:33,790 --> 00:02:40,710 This port is in VLAN 1 that's the default. 24 00:02:40,750 --> 00:02:44,800 The same is true for the second port. 25 00:02:44,860 --> 00:02:55,700 What we'll do however is configure gigabit 00 to be in VLAN 2 and gigabit 26 00:02:55,720 --> 00:03:04,940 01 will be put into VLAN 3. So now show interface gigabit 00 switch port 27 00:03:04,970 --> 00:03:19,790 shows us that gigabit 00 is in VLAN 2 and gigabit 01 is in VLAN 3. Show IP route on the switch 28 00:03:19,820 --> 00:03:22,520 shows us that IP routing is enabled. 29 00:03:22,700 --> 00:03:31,790 If I disable IP routing and use the command show IP route notice the output is very different to when 30 00:03:32,390 --> 00:03:34,810 IP routing is enabled. 31 00:03:34,880 --> 00:03:42,290 Now in these IOS V layer 2 switches IP routing is enabled by default but it's often not enabled 32 00:03:42,860 --> 00:03:50,120 on real physical switches. So to enable inter VLAN routing or layer 3 functionality we need to have 33 00:03:50,120 --> 00:03:58,850 the IP routing command enabled on the switch. Show IP interface brief shows us the physical interfaces 34 00:03:59,720 --> 00:04:08,690 to enable inter VLAN routing between the VLANs we need to configure IP addresses in the relevant 35 00:04:08,980 --> 00:04:17,459 VLANs on what are called switch virtual interfaces or SVIs. So on both VLAN 2 36 00:04:17,600 --> 00:04:24,240 and VLAN 3 we need to configure IP addresses in the relevant subnet. 37 00:04:24,590 --> 00:04:34,710 So show IP interface brief we can see that an IP address is configured in VLAN 2 and on VLAN 38 00:04:34,730 --> 00:04:40,860 3 I need to no shut those SVIs. 39 00:04:42,170 --> 00:04:54,950 So now show IP interface brief we can see that those two SVIs or Layer 3 interfaces for the VLANs 40 00:04:55,400 --> 00:04:59,340 are configured and the SVIs are up. 41 00:04:59,410 --> 00:05:05,600 That's how you configure a switch for inter VLAN routing and layer 3 functionality. 42 00:05:05,660 --> 00:05:18,160 So on the router acting as a PC, I can no shut the interface and give it an IP address in the VLAN such 43 00:05:18,160 --> 00:05:20,040 as the following. 44 00:05:21,050 --> 00:05:31,350 I'll disable IP routing on the router and configure an IP default gateway of 10.1.2.254. 45 00:05:31,720 --> 00:05:41,330 So show IP route on the router shows us that IP routing is disabled. Can we ping the default gateway? 46 00:05:41,330 --> 00:05:45,230 Yes, we can. On this side we'll do something similar. 47 00:05:45,410 --> 00:06:01,090 So CONFT host router 2, interface could give 00, no shut IP address 10 131 255 255 255 0 48 00:06:01,950 --> 00:06:12,500 no IP routing to disable routing and make this act like a PC IP default gateway 10 13 254 ping 49 00:06:12,500 --> 00:06:20,460 10 13 254, so router 2 can ping it's default gateway. 50 00:06:20,500 --> 00:06:28,660 So what we should be able to do now is ping router 2 from router 1 which we can and to prove that, I'll do a de-bug 51 00:06:29,200 --> 00:06:38,650 IP ICMP on the side and ping the router from router 2 and you can see that the pings arrived 52 00:06:38,680 --> 00:06:40,440 echo reply was sent. 53 00:06:41,240 --> 00:06:50,330 So now if we disable IP routing on the layer 3 switch what will happen is the pings no longer work 54 00:06:51,140 --> 00:06:58,310 because the switch is no longer acting as a layer 3 switch, layer 3 capability has been disabled 55 00:06:58,400 --> 00:07:06,650 on the switch. Enable IP routing and routing takes place and pings can be sent from one router to the 56 00:07:06,650 --> 00:07:07,190 other. 57 00:07:08,530 --> 00:07:12,520 So router 2 can ping router 1 and router 1 can ping router 2. 58 00:07:12,840 --> 00:07:18,380 So that was a simple example of how to enable inter VLAN routing on a switch. 59 00:07:18,390 --> 00:07:21,350 In other words make it act as a layer 3 switch. 60 00:07:21,690 --> 00:07:24,810 I hope you enjoyed this video if it's been of benefit to you 61 00:07:24,810 --> 00:07:28,750 Please like it, please subscribe to my Youtube channel 62 00:07:28,770 --> 00:07:30,600 I wish you all the very best.