Manually configure the Linux (centos) IP Address

Source: Internet
Author: User

The IP address of the Linux Nic is stored in the file. The configuration file is stored in/etc/sysconfig/network-scripts,
The names are ifcfg-eth0, ifcfg-eth1 .... if you have a network card, there is only one ifcfg-eth0 file, if you have two or more of the network card, there will be a ifcfg-eth1, ifcfg-eth2 and other files.
File structure:

1. VI/etc/sysconfig/network-scripts/ifcfg-teh0

Device = eth0 // specify the device name
Bootproto = static // Startup Type DHCP
Broadcast = 192.168.1.255 // broadcast address
Hwaddr = 00: 06: 5b: Fe: DF: 7C // hardware MAC address
Ipaddr = 192.168.0.2 // ip address
Netmask = 255.255.255.0 // Subnet Mask
Network = 192.168.0.1 // network address
Onboot = Yes // whether to start the application
Type = Ethernet // network type

2. Start Service Network restart

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.