Netgear VLAN Routing Using CLI: Complete Inter-VLAN Guide
Create routed VLAN gateways on a supported NETGEAR Layer 3 switch, assign access and trunk ports, add an upstream path, and verify the complete packet flow from user to server.
Lesson overview
In This Lesson
This guide turns four isolated VLANs into routed subnets while keeping the Layer 2 membership, Layer 3 gateways and upstream routing responsibilities clear.
- Understand how routed VLAN interfaces move packets
- Confirm switch support and build an addressing plan
- Access the CLI and enable Layer 3 forwarding
- Create VLANs and enable VLAN routing
- Configure the four SVI gateway addresses
- Assign access ports and the uplink trunk
- Add an upstream route and return path
- Save, verify and test end-to-end
- Diagnose common inter-VLAN failures
From isolation to forwarding
Quick Learning Map
Define the VLANs
Give every security and broadcast domain a unique VLAN ID and non-overlapping IP subnet.
Create the gateways
Enable routing and assign one routed VLAN interface address for each subnet.
Prove both directions
Verify port membership, connected routes, endpoint gateways and the upstream return path.
Netgear VLAN Routing at a Glance
A user in VLAN 20 sends remote-subnet traffic to its SVI at 192.168.20.1. The switch performs a route lookup and forwards it through the VLAN 30 SVI toward the server.
What VLAN Routing Does
A VLAN is a Layer 2 broadcast domain. Without a router or Layer 3 switch, traffic cannot cross from VLAN 20 to VLAN 30 even when both endpoints attach to the same chassis.
SVI gateway
A switched virtual interface represents one VLAN at Layer 3. Its IP address is the default gateway for endpoints in that subnet.
Connected route
When the SVI is operational, the switch installs the VLAN subnet as directly connected and can route to it without an external next hop.
Policy boundary
Routing creates reachability, not authorization. Apply reviewed ACL or firewall policy when users, servers, voice and management must not communicate freely.
192.168.20.100 sends a packet for 192.168.30.50 to gateway 192.168.20.1. The switch routes it to connected network 192.168.30.0/24, resolves the server with ARP and transmits it in VLAN 30.Prerequisites and Addressing Plan
- Confirm the exact switch model, firmware and license support Layer 3 routing.
- Back up the running and startup configurations before changing VLAN membership.
- Keep console access available in case the management VLAN or IP changes.
- Choose non-overlapping subnets and reserve one SVI address in each VLAN.
- Record every access port, trunk, native VLAN and allowed VLAN list.
- Plan ACLs, DHCP relay, DNS, NTP and the upstream return routes before cutover.
| VLAN | Role | Subnet | SVI/default gateway | Example ports |
|---|---|---|---|---|
| 10 | Management | 192.168.10.0/24 | 192.168.10.1 | 1/0/1-1/0/4 |
| 20 | Users | 192.168.20.0/24 | 192.168.20.1 | 1/0/5-1/0/16 |
| 30 | Servers | 192.168.30.0/24 | 192.168.30.1 | 1/0/17-1/0/20 |
| 40 | Voice | 192.168.40.0/24 | 192.168.40.1 | 1/0/21-1/0/23 |
1/0/5. Other NETGEAR families may use a different format. Confirm the live interface names before pasting a range.Step 1: Access the CLI and Enable IP Routing
Enter privileged and global configuration modes
Use the console for initial work or SSH for encrypted remote administration. Avoid Telnet in production.
User: admin
Password: [your local administrator password]
(NETGEAR Switch) > enable
(NETGEAR Switch) # show version
(NETGEAR Switch) # show running-config
(NETGEAR Switch) # configure
(NETGEAR Switch) (Config) #
Safety: save a backup and verify console recovery before changing the VLAN that carries your active management session.
ip routing — enable global Layer 3 forwarding
(NETGEAR Switch) (Config) # ip routing
(NETGEAR Switch) (Config) # exit
(NETGEAR Switch) # show ip brief
Common failure: routed interfaces can have addresses while inter-VLAN traffic still fails if global IP routing is disabled.
Step 2: Create the VLANs and Enable VLAN Routing
Create VLANs 10, 20, 30 and 40
(NETGEAR Switch) # vlan database
(NETGEAR Switch) (Vlan) # vlan 10,20,30,40
(NETGEAR Switch) (Vlan) # vlan routing 10
(NETGEAR Switch) (Vlan) # vlan routing 20
(NETGEAR Switch) (Vlan) # vlan routing 30
(NETGEAR Switch) (Vlan) # vlan routing 40
(NETGEAR Switch) (Vlan) # exit
(NETGEAR Switch) # show vlan
Why both commands matter: vlan creates the Layer 2 broadcast domain; vlan routing prepares it for a routed VLAN interface on supported releases.
Step 3: Configure the Routed VLAN Interfaces
Each SVI address becomes the gateway for its own subnet. Do not reuse these addresses on another router, firewall or host.
VLAN 10 — Management gateway
(NETGEAR Switch) # configure
(NETGEAR Switch) (Config) # interface vlan 10
(NETGEAR Switch) (Interface vlan 10) # routing
(NETGEAR Switch) (Interface vlan 10) # ip address 192.168.10.1 255.255.255.0
(NETGEAR Switch) (Interface vlan 10) # exit
Management caution: changing this interface can disconnect the current session. Keep console access and update your administrator workstation route.
VLAN 20 — Users gateway
(NETGEAR Switch) (Config) # interface vlan 20
(NETGEAR Switch) (Interface vlan 20) # routing
(NETGEAR Switch) (Interface vlan 20) # ip address 192.168.20.1 255.255.255.0
(NETGEAR Switch) (Interface vlan 20) # exit
Configure user DHCP scopes or static endpoints to use 192.168.20.1 as their default gateway.
VLAN 30 — Servers gateway
(NETGEAR Switch) (Config) # interface vlan 30
(NETGEAR Switch) (Interface vlan 30) # routing
(NETGEAR Switch) (Interface vlan 30) # ip address 192.168.30.1 255.255.255.0
(NETGEAR Switch) (Interface vlan 30) # exit
Use ACLs or a firewall path when users should reach only approved server ports rather than the entire subnet.
VLAN 40 — Voice gateway
(NETGEAR Switch) (Config) # interface vlan 40
(NETGEAR Switch) (Interface vlan 40) # routing
(NETGEAR Switch) (Interface vlan 40) # ip address 192.168.40.1 255.255.255.0
(NETGEAR Switch) (Interface vlan 40) # exit
(NETGEAR Switch) (Config) # exit
(NETGEAR Switch) # show ip interface brief
(NETGEAR Switch) # show ip route
Operational state: an SVI can remain down until its VLAN has an active member port. Some NETGEAR families do not require or expose Cisco-style no shutdown on a VLAN interface.
Step 4: Assign Access Ports and the Uplink Trunk
Access ports — one untagged endpoint VLAN
(NETGEAR Switch) # configure
(NETGEAR Switch) (Config) # interface range 1/0/5-1/0/16
(NETGEAR Switch) (conf-if-range-1/0/5-1/0/16) # switchport mode access
(NETGEAR Switch) (conf-if-range-1/0/5-1/0/16) # switchport access vlan 20
(NETGEAR Switch) (conf-if-range-1/0/5-1/0/16) # exit
(NETGEAR Switch) (Config) # interface range 1/0/17-1/0/20
(NETGEAR Switch) (conf-if-range-1/0/17-1/0/20) # switchport mode access
(NETGEAR Switch) (conf-if-range-1/0/17-1/0/20) # switchport access vlan 30
(NETGEAR Switch) (conf-if-range-1/0/17-1/0/20) # exit
Alternative syntax: existing general-mode configurations may use vlan participation include, vlan pvid and vlan tagging. Review the current port mode before converting it.
Trunk port — carry only the required VLANs
(NETGEAR Switch) (Config) # interface 1/0/24
(NETGEAR Switch) (Interface 1/0/24) # switchport mode trunk
(NETGEAR Switch) (Interface 1/0/24) # switchport trunk allowed vlan 10,20,30,40
(NETGEAR Switch) (Interface 1/0/24) # switchport trunk native vlan 10
(NETGEAR Switch) (Interface 1/0/24) # exit
(NETGEAR Switch) (Config) # exit
(NETGEAR Switch) # show vlan
Verify both ends: allowed VLANs, native VLAN and tagging must match the connected switch, router or firewall. A mismatch can break one VLAN while others continue working.
Step 5: Add the Upstream Route and Return Path
Inter-VLAN routing works without a default route because all four networks are directly connected. A default route is needed only for destinations the switch does not already know.
Add a default route to a directly reachable firewall or router
This example assumes the upstream device has address 192.168.10.254 on VLAN 10. Use the actual transit or routed-link address from your design.
(NETGEAR Switch) # configure
(NETGEAR Switch) (Config) # ip route 0.0.0.0 0.0.0.0 192.168.10.254
(NETGEAR Switch) (Config) # exit
(NETGEAR Switch) # show ip route
Return routing: the upstream device needs routes back to 192.168.20.0/24, 192.168.30.0/24 and 192.168.40.0/24, pointing to the switch. Internet access also normally requires NAT and security policy on that device.
192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 are reserved for examples. Never paste an example next hop unless it exists on your own directly connected transit network.Step 6: Save and Verify End-to-End
Save the running configuration
(NETGEAR Switch) # write memory
# Equivalent explicit form on supported releases:
(NETGEAR Switch) # copy system:running-config nvram:startup-config
Compare the running and startup configurations after saving. Export a backup after the change is accepted.
Verify VLANs, SVIs, routes and neighbors
show vlan
show ip brief
show ip interface brief
show ip route
show arp
show interfaces status
show running-config
show startup-config
Test sequence: from a VLAN 20 host, ping 192.168.20.1, then the VLAN 30 gateway 192.168.30.1, then the server 192.168.30.50, and finally the upstream next hop. Test the return direction too.
- Local gateway: prove the endpoint can ARP and ping its own SVI.
- Remote SVI: prove global routing and connected routes are active.
- Remote endpoint: verify destination addressing, host firewall and return gateway.
- Upstream: verify the default route, return routes, NAT and security policy.
Troubleshooting VLAN Routing
| Symptom | Likely cause | Check |
|---|---|---|
| Host cannot ping its gateway | Wrong access VLAN, IP/mask or SVI down | Port membership, endpoint subnet, VLAN existence and active member ports. |
| Host reaches its gateway but not another SVI | Global ip routing or SVI routing missing | show ip brief, interface configuration and connected routes. |
| Remote SVI responds but remote host does not | Host firewall, gateway or VLAN membership | ARP table, destination gateway, host policy and return traffic. |
| One VLAN fails across a trunk | Allowed-list or native/tagging mismatch | Compare the trunk configuration on both endpoints. |
| Internet works from one VLAN only | Missing upstream return route, NAT or policy | Firewall routes, NAT scope and security rules for every subnet. |
| Configuration works until reboot | Running configuration was not saved | write memory and compare startup configuration. |
Web UI Cross-Check and Official References
The main UI can configure the same components under VLAN and IP-routing pages. CLI and UI changes affect the same running configuration, so avoid having two administrators edit the same feature simultaneously.
- NETGEAR M4300 product documentation
- M4300 CLI Command Reference Manual
- Configuration Example Guide for M4250, M4300 and M4350
Always use documentation for the exact hardware family and firmware. Command availability, interface notation and licensing can differ.
Netgear VLAN Routing Frequently Asked Questions
What is VLAN routing on a NETGEAR managed switch?
It lets a supported Layer 3 switch forward traffic between separate VLAN subnets. Each routed VLAN interface receives an IP address that endpoints use as their default gateway.
Which commands are required for NETGEAR inter-VLAN routing?
Create the VLANs, enable VLAN routing, enable global ip routing, configure each interface vlan with routing and an IP address, assign ports, verify, and save.
Why is a NETGEAR VLAN interface down?
The VLAN might have no operational member port, the VLAN may not exist, routing may be disabled on the interface, or the physical access/trunk path may be down.
What should hosts use as their default gateway?
Each host uses the SVI address for its own VLAN. In this guide, a VLAN 20 host uses 192.168.20.1.
Does a default route provide internet access by itself?
No. The next hop must be reachable, the upstream device needs return routes for every VLAN, and internet access normally also requires NAT and security policy.
Do all NETGEAR managed switches support VLAN routing?
No. Confirm that the exact model, firmware and license support Layer 3 routing and expose the required commands before planning the change.