Juniper EX: Troubleshooting Inter-VLAN Communication - 夜莺博客

Juniper EX: Troubleshooting Inter-VLAN Communication

When hosts in different VLANs on a Juniper EX switch cannot talk to each other, the fault can live in any of six layers — VLAN creation, port membership, Layer 2 switching, the L3 gateway, routing, or the end device's default gateway. Juniper's official KB gives a clean, ordered workflow that eliminates guesswork by testing each layer in sequence. This article reproduces that methodology with the exact verification commands, so you can bisect the problem in minutes instead of reconfiguring blindly.

Step 1 — Verify the VLANs Exist

user@switch> show vlans
Name     Tag    Interfaces
default         ge-0/0/1.0, ge-0/0/2.0, ...
sales    10     ge-0/0/0.0*, ge-0/0/3.0, ge-0/0/20.0
support  20     ge-0/0/4.0, ge-0/0/24.0, ge-0/0/46.0*

Step 2 — Verify Port-to-VLAN Membership and State

user@switch> show ethernet-switching interfaces
Interface   State    VLAN members    Blocking
ge-0/0/0.0  up       sales           unblocked
ge-0/0/1.0  up       default         unblocked

Every interface must be up, assigned to the intended VLAN, and unblocked.

Step 3 — Test Layer 2 Within a VLAN

Ping between two end devices in the same VLAN. If this fails, the problem is Layer 2: cabling, interface state, or port assignment.

Step 4 — Test the L3 Gateway for Each VLAN

Ping from a host to its own VLAN's L3 interface on the switch. View the L3 interfaces first:

user@switch> show interfaces vlan terse
Interface  Admin Link  Proto  Local       Remote
vlan.10    down  up    inet   10.10.0.1/24
vlan.20    down  up    inet   10.20.0.1/24

If the ping fails, check that the host's default gateway points to the correct VLAN L3 interface and that subnet masks match.

Steps 5–6 — Cross-VLAN Tests

Ping from an end device in VLAN A to the L3 interface of VLAN B, then from end device A to end device B. If step 5 works but step 6 fails, the end devices' default gateways are misconfigured — they must point to their own VLAN's gateway for inter-VLAN routing to work.

Workflow Summary

Layer Test Command
VLAN existence VLANs created show vlans
Membership Ports up + unblocked show ethernet-switching interfaces
L2 switching Same-VLAN ping ping
L3 gateway Host → own gateway show interfaces vlan terse
Routing Host → other gateway ping
End device Host → other host ping, check default gw

Also see the companion guide troubleshooting an IRB or VLAN interface that is down, plus SR-TE LSPs through a multi-domain network for the routing side.

原文链接:https://supportportal.juniper.net/s/article/EX-Troubleshooting-inter-vlan-communication-problem-on-EX-Series-Ethernet-switches