Skip to main content

About this free course

Download this course

Share this free course

Discovering computer networks: hands on in the Open Networking Lab
Discovering computer networks: hands on in the Open Networking Lab

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

12.3 How are switching decisions made?

In this section you will have a look at how switches make their switching decisions, using the same demonstration network you used in the previous section. You will again be able to see what the frames of data are doing at each stage, with Packet Tracer running in simulation mode.

Watch the video below, which is about 3 minutes long.

How are switching decisions made?

Download this video clip.Video player: 69_how_are_switching_descisions_made.mp4
Copy this transcript to the clipboard
Print this transcript
Show transcript|Hide transcript
 
Interactive feature not available in single page view (see it in standard view).

Activity 5 Test yourself

5 minutes

1. Do switches generate ARP requests?

a. 

(a) Yes


b. 

(b) No


The correct answer is a.

2. What type of addresses do switches store in their switching tables?

a. 

(a) IP addresses


b. 

(b) Postal addresses


c. 

(c) MAC addresses


d. 

(d) Gateway addresses


The correct answer is c.

3. Will switches forward frames out of all ports (except the one the frame came in on) if the destination MAC address is not in the MAC address table?

a. 

(a) Yes


b. 

(b) No


The correct answer is a.

Next you are going to revisit an earlier activity that involved a simple network comprising a switch and four PCs.

Activity 6 Try it out

10 minutes

1. Open PT Anywhere [Tip: hold Ctrl and click a link to open it in a new tab. (Hide tip)] in a new tab or window so you can read these instructions. The ‘spare’ switch and the two PCs at the bottom are for use in step 4 of this activity.

Investigate the network and enter the configuration settings into a copy of the table.

DeviceInterfaceIP addressSubnet maskDefault gateway
Router0G0/0  
PC0   
PC1   
PC2   
PC3   

2. From the CLI of the switch have a look at the MAC address table. You should find the table is currently empty. (Hint: to view the MAC address table you will need to use the command show mac-address-table from the privileged executive mode.)

3. Generate some network traffic by sending a broadcast ping from one of the PCs and then have another look at the table. You should now find that the table has been populated.

4. Add a second switch to the work area, with a couple of PCs connected to it, to create a second isolated network. (Use the spare switch and PCs provided at the bottom for this.) Configure these new PCs with suitable IP addresses and add the configuration details to the table you created in step 1.

5. Generate some network traffic on the new network and then have a look at the MAC address table of the new switch.

6. Now connect your new network to the router by adding a link between the router interface G0/1 and the switch.

7. Configure the router interface G0/1 with an appropriate IP address and add this address as a default gateway on both of the new PCs. Once again, add the configuration details to the table you created in step 1.

8. Try to ping between networks.

9. Examine the routing table from the CLI of the router. Can you see the connected networks (C)? And the IP addresses of the router interfaces (L)? (Hint: use the command show ip route from the privileged executive mode.)

Answer

1. Your table should look like this.

DeviceInterfaceIP addressSubnet maskDefault gateway
Router0G0/0192.168.2.1255.255.255.0
PC0192.168.2.10255.255.255.0192.168.2.1
PC1-192.168.2.11255.255.255.0192.168.2.1
PC2-192.168.2.12255.255.255.0192.168.2.1
PC3-192.168.2.13255.255.255.0192.168.2.1

2. If there were any entries in the MAC address table, you may have accidentally generated some network traffic. You can clear the MAC address table with the command clear mac-address-table.

3. The broadcast address for this network is 192.168.2.255 . You should have seen replies come in from each of the other three PCs and that the MAC address table now has five entries – one for each of its connected interfaces.

4. You could have chosen any private IP addresses for the two new PCs but, of course, they should both belong to the same network. For example, 192.168.8.10 and 192.168.8.11.

5. Again, you need to use the broadcast address for this network. For the example IP addresses given above, this would be 192.168.8.255. Once again, your ping should have populated the switch’s MAC address table.

6. Router interface 0/1 needs to be configured with a suitable IP address which will be the same for the PCs’ default gateways. For the example IP addresses given above, this would be 192.168.8.1. Using these example IP addresses, the complete configuration table would be:

DeviceInterfaceIP addressSubnet maskDefault gateway
Router0G0/0192.168.2.1255.255.255.0
PC0192.168.2.10255.255.255.0192.168.2.1
PC1192.168.2.11255.255.255.0192.168.2.1
PC2192.168.2.12255.255.255.0192.168.2.1
PC3192.168.2.13255.255.255.0192.168.2.1
PC4192.168.8.10255.255.255.0192.168.8.1
PC5192.168.8.11255.255.255.0192.168.8.1
Router0G0/1192.168.8.1255.255.255.0 

7. If your ping between the two networks was unsuccessful, it may have been because the default gateways on the PCs were not correctly set.