Welcome to Sysnet Board คู่มือ การใช้งานอุปกรณ์ Network. Please log in or sign up.
สมาชิกทั้งหมด
17,595
กระทู้ทั้งหมด
10,026
หัวข้อทั้งหมด
4,711

  • คู่มือการ Config VLAN อุปกรณ์ EdgeCore Switch
    เริ่มโดย yod
    Read 15,035 times
0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้
yod

 

 

คู่มือการ Config VLAN อุปกรณ์ EdgeCore Switch




ตัวอย่างจะเป็นรุ่น Edgecore ECS2110-26T และรุ่น ECS2100-10T


ตัวอย่างผมจะ config แบบ CLI และ Web Base ครับ


เบื้องต้นผมจะ config อุปกรณ์ L3 Base โดยจะใช้ Router Draytek Vigor300B แบ่ง VLAN เป็น 3 Subnet

VLAN10: IP 192.168.2.0/24 (Vlan 10 เป็น Default VLAN บนอุปกรณ์ Draytek ครับ)
VLAN20: IP 192.168.20.0/24
VLAN30: IP 192.168.30.0/24
VLAN40: IP 192.168.40.0/24


1. Login เข้าหน้า Config ของ Vigor300B --> Menu LAN เพื่อสร้าง VLAN ตามที่กำหนด






2. กำหนด Taged VLAN เข้าไปใน Switch Port 1

อย่าลืมเอา UnTaged LAN2 ออกด้วยนะครับ ไม่งั้น Data ที่วิ่งออกจาก Port Lan 1 จะไม่มี VLAN10




เรียบร้อยครับสำหรับอุปกรณ์ Router เวลา Config อีกที ให้ต่อสาย Lan เข้า Port 2 ครับ


Config อุปกรณ์ Switch EdgeCore ECS2110-26T

เชื่อมต่อสาย Serial Console ตั้ง Baud rate: 115200 ครับ Command จะคล้ายๆของ Cisco

User/Password = admin/admin

IP Default: 192.168.2.10




ใช้คำสั่ง configure เพื่อเข้า Mode Global Config

Console#configure

ลบ IP Address ออกจาก VLAN 1

Console(config)#interface vlan 1
Console(config-if)#no ip address




สร้าง VLAN 10,20,30 และ 40

Console(config)#vlan database
Console(config-vlan)#VLAN 10 name Manage media ethernet
Console(config-vlan)#VLAN 20 name Manager media ethernet
Console(config-vlan)#VLAN 30 name Staff media ethernet
Console(config-vlan)#VLAN 40 name VOIP media ethernet




กำหนด IP Address ให้ VLAN 10

Console(config)#interface vlan 10
Console(config-if)#ip address 192.168.2.2 255.255.255.0




ทำ Port 1 กับ Port 24 เป็น Port Trunk มี VLAN 1,10,20,30 และ 40 แปะไปกับ Data

Console(config)#interface ethernet 1/1
Console(config-if)#switchport allowed vlan add 1,10,20,30,40 tagged
Console(config-if)#

ส่วน Port 24 เดี๋ยวผมทำตัวอย่างบน Web Config ครับ




กำหนดให้ Port 2 เป็น Access Port

Access Port จะเป็น Port ที่ เชื่อมต่อกับ Computer หรือ พวก Switch Unmanaged ได้ครับ

Console(config)#interface ethernet 1/2
Console(config-if)#switchport mode access
Console(config-if)#switchport allowed vlan 10 (เปลี่ยนจาก access ใน cisco เป็น allowed)




Save ค่า config ด้วยคำสั่ง

Console#copy running-config startup-config




คำสั่งที่ใช้ในการแสดงข้อมูล VLAN

show interfaces status vlan
show interfaces switchport
show vlan

ขั้นตอนต่อไปจะเป็นตัวอย่างการ Config แบบ Webbase ครับ

ต่อ PC เข้า Port 2 ของ Switch ถ้าไม่มีอะไรผิดพลาด จะต้องได้ IP: 192.168.2.xx ที่เป็น Subent ของ VLAN10

เปิด Browser เข้าหน้า Config Switch ด้วย IP: 192.168.2.2 user/password = admin/admin

หน้า Dashboard



Menu VLAN --> Static --> Action: Edit Member by Interface

Interface: Port 24 (รูปผิด)
Mode: 1Q Trunk
VLAN 1,10,20,30,40: Tagged



Click [Apply]

Tagged VLAN Port 23 เพื่อเชื่อมต่อกับ Switch ECS2100-10T

ตัวอย่าง ใช้แค่ VLAN 10,30 และ 40

Interface: Port 23
Mode: 1Q Trunk
VLAN 10,20,40: Tagged




Click [Apply]

กำหนดสมาชิก Port ว่าอยู่ใน VLAN ไหน

Menu VLAN --> Static --> Action: Edit Member by VLAN


VLAN 20
Port 3: PVID:20, Mode Access , Untagged
Port 4: PVID:20, Mode Access , Untagged

Click [Apply] แล้วเลือก VLAN30 แล้วทำลักษณะเดียวกันครับ

ทดสอบด้วยการต่อสาย Lan เข้ากับ Port ต่างๆที่กำหนด VLAN เอาไว้


Config Switch ECS2100-10T

เชื่อมต่อสาย Lan จาก Computer เข้าที่ Port 8 แล้ว Fix IP ที่ Computer เป็น 192.168.2.100

เปิด Browser เข้าหน้า Web config ด้วย IP: 192.168.2.10 user/password = admin/admin

สร้าง VLAN 10, 20, 30 และ 40 ที่ Menu VLAN --> Staic --> Action : Add




ทำ Trunk ที่ Port 1 เพื่อเชื่อมต่อกับ Switch ECS2110-26T

Menu Port VLAN --> Static --> Action : Edit Member by Interface

Interface: Port 1
Mode: 1Q Trunk
VLAN 1,10,30,40: Tagged




Click [Apply]


กำหนดสมาชิก Port ให้อยู่ใน VLAN 30

Menu Port VLAN --> Static --> Action : Edit Member by VLAN

VLAN: 30
Interface: Port
Port 2,3,4,5,6,7 Mode: Access, PVID: 30, Untagged

ในกรณีที่ต้องการให้ Port ไหน เป็น VLAN อะไรก็เลือกได้เลยครับ แต่อย่าลืมว่าเรา Tag VLAN อะไรมาบ้าง




Click [Apply]

Set Port 8 ให้เป็น VLAN10




แก้ไข IP ของ Switch ที่ Menu IP --> General --> Routing Interface

จากตัวอย่าง VLAN 10 เป็น Manage VLAN ให้ทำการลบ IP ของ VLAN 1 ออก และใส่ IP ที่ VLAN 10 แทนครับ




เรียบร้อยครับ  ;D ;D


เป็นข้อมูลที่มากเลยครับผมก็งงอยู่ต้องนานไว้จะเอาไปทำดูนะครับ