SonicWall switches are L2 switches with the added functionality of static routing. The switch has a default route added by default once it is provisioned to point all traffic towards the gateway IP through which it is provisioned.Based on the devices connected to various interfaces of the switch, the connected routes get updated and cannot be deleted/modified.
This article explains the steps to add static routes on SonicWall switch.
EXAMPLE:Let us consider the following scenario where firewall 1 has two switches connected to it, Switch 1 and Switch 2. The VLAN network associated withport 11isVLAN 11with the network being192.168.11.0/24. TheX4:V11IP for firewall 2 is192.168.11.1. In this scenario, all traffic passing through Switch 1 for destination network192.168.200.0/24needs to use 192.168.11.1as the gateway.
Adding Static Route
Navigate to MANAGE | System Setup | Switch Controller and Switches tab.
Under the Static Routes tab, click on the Add Static Route option.
Fill in the destination network ID, subnet mask and gateway.
Once this route is added, the Switch 1 will directly send the traffic destined for 192.168.200.0/24 to 192.168.11.1 instead of its default gateway 192.168.198.1.