To stop the advertising of routes and networks follow the step below:
Login to the CLI of the SonicWall either via SSH or serial console (How to login to the appliance using the Command Line Interface (CLI)) and enter the following commands:
Stop the advertising of routes and networks in OSPF (example would be to not advertise the WAN subnet)
admin@18B169529ADC> configure terminal
config(18B169529ADC)# routing
(config-routing)# ospf
ARS OSPF>configure terminal
ARS OSPF(config)>router ospf
ARS OSPF(config-router)>summary-address X.X.X.X/24 not-advertise
ARS OSPF(config-router)>exit
ARS OSPF(config)>exit
ARS OSPF>write file
Configuration saved to OSPF
ARS OSPF>
admin(2CB8ED9D3824)#configure terminal