0

I was just experimenting with IPv6 and hypervisors, where I made productive use of the IPv6 link local address to route packets towards a tap device to establish communication with a virtual machine.

But, thinking back on my casual experience with IPv4, the recipient of the default route/gateway sits at the beginning of the address space advertised by DHCP (e.g. 192.168.0.1) instead of a link local address. Why, though? And would it break a lot of stuff to use a link local address to forward private range and/or Internet traffic, just as in IPv6?

Best I can tell, the normal way this is done is the host reserves some of the user's preferred subnet, for example, as AWS does, where, among a few other addresses, the bottom of a subnet is reserved for a gateway.

I ask because it would be nice to not have to configure the host's settings for a tap device a certain way depending on the network addresses as preferred by the person in control of the virtual machine, and to not squat on the virtual machine's preferred subnet.

4
  • is VM supposed to communicate only with hypervisor, or should packets be forwarded?
    – Effie
    Commented Feb 14, 2023 at 13:10
  • Unfortunately, questions about host/server/VM configurations are off-topic here. You could try to ask this question on Super User.
    – Ron Maupin
    Commented Feb 14, 2023 at 13:24
  • 1
    The immediately obvious answer: IPv4 rarely has link-local addresses. IPv6 was designed to always have them, and use them. If your system sets up a link-local address (apipa?), it's most likely going to be all by itself. And no system I'm aware of allows more than one address on a DHCP interface.
    – Ricky
    Commented Feb 14, 2023 at 21:07
  • Thanks @ricky, that does help. I probably won't pursue link local addresses as a way to forward packets further, but if I get inclined to research it again, I'll consider the DHCP interface early on.
    – fdr
    Commented Feb 15, 2023 at 3:52

1 Answer 1

3

It could be done, theoretically.

The main problem is that IPv4 nodes are not commonly using multiple IP addresses, especially with DHCP - unlike IPv6 ones. A node would need to use its private/public address as source (since link-local isn't routable in general) but ARP through its link-local binding to resolve the gateway's MAC address

1
  • Thanks, that was helpful.
    – fdr
    Commented Feb 15, 2023 at 3:52

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