You will need to configure routing. There is no command to enable it like on a Cisco. I assume the gateway of the clients is the S2500? If so, do a show ip route. Do all the routes show up on the switch?
On the SonicWall, you would need to set static routes and possibly alter the NAT configuration for the internet. The static routes for the 172 networks should point to the 192.168.x.x interface ON THE S2500 as the next hop!!! This is important because the S2500 will know about all three networks as well as the default gateway. So...if a client is trying to get to 4.2.2.2 on the internet, they will point to their gateway (assuming it's the S2500). The S2500 will see the destination and say "I don't have that in my routing table so I'll use my default route" which is the SonicWall.
Once at the SonicWall, it will then forward it (and NAT) the traffic to the internet! Now...on the return path, the Sonicwall will see the destination pointing to the 172.168 network. IF it doesn't see a static route, it will then send it back out on the Internet and it will die. So...on the Sonicwall, you need to define a static route for 172.168.x.x pointing to the S2500 with a next hop of 192.168.x.x replacing x.x with the actual IP interface on the S2500. Once at the S2500, it already knows about the 172.168 network so it will send it to the client.
Hope this helps!