3

my /etc/network/interfaces file when I am logged as the container looks like this

auto eth0
iface eth0 inet static
    address 192.168.1.27
    netmask 255.255.255.240
    gateway 192.168.1.1

but when I do ping 192.168.1.1 I get

connect: Network is unreachable

I don't understand why I cannot do that.

I get the same thing when pinging 8.8.8.8

Long Claw
  • 107
  • 2
  • 6
  • A gateway must be on the same network as the host, otherwise you would need a gateway to reach the gateway. Your `192.168.1.1` gateway address is not in the `192.168.1.16/28` network of your `192.168.1.27/28` host address. A gateway is the host on a network that knows how to reach other networks, so having a gateway on a different network simply does not work. – Ron Maupin Dec 06 '19 at 19:56
  • 2
    so I have to modify the host to also register that network address? this is what I understood – Long Claw Dec 06 '19 at 20:12

0 Answers0