How Linux modifies the IP address

Source: Internet
Author: User

1. Temporarily set the IP address

Ifconfig eth0 IP address (netmask and gateway if not set, use default 0)

This method is only temporarily modified, restart the network card or the server will be restored

2. Set Vi/etc/sysconfig/network-scripts/ifcfg-eth0 using the VI Editor

Device=eth0 NIC corresponding device alias, such as Ifcfg-eth0 first NIC Bootproto=static

How the NIC obtains the IP address,

Static IP Address

DHCP (get IP via DHCP protocol)

Bootip IP address obtained through the BOOTP protocol broadcast=192.168.0.255 subnet broadcast address HWADDR=00:50:56:8e:47:ee nic Physical Address ipaddr =12.168.1.117 Network card IP address

Ipv6init=no whether to enable IPV6ipv6_autoconf=no netmask=255.255.255.0 network card corresponding netmask networ k=192.168.1.0 the network address of the NIC Onboot=yes if the system is set to Yes when it is started, the device is activated when the system starts. The default setting is Yes

As for the following type and UUID this does not have to worry about, the type of the network card

How Linux modifies the IP address

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.