The way terrorists operate, the very thought that an attack would lead the the widespread closure of the rail network would be a major insentive to carry one out. It would cause massive disruption to the economy, and even has a potential for loss of life (pushing more traffic onto the roads leading to more road accidents, and also disrupting either directly or indirectly the transport of personel and supplies related to essential services).
9/11 which lead to a temporary closure of US airspace was an unprecedented event, and at the time of the closure was ongoing and nobody knew how serious it was likely to be. The only similarity on the railways I could see is if there were large numbers of trains being blown up over a fairly short timescale. Madrid and London do not compare as they were simultaneous (reasonably) so that by the time it was known what was going on and action could be taken it was already all over.
The only situation where I could see a shutdown of part of the rail network for security purposes would be as part of a largescale shut down of transport in a particular area due to a serious incident. An example would be an NBC incident in a major city leading to the city basically being locked down. Not only would any rail routes through the effected area be closed, or at least be used only for evacuation, so would any roads, and airports inside the area would also be closed or stop inbound flights. The same would be true of major weather situations, not that it is particularly likely in this country, and depending on the circumstances there might be no warning anyway. Basically in any situation where the rail network is shut down, most likely life in the entire area effected will also be shut down to a greater or lesser extent. If it came to the whole rail network being shut down, it's going to be the least of anyone's concerns.