RHEL Linux is DHCP, can I change it

Steven Hansell 20 Reputation points
2023-02-20T14:02:34.5733333+00:00

Can I change the default behavior from DHClient to a static IP boot?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
{count} votes

Accepted answer
  1. Prrudram-MSFT 28,201 Reputation points Moderator
    2023-02-20T17:20:43.4733333+00:00

    Hi @Steven Hansell

    Thank you for reaching out to the Microsoft Q&A platform. I am happy to answer your question.

    You can change the IP address assignment from DHCP to static by following these steps:

    Go to the Azure portal and select the virtual machine you want to change the IP address assignment for.

    Under Networking tab, select the Network interface and IP configurations, and change the assignment type to Static IP address settings

    Type the desired IP address, for example, 192.168.1.101, and select Save.

    Select Yes to confirm the change.

    Note: It's recommended that you do not statically assign the private IP assigned to the Azure virtual machine within the operating system of a VM, unless necessary.

    If you do manually set the private IP address within the operating system, ensure that it is the same address as the private IP address assigned to the Azure VM, or you can lose connectivity to the virtual machine.

    You can find more information on how to configure static IP on azure VM here https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/reset-network-interface#for-vms-deployed-in-resource-manager-model

    Hope this helps!
    Please accept as answer and upvote if the above information is helpful for the benefit of the community.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.