1 00:00:11,250 --> 00:00:17,190 In this packet tracer lab we're going to discuss spanning tree PortFast . What is a spanning tree 2 00:00:17,190 --> 00:00:20,160 PortFast and why is it important? 3 00:00:20,190 --> 00:00:27,750 Why do we use spanning tree PortFast in switched networks? Now on Cisco's website they discuss 4 00:00:28,170 --> 00:00:35,960 various options that you can configure with spanning tree including PortFast and they say that Port 5 00:00:35,960 --> 00:00:42,380 Fast causes a switch or trunk port to enter the spanning tree forwarding state immediately bypassing 6 00:00:42,380 --> 00:00:44,330 the listening and learning states. 7 00:00:44,570 --> 00:00:51,020 You can configure spanning tree PortFast on switch or trunk ports that are connected to a single workstation 8 00:00:51,050 --> 00:00:57,860 switch or server to allow those devices to connect to the network immediately instead of waiting for 9 00:00:57,860 --> 00:01:03,100 the port to transition from the listening to learning to the forwarding state. 10 00:01:03,260 --> 00:01:09,480 But you need to be careful with spanning-tree port fast if you enable spanning-tree PortFast on a Port 11 00:01:09,540 --> 00:01:16,980 that's connected to another layer to device such as a switch you may create network loops. 12 00:01:16,980 --> 00:01:20,550 So let's see the problem practically in this network. 13 00:01:20,550 --> 00:01:30,870 I'm gonna power cycle the devices in the topology and then on PC1 I'm gonna open up a command 14 00:01:30,870 --> 00:01:35,590 prompt and use the command IP config. 15 00:01:35,610 --> 00:01:39,960 Notice these ports are orange on the switch. 16 00:01:39,960 --> 00:01:46,770 So if I use the command IP config slash renew the PC is not going to get an IP address because these 17 00:01:46,770 --> 00:01:56,810 ports are currently blocked by spanning tree on the switch show spanning tree. 18 00:01:56,920 --> 00:02:03,550 Notice the ports are currently in the learning state spanning tree is just going green 19 00:02:03,710 --> 00:02:12,770 but notice in the output of my switch I see that they are currently in the learning state. So this command 20 00:02:12,830 --> 00:02:17,070 shows us the state of ports do that again. 21 00:02:17,100 --> 00:02:25,300 we can see that the ports are now forwarding but while the switch was transitioning from blocking to 22 00:02:25,300 --> 00:02:32,400 listening to learning to forwarding the PC wasn't able to get an IP address so would end up using 23 00:02:33,000 --> 00:02:40,770 an address in this range. Later on thePC would get an IP address if it continues to send DHCP request 24 00:02:40,770 --> 00:02:41,800 messages. 25 00:02:42,000 --> 00:02:51,110 but you can have problems with applications on your PC if it takes 30 seconds for a PC to receive 26 00:02:51,110 --> 00:02:52,610 an IP address. 27 00:02:52,610 --> 00:02:54,940 So here again the PC has got an IP address 28 00:02:55,580 --> 00:03:06,380 but if I power cycle these devices while the switch is booting up and while the ports are transitioning 29 00:03:06,380 --> 00:03:09,140 through the spanning tree states like they are now. 30 00:03:09,890 --> 00:03:17,720 So again back on the switch, the switch has no configuration show spanning tree. 31 00:03:18,110 --> 00:03:23,640 Port is currently in the listening state and then should go to the learning state as you can see there 32 00:03:24,150 --> 00:03:26,850 and then we'll eventually go to the forwarding state. 33 00:03:27,000 --> 00:03:35,280 But during that time PCs will not be able to receive IP addresses or forward traffic. Windows PC 34 00:03:35,280 --> 00:03:42,570 as an example won't be able to log on to the domain it's using one of these IP addresses instead of 35 00:03:42,660 --> 00:03:52,150 the IP address allocated by the DHCP server now 169.254. dot something dot something is a IP version 36 00:03:52,150 --> 00:03:54,360 4 link-local address. 37 00:03:54,430 --> 00:04:03,090 In other words, an IP address in this range 169.254/16 is an IP version 4 link-local address. 38 00:04:03,310 --> 00:04:10,630 This is similar in concept to fe80::/10 in IP version 6. 39 00:04:10,660 --> 00:04:18,890 The idea is that if a PC doesn't get an IP address from a DHCP server it will use an IP address in 40 00:04:18,890 --> 00:04:25,430 this range so that two PCs can still communicate with one another if they for instance connected 41 00:04:25,430 --> 00:04:32,380 to a hub or a switch and there's no DHCP server on the network. So in other words that's what this PC 42 00:04:32,380 --> 00:04:33,180 has done. 43 00:04:33,180 --> 00:04:39,000 It used an IP address in this range but that means that it won't be able to communicate with other servers 44 00:04:39,000 --> 00:04:46,650 on the network unless it continues to send a DHCP requests and then gets an IP address in the correct 45 00:04:46,650 --> 00:04:48,600 range as it did here. 46 00:04:48,690 --> 00:04:55,560 The PC won't be able to communicate with other devices such as domain controllers, DNS servers or even 47 00:04:55,560 --> 00:04:57,590 connect to the Internet. 48 00:04:57,600 --> 00:05:00,780 This is a non routable IP address. 49 00:05:01,290 --> 00:05:02,910 So how do we fix this. 50 00:05:02,910 --> 00:05:10,510 The answer is to use PortFast, so can you configure this network so that the PCs receive IP addresses 51 00:05:10,510 --> 00:05:12,960 from the DHCP survey immediately. 52 00:05:13,240 --> 00:05:21,180 The server here is configured as a DHCP server so the PCs should receive IP addresses from the DHCP 53 00:05:21,180 --> 00:05:23,820 server as soon as they boot up. 54 00:05:24,090 --> 00:05:26,190 So can you complete this lab yourself. 55 00:05:26,280 --> 00:05:31,090 Download the packet tracer file and see if you can complete the lab. 56 00:05:31,140 --> 00:05:34,240 Otherwise continue watching as I complete to the lab.