0

I have the following problem. I cant ping 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

My network consist of 1 Network interface and on second virtual on top of it. And two gateways for it. Both gateways need to be configuerd.

I checked befor and the google server is reachable with the normal gateway line in Debian. From both Gateways. So how do i get it to work ?

My interface config file

# 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

1 Answer 1

0

A couple of things:

  • Pass the IP address of the interface on -I. I.e. -I 192.168.4.201
  • The default route on the second interface says dev ens192 instead of dev ens192:1
  • I guess that you either can't ping 192.168.4.1 and 192.168.4.3 or there is some additional configuration that's not shown here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.