This article explains the steps for Router on a Stick configuration using SonicWall switch while using common uplink or dedicated uplink.
Router-on-a-stick is a term frequently used to describe a setup up that consists of a router and switch connected using one Ethernet link configured as an 802.1q trunk link. In this setup, the switch is configured with multiple VLANs and the router performs all routing between the different networks/VLANs.
We can have Router on a Stick configuration using common uplink or dedicated uplink. In both scenarios, the VLAN sub-interfaces are to be added on the firewall first. Once done, we can assign the roles correctly to the switch ports.
For creating VLAN sub-interfaces on the firewall, please refer How Can I Configure Sub-Interfaces?
When two devices communicate that belong to the same VLAN, the traffic is directly sent through the switch. When devices from two separate VLANs try to communicate, the traffic needs to come to the SonicWall firewall which will perform inter-VLAN routing.
EXAMPLE 1: Router on a Stick configuration with common uplink

Switch configuration:

To create the access ports:


EXAMPLE 2: Router on a Stick configuration with dedicated uplink.

Switch configuration:
To create trunk port:

To create the access ports:

