Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Juniper SRX220 (junos) router where I have configured vlan.1 and vlan.2 with IP and Now I want to route between these networks. How do I configure that in Junos? I can't figure that out from the manual and it does not work out of the box.

share|improve this question
up vote 1 down vote accepted

Because this is an SRX, there are a number of requirements here.

Step 1:

Define VLANS (think layer 2)

set vlans vlan1 description desktops vlan-id 1 l3-interface vlan.1

set vlans vlan2 description servers vlan-id 2 l3-interface vlan.2

Step 2:

Define L3 interfaces bound to those vlans...

set interfaces vlan unit 1 family inet address

set interfaces vlan unit 2 family inet addresses

Step 3:

Place those L3 interfaces into a zone

set security zones security-zone trust interfaces vlan.1

set security zones security-zone trust interfaces vlan.2

Step 4:

Since this is an SRX, you must create a policy permitting intra-zone traffic

set security policies from-zone trust to-zone trust policy trust-to-trust match source-address any destination-address any application any then permit

Step 5:

Set physical interfaces onto that VLAN

set interfaces ge-0/0/0 unit 0 family ethernet switching port-mode access vlan members vlan1

set interfaces ge-0/0/1 unit 0 family ethernet switching port-mode access vlan members vlan2

Step 6:

Plug devices in. Once any interface assigned to that VLAN is physically up, the VLAN interface for that VLAN will come up.

share|improve this answer
Thanks a million! It was step 4 and step 5 that was missing in my configuration. – rdrmntn Nov 28 '11 at 8:15
If you are going to use this device as just a router, you can change the default action to permit instead of drop, FYI. – SpacemanSpiff Nov 29 '11 at 5:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.