The way to manually add a route is: The routeadd-net172.16.6.0netmask255.255.255.0gw172.16.2.25routeadd-net is the way to add a static route network under centos, netmask is the subnet mask of the network segment, gw represents the next hop address, in fact, the route of 172.16.6.0 is routed out through 172.16.2.25.
You can add a route manually by using the following methods:
RouteDd-Net 172.16.6.0 netmask 255.255.255.0 gw 172.16.2.25
Route add-net is the method for adding a static route network under centos, netmask is the subnet mask of the network segment, gw represents the next hop address, in fact, 172.16.6.0 routes are routed out through 172.16.2.25. This is only temporary effect. If the server fails to be restarted, how can it be permanently effective? In fact, it may be written into the file as follows:
Vim/etc/sysconifg/network-scripts/route-eth0
127.16.6.0/24 via 172.16.2.25
You don't need to worry about restarting the server. It will always take effect.
There are many ways to view the route table in CentOS, netStat-Rn or route-n can be used. There are a lot of related information in linux, and I will not focus on it here.