Score:0

DHCP and Static IP on different subnet on one interface - Netplan - What are the limitations

uz flag

Maybe I have some fundamental misunderstanding about subnets, but someone at my company is telling me what I want to achieve is not possible or at least not reliable.

Currently, we have multiple computers with a static IP on the ethernet port used for connecting to directly without being part of a wider LAN on a 10.x.x.x address.

I would like to also be able to use this port for things such as offloading data or downloading updates and thought I could simply add dhcp to the config as such:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: yes
      dhcp6: no
      addresses: 
        - 10.1.2.15/24

And the networks it would be connecting to would be on a 192.168.x.x subnet. Seemed to work fine with the above config but I'm being told there's some vague reliability issues.

Would this actually cause unintended and erratic behavior? One thing that is of concern is that multiple computers will have this exact same config, but since you can only connect to one at a time directly, and none of the networks with DHCP have the same IP.

Would this cause issues? Should the static IP be made the secondary IP? Do I need to do something special to the routing? Or is this just not possible to make work?

Score:0
us flag

There is nothing fundamental about IP networking that makes it unreliable to have both a static and a dynamic IP address assigned to the same interface. Configurations with multiple addresses, from multiple sources, are commonly used. However, if your network administrator has configured their ethernet switches in a way that filters IPs based on port, it is possible that you may experience unreliability as a result of this. It's best to consult your network admin to understand exactly what they mean by "reliability issues".

Also, on the other hand, if you are already doing this in practice and not experiencing problems, then you might simply prefer to trust the empirical answer that it doesn't cause reliability problems.

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.