错误
[root@sim-11 init.d]# ip route add 10.0.1.0/24 via 172.16.0.1 dev ens256
RTNETLINK answers: Network is unreachable
原因
对应的网卡没有起来
是down的状态
例子:https://blog.csdn.net/weixin_34419321/article/details/92289832
对应的网关地址不通
就是arp表里没有学到网关的MAC地址。
https://blog.csdn.net/dongyanwen6036/article/details/77504631
配置错误
就是使用的网关,不在本机所属的网络。
https://blog.csdn.net/iteye_19606/article/details/82324242
strace 结果
sendmsg(3