CentOS Network Configuration

Source: Internet
Author: User

CentOS Network Configuration Network configuration

-bash-4.1# Setup #如果没有setup命令, the Setup command can also be installed with yum install setuptool-y

http://jingyan.baidu.com/album/25648fc1a303ce9191fd0032.html?picindex=2

-bash-4.1# Yum Install Setuptool

Then enter your own IP address, subnet mask, gateway, etc., if you use the graphical interface set or not be able to take effect static IP, please change the file bootproto=static


Ifconfig-a
Ifup Etho Enable network 0 network connection
Ifdown eth0 Disable 1 nic


[email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0 #这个文件是自动获取IP, you only need onboot=yes Yes Yes
Device=eth0
Hwaddr=00:0c:29:79:38:bb
Type=ethernet
uuid=31b2e3cb-096e-41a8-a6aa-da6db0935222
Onboot=yes
Nm_controlled=yes
Bootproto=dhcp

[Email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Hwaddr=00:0c:29:79:38:bb
Type=ethernet
uuid=31b2e3cb-096e-41a8-a6aa-da6db0935222
Onboot=yes
Nm_controlled=yes
Bootproto=none #也可以bootproto=static
ipaddr=192.168.1.7
netmask=255.255.255.0
dns2=114.114.114.114
gateway=192.168.1.1
dns1=202.96.134.133
Ipv6init=no
Userctl=no

[email protected] ~]# cat/etc/resolv.conf #dns配配置文件

CentOS Network Configuration

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.