Operations 4 min read

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.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Configuring Inter‑VLAN Routing on Two Three‑Layer Switches Using Static Routes

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 3
int e0/0/1
port link-type access
port default vlan 2
int e0/0/2
port link-type trunk
port trunk allow-pass vlan 3
int Vlanif 2
ip address 10.1.1.1 24
int Vlanif 3
ip address 10.1.3.1 24
ip route-static 10.1.2.0 255.255.255.0 10.1.3.2

On Switch B:

vlan batch 2 3
int Vlanif 2
ip address 10.1.2.2 24
int Vlanif 3
ip address 10.1.3.2 24
int e0/0/1
port link-type access
port default vlan 2
int e0/0/2
port link-type trunk
port trunk allow-pass vlan 3
ip route-static 10.1.1.0 255.255.255.0 10.1.3.1

Configuration screenshots:

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

NetworkingVLANSwitch Configurationstatic routing
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.