Parmi Notes Random short any article

WAN as LAN

WAN as LAN: Transformasi Port Fleksibel di Router Peplink

Pengertian WAN as LAN: Port yang Bisa Berubah Wajah

WAN as LAN adalah fitur di router Peplink (dan beberapa vendor lain) yang memungkinkan port LAN fisik dikonfigurasi sebagai port WAN, sehingga router bisa menerima koneksi internet dari port yang secara fisik adalah port LAN. Ini seperti memiliki port universal yang bisa berfungsi sebagai input WAN atau output LAN sesuai kebutuhan.

Analog: Steker listrik universal yang bisa terima colokan US, EU, atau UK — cukup setting di software.


Bagaimana "Port Biasa" vs "WAN as LAN" Bekerja

Router Tradisional (Fixed Ports):

[Router Biasa]
WAN Ports: 1-2 port khusus (biasanya terpisah, warna berbeda)
LAN Ports: 4-8 port untuk client
Switch Ports: Semua LAN port dihubungkan internal switch

Keterbatasan:
- WAN port hanya untuk internet in
- LAN port hanya untuk devices out
- Tidak bisa tukar fungsi

Router dengan WAN as LAN:

[Peplink dengan WAN as LAN]
Port 1: WAN (ISP A) [asli WAN port]
Port 2: LAN [untuk PC, printer]
Port 3: WAN as LAN [ISP B via VLAN]
Port 4: WAN as LAN [Starlink terminal]
Port 5: LAN [Access Point]

Fleksibilitas:
- Port 3 & 4 BISA sebagai WAN ATAU LAN
- Configurable via software
- No physical rewiring needed

Sejarah & Konteks: Kenapa Fitur Ini Muncul?

Era 2000-an: Router SOHO Fixed Function

  • WAN port: 1 saja (koneksi ADSL/Cable)
  • LAN ports: 4 port switch
  • Masalah: Mau tambah WAN untuk backup? Tidak bisa.

Era 2010: Router Bisnis dengan Dual-WAN

  • 2 WAN ports fisik
  • 4-8 LAN ports
  • Masalah: 2 WAN cukup? Bagaimana kalau mau 3-4 WAN?

Era 2015-Sekarang: Software-Defined Ports

  • SD-WAN adoption: Perlu banyak WAN links
  • IoT proliferation: Perlu banyak LAN segments
  • Solution: Port universal configurable via software
  • Pelopor: Peplink, Ubiquiti, Cisco (terbatas)

Metode Implementasi WAN as LAN

1. VLAN-based (Paling Umum)

Physical Port 3 (WAN as LAN)
├── VLAN 10 (untuk WAN connection)
│   ├── DHCP Client: Dapat IP dari ISP
│   └── Gateway: 192.168.100.1
└── VLAN 20 (untuk LAN segment)
    ├── DHCP Server: Beri IP ke clients
    └── Subnet: 10.0.20.0/24

Konfigurasi:
Interface eth3:
  Mode: Trunk
  Native VLAN: 20 (LAN)
  Tagged VLAN: 10 (WAN)

Cara Kerja VLAN-based:

graph TD
    A[ISP Modem] -->|VLAN 10 tagged| B[Port 3 Peplink]
    C[Switch LAN] -->|VLAN 20 untagged| B
    B --> D[Router Internal]
    D --> E{VLAN Routing}
    E -->|VLAN 10| F[WAN Routing Table]
    E -->|VLAN 20| G[LAN Routing Table]

2. MAC-based VLAN (IEEE 802.1X)

  • Port menerima traffic dari MAC address tertentu
  • MAC ISP gateway → treat as WAN
  • MAC client devices → treat as LAN
  • Keuntungan: Tidak perlu configure switch

3. IP-based Classification

Rules:
IF source IP = ISP gateway range THEN treat as WAN
IF source IP = internal range THEN treat as LAN
ELSE drop

Contoh:
  100.64.0.0/10 → WAN (CG-NAT ISP)
  192.168.0.0/16 → LAN
  10.0.0.0/8 → LAN

4. Protocol-based

  • PPPoE traffic → WAN interface
  • DHCP Discovery → WAN interface
  • ARP untuk gateway ISP → WAN
  • STP BPDUs → LAN segment

5. Hybrid/Multi-Method (Peplink Approach)

Port 3 Configuration:
├── Primary Role: LAN
├── WAN Detection: Automatic
├── Triggers:
│   ├── DHCP Offer dari non-local scope → switch ke WAN
│   ├── PPPoE Active Discovery → switch ke WAN
│   ├── ARP untuk ISP gateway → switch ke WAN
│   └── Manual override via Web UI
└── Fallback: Kembali ke LAN jika WAN link down

Use Case Nyata WAN as LAN

Case 1: Small Office dengan Multiple ISPs

Situasi: 
- Kantor kecil, hanya 1 router (Peplink Balance 20)
- Butuh 3 ISP: Fiber, Cable, 4G LTE
- Router cuma punya 2 WAN port fisik

Solusi WAN as LAN:
Port 1: WAN 1 (Fiber)
Port 2: WAN 2 (Cable) 
Port 3: WAN as LAN (4G LTE modem via VLAN)
Port 4: LAN untuk PC
Port 5: LAN untuk VoIP phones

Case 2: Hotel dengan Guest/Management Networks

Situasi:
- Satu router di lobby
- Butuh: 
  • WAN: 2 ISP untuk redundancy
  • LAN 1: Staff network (secure)
  • LAN 2: Guest Wi-Fi
  • LAN 3: IPTV system
  • LAN 4: Building management

Solusi:
Port 1: WAN 1 (Primary ISP)
Port 2: WAN as LAN (Backup ISP via hotel switch)
Port 3: LAN Staff
Port 4: LAN Guest (VLAN 10)
Port 5: LAN IPTV (VLAN 20)

Case 3: Retail Chain - In-Store Applications

Situasi: Toko retail butuh:
1. WAN: Credit card processing (dedicated)
2. WAN: Inventory sync (shared)
3. LAN: POS terminals
4. LAN: Digital signage
5. LAN: Security cameras

Solusi 1 router Peplink:
Port 1: WAN Card Processing (PCI-DSS compliant)
Port 2: WAN as LAN Inventory (via store network)
Port 3: LAN POS (isolated VLAN)
Port 4: LAN Signage
Port 5: LAN Cameras

Case 4: Home Lab & Development

Situasi: Developer punya:
- ISP 1: Residential broadband
- ISP 2: Business fiber
- Lab: Multiple test environments

Solusi:
Port 1: WAN Residential
Port 2: WAN as LAN Business fiber
Port 3: LAN Dev Environment 1
Port 4: LAN Dev Environment 2  
Port 5: LAN Production模拟

Konfigurasi WAN as LAN di Peplink: Step-by-Step

Scenario: Tambah ISP ketiga via LAN Port

Step 1: Physical Connection

ISP Modem 3 ──[Ethernet]──› Port 3 Peplink (LAN port)

Step 2: Web Admin Configuration

Menu: Network → Interfaces → WAN
1. Klik "Add WAN"
2. Interface: Select "LAN3 (WAN as LAN)"
3. Connection Type: 
   • DHCP Client (biasanya)
   • Static IP (jika ISP kasih fixed IP)
   • PPPoE (jika perlu login)
4. VLAN Settings (jika perlu):
   • VLAN ID: [misal 30]
   • Priority: [0]
5. Advanced:
   • MAC Address: [Clone atau ISP-registered]
   • MTU: [1500 atau sesuasi ISP]

Step 3: Testing & Verification

Menu: Status → Connections
Akan muncul:
WAN1: Port 1 - Connected (ISP A)
WAN2: Port 2 - Connected (ISP B)  
WAN3: LAN3 - Connected (ISP C) ← Baru!

Speed Test masing-masing WAN
Ping test ke 8.8.8.8 via masing-masing WAN

Step 4: Load Balancing/Failover Setup

Menu: Network → Outbound Policy
Rule 1: VoIP → WAN1 (lowest latency)
Rule 2: Video → WAN2 (highest bandwidth)
Rule 3: Backup → WAN3 (WAN as LAN)
Rule 4: Default → Weighted 40:40:20

Perbandingan: Vendor yang Support Fitur Serupa

1. Peplink (Paling Fleksibel)

  • Series: Balance, MAX, SDX, sebagian SOHO
  • Fitur:
    • GUI mudah: Checkbox "Use as WAN"
    • Auto-detection: Deteksi otomatis WAN di LAN port
    • VLAN support: Native dan tagged
  • Contoh Model: Balance 20X, MAX BR1 Pro, SDX 1200

2. Ubiquiti UniFi

  • Produk: USG Pro, UDM Pro
  • Implementasi:
    • Via VLAN-only
    • Tidak ada auto-detection
    • Harus manual config VLAN
  • Keterbatasan: Hanya beberapa model high-end

3. Cisco Meraki

  • Produk: MX series (MX64, MX67, MX100)
  • Fitur:
    • "WAN 2" bisa dikonfigurasi di LAN port
    • Tapi terbatas: MX64 hanya 1 WAN + 1 LAN-as-WAN
    • Cloud-managed only

4. MikroTik

  • Produk: Semua RouterOS devices
  • Fitur:
    • Paling flexible (software-based sepenuhnya)
    • Tapi kompleks: CLI needed
    • Bisa ubah semua port jadi apapun
  • Contoh: RB4011, CCR series

5. TP-Link Omada

  • Produk: ER7206, ER605
  • Fitur:
    • "Dual WAN" dengan LAN port sebagai WAN
    • GUI sederhana
    • Tapi hanya 1 LAN port bisa sebagai WAN

6. DrayTek

  • Produk: Vigor series
  • Fitur:
    • "WAN3" via LAN port
    • PPPoE/DHCP/Static support
    • Load balancing capabilities

Perbandingan Visual:

Vendor         | Auto-detect | VLAN Support | Max Ports | GUI Ease
---------------|-------------|--------------|-----------|----------
Peplink        | ✓ Excellent | ✓ Native     | 4+        | ✓ Very Easy
Ubiquiti       | ✗ No        | ✓ Required   | 2         | ✓ Easy
Cisco Meraki   | ✗ No        | ✓ Limited    | 1-2       | ✓ Easy
MikroTik       | ✗ No        | ✓ Advanced   | Unlimited | ✗ Complex
TP-Link Omada  | ✗ No        | ✓ Basic      | 1         | ✓ Easy
DrayTek        | ✗ No        | ✓ Yes        | 1-2       | ✓ Moderate

Teknikal Detail: Bagaimana Peplink Implementasikan

Driver-Level Implementation

// Simplified logic di kernel driver
struct port_config {
    int physical_port;
    enum {MODE_LAN, MODE_WAN, MODE_DUAL} mode;
    struct vlan_config *vlans;
    bool auto_detect;
};

// Auto-detection algorithm
bool detect_wan_traffic(struct packet *pkt) {
    // Cek DHCP packets dari non-local server
    if (pkt->type == DHCP_OFFER && 
        !is_local_subnet(pkt->src_ip)) {
        return true;
    }

    // Cek PPPoE Active Discovery
    if (pkt->type == PPPoE_PADI) {
        return true;
    }

    // Cek ARP untuk gateway IP
    if (pkt->type == ARP_REQUEST &&
        is_isp_gateway(pkt->target_ip)) {
        return true;
    }

    return false;
}

Switching Architecture

[Physical Port 3]
     ↓
[PHY + MAC Layer] 
     ↓
[VLAN Tagging/Untagging]
     ↓
[Classification Engine] ← Rules dari GUI
     ↓
    ├── [WAN Processing] → Routing Engine
    └── [LAN Processing] → Switch Fabric

Hardware Design

Peplink menggunakan switch chip programmable: - Broadcom BCM53134: 8-port gigabit switch - Qualcomm IPQ8074: Advanced routing processors - Marvell 88E6393X: Enterprise multi-gig switch

Chip ini support: - IEEE 802.1Q VLANs - Port-based VLANs - MAC-based VLANs - Protocol-based VLANs


Keuntungan WAN as LAN

1. Cost Savings

Tanpa WAN as LAN:
  Butuh router dengan 4 WAN ports
  Harga: $800-$2000
  Contoh: Peplink Balance 310 (4 WAN)

Dengan WAN as LAN:
  Router dengan 2 WAN + 3 LAN configurable
  Harga: $400-$600  
  Contoh: Peplink Balance 20X
  Savings: 40-60%

2. Future-Proofing

  • Beli router sekarang dengan 2 WAN
  • 2 tahun kemudian butuh WAN ke-3
  • Tidak perlu ganti router, cukup setting WAN as LAN

3. Inventory Simplification

  • Satu model router untuk berbagai kebutuhan
  • Tidak perlu stock model berbeda untuk kebutuhan WAN port berbeda

4. Deployment Flexibility

  • Site survey tidak perlu exact
  • Jika ternyata butuh WAN extra, cukup software config
  • Tidak perlu revisi cabling

Batasan & Pertimbangan

1. Performance Considerations

Port sebagai WAN vs LAN:
• WAN mode: Routing path (software)
• LAN mode: Switching path (hardware)

Impact:
  LAN mode: Line rate (1Gbps full duplex)
  WAN mode: Mungkin limited oleh CPU
    Contoh: Balance 20X → ~500Mbps routing throughput

2. Feature Support

Beberapa fitur mungkin tidak tersedia di port WAN as LAN: - PoE: Jika port support PoE, mungkin disable saat WAN mode - Port Aggregation: LACP mungkin tidak support di mixed mode - Management Access: Web admin mungkin hanya via true LAN ports

3. VLAN Complexity

Jika pakai VLAN untuk WAN as LAN:
  • Switch upstream harus support VLAN tagging
  • Konfigurasi double: di router DAN di switch
  • Troubleshooting lebih kompleks

4. Auto-detection Limitations

  • Tidak semua ISP setup terdeteksi otomatis
  • Static IP configuration biasanya perlu manual
  • PPPoE dengan VLAN mungkin perlu manual config

Best Practices Implementasi

1. Planning Phase

Checklist:
[ ] Identifikasi berapa WAN dibutuhkan sekarang
[ ] Identifikasi berapa WAN mungkin dibutuhkan future  
[ ] Pilih router dengan cukup ports untuk growth
[ ] Consider VLAN requirements

2. Implementation

Step 1: Configure sebagai LAN dulu
Step 2: Test LAN connectivity
Step 3: Switch ke WAN mode
Step 4: Test WAN connectivity
Step 5: Configure load balancing/failover
Step 6: Document configuration

3. VLAN Best Practices

• Gunakan VLAN ID konsisten: 
  WAN1: VLAN 10, WAN2: VLAN 20, etc.
• Gunakan different IP ranges untuk WAN vs LAN
• Enable VLAN logging untuk troubleshooting
• Test failover dengan VLAN scenarios

4. Monitoring & Maintenance

Monitor:
• Port status (WAN/LAN mode)
• VLAN tagging errors
• Packet drops di port mixed-mode
• CPU utilization jika banyak WAN ports

Maintenance:
• Regular firmware updates
• Backup configuration sebelum changes
• Label physical ports dengan fungsinya

Future Trends: Software-Defined Ports

1. Dynamic Port Assignment

  • Port berubah fungsi berdasarkan waktu: 08:00-18:00: Port sebagai WAN (business hours) 18:00-08:00: Port sebagai LAN (backup/management)

2. AI-Powered Port Management

AI menganalisis traffic patterns:
• Jika port mostly menerima internet traffic → auto switch ke WAN
• Jika port mostly internal traffic → auto switch ke LAN
• Predictive: Switch sebelum traffic pattern change

3. Containerized Network Functions

Port jadi "generic ethernet"
Fungsi ditentukan oleh container yang running:
• Container A: WAN router
• Container B: LAN switch  
• Container C: VPN concentrator
Bisa ganti fungsi dengan start/stop container

4. Intent-Based Port Configuration

Admin specify: "Saya butuh 3 WAN, 2 LAN"
System auto-configure:
• Pilih port optimal berdasarkan physical location
• Configure VLANs otomatis
• Test dan validate configuration

Case Study: Migrasi dari Fixed ke Flexible Ports

Perusahaan: Retail Chain dengan 50 Toko

Situasi Awal:

Setiap toko: Router dengan 2 WAN ports
• WAN1: MPLS untuk POS
• WAN2: Internet untuk CCTV
Problem: Mau tambah backup 4G LTE → tidak ada port

Solusi dengan WAN as LAN:

Router baru: Peplink Balance 20X
Port 1: WAN1 (MPLS)
Port 2: WAN2 (Internet)
Port 3: WAN as LAN (4G LTE modem)
Port 4: LAN untuk local devices

Konfigurasi:
• Failover: Jika MPLS down → switch ke 4G untuk POS
• Load balancing: CCTV pakai Internet, failover ke 4G

Hasil: - Cost: Tidak perlu upgrade ke router 3-WAN ($200 savings per store) - Deployment: Cepat, hanya software config - Reliability: Triple redundancy achieved - ROI: 6 bulan dari avoided downtime


Kesimpulan: Kenapa WAN as LAN Menjadi Standard?

WAN as LAN adalah evolusi natural dari hardware-defined networking ke software-defined networking. Ini mencerminkan beberapa trend besar:

  1. Economics of Scale: Lebih murah buat chip switch programmable daripada dedicated WAN ports
  2. Operational Flexibility: IT teams bisa adapt tanpa physical changes
  3. Cloud Management: Port configuration menjadi bagian dari policy template
  4. IoT & Edge Computing: Perlu banyak network segments di edge

Vendor Landscape: Meskipun Peplink termasuk pioneer dan memiliki implementasi paling user-friendly, konsep ini semakin diadopsi oleh vendor lain. Perbedaannya ada di: - Ease of use: Peplink menang di GUI simplicity - Auto-detection: Peplink unik dengan automatic WAN detection - Scale: MikroTik lebih flexible untuk advanced users

Future Outlook: Dalam 5 tahun ke depan, hampir semua router bisnis mid-to-high-end akan memiliki port configurable. "Port purpose" akan menjadi software setting, bukan hardware design. WAN as LAN bukan lagi fitur premium, tapi table stakes untuk router modern.

Bagi organisasi, ini berarti: invest in flexibility. Beli router dengan port configurable meskipun sekarang butuhnya sedikit. Future-proof infrastructure dengan kemampuan untuk adapt via software, bukan hardware replacement.