About CentOS 7 Network settings

Source: Internet
Author: User

1, nmcli con
[[email protected] ~]# nmcli con
NAME UUID TYPE DEVICE
Enp2s3 392f1079-f6eb-af36-31cb-9ce552231745 802-3-ethernet Enp2s3
Enp2s0 8C6FD7B1-AB62-A383-5B96-46E083E04BB1 802-3-ethernet Enp2s0


2. Open the/etc/sysconfig/network-scripts/ifcfg-enp2s0 file,
Type=ethernet
Bootproto=dhcp
Name=enp2s0
uuid=00eaabe5-1f75-4c01-a21f-79bf9c76d496
Device=enp2s0
Onboot=yes

Update the UUID of this document with the UUID corresponding to the device name in step 1.
Description
(1) In general, the default UUID value of the network device does not match the actual device, and needs to be updated with the actual UUID.
(2) Onboot key set to Yes enabled

After the update the file is:
[Email protected] ~]# CAT/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-ENP2S0
Type=ethernet
Bootproto=dhcp
Name=enp2s0
Uuid=8c6fd7b1-ab62-a383-5b96-46e083e04bb1
Device=enp2s0
Onboot=yes


3. Network card information
[Email protected] ~]# DMESG | Grep-in ETH
554:[2.134579] e1000 0000:02:00.0 eth0: (pci:66mhz:32-bit) 00:0c:29:9c:f8:d5
555:[2.134588] e1000 0000:02:00.0 Eth0:intel (R) pro/1000 Network Connection
565:[2.561570] e1000 0000:02:03.0 eth1: (pci:66mhz:32-bit) 00:0C:29:9C:F8:DF
566:[2.561575] e1000 0000:02:03.0 Eth1:intel (R) pro/1000 Network Connection
567:[2.568309] systemd-udevd[238]: Renamed network interface eth1 to ENP2S3
568:[2.578203] systemd-udevd[240]: Renamed network interface eth0 to ENP2S0


4, change the name of the network card-changed from Enp2s0 to Eth0

[Email protected] ~]# Cat/etc/default/grub
Grub_timeout=5
Grub_default=saved
Grub_disable_submenu=true
grub_terminal_output= "Console"
grub_cmdline_linux= "Rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet"
Grub_disable_recovery= "true"

Modify the Grub_cmdline_linux in grub and append the statement "Net.ifnames=0 biosdevname=0".
Then execute # grub2-mkconfig-o/boot/grub2/grub.cfg


5, restart the network services.
Servie Network Restart


6, centOS7 mini version without ifconfig and other tools, in the system connection outside the network unimpeded situation, root execute the following command, install the Ifconfig tool, as follows:
#yum install-y net-tools\*


7, garbled problem

Export LANG=ZH_CN. GBK



This article is from the "Technology Park" blog, please be sure to keep this source http://zhonglaif.blog.51cto.com/10487639/1676111

About CentOS 7 Network settings

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.