VLANs Cisco/Juniper
If you are familiar with Cisco switches, and using Cisco switches fairly well, this post will help you to boost your confidence as a Juniper network engineer.
If you can configure a Cisco switch, then you also can configure a JUNOS based switch :) here you go..
IOS
#vlan-database
(vlan)#vlan 5 name Internet
(vlan)#vlan 6 name Intranet
(vlan)#apply
JUNOS
set vlan Internet vlan-id 5
set vlan Intranet vlan-id 6
Assign an IP addressto a VLAN:
IOS
(config)#interface vlan 5
(config-if)#ip address 10.10.10.254 255.255.255.0
JUNOS
set interfaces vlan unit 5 family inet address 10.10.10.254/24
set vlan Internet l3-interface vlan.5
Assigning a port to aVLAN (Access):
IOS
(config)#interface fastEthernet 2/2
(config-if)#switchport mode access
(config-if)#switchport access vlan 5
JUNOS
set interfaces fe-2/0/2 unit 0 family ethernet-switching port-mode access
set interfaces fe-2/0/2 unit 0 family ethernet-switching vlan members Intranet
Assigning a port to aVLAN (6 Trunked with 5 Native)
IOS
(config)#interface fastEthernet 2/2
(config-if)#switchport mode trunk
(config-if)#switchport trunk encapsulation dot1q
(config-if)#switchport trunk native vlan 5
(config-if)#switchport trunk allowed vlan 5,6
JUNOS
set interfaces fe-2/0/2 unit 0 family ethernet-switching port mode trunk
set interfaces fe-2/0/2 unit 0 family ethernet-switching native-vlan-id 5
set interfaces fe-2/0/2 unit 0 family ethernet-switching vlan members 6