每个网关configuration多个接口

我正在尝试configuration一个SIPnetworking接口。 我的目标是将我的internet接口( enp3s0 )连接到SIP以太网设备( enp4s0 )。 我编辑了我的/etc/network/interfaces如下所示:

 root@debian:/home/debian# cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback auto enp3s0 iface enp3s0 inet static address xxx.xx.xx.xx (removed, but this is working just fine - I wouldn't beable to connect wth SSH without this) gateway xxx.xx.xx.x netmask 255.255.255.0 auto enp4s0 iface enp4s0 inet static address 10.50.146.130 gateway 10.50.146.129 netmask 255.255.255.252 dns-nameservers 8.8.8.8 8.8.4.4 

但是,当我尝试ping我的网关10.50.146.129 ,我面临失败。 我已经尝试过的事情:

  • 创build一个新的IP路由表并添加一个default ,然后创build一个IP规则来select该路由
  • via网上find的各种path组合添加路线
  • 一个ip a显示了enp4s0接口,以及旁边的正确IP

在这一点上,我只是喜欢一个指向正确的方向,而不是反复试验。 你将如何pipe理2个networking接口,都用不同的网关? 接收传入的networkingstream量并将其代理到我的SIP设备 – 使用siproxd是至关重要的。