Spanning Tree Protocol calculates path cost based on which of the following?