Deployment CentOS Configuration IP Address

Source: Internet
Author: User

Environment

Virtual machine: VMWare10.0.1 build-1379776

Operating system: CentOS7 64-bit

Brief introduction

CentOS7 Minimal installation (Minimal), is not with ifconfig instructions, the instructions in the Net-tools package, through Yum can be installed, but when our network is not configured well, this time Yum is not working (unable to connect to the network download package). Then we need to manually configure the network card settings.

View network adapters
IP A

Lists information for all network adapters

Lo is the local loopback address 127.0.0.1

ENO16777736 is our virtual machine NIC.

Configure IP Address

Open/etc/sysconfig/network-scripts/ifcfg-eno16777736

VI /etc/sysconfig/network-scripts/ifcfg-eno16777736

Default configuration

Modify Configuration

Description

ipv6init=no #关闭ipv6

onboot=Yes #启动自动加载

hwaddr=00:0c:29: c7:a9:5d #MAC地址 filled in according to the Virtual machine network adapter configuration

Prefix=24 #掩码长度

Full configuration file

Type=Ethernetbootproto=Nonedefroute=Yesipv4_failure_fatal=Noipv6init=noipv6_autoconf=Yesipv6_defroute=Yesipv6_failure_fatal=NoNAME=Eno16777736uuid=f74f183e-026c-44fd-91f3-08a08a3d02cfdevice=Eno16777736onboot=yesDNS1=114.114.114.114HWADDR=xx: 0C: in: C7:a9:5dipv6_peerdns=yesipv6_peerroutes=yesipaddr=10.12.2.68PREFIX= -GATEWAY=10.12.2.254

Restart Network Service
Service Network restart

Test the network, ping the gateway

Ping 10.12. 2.254

According to the feedback, the network and configuration are good.

Deployment CentOS Configuration IP Address

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.