Score:0

Not able to connect to other subnet device using Ubuntu 20.04

br flag

I have added 1 USB2ETHERNET TPLINK NIC on Ubuntu server 20.04 running on raspberry pi for home DHCP server for HOME LAB purpose.

My Raspberry Pi ubuntu server, eth0 (main nic) is receiving IP (192.168.0.2) address from my TP-LINK router, On My TP-LINK router I have set the static lease for my pi nic.

And I have set static ip (192.168.10.1)for my eth1 (usb nic) via netplan (details below). On My TP-LINK Router I have also added a static route to send/forward request for 192.168.10.0 network on pi main nic (192.168.0.2). I am able to ping 192.168.10.1 from my latop with is on 192.168.0.0 network. 192.168.0.1/24 is being managed by TP-LINK router dhcp server.

I have a desktop running ESXI, and it's main NIC is connect over wired cable to pi USB NIC. ESXI desktop has received its IP from PI dhcp server running on eth1 also set as static lease on isc-dhcp-server config file (details below).

  1. I'm able to ping 192.168.10.1 (pi usbnic) from my laptop on 192.168.0.170
  2. I'm not able to ping 192.168.10.10 (esxi) from my laptop on 192.168.0.170
  3. I'm able to ping 192.168.10.10 from pi

Let me know what have I missed in routing as I'm not able to access ESXI WEBUI from laptop. What more routing do i need to set on PI so I can access my ESXI.

TP-LINK Router static route set

NETPLAN STATIC IP address assign to eth1 & route

network:
version: 2
ethernets:
    eth0:
        dhcp4: true
        optional: true

    eth1:
        dhcp4: false
        addresses: [192.168.10.1/24]
        gateway4: 192.168.0.1
        nameservers:
            addresses: [192.168.10.1, 8.8.8.8]
        routes:
            - to: 192.168.0.0/24
              via: 192.168.0.1
              metric: 100

thank in advance.

zwets avatar
us flag
You may want to read up a bit on IP networking and routing. A route from some network (say `192.168.10/24`) to another network (say `192.168.0/24`) needs a gateway. That gateway must obviously have an address in the _from_ network - else how could it be reached? Your `eth1` is in the `10` network, but has no gateway to the `0` network, so pings sent to it won't get responses. Pings sent to `10.1` over the Pi's `eth0` _will_ get responses (but would be martians). Also, it makes no sense to have a route `to: 192.168.0.0/24 via: 192.168.0.1`, as `0.1` _is already in_ `192.168.0.0/24`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.