Infrastructure: Switching, Routing, and Overlays
The largest ENCOR domain, infrastructure covers Layer 2 switching (VLANs, trunking, spanning tree, EtherChannel), Layer 3 routing with OSPF and BGP, first-hop redundancy, and VXLAN overlays. This chapter also folds in the network assurance mindset of verifying that these behave as intended.
Layer 2 switching
Access ports carry a single VLAN untagged, while trunk ports use 802.1Q tagging to carry many VLANs between switches. Spanning Tree (Rapid PVST+) prevents loops by electing a root bridge, one root port per switch, and one designated port per segment, blocking the rest. EtherChannel with LACP bundles links for bandwidth and redundancy without STP blocking the members.
Layer 3 routing with OSPF and BGP
OSPF neighbors form adjacencies only when area, subnet, hello and dead timers, and authentication match. BGP selects a best path through an ordered process; on Cisco devices the first tie-breaker is Weight (highest wins, local to the router), followed by local preference (highest), shorter AS-path, and lower MED, among others. Knowing this order is essential for path control.
Redundancy and overlays
First-hop redundancy protocols give hosts a resilient default gateway: HSRP (Cisco) elects Active and Standby routers for a virtual IP, VRRP is the open standard, and GLBP adds load balancing. VXLAN encapsulates Layer 2 frames in UDP and uses a 24-bit VNID for about 16 million segments over a routed underlay, enabling scalable overlays in campus and data-center fabrics.