Spanning Tree Protocol (STP)

 

[Topology]

 

 

There will be a loop between h2 and h3.

 

In this experiment, I will create 4 virtual machines in virtualbox. The first VM is h1 (host), the second is h2 (bridge), the third is h3 (bridge), and the fourth is h4 (host).

 

[Step].

1. Please install one Linux VM. In this case, I use ubuntu as an example.

 

2. Duplicate this VM.

 

 

 

 

Use the same method to create h3 and h4.

 

change the ubuntu15.04 to h1.

 

 

3. Network Setting.

For h1.

 

For h2.

    

 

For h3.

     

 

For h4.

 

Note: If the VM does not work correctly, please check the internal network setting is correct. Make sure that the promiscuous mode is "Allow VM"

 

4. Turn on these four VMs.

 

5. Configure the IP address for h1.

 

6. Configure the IP address for h4.

 

7. Configure the h2 as a bridge.

 

8. Configure the h3 as a bridge.

 

9. Before we turn on the stp in h2 and h3, we can see the ping results of h1-h4. From the following figure, we can see that h1 takes much time to get ping results from h4. Also there are some packets which are lost. This is due to a loop between h2 and h3.

 

10. Turn on the stp in h2 and set the h2 as the root bridge. (See the first part of bridge id. The smaller value, the higher priority.)

 

11. Turn on the stp in h3.

 

12. h1 try to ping h4 again. From the results, the RTT values are smaller.

 

13. Check the status of h2. (root bridge)

 

14. Check the status of h3. (we can see that the port 3 (ether2) is blocked due to stp).

 

15.Now we shutdown the eth1 (port 2) of h2. And try ping again.

 

 

The status of eth1 becomes disabled.

 

The status of eth2 is changed from blocked to forwarding. So the h1 can still ping h4.

 

Dr. Chih-Heng Ke

Department of Computer Science and Information Engineering, National Quemoy University, Kinmen, Taiwan

Email: smallko@gmail.com