การสร้าง vlan และ add port to vlan (cisco sg200 sg500 command)

* ก่อนเข้าใช้งานผ่าน Console ต้อง Login ทุกครั้ง
วิธี Creat Vlan
sw1(config)# vlan 10
//คำสั่งเข้าใช้ valn 10 //
sw1(config)# name CPE
//ตั้งชื่อให้กับ vlan โดยใช้คำสั่ง name ตามด้วยชื่อที่ต้องการตั้ง //
sw1(config)# exit
//คำสั่งออก //
วิธี Add port(trunk) to vlan
sw1#configure terminal
sw1(config)#int fa0/1
sw1(config-if)#switchport trunk encapsulation dot1q
sw1(config-if)#switchport mode trunk
sw1(config-if)#switchport trunk allowed vlan remove 5-10,12
sw1(config-if)#switchport trunk allowed vlan add 7
sw1(config-if)#end
วิธี Add port(Access) to VLAN
sw1#conf t
sw1(config)#int gi1/1/1
sw1(config-if)#switchport access vlan 300
sw1(config-if)#switchport mode access
sw1(config-if)#end

Comments