Configuring EX switches for Vlans and trunk (tagged) ports

Configuring EX switches for Vlans and trunk (tagged) ports

Configuring a port for vlan membership

 

Define a vlan


[edit]
admin@switch# set vlans <name of vlan> vlan-id <vlan numerical id>
[edit]
admin@switch# set vlans vlan10  vlan-id 10

Configure a port for membership in that vlan


[edit]
admin@switch# set interface <interface name> unit <unit number> ethernet-switching vlan members <name of vlan>

[edit]
admin@switch# set interfaces ge-0/0/12 unit 0 family ethernet-switching vlan members vlan10

Set mode for access

Actually this is not necessary as access mode is the default

[edit]
admin@switch# set interface <interface name> unit <unit number> ethernet-switching port-mode access

Configuring a interface as a trunk port

Define a vlan


[edit]
admin@switch# set vlans <name of vlan> vlan-id <vlan numerical id>
[edit]
admin@switch# set vlans vlan10  vlan-id 10

Configure a port for membership in that vlan


[edit]
admin@switch# set interface <interface name> unit <unit number> ethernet-switching vlan members <name of vlan>

[edit]
admin@switch# set interfaces ge-0/0/12 unit 0 family ethernet-switching vlan members vlan10

Set mode for trunking


[edit]
admin@switch# set interface <interface name> unit <unit number> ethernet-switching port-mode trunk

This entry was posted in Juniper. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s