Got it

Centos network configuration

Latest reply: Nov 24, 2019 08:47:38 392 1 0 0 0

Centos network configuration

[Modify IP address]

1. Use the Setup command


Use the setup command to enter the graphical interface, enter the Network Configuration, Edit Device according to the prompts, and set the IP according to the prompts.


2. Directly edit the file to modify


# vi /etc/sysconfig/network-scripts/ifcfg-eth0


Here ifcfg-eth0 is the corresponding NIC configuration file


DEVICE=eth0 #Describe the device alias corresponding to the NIC. For example: ifcfg-eth0 is eth0


BOOTPROTO=static #Set the way the NIC obtains the ip address. The possible options are static, DHCP or bootp, which correspond to the statically specified IP address, the IP address obtained through the DHCP protocol, and the IP address obtained through the bootp protocol.


BROADCAST=192.168.0.255 # corresponding subnet broadcast address


HWADDR=00:07:E9:05:E8:B4 #corresponding network card physical address


IPADDR=12.168.1.2 #If you set the NIC address to be statically specified, this field specifies the IP address corresponding to the NIC.


IPV6INIT=no


IPV6_AUTOCONF=no


NETMASK=255.255.255.0 #Network card corresponding network mask


NETWORK=192.168.1.0 #Network address corresponding to the network card


ONBOOT=yes


the answer was very clear, thanks
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.