1)端口交換機屬性 配置
edit vlans Test //創建vlan,名稱爲Test
set vlan-id 3 //設置vlan-id
set l3-interface vlan.3 //綁定3層子接口
set description "Test VLAN" //設置vlan描述
set interface ge-0/0/1.0 //將接口ge-0/0/1.0 加入到vlan中
set interface ge-0/0/2.0 //將接口ge-0/0/2.0 加入到vlan中
2)set interfaces vlan.3 family inet address 202.100.2.10 //配置3層子接口IP地址
3)將接口改爲access模式,並加入到新創建的vlan中
set int ge-0/0/1.0 family ethernet-switching port-mode access
set int ge-0/0/1.0 family ethernet-switching vlan members 3
#set int ge-0/0/1 vlan-tagging unit 0 vlan-id 3
set int ge-0/0/2.0 family ethernet-switching port-mode access
set int ge-0/0/2.0 family ethernet-switching vlan members 3
#set int ge-0/0/2 vlan-tagging unit 0 vlan-id 3