Setting up a service provider network (SPN) enables you to create a dedicated, managed infrastructure for delivering internet, voice, or data services—typically used by small ISPs, campus networks, or multi-dwelling units. This guide walks you through building a functional SPN using off-the-shelf equipment, focusing on core components like routing, authentication, and billing integration. You’ll need basic networking knowledge, a budget for hardware, and approval from your upstream provider before proceeding.

What You’ll Need

  • A stable upstream internet connection (e.g., fiber or Ethernet circuit)
  • A router capable of BGP or static routing (e.g., MikroTik, Cisco ISR, or Ubiquiti EdgeRouter)
  • A RADIUS server (e.g., FreeRADIUS) for user authentication
  • Switches with VLAN support (Layer 2 or Layer 3)
  • Subscriber premises equipment (e.g., customer CPE modems/routers)
  • IP address space (public or private, depending on service scope)
  • Accounting/billing software (e.g., CoovaChilli + RadSec or open-source alternatives like Wifidog)
  • Physical cabling (Cat 6+ for internal backbone)
  • Access to command-line or web interface for each device

Step-by-Step

  1. Confirm upstream connectivity and agreements: Ensure your upstream provider (e.g., a Tier 2 ISP or backbone carrier) has provisioned your circuit and provided necessary details: IP addresses, gateway, ASN (if BGP), peering info, and any required authentication (like PPPoE or static IP). Document this information—errors here cascade downstream.
  2. Design your network topology: Sketch a simple diagram: Upstream Router → Core Router → Distribution Switches → Access Switches → CPE. Assign IP subnets for management (e.g., 10.0.0.0/24), customer traffic (e.g., 192.168.1.0/24 per VLAN), and RADIUS. Plan VLAN IDs early (e.g., VLAN 10 for management, VLAN 100 for customers).
  3. Configure the core router: Connect your core router (e.g., MikroTik hEX S) to the upstream circuit. Set up static routes or BGP sessions per upstream specs. For BGP, enter your ASN, peer ASN, and peer IP; for static, input the gateway and default route. Enable NAT only if using private upstream IPs (rare for SPNs).
  4. Set up VLANs on distribution/access switches: On each managed switch, create VLANs matching your design (e.g., VLAN 100 for customers). Tag the uplink ports to the core router and untag customer-facing ports. Example (MikroTik CLI): /interface vlan add name=customer-vlan interface=ether1 vlan-id=100.
  5. Deploy the RADIUS server: Install FreeRADIUS on a dedicated Linux server (Ubuntu/Debian recommended). Configure /etc/freeradius/3.0/sites-available/default for authentication (PAP or CHAP), and edit clients.conf to add your core router’s IP and shared secret. Test with radtest username password 127.0.0.1 0 testing123.
  6. Link the router to RADIUS: On your core router, configure the authentication method for customer traffic. In MikroTik: /ip radius add address=10.0.0.5 secret=yoursecret, then set /ip account to use RADIUS for accounting. For Cisco IOS: aaa new-model, aaa authentication login default group radius local, radius-server host 10.0.0.5 key yoursecret.
  7. Configure DHCP and DNS: Enable DHCP on the core router or distribution layer to assign IPs to subscribers. Use separate pools per VLAN (e.g., pool for VLAN 100: 192.168.100.100–200). Set DNS servers to upstream-resolved IPs or public resolvers like 8.8.8.8 if internal caching isn’t needed.
  8. Integrate billing/accounting: If using CoovaChilli (for captive portals), configure it to forward accounting packets to RADIUS. In CoovaChilli’s chilli.conf, set radiusserver1 10.0.0.5 and radiussecret yoursecret. For simple billing, use RADIUS accounting data to track usage and trigger top-ups via an external script or web UI.
  9. Deploy and test CPE: Connect subscriber devices (e.g., a customer’s Wi-Fi router) to an access switch port configured for VLAN 100. They should receive an IP via DHCP and be prompted for credentials if a captive portal is active. Verify internet access and check RADIUS logs for successful authentication and accounting records.
  10. Monitor and secure: Enable logging on the RADIUS server (e.g., /var/log/freeradius/radius.log) and router. Set up SNMP or Prometheus exporters for alerts. Restrict RADIUS access to trusted IPs only, disable unused services (e.g., Telnet), and encrypt management traffic with SSH.

Common Mistakes

Misconfiguring VLAN tagging is the most frequent error—ensure the core router’s interface to the switch is set to trunk/tagged mode for customer VLANs, while subscriber ports are untagged. Another pitfall is mismatched RADIUS shared secrets between the router and server; even a single extra space breaks authentication. Also, forgetting to enable IP forwarding on the RADIUS server can cause dropped sessions. Always verify subnet masks: using /30 instead of /24 for customer pools limits usable IPs dramatically. Finally, skipping firmware updates on switches or routers can lead to VLAN hopping or STP issues.

Tips

Start small: test with one VLAN and one customer before scaling. Use consistent naming (e.g., VLAN100-CUST for clarity). Document every IP assignment and secret in a password manager, not a plaintext file. For multi-tenant buildings, assign unique VLAN IDs per unit or floor to prevent traffic leakage. Use Q-in-Q (802.1AD) if your switch supports it to preserve customer VLANs over your backbone. Regularly rotate RADIUS secrets—every 90 days is a good practice. And always test failover: unplug the upstream link to confirm your backup circuit or static route kicks in.

Troubleshooting

If subscribers can’t get online, first check physical connectivity: LED lights on switches/routers, correct cable ports, and no VLAN mismatches. Verify the customer CPE obtained an IP (run ipconfig on Windows or ifconfig on Linux). If no IP, inspect DHCP logs on the server—common fixes include restarting the DHCP service or checking lease ranges. For RADIUS failures, use radtest from the router’s perspective (e.g., radtest test pass 10.0.0.5 0 secret) to isolate issues. If authentication succeeds but no internet, check firewall rules on the core router: ensure traffic from customer VLANs is permitted outbound. If using NAT, confirm masquerade rules exist for the correct interface. For intermittent drops, check for broadcast storms (excessive ARP requests) or looped cables (STP misconfiguration). If all else fails, reboot core devices sequentially—start with switches, then router, then RADIUS server—and avoid resetting to factory defaults unless absolutely necessary, as this erases all configurations.

Frequently Asked Questions

Can I use consumer-grade gear for a service provider network?

Yes, but with limits. MikroTik, Ubiquiti, and some Cisco Small Business switches handle VLANs and routing well for small deployments (under 100 users). Avoid home routers—they lack RADIUS support, fail under load, and often block VLAN tagging on LAN ports. For production, invest in managed switches with Layer 3 capabilities.

Do I need public IP addresses for customers?

Not necessarily. Many SPNs use private IPs (e.g., 10.0.0.0/8) with NAT at the core router. However, public IPs are better for services like hosting or VoIP. If using public IPs, ensure your upstream provider routes your assigned block (e.g., via BGP) and your firewall is hardened to block unsolicited inbound traffic.

How do I prevent customers from seeing each other’s traffic?

Use port isolation or VLAN separation. On switches, enable private VLANs (PVLANs) or assign each customer to a unique VLAN with no Layer 3 routing between them. Configure your firewall to drop inter-VLAN traffic unless explicitly allowed. For Wi-Fi, enable client isolation per SSID.

What if my RADIUS server goes down?

Configure fallback authentication on the router: set aaa authentication login default group radius local so users can log in with local credentials if RADIUS fails. For critical uptime, run a secondary RADIUS server in sync (e.g., using FreeRADIUS proxy or replication tools) and point the router to both.

Can I run this without a RADIUS server?

For basic setups, yes—use static IP assignments and local user accounts on the router. But scaling becomes impractical. RADIUS is essential for per-user authentication, accounting, and integration with billing systems. Skipping it limits you to manual management and weak security (e.g., shared passwords).

How do I handle customer support for outages?

Implement remote monitoring: use tools like Cacti or PRTG to graph interface utilization and latency. Set up alerts for down interfaces or high CPU. When a customer reports issues, ask for their VLAN ID and IP to quickly locate their port and check logs. Maintain a simple runbook: 1) check switch port status, 2) verify RADIUS auth logs, 3) test with a known-good CPE.