What is the primary purpose of a spanning tree in network design?
a) To increase the network's bandwidth
b) To eliminate redundant paths and prevent loops in the network
c) To enhance network security by encrypting data
d) To optimize the performance of network switches