0

Ubuntu 18.04

I have read many other posts about this and tried various solutions but I still cannot get this to work.

I have two interfaces configured. The first is host-only and the second is NAT

My netplan yaml file looks likek this:

# Let NetworkManager manage all devices on this system

network:

  version: 2

  renderer: NetworkManager

  ethernets:

      enp0s8:

         dhcp4: yes

      enp0s3:

         dhcp4: no

         dhcp6: no

         addresses: [192.168.33.10/24]

         nameservers:
         addresses: [8.8.8.8,8.8.4.4]

ifconfig gives me:

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.33.10  netmask 255.255.255.0  broadcast 192.168.33.255
        inet6 fe80::a00:27ff:fef1:c5dc  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:f1:c5:dc  txqueuelen 1000  (Ethernet)
        RX packets 21  bytes 5028 (5.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 86  bytes 8802 (8.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.3.15  netmask 255.255.255.0  broadcast 10.0.3.255
        inet6 fe80::a00:27ff:fe71:ea26  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:71:ea:26  txqueuelen 1000  (Ethernet)
        RX packets 4782  bytes 3356880 (3.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3314  bytes 515307 (515.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 398  bytes 36683 (36.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 398  bytes 36683 (36.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

My Windows 10 adapter has the address 192.168.33.1

When I try to ping it, I get Destination is unreachable.

I really cannot find a solution that works.

0

Your question shows a syntactically correct netplan config that has been applied and gives you a route to 192.168.33.1 on interface enp0s3. If that's what you expect, then there is no netplan reason for you to not be able to ping the machine.

To troubleshoot this, you should double check that:

  • ip route get 192.168.33.1 shows the route going via the correct interface (i.e. there are no unexpected routes on your system managed outside of netplan)
  • you do not have firewalls on either machine blocking traffic
  • the IP shows up in /proc/net/arp on your system, showing that the machines are connected to the network and passing traffic
  • the routing tables on your windows machine match

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.