Eu tenho o seguinte problema. Eu não consigo pingar 8.8.4.4
ping -I ens192 8.8.4.4
PING 8.8.4.4 (8.8.4.4) from 192.168.4.44 ens192: 56(84) bytes of data.
^C
--- 8.8.4.4 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1023ms
ping -I ens192:1 8.8.4.4
ping: invalid source address ens192:1
Minha rede consiste em 1 interface de rede e em segundo virtual em cima dela. E dois gateways para isso. Ambos os gateways precisam ser configurados.
Eu verifiquei antes e o servidor do google é acessível com a linha de gateway normal no Debian. De ambos os gateways.
Então, como faço para que funcione?
Meu arquivo de configuração da interface
# 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
# The primary network interface
auto ens192
allow-hotplug ens192
iface ens192 inet static
address 192.168.4.44
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192 src 192.168.4.44 table rt1
post-up ip route add default via 192.168.4.1 dev ens192 table rt1
post-up ip rule add from 192.168.4.44/32 table rt1
post-up ip rule add to 192.168.4.44/32 table rt1
auto ens192:1
allow-hotplug ens192:1
iface ens192:1 inet static
address 192.168.4.201
netmask 255.255.255.0
post-up ip route add 192.168.4.0/24 dev ens192:1 src 192.168.4.201 table rt2
post-up ip route add default via 192.168.4.3 dev ens192 table rt2
post-up ip rule add from 192.168.4.201/32 table rt2
post-up ip rule add to 192.168.4.201/32 table rt2