MikroTik Hotspot + Cisco Core Architecture

📄 ENTERPRISE NETWORK DOCUMENT

MikroTik Hotspot + Cisco Core Architecture


🧠 1. Network Overview

یہ setup ایک enterprise hotspot architecture ہے جس میں:

  • Cisco Layer 3 Switch (10.10.24.1) → Core Gateway + Routing
  • MikroTik Router (10.10.24.2) → Hotspot + User Authentication
  • Internet uplink Cisco کے ذریعے manage ہوتا ہے
  • MikroTik صرف user login + NAT handle کرتا ہے

🔄 Traffic Flow

Internet

Cisco Core (10.10.24.1)

MikroTik Hotspot (10.10.24.2)

Users (WiFi / LAN)

⚙️ MikroTik Role

  • Captive Portal (Hotspot Login)
  • DHCP Server
  • NAT (User → Internet)
  • User authentication (MAC / Web login)
  • Traffic control (optional)

⚙️ Cisco Role

  • Default Gateway (SVI)
  • Inter-VLAN routing
  • Static routing back to MikroTik
  • Core network control

💾 2. MIKROTIK FULL CONFIG (NOTEPAD SCRIPT)

👉 Save file as:
mikrotik-hotspot.rsc

########################################
# ENTERPRISE HOTSPOT CONFIG
# MikroTik RouterBOARD 750G r2
########################################

# =========================
# INTERFACES
# =========================
/interface ethernet
set [find default-name=ether1] name=WAN comment="To Cisco Core"
set [find default-name=ether2] name=LAN comment="Hotspot LAN"

# =========================
# IP ADDRESSING
# =========================
/ip address
add address=10.10.24.2/23 interface=LAN comment="Hotspot LAN"
add address=172.16.50.2/24 interface=WAN comment="Uplink to Cisco"

# =========================
# ROUTING
# =========================
/ip route
add gateway=172.16.50.1 comment="Default Route to Cisco Core"

# =========================
# DNS
# =========================
/ip dns
set servers=8.8.8.8,1.1.1.1 allow-remote-requests=yes

# =========================
# DHCP SERVER
# =========================
/ip pool
add name=hotspot_pool ranges=10.10.24.10-10.10.25.200

/ip dhcp-server
add name=dhcp_hotspot interface=LAN address-pool=hotspot_pool lease-time=1h disabled=no

/ip dhcp-server network
add address=10.10.24.0/23 gateway=10.10.24.2 dns-server=10.10.24.2

# =========================
# NAT
# =========================
/ip firewall nat
add chain=srcnat out-interface=WAN action=masquerade comment="Internet NAT"

# =========================
# FIREWALL SECURITY
# =========================
/ip firewall filter
add chain=input connection-state=established,related action=accept comment="Allow Established"
add chain=input protocol=icmp action=accept comment="Allow Ping"
add chain=input src-address=10.10.24.0/23 action=accept comment="Allow LAN Access"
add chain=input in-interface=WAN action=drop comment="Drop WAN Access"

# =========================
# HOTSPOT SETUP
# =========================
/ip hotspot profile
add name=hsprof hotspot-address=10.10.24.2 login-by=mac,cookie,http-chap

/ip hotspot
add name=hotspot1 interface=LAN address-pool=hotspot_pool profile=hsprof disabled=no

# =========================
# HOTSPOT USER EXAMPLE
# =========================
/ip hotspot user
add name=admin password=Admin@123

# =========================
# DISABLE UNSAFE SERVICES
# =========================
/ip proxy set enabled=no
/ip service disable telnet
/ip service disable ftp

🧱 3. CISCO CONFIG (NOTEPAD SCRIPT)

👉 Save as:
cisco-core.txt

########################################
# CISCO CORE L3 CONFIG
########################################

# VLAN Interface (Gateway)
/interface vlan
interface Vlan24
ip address 10.10.24.1 255.255.254.0
no shutdown

# Route back to MikroTik hotspot network
ip route 10.10.24.0 255.255.254.0 10.10.24.2

# Optional Security ACL
ip access-list standard HOTSPOT_USERS
permit 10.10.24.0 0.0.1.255
deny any

📌 4. HOW TO APPLY (STEP-BY-STEP)

MikroTik:

  1. Winbox login
  2. Open New Terminal
  3. Paste .rsc script
  4. Or import file:
/import file-name=mikrotik-hotspot.rsc

Cisco:

  1. Paste in CLI
  2. Save config:
write memory

🔥 5. FINAL RESULT

After setup:

  • Users connect to WiFi/LAN
  • Redirect to Hotspot login page
  • MikroTik authenticates users
  • Traffic goes → Cisco → Internet
  • Secure + controlled + scalable network

Comments

Popular posts from this blog

Windows 11 rdp problem resolved

Microsoft Activation Scripts (MAS)

Windows 11 ke common RDP issues fix karta hai