How to add permanent routes to multiple Linux NICs

  
        

Sometimes when Linux has multiple network cards, you need to add routes to other network cards, so that the network can't get out of the network card

1. View local routes, as follows

2, the route added to a host address, as follows, you can also add a route to a network segment

3, if it is executed with a command, then after the restart, the route may be invalid, there are two The method can save the route, one is written to the rc file, in the command mode

4, you can also create a new file in the directory shown below, as follows, add the route, pay attention to the way of naming

5, restart /etc/init.d/network for verification

Copyright © Windows knowledge All Rights Reserved