1. systemctl stop NetworkManager
2. cd /etc/sysconfig/network-scripts
vim ifcfg-em2 # 注释掉网关
3. systemctl restart network
4. ip route add default via 10.0.20.1 dev ens224 table 1
5. ip rule add from 10.0.20.3 table 1
把那些命令写到 /etc/rc.d/init.d/network
ip route flush table 1
ip route add default via 10.0.2.1 dev em2 table 1
ip rule add from 10.0.2.87 table 1
linux 双网卡配置2个网段
最新推荐文章于 2024-06-14 16:30:33 发布