Cos Change IP

Source: Internet
Author: User

Ipaddrip Address
netmask Subnet Mask
Network gateway Address

Typically, if we want to change the host address to a static address or change the hostname, several files that need to be modified include:
/etc/sysconfig/network CentOS setting host name and network configuration
/etc/sysconfig/network-scripts/ifcfg-eth0 settings for a specific NIC
/etc/resolv.conf Setting up DNS
/etc/hosts setting the specified domain name resolution address

In general we only need to modify the CentOS configuration file of the network card, for example, my CentOS configuration file is as follows:
Device=eth0
Bootproto=static
Type=ethernet
Name= "System etho0"
broadcast=192.168.56.255
hwaddr=08:00:27:24:f8:9b
Ipaddr=192.168.56.101
Ipv6init=yes
Ipv6_autoconf=yes
netmask=255.255.255.0
network=192.168.56.1
Onboot=yes

After the CentOS setup IP is complete, reboot the network card to do it: Service network restart
We also have a way to implement the CentOS set static IP, that is, by ifconfig this command. Usually, we use it to view some information about the current network card, and he can also be used to set up some network card information.
The modified command is as follows: Ifconfig eth0 192.168.56.102

Cos Change IP

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.