This approach that @Allan Adair shown, it will definitely work, however in this case these road links you have restricted will become non-traversable.
I approach this in another way - you usually do want to be able to go through such roads when travelling between points, you just don't want your routes to start and stop on them. So instead of restricting these road segments, all you have to do is just to tell the Network Analyst that you don't want your routes to start and stop right on the motorways, tunnels, ramps etc.
You can achieve these by adding a field in your roads feature class and then calculting it with a value that you will exclude later on. Then you use snapping network locations option, where you specify that you don't want your route Stops to be snapped to those roads with the value you have just calculated. In the data obtained from vendors, the information of road type is usually included so you can just do a selection and then run a field calculator session. After you are done, you will be able to route through the tunnels, motorways, ramps etc., yet will not be able to start or stop your route on.
First figure: your stop is located right on top of a tunnel, yet a stop is being snapped to a closest "snappable" road link, i.e., the one that hasn't -1.
Second figure: you are still able to route through the road links that have -1 in a Snapping field you've specified earlier.