Centos7.6 dual card, modify the default route

centos modify the default route

Demand: The server has two network cards, one is the network card, a network card is external, but the default route within the network;

 

route -n List all routes:

Delete the default route: 
route del default gw 0.0 . 0.0 
adding new default route: 
route the Add -net 0.0 . 0.0 gw 192.168.123.1;

 

Take effect immediately test

ping baidu.com

 

Guess you like

Origin www.cnblogs.com/root0/p/11122731.html