CentOS Set up network/etc/sysconfig/network,/etc/sysconfig/network-scripts/ifcfg-eth0

Source: Internet
Author: User
Tags centos

/etc/sysconfig/network

Used to set the "host name (HOSTNAME) and start network or not"

Generally, the host name takes effect after the reboot.


If you set up a gateway here, but you also reconfigure the gateway elsewhere and make it effective, use a different local gateway.

If the gateway is not configured elsewhere, the gateway is the subject.


Therefore, it may be caused by the gateway network problem, need to pay attention to ...


/////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////


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

Restart Services: Service Network restart Eth0

Set form: Set value = value
The project project is set as follows:
DEVICE Interface Name (device, network card)
Bootproto IP Configuration method (static: Fixed IP, DHCP: Dynamic ip,none: Manual)


Hwaddr MAC Address
Onboot the network interface is active when the system is started (yes/no)
Type network types (usually Ethemet)
NETMASK Network Mask
IPADDR IP Address
Ipv6init IPV6 is valid (yes/no)
Gateway Default Gateways IP address


Device= "eth0" bootproto= "none" #BOOTPROTO = "DHCP" nm_controlled= "yes" onboot= "yes" type= "Ethernet" ipaddr= "192." 168.1.111 "netmask=" 255.255.255.0 "network=" 192.168.1.0 "broadcast=" 192.168.1.255 "


Device=eth0
Bootproto=static
broadcast=192.168.1.255
Hwaddr=00:0c:2x:6x:0x:xx
ipaddr=192.168.1.23
gateway=192.168.1.1 (default gateway configuration requires manual)
netmask=255.255.255.0
network=192.168.1.0
Onboot=yes
Type=etherne




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.