![如何为具有两个接口的多个子网设置路由?](https://linux22.com/image/1178954/%E5%A6%82%E4%BD%95%E4%B8%BA%E5%85%B7%E6%9C%89%E4%B8%A4%E4%B8%AA%E6%8E%A5%E5%8F%A3%E7%9A%84%E5%A4%9A%E4%B8%AA%E5%AD%90%E7%BD%91%E8%AE%BE%E7%BD%AE%E8%B7%AF%E7%94%B1%EF%BC%9F.png)
我有安装有 Zabbix 的 Ubuntu Server。2 个接口:
eth0 (main network for apache, ssh etc)
adress: 10.0.10.11/24
gateway4: 10.0.10.254
eth1:
adress: 10.0.2.10/24
gateway: 10.0.2.1
network 10.0.2.0 got subnets:
10.0.0.0
192.168.7.0
192.168.15.0
192.168.0.0
192.168.30.0
192.168.40.0
network 10.0.10.0 got subnets:
192.168.7.0
192.168.20.0
192.168.25.0
192.168.50.0
192.168.60.0
192.168.70.0
如何在不选择特定接口的情况下使路由(或其他东西)可以 ping ?
$ ip route
default via 10.0.10.254 dev eth0 proto static
default via 10.0.2.1 dev eth1 proto static
10.0.2.0/24 dev eth1 proto kernel scope link src 10.0.2.254
10.0.10.0/24 dev eth0 proto kernel scope link src 10.0.10.11