To isolate multiple VLANs on a Cisco Catalyst 3850 while providing internet access via separate routers, configure each switch port as an access port in its respective VLAN and disable Layer 3 routing on the switch. Connect each router’s WAN interface to the internet and its LAN interface to a distinct switch port assigned to that VLAN. This ensures traffic remains segmented at Layer 2, preventing inter-VLAN communication while allowing outbound connectivity through independent default gateways.
Network Topology and Design Strategy
The primary goal here is network segmentation without internal routing. By keeping the Cisco Catalyst 3850 operating strictly as a Layer 2 switching device for these specific segments, we eliminate the complexity of managing subnets and routes within the switch itself. This approach leverages the hardware capabilities of the TP-Link AX20 and Asus RT-N12 routers to handle NAT and internet forwarding independently. Each VLAN represents a distinct broadcast domain, ensuring that devices in one VLAN cannot directly communicate with devices in another, which is crucial for security and bandwidth management. For this configuration, we assume three distinct networks: VLAN 10 for the TP-Link AX20, VLAN 20 for the Asus RT-N12, and potentially VLAN 30 for other isolated devices. The Cisco switch will act as the central distribution point, tagging frames only if necessary, but in this pure access model, untagged frames are typical for end-user devices. It is important to note that while the switch does not route between these VLANs, it must still have a management IP address if remote administration is required, though this should be placed in a dedicated management VLAN not connected to the user-facing ports. This setup aligns with best practices discussed in Multiple VLANs Single Interface Isolation: Switching Between Locations, where segmenting traffic is prioritized over centralized routing for simplicity and security.Cisco Catalyst 3850 Configuration Steps
Begin by accessing the CLI of your Cisco Catalyst 3850. First, create the VLANs that will correspond to your router networks. Use the following commands to define VLAN 10 and VLAN 20:configure terminal
vlan 10
name TP-Link-Network
exit
vlan 20
name Asus-Network
exit
Next, configure the physical interfaces connecting to the routers. Since the routers typically expect untagged Ethernet frames on their LAN ports for local traffic, you must set these switch ports as access ports. For example, if Gi0/1 connects to the TP-Link AX20 and Gi0/2 to the Asus RT-N12:
interface GigabitEthernet0/1
description TP-Link-AX20-LAN
switchport mode access
switchport access vlan 10
no shutdown
exit
interface GigabitEthernet0/2
description Asus-RT-N12-LAN
switchport mode access
switchport access vlan 20
no shutdown
exit
Ensure that no SVI (Switch Virtual Interface) is created for VLAN 10 or 20. If an SVI exists and is active, the switch might attempt to route traffic between them if IP routing is enabled globally. To guarantee isolation, verify that ip routing is disabled or simply ensure no interface Vlan10 or interface Vlan20 configurations exist. This step is critical; any active L3 interface on these VLANs could inadvertently enable routing, defeating the purpose of isolation.
Router Configuration Details
On the TP-Link AX20, log into the web interface. Set the connection type to Dynamic IP (DHCP) if the upstream ISP provides an IP, or PPPoE if required. In the LAN settings, assign a static IP address to the router, such as 192.168.10.1/24. Ensure the DHCP server is enabled for clients in VLAN 10. Repeat this process for the Asus RT-N12, assigning it an IP like 192.168.20.1/24 in VLAN 20. It is vital that both routers operate on different subnets. If both use 192.168.1.0/24, conflicts may arise if any cross-connection occurs accidentally. Using unique subnets reinforces the logical separation. Additionally, check the firewall settings on both routers to ensure they block incoming unsolicited connections from the internet, adding a layer of security to the isolated networks.Verification and Troubleshooting
After configuration, verify connectivity by pinging the router’s LAN IP from a device in each VLAN. A device in VLAN 10 should reach 192.168.10.1 but fail to reach 192.168.20.1. If ping succeeds between VLANs, re-check the switch port configurations to ensure they are correctly assigned to their respective VLANs and that no trunk links are unintentionally carrying both VLANs to a single endpoint. Also, confirm internet access works for both networks. If one fails, check the router’s WAN status and cable connections. For deeper insights into network behavior, refer to Analyzing Unusual Behavior in Router Logs: Virus or Attack? to monitor for any unexpected traffic patterns that might indicate misconfiguration or security threats.Frequently Asked Questions
Can I connect both routers to the same switch port?
No, each router requires a dedicated switch port assigned to its specific VLAN. Connecting both to the same port would place them in the same broadcast domain, breaking the isolation.What happens if I enable ip routing on the Cisco switch?
Enablingip routing allows the switch to forward packets between VLANs if SVIs are configured. To maintain isolation, either keep ip routing disabled or ensure no SVIs exist for the user VLANs.