I’ve found the solution, and it’s exactly as stupid and obvious as I was expecting.

The classroom computers were deployed using Clonezilla from an image that had the VirtualBox VM pre-configured. As a result of this, every VM had the same MAC address, which probably caused a lot of ARP collisions, since all the hosts and VMs were essentially on the same broadcast domain.

The solution was to simply randomize each VM’s MAC address. After that, ICMP, SSH, and HTTP worked as expected. Thanks for the suggestions, but it was caused by my own oversight in the end.

(edit) I got around to reading the comments just now, @maxy@piefed.social was totally correct.


I know this isn’t “selfhosting” as most people imagine it, but it is about hosting services on own hardware, hence why I’m posting in this community.

I’m supposed to help a teacher set up a networking exercise where pairs of computers are connected directly on a crossover cable and can access services (echo, HTTP, SSH, FTP) on each other. Every computer is identical: Windows 10 host, one VirtualBox VM running Linux Mint with a bridged adapter in promiscuous mode. Each host and VM has its own static link-local IP address.

The problem is, the VMs can’t talk to each other, and I don’t know why.

From one VM, I can ping itself, its host, and the remote host, but not the remote VM. Each host can ping itself, the local VM, the remote host, but not the remote VM. I’ve tried connecting both hosts to a layer-2 switch, with the same result.

Can someone point me at the one thing that I’m obviously doing wrong?

(edit) I’ve also tried to set the default gateway to the host’s, remote host’s, and remote VM’s address, but nothing changed.


Running Linux on metal isn’t an option. In the past, the classroom computers used to dual boot Windows and Ubuntu, but the Windows install got so bloated (the software too, not just Windows) that it needs the full SSD.

  • maxy@piefed.social
    link
    fedilink
    English
    arrow-up
    3
    ·
    8 hours ago

    Sounds like a networking exercise on its own.

    Do the attempted pings show up on the wire? (Switch LEDs, network card activity light.)

    Does broadcast work? (Watch if it is received with tcpdump -n on both Linux VMs, and Wireshark on the Windows hosts, while doing ping -b 10.0.0.255. Or trigger a broadcast ARP by ping-ing a non-existing IP in the same network. Those should go through all bridge and switch devices, independent of IPs and routing setup.)

    I think you need four distinct MAC addresses for this setup, are they all different?

    The network card/driver is filtering received unicast by MAC. I’m sure something should set up the filters correctly, but maybe it went wrong, or there is a bug in the driver. Wireshark on Windows should be able to enable promiscuous mode, which disables the filter.

    Side note: I don’t think you need a crossover cable. Auto-crossover should just work these days.

    At work I map a USB Ethernet device into my Linux VM when I do anything networking, exactly to avoid those kind of “is it Windows?” questions. Also, I can then check the Ethernet link at the lowest level using Linux tools like ip link or mii-tool or ethtool.

    I’m using VMWare for this, which I cannot recommend any more. (It used to be good for this, but gut much worse in recent years.) I think vanilla VirtualBox doesn’t allow to map USB devices.

    • rtxn@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 hours ago

      I think you need four distinct MAC addresses for this setup, are they all different?

      We have a winner!

      The classroom computers were mass-deployed using Clonezilla, from a disk image that already had the VM pre-configured. As a result, every VM had the same MAC address. Bridged networking put both hosts and both VMs in the same broadcast domain, which caused collisions in the ARP tables. I randomized the MAC address of one VM and everything suddenly started working.

      It’s never been an issue since we’ve never needed to use anything other than the default NAT adapter, so I’ve never even questioned it. I found the solution after plugging the computers directly into an access switch without success, and cross-checking show mac address-table with the MAC reported by the VMs revealed that they were identical.

      • maxy@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 hour ago

        Thanks for the follow-up. Of course you would have some kind of mass-deployment, it didn’t think of that. I thought you’d maybe copy the Windows MAC to Linux, but… then you’d remember doing that.

        Next up, they will also all have the same ssh host key ;-) (Which may be an advantage actually, but still confusing.) Those are the kind of problems cloud-init is solving, I guess.