Configuring Inter‑VLAN Routing on Two Three‑Layer Switches Using Static Routes
This guide demonstrates how to enable communication between hosts on different subnets within the same VLAN across two three‑layer switches by configuring VLANs, assigning IP addresses to Vlanif interfaces, and adding static routes on each device.
Two three‑layer switches are used to connect hosts (PC1 and PC2) that belong to the same VLAN but reside in different IP subnets, requiring static routing for inter‑subnet communication. undo info-center enable On Switch A:
vlan batch 2 3int e0/0/1port link-type accessport default vlan 2int e0/0/2port link-type trunkport trunk allow-pass vlan 3int Vlanif 2ip address 10.1.1.1 24int Vlanif 3ip address 10.1.3.1 24ip route-static 10.1.2.0 255.255.255.0 10.1.3.2On Switch B:
vlan batch 2 3int Vlanif 2ip address 10.1.2.2 24int Vlanif 3ip address 10.1.3.2 24int e0/0/1port link-type accessport default vlan 2int e0/0/2port link-type trunkport trunk allow-pass vlan 3ip route-static 10.1.1.0 255.255.255.0 10.1.3.1Configuration screenshots:
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
