Answer the question
In order to leave comments, you need to log in
How to set up routing in centos?
To create a route, I use the command
route add -host "ip address" gw "gateway" dev eth1
when rebooting, respectively, everything flies.
you need to set it to "Forever"
Tried: nano /etc/sysconfig/network-scripts/route-eth1
ADDRESS0= "ip address"
GATEWAY0= "gateway"
NETMASK0= "mask"
Or like this, /<subnet mask> via <gateway> dev <interface>
after a reboot, you still have to re-enter the command.
Answer the question
In order to leave comments, you need to log in
in the route-eth0 file, you need to directly register the routing commands. For example, like this:
10.87.6.0/24 via 10.87.1.17
10.87.2.0/24 via 10.87.1.17
10.54.200.0/24 via 10.87.1.17
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question