[CentOS] CentOS Setup NIC

Source: Internet
Author: User

IP Settings View command

# ifconfig-a

# NETSTAT-NR

Set a value for eth0

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

Device=eth0                #设备名ONBOOT =yes                 #系统启动时是否激活设备BOOTPROTO =none             #固定IP: none,static dhcp:dhcphwaddr=xx:xx:xx:xx : xx:xx   #地址TYPE =ethernet              #接口的设备类型, and #dhcp_hostname=example.com #DHCP服务器通知主机名IPADDR such as xDSL =192.168.1.16        #IP地址NETMASK =255.255.255.0      #子网掩码 #netaddr=192.168.1.0       #网络地址, usually automatically judged by subnet masks. #BROADCAST =192.168.1.255   #广播地址, usually automatically judged by subnet masks. Userctl=no                 #是否允许非user用户控制设备. Peerdns=no                 #从DHCP取得到的DNS服务器地址是否往/etc/resolv.conf inside the reaction. In the case of DHCP use, it is usually yes. gateway=192.168.1.1        #默认网关地址IPV6INIT =no                #此设备是否把IPv6有效

DNS Value setting

# vi/etc/resolv.conf

NameServer XXX.XXX.XXX. Xxxnameserver XXX.XXX.XXX.XXX

# vi/etc/sysconfig/network

networking=yesnetworking_ipv6=nogateway=192.168.1.1

# Service Network Restart

[CentOS] CentOS Setup NIC

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.