Network Configuration after MAC address changed on Microsoft Hyper-V

Hello, folks

As far as I know, Suse Linux binds the IP Configuration to the MAC Address. If MAC address is changed, it will lose connection with Network.
So I have to remap the Network Configuration(including IP, DNS, Netmask, etc) to the new MAC address.

However, OpenSuse doesn’t have same issue such like Suse. When I did a test in OpenSuse, it didn’t lose connection although MAC address changed.
As a result, does the design that network configuration binds to the MAC address be changed in OpenSuse?

Best Regards,
Haewon

Hello and welcome here.

Can you please first and foremost always tell what version of openSUSE you use when you start a thread about a problem/question?

When you have a problem with SUSE LInux Enterprise (again without version given), you are at the wrong forum. Most peopel here realy do not kno much about it, let alone about the subtle differences.

Thank you for reply
I’m sorry I didn’t write what you need.
OpenSuse Version 3.11.6-4-desktop

Is OpenSuse be designed not to bind network configuration(IP Address, NetMask, etc) to MAC Address?
In other Linux distribution, because network configuration is bound to MAC address, it will lose its network connection after MAC address changed.
Any ideas would be very appreciated.

Sorry, but that is not the openSUSE version. (Most likely you’re referring to the kernel version.)

cat /etc/os-release

As far as I know, opensuse is no different from other distros in this respect.

You are actually confusing multiple issues.

If you acquire an IP address using DHCP, then the DHCP server bases that on MAC address. If you change the MAC address, then the DHCP server will assign a different IP address.

If you statically assign the IP, then it is assigned to the device. If you change the MAC address on the device, you will still use the same IP address.

Communication with other computers on your LAN is always done with the use of MAC address. The “arp” cache provides a short-term mapping between IP and MAC. If you change the MAC address, then other systems on your LAN will lose contact. They will continue to send packets to the old MAC. But, after a timeout, they should discover the new MAC and resume communication.

Presumably there is a router on your LAN to connect to the rest of the Internet. If a change in MAC causes a temporary communication failure with the router, that will affect connects to the Internet.

On 05/29/2014 08:56 AM, nrickert pecked at the keyboard and wrote:
> hwjung;2646089 Wrote:
>> Is OpenSuse be designed not to bind network configuration(IP Address,
>> NetMask, etc) to MAC Address?
> As far as I know, opensuse is no different from other distros in this
> respect.
>
> You are actually confusing multiple issues.
>
> If you acquire an IP address using DHCP, then the DHCP server bases that
> on MAC address. If you change the MAC address, then the DHCP server
> will assign a different IP address.
>
> If you statically assign the IP, then it is assigned to the device. If
> you change the MAC address on the device, you will still use the same IP
> address.
>
No it will not as the static address is assigned to the old mac address.
The new mac address will get a different address via DHCP until the new
mac address is assigned the original static address.

Ken

That just adds confusion.

The traditional meaning of “statically assigned”, particularly when contrasted with “DHCP”, is that the IP address is assigned with the “ifconfig” command, or with “ifup” settings. The IP address is assigned to the device.

Yes, you can have a static entry in the DHCP tables on the DHCP server. But that’s covered in my earlier comment on using DHCP to acquire IP address.

I agree with you. A static IP address is called as such from the systems view and means that it is not configured using DHCP And being connected to the device (earlier something like eth0,now newer naming) through ifup, and not to the MAC address. Thus when the MAC address chances (even when the NIC is replaced, but again becomes eth0), it will get the same IP address on boot (or other ifup of the NIC)

When you have the DHCP server configured in a way that it serves allways the same IP address to the same MAC address, then that is not called a static IP address from the system’s point of view (if at all).

On 05/29/2014 10:36 AM, hcvv pecked at the keyboard and wrote:
> nrickert;2646171 Wrote:
>> That just adds confusion.
>>
>> The traditional meaning of “statically assigned”, particularly when
>> contrasted with “DHCP”, is that the IP address is assigned with the
>> “ifconfig” command, or with “ifup” settings. The IP address is assigned
>> to the device.
>>
>> Yes, you can have a static entry in the DHCP tables on the DHCP server.
>> But that’s covered in my earlier comment on using DHCP to acquire IP
>> address.
> I agree with you. A static IP address is called as such from the systems
> view and means that it is not configured using DHCP And being connected
> to the device (earlier something like eth0,now newer naming) through
> ifup, and not to the MAC address. Thus when the MAC address chances
> (even when the NIC is replaced, but again becomes eth0), it will get
> the same IP address on boot (or other ifup of the NIC)
>
> When you have the DHCP server configured in a way that it serves allways
> the same IP address to the same MAC address, then that is not called a
> static IP address from the system’s point of view (if at all).
>
>
Then you are NOT using DHCP to serve an address to the machine but
assigning one statically on the machine.

Ken

To the OP:
Obviously your incorrect use of terminology is causing confusion, here are some common definitions:

DHCP (automatically assigned addresses) - When a machine (virtual or physical) boots up on the network, it broadcasts its existence and a DHCP server responds by providing a unique network configuration the machine can use. You configure the client machine as a “DHCP client,” on openSUSE typically in YAST or Network Manager.

Static Address - When a machine (virtual or physical) boots up on the network, it is pre-configured with known network settings. On openSUSE this is more commonly configured using YAST, but can also be configured in Network Manager.

Reserved Lease - This is a hybrid of the above, when a machine (virtual or physical) boots up on the network, it broadcasts its existence and a DHCP server responds by first finding the machine’s MAC address in a list of reserved addresses mapped to specific IP addresses. In this way, the newly booted machine is always assigned the same IP address whereas a normal DHCP address could change.
**
Solutions to the above:**
First, you should understand that the MAC address is always the fundamental way a machine identifies itself but it is difficult to use when designing an IP network. For that reason although machines communicate fundamentally using MAC addresses, they normally find and manage each other using IP addresses which are mapped locally to the MAC address. In this way there is typically a “soft relationship” (configurable) between the IP address and the MAC address.

Note that the following only re-establishes fundamental networking. If you’re also running network security, ie LDAP, AD, etc. then there will be other far-ranging consequences. That gets complicated, would be something you need to contact your Network Administrator about (and would more than triple the length of this post).

DHCP - Since the DHCP server assigns “some” IP address to any machine that needs one, all you need to do is restart your client machine’s networking service which can be done by the following command, note that this is comparable to the Windows “ipconfig -renew”

systemctl restart network

When the local machine’s network service restarts, it again broadcasts requesting an IP address. The DHCP server responds, replacing any old configuration on the machine.

Static IP address - Depending on circumstances, changing your MAC address shouldn’t cause much of a network issue although you may need to either wait or manually initiate some ARPs to announce your machine’s changes.

**Reserved Lease **- Since the DHCP server maintains a list of MAC addresses mapped to IP addresses, that list would have to be modified, followed by the procedure described for a regular DHCP IP address above.

Lastly, these are fundamental principles that apply to any virtualized or physical Hosts, it does not matter that your Guest is running on Hyper-V.

HTH,
TSU

The DHCP standard is written so that it is able to request a specific IP address. It could be that the version of Suse you are using now uses that option where it might not have in the past.

Another thing is that Udev/system/whatever has all changed in the past couple of years. In the past if the MAC of an interface changed it would create a new Device. This is not suppose to be the case any longer. Generally it is suppose to create a “predictable interface name” which is suppose to be something like IntTypePortSlot So something like enp0s0

Depending on your version this may or may not be the case.

FYI for your reference http://www.freesoft.org/CIE/RFC/2131/24.htm RFC for DHCP

Skimmed your reference quickly (so may misunderstand or miss), if I understand what is described correctly it’s consistently what I’ve observed <but> I’ve only ever seen a successful “request” when the IP address had been issued before.

The most common scenario I’ve seen is if a machine was once issued an IP address, then was taken offline for an extended period of time and the lease then expires before the lease can be renewed. When the machine comes back online, it can request the IP address it had before and then it’s up to the DHCP server to re-issue the same IP address or not(generally based on whether it has been issued to another machine).

On the other hand, it’s been my experience that once a machine has changed its MAC address, then the IP address is no longer matched to the MAC address so the IP address cannot be renewed (maybe this is only my limited experience observing this scenario? I admit I rarely experience machines taken offline that long and then are returned to the network, and if it’s important enough to me that the same IP address be used then I’ve always configured reserved leases).

I’ve also never seen a DHCP client configurable to manually request a specific IP address although who knows? Maybe it’s configurable somewhere.

TSU

On 05/31/2014 01:56 AM, tsu2 pecked at the keyboard and wrote:
> zoop;2646466 Wrote:
>> The DHCP standard is written so that it is able to request a specific IP
>> address. It could be that the version of Suse you are using now uses
>> that option where it might not have in the past.
>>
>> Another thing is that Udev/system/whatever has all changed in the past
>> couple of years. In the past if the MAC of an interface changed it
>> would create a new Device. This is not suppose to be the case any
>> longer. Generally it is suppose to create a “predictable interface
>> name” which is suppose to be something like IntTypePortSlot So
>> something like enp0s0
>>
>> Depending on your version this may or may not be the case.
>>
>> FYI for your reference http://www.freesoft.org/CIE/RFC/2131/24.htm RFC
>> for DHCP
> Skimmed your reference quickly (so may misunderstand or miss), if I
> understand what is described correctly it’s consistently what I’ve
> observed <but> I’ve only ever seen a successful “request” when the IP
> address had been issued before.
>
> The most common scenario I’ve seen is if a machine was once issued an IP
> address, then was taken offline for an extended period of time and the
> lease then expires before the lease can be renewed. When the machine
> comes back online, it can request the IP address it had before and then
> it’s up to the DHCP server to re-issue the same IP address or
> not(generally based on whether it has been issued to another machine).
>
> On the other hand, it’s been my experience that once a machine has
> changed its MAC address, then the IP address is no longer matched to the
> MAC address so the IP address cannot be renewed (maybe this is only my
> limited experience observing this scenario? I admit I rarely experience
> machines taken offline that long and then are returned to the network,
> and if it’s important enough to me that the same IP address be used then
> I’ve always configured reserved leases).
>
> I’ve also never seen a DHCP client configurable to manually request a
> specific IP address although who knows? Maybe it’s configurable
> somewhere.
>
> TSU
>
>

I highly suggest the use of wireshark (on a different machine) to see
what actually happens when a machine is turned on and is negotiating an
IP address with a DHCP server, it is even useful to see how requests for
connections to other machines is handled by the routing software.
FYI: a mac address can have more then one IP address associated with it
but an IP address can have ONLY ONE mac address associated with it
(again to function properly).

Ken

I think it probably depends on your DHCP Client application. It appears the one I am using on my desktop is from ISC. It does not appear to track the Interfaces MAC address rather just the interface name. So as long as the interface name did not change it will assume it is still a valid relationship. But of course other people could have implmented it differently. If you are so interested in how it works and why it is working. I suggest reading maybe the manual for the Client that you are using with Suse or maybe do a sniff like the last post was suggesting. But I would think it makes sense for a machine to track the interface name vs MAC address. Because I would want my machine to use DHCP on the same interface vs following a MAC address.

Good luck.