about make hybrid port (access & trunk at the same time ) in juniper like that :
switchport access vlan 1250
switchport trunk encapsulation dot1q
switchport mode trunk
how can make it in juniper ?
Even though you have the switchport access vlan 1250 command configured, this is not an access port.
Take note of the switchport mode trunk command. This means that the port is a trunk port only.
If you'd like to confirm, run show interfaces gi0/1 switchport and look for a line that says showtchport mode access or switchport mode trunk.
So, to replicate this in Juniper, just configure a trunk as usual.
Perhaps the native VLAN is what you're thinking of? The VLAN for untagged traffic?
interface style is a bit different and it will start as follow;
FPC 0 -- pic-slot 0 and port 0
interface ge-0/0/0 for 1g
interface xe-0/0/0 for 10g
interface et-0/0/0 for 40g
The configuration below is applicable for ELS device. [EX2300/EX3400/EX4300/EX4600 and QFX]
Layer 2 ethernet configuration; access ports are by nature untagged meaning we don't need to use a native VLAN.
# set interface ge-0/0/0 unit 0 family ethernet-switching interface-mode access
# set interface ge-0/0/0 unit 0 family ethenet-switching vlan member 1250
Trunk interface., tagged and untagged traffic (802.1Q)
# set interface ge-0/0/1 unit 0 family ethernet-switching interface-mode trunk
# set interface ge-0/0/1 unit 0 family ethernet-switching vlan members all
# set interface ge-0/0/1 native-vlan-id 999
native VLAN on ELS devices:
quick config for legacy, instead of using interface-mode we should go for port-mode legacy syle.
# set interface ge-0/0/1 unit 0 family ethernet-switching port-mode trunk
# set interface ge-0/0/1 unit 0 family ethernet-switching port-mode access
legacy platforms: EX2200/EX3300/EX4200/EX4500/EX8200
Note: Juniper switches EX/QFX have all interfaces as access by default
hope it helps!
Please mark "Accept as solution" if this answers your query.
What's the final goal here? why do you want an interface that is "access and trunk" at the same time?