Enterprise Routing and Switching Fundamentals

3 Nov 2026, 18:2122 min readby ITYantra Admin

Comprehensive guide to enterprise routing and switching including OSPF, EIGRP, BGP, STP, VLANs, and inter-VLAN routing.

# Enterprise Routing and Switching Fundamentals

Introduction

Enterprise routing and switching are the core functions that move data across modern networks. Switching forwards frames within a LAN using MAC addresses at Layer 2, while routing forwards packets between networks using IP addresses at Layer 3. Together, they enable communication across campus networks, data centers, and wide area networks.

This tutorial covers enterprise routing protocols (OSPF, EIGRP, BGP), switching technologies (STP, VLANs, EtherChannel), inter-VLAN routing, route redistribution, and high-availability design. You will learn how to configure and validate routing and switching in enterprise environments.

By the end of this guide, you will understand how to design resilient routed networks, implement dynamic routing protocols, and troubleshoot common routing and switching issues.

Technical Background

Layer 2 Switching

Switches use MAC address tables to forward frames within a VLAN. When a frame arrives, the switch records the source MAC and ingress port, then looks up the destination MAC. If known, the frame is forwarded out the associated port. If unknown, the frame is flooded to all ports in the VLAN except the ingress port.

Layer 3 Routing

Routers and Layer 3 switches use routing tables to forward packets between networks. Each route entry contains a destination network, next-hop IP, outgoing interface, and administrative distance. Routing protocols populate these tables dynamically.

Administrative Distance

Administrative distance (AD) is a trustworthiness rating for route sources. Lower values are preferred:

| Route Source | Administrative Distance | |--------------|------------------------| | Connected interface | 0 | | Static route | 1 | | EIGRP summary | 5 | | External BGP | 20 | | Internal EIGRP | 90 | | IGRP | 100 | | OSPF | 110 | | IS-IS | 115 | | RIP | 120 | | External EIGRP | 170 | | Internal BGP | 200 |

Routing Protocols Overview

**OSPF (Open Shortest Path First)**: Link-state protocol using Dijkstra's SPF algorithm. Organizes networks into areas. Uses multicast 224.0.0.5 and 224.0.0.6. Administrative distance 110.

**EIGRP (Enhanced Interior Gateway Routing Protocol)**: Cisco proprietary (now partially open). Advanced distance-vector using DUAL algorithm. Uses multicast 224.0.0.10. Administrative distance 90 (internal).

**BGP (Border Gateway Protocol)**: Path-vector protocol for inter-domain routing. Uses TCP port 179. Exchanges routing information between autonomous systems. Administrative distance 20 (external), 200 (internal).

Prerequisites

  • Cisco IOS, Juniper Junos, or equivalent network devices
  • Console or SSH access
  • IP addressing plan documented
  • Understanding of subnetting and CIDR
  • Maintenance window for routing changes

Architecture

OSPF Area Design

                    AREA 0 (Backbone)
              ┌─────────────────────┐
              │  Area Border Routers│
              └─────────┬─────┬─────┘
                        │     │
              ┌─────────▼─┐ ┌─▼─────────┐
              │   Area 1  │ │   Area 2  │
              │ (Building │ │ (Building │
              │   A)      │ │   B)      │
              └───────────┘ └───────────┘

All non-backbone areas must connect to Area 0 either directly or via virtual links.

Inter-VLAN Routing (Router-on-a-Stick)

Layer 3 Switch                        Router
┌─────────────────┐             ┌─────────────┐
│  SVI VLAN 10    │─┐           │  Gi0/0.10   │
│  10.1.10.1/24   │ │ 802.1Q    │  10.1.10.2  │
│  SVI VLAN 20    │─┘  Trunk    │  Gi0/0.20   │
│  10.1.20.1/24   │             │  10.1.20.2  │
└─────────────────┘             └─────────────┘

Step-by-Step Implementation

Step 1: Configure OSPF on Area Border Router

**Purpose**: Advertise connected networks into OSPF Area 0.

**Commands**:

configure terminal
!
hostname ABR-Router
!
interface Loopback0
 ip address 1.1.1.1/32
 ip ospf 1 area 0
!
interface GigabitEthernet0/0
 description Link-to-Core
 ip address 10.0.1.1/30
 ip ospf 1 area 0
 no shutdown
!
interface GigabitEthernet0/1
 description Link-to-Area-1
 ip address 10.0.2.1/30
 ip ospf 1 area 1
 no shutdown
!
router ospf 1
 router-id 1.1.1.1
 passive-interface default
 no passive-interface GigabitEthernet0/0
 no passive-interface GigabitEthernet0/1
!
end

**Explanation**: Passive-interface default suppresses OSPF hello packets on all interfaces except those explicitly enabled, reducing unnecessary multicast traffic on stub networks.

**Expected output**: OSPF adjacencies established on both interfaces.

**Verification**:

show ip ospf neighbor
show ip ospf interface brief
show ip route ospf

Step 2: Configure Inter-VLAN Routing on Layer 3 Switch

**Purpose**: Route between VLANs using SVIs.

**Commands**:

configure terminal
!
ip routing
!
interface Vlan10
 ip address 10.1.10.1/24
 no shutdown
!
interface Vlan20
 ip address 10.1.20.1/24
 no shutdown
!
interface Vlan30
 ip address 10.1.30.1/24
 no shutdown
!
end

**Explanation**: `ip routing` enables Layer 3 forwarding. Each SVI acts as the default gateway for its VLAN.

**Verification**:

show ip route
show ip interface vlan 10
ping 10.1.10.10 (from VLAN 20 client)

Step 3: Configure Static Route for Internet Egress

**Purpose**: Direct default traffic to the perimeter firewall.

**Commands**:

configure terminal
!
ip route 0.0.0.0 0.0.0.0 10.0.99.1
!
end

**Explanation**: Static default route with AD 1 is preferred over learned default routes unless overridden.

**Verification**:

show ip route static
trace 8.8.8.8

Step 4: Configure BGP for Multi-Homed Internet

**Purpose**: Connect to two ISPs with BGP for redundancy.

**Commands**:

configure terminal
!
router bgp 65001
 bgp router-id 1.1.1.1
 neighbor 203.0.1.1 remote-as 65010
 neighbor 203.0.1.1 description ISP-A
 neighbor 203.0.1.2 remote-as 65020
 neighbor 203.0.1.2 description ISP-B
 network 10.0.0.0 mask 255.255.0.0
!
end

**Explanation**: AS 65001 originates the 10.0.0.0/16 prefix to both ISPs. Inbound path selection can be influenced using AS_PATH prepending or local preference.

**Verification**:

show ip bgp summary
show ip bgp neighbors
show ip route bgp

Configuration Examples

OSPF Multi-Area Configuration

router ospf 1
 router-id 2.2.2.2
 network 10.1.10.0 0.0.0.255 area 1
 network 10.1.20.0 0.0.0.255 area 1
 network 10.0.2.0 0.0.0.255 area 0
 area 1 stub

EIGRP Named Mode Configuration

router eigrp ENTERPRISE
 address-family ipv4 autonomous-system 100
  network 10.0.0.0 0.255.255.255
  no auto-summary
  eigrp router-id 3.3.3.3
 exit-address-family

BGP with AS Path Prepending

route-map PREPEND-ISP-B permit 10
 set as-path prepend 65001 65001 65001
!
router bgp 65001
 neighbor 203.0.1.2 route-map PREPEND-ISP-B out

Redistribution Between OSPF and EIGRP

router ospf 1
 redistribute eigrp 100 subnets metric 100 metric-type 1
!
router eigrp 100
 address-family ipv4 autonomous-system 100
  redistribute ospf 1 metric 10000 100 255 1 1500
 exit-address-family

**Warning**: Redistribution can cause routing loops. Use route tags and distribute lists to prevent feedback.

Verification

Routing Table Inspection

show ip route              -- Full routing table
show ip route ospf         -- OSPF routes only
show ip route bgp          -- BGP routes only
show ip route static       -- Static routes

Protocol State Verification

show ip ospf neighbor      -- OSPF adjacency state
show ip eigrp neighbors    -- EIGRP neighbor state
show ip bgp summary        -- BGP peer state

Path Verification

trace 10.1.30.10           -- Hop-by-hop path
show ip cef 10.1.30.10     -- CEF forwarding decision

Expected Results

  • OSPF neighbors in FULL state
  • EIGRP neighbors in UP state
  • BGP peers in Established state
  • Routing table contains expected networks with correct next hops
  • CEF entries point to correct outgoing interfaces

Troubleshooting

| Symptom | Possible Cause | Diagnostic Command | Corrective Action | Verification | |---------|---------------|-------------------|-------------------|--------------| | OSPF neighbor stuck in INIT | Hello mismatch (area, timers, authentication) | `show ip ospf interface` | Match area ID, hello/dead timers, auth | Neighbors reach FULL | | Route not in routing table | Higher AD route exists | `show ip route network` | Remove conflicting route or adjust AD | Route appears | | BGP peer Idle/Passive | TCP port 179 blocked or wrong peer IP | `show ip bgp neighbors` | Allow TCP 179, verify peer address | State becomes Established | | Suboptimal routing | Redistribution metric issue | `show ip route` | Adjust redistribution metrics or use route maps | Optimal path selected | | Routing loop after redistribution | No route filtering | `show ip route` | Add distribute lists or route tags | Loop eliminated | | Interface in err-disabled | BPDU guard or security violation | `show interfaces status` | `shutdown` then `no shutdown`; fix root cause | Interface recovers | | High CPU on router | Excessive routing updates | `show processes cpu sorted` | Filter routes, increase timers, summarize | CPU normalizes | | Black hole route | Next-hop unreachable | `show ip route next-hop` | Fix next-hop reachability or remove route | Traffic flows | | Asymmetric routing | Different return path | `traceroute` both directions | Align routing policies on both paths | Symmetric paths | | OSPF not advertising network | Wrong network wildcard | `show ip ospf interface` | Correct network statement or use interface command | Network appears in database |

Best Practices

1. **Use loopback addresses for router IDs**: Provides stable identification independent of interface state. 2. **Summarize at area boundaries**: Reduces routing table size and limits LSA flooding. 3. **Set passive interfaces on end-user ports**: Prevents unnecessary OSPF hello packets on LAN segments. 4. **Authenticate routing protocols**: Use MD5 or key-chain authentication for OSPF, EIGRP, and BGP. 5. **Filter redistributed routes**: Use route tags and distribute lists to prevent routing loops. 6. **Document BGP communities**: Standardize community values for route tagging and path manipulation. 7. **Use BFD for fast failure detection**: Sub-second failure detection compared to default protocol timers. 8. **Implement route summarization**: Reduce routing table size at distribution and core layers. 9. **Monitor routing table changes**: Alert on unexpected route additions or removals. 10. **Test failover during maintenance**: Verify redundant paths work before a real failure occurs.

Conclusion

Enterprise routing and switching form the foundation of reliable network communication. Understanding Layer 2 switching, Layer 3 routing, dynamic routing protocols, and inter-VLAN routing enables engineers to design networks that are scalable, resilient, and maintainable. Apply the configuration examples and verification procedures in this guide to build robust enterprise networks, and always validate changes in a lab environment before production deployment.

References

  • RFC 2328 - OSPF Version 2 (https://tools.ietf.org/html/rfc2328)
  • RFC 4271 - BGP-4 (https://tools.ietf.org/html/rfc4271)
  • Cisco OSPF Configuration Guide (https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/)
  • Juniper Routing Protocols Configuration (https://www.juniper.net/documentation/)
  • Cisco EIGRP Configuration Guide (https://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/)
  • IANA Autonomous System Numbers (https://www.iana.org/numbers)
#routing#switching#ospf#bgp#eigrp#spanning-tree#inter-vlan-routing#enterprise-network