Tuesday, April 5, 2011

VLAN and TRUNK Configurations on EX Switches



Background


This document talks about configuring an interface or port on a EX switch to be a member of a Vlan, then how to set up tagged/trunked port so that you can pass vlan information to another switches trunk port. This was tested on an EX4200 running Junos 9.4R1.8


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

No comments:

Post a Comment