在下面的示例中,我在我的Linux机器上建立了一个以太网和Wifi接口。以下是路由输出:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 mlan0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 mlan0如果不作任何进一步的修改,内核将使用哪个接口在192.168.1.x网络上发送数据?
发布于 2016-02-15 11:40:27
您只需使用ip route get命令测试任何地址(请参阅man ip-route)。例如
$ ip route get 192.168.1.99
192.168.1.99 dev eth0 src 192.168.1.0 https://unix.stackexchange.com/questions/263246
复制相似问题