VLAN Tagging & Trunk / Access Switch Studio

হোম » টুলস » স্ক্রিপ্টসমূহ » বিস্তারিত
🏷️ Layer 2/3 Enterprise Segmentation

VLAN Tagging & Trunk / Access Switch Studio

মিক্রোটিক ব্রিজ ভিল্যান ফিল্টারিং (Bridge VLAN Filtering) এবং সিসকো সুইচের জন্য ট্রাঙ্ক ও অ্যাক্সেস পোর্ট কনফিগারেশন জেনারেটর।

মেইন ব্রিজ ও ট্রাঙ্ক পোর্ট (Trunk Links)

ওএলটি বা কোর সুইচের সাথে কানেক্টেড ট্রাঙ্ক পোর্ট।

ভিল্যান এবং অ্যাক্সেস পোর্ট তালিকা

VLAN ID:
Gateway IP/Subnet:
Access Untagged Ports:
VLAN ID:
Gateway IP/Subnet:
Access Untagged Ports:
VLAN ID:
Gateway IP/Subnet:
Access Untagged Ports:
VLAN ID:
Gateway IP/Subnet:
Access Untagged Ports:

MikroTik Bridge VLAN Script

RouterOS Hardware Bridge
mikrotik_bridge_vlan.rsc
# ==================================================================
# ISP SECTOR - MikroTik Bridge VLAN Filtering Configuration
# Bridge: bridge-LAN | Trunk Ports: sfp-sfpplus1, ether1
# Generated at: 2026-09-12 03:45:44
# ==================================================================

# 1. Create Main Hardware-Offloaded Bridge
/interface bridge add name=bridge-LAN vlan-filtering=no comment="Main Hardware Bridge"

# 2. Bind Trunk Interfaces to Bridge (Admit only VLAN-tagged)
/interface bridge port add bridge=bridge-LAN interface=sfp-sfpplus1 frame-types=admit-only-vlan-tagged comment="Trunk to OLT/Core"
/interface bridge port add bridge=bridge-LAN interface=ether1 frame-types=admit-only-vlan-tagged comment="Trunk to OLT/Core"

# 3. Bind Access Ports with Specific PVID (Admit Untagged Only)
/interface bridge port add bridge=bridge-LAN interface=ether2 pvid=10 frame-types=admit-only-untagged-and-priority-tagged comment="Access PPPOE_USERS"
/interface bridge port add bridge=bridge-LAN interface=ether3 pvid=10 frame-types=admit-only-untagged-and-priority-tagged comment="Access PPPOE_USERS"
/interface bridge port add bridge=bridge-LAN interface=ether4 pvid=20 frame-types=admit-only-untagged-and-priority-tagged comment="Access HOTSPOT_WIFI"
/interface bridge port add bridge=bridge-LAN interface=ether5 pvid=30 frame-types=admit-only-untagged-and-priority-tagged comment="Access IPTV_MEDIA"
/interface bridge port add bridge=bridge-LAN interface=ether8 pvid=99 frame-types=admit-only-untagged-and-priority-tagged comment="Access MANAGEMENT"

# 4. Define Bridge VLAN Filtering Table
/interface bridge vlan add bridge=bridge-LAN vlan-ids=10 tagged=bridge-LAN,sfp-sfpplus1,ether1 untagged=ether2, ether3 comment="PPPOE_USERS"
/interface bridge vlan add bridge=bridge-LAN vlan-ids=20 tagged=bridge-LAN,sfp-sfpplus1,ether1 untagged=ether4 comment="HOTSPOT_WIFI"
/interface bridge vlan add bridge=bridge-LAN vlan-ids=30 tagged=bridge-LAN,sfp-sfpplus1,ether1 untagged=ether5 comment="IPTV_MEDIA"
/interface bridge vlan add bridge=bridge-LAN vlan-ids=99 tagged=bridge-LAN,sfp-sfpplus1,ether1 untagged=ether8 comment="MANAGEMENT"

# 5. Create Layer 3 VLAN Interfaces on Router & Assign IPs
/interface vlan add name=VLAN_10_PPPOE_USERS vlan-id=10 interface=bridge-LAN
/ip address add address=10.10.10.1/24 interface=VLAN_10_PPPOE_USERS comment="Gateway for PPPOE_USERS"
/interface vlan add name=VLAN_20_HOTSPOT_WIFI vlan-id=20 interface=bridge-LAN
/ip address add address=10.20.20.1/24 interface=VLAN_20_HOTSPOT_WIFI comment="Gateway for HOTSPOT_WIFI"
/interface vlan add name=VLAN_30_IPTV_MEDIA vlan-id=30 interface=bridge-LAN
/ip address add address=10.30.30.1/24 interface=VLAN_30_IPTV_MEDIA comment="Gateway for IPTV_MEDIA"
/interface vlan add name=VLAN_99_MANAGEMENT vlan-id=99 interface=bridge-LAN
/ip address add address=192.168.99.1/24 interface=VLAN_99_MANAGEMENT comment="Gateway for MANAGEMENT"

# 6. Enable Active VLAN Filtering (Activate HW Offload)
/interface bridge set [find name=bridge-LAN] vlan-filtering=yes

# ==================================================================
হার্ডওয়্যার অফলোডিং সুবিধা: MikroTik Bridge VLAN Filtering ব্যবহার করলে সুইচ চিপের মাধ্যমে হার্ডওয়্যার লেভেলে ট্রাফিক ফরওয়ার্ড হয়, যার ফলে রাউটার বা সুইচের CPU-তে কোনো বাড়তি চাপ পড়ে না।

স্ক্রিপ্টের বিবরণ ও নির্দেশাবলী

Generates RouterOS Bridge VLAN filtering and Switch Port trunking commands.

ডাউনলোড এক্সেস সক্রিয়

আপনার অ্যাকাউন্ট থেকে এই স্ক্রিপ্ট ফাইলটি সফলভাবে অ্যাক্সেস করা যাচ্ছে।