Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set the network card to DHCP to dynamically obtain IP in CentOS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to set the network card into DHCP dynamic access IP in CentOS, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.

1) Edit the configuration file of the network card: vi / etc/sysconfig/network-scripts/ifcfg-eth0, where eth0 is the alias of the network card device and represents the first network card. If you want to edit the configuration file of other network cards, you may have to change this to eth2,eth3,eth4.....

2) modify the configuration file according to the prompts in the red box below. ONBOOT=yes refers to activating the device when the system starts, and BOOTPROTO=dhcp means that the IP of the network card is dhcp. If you want to change it to static acquisition, you can set this value to static.

3) restart the network service, service network restart

4) complete!

The above is all the contents of the article "how to set the network card in CentOS to DHCP to dynamically obtain IP". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report