Linux Modify settings IP address

Source: Internet
Author: User

Method One:

ifconfig eth0 IP Address netmask gateway----If not set, use the default mask

Note: This method is only temporarily modified to restart the network or the server will be restored.

Method Two:

Vi/etc/sysconfig/network-scripts/ifcfg-eth0 --Modify the file for permanent entry

1. Device aliases for Device=eth0 NIC

such as Ifcfg-eth0 the first network card bootproto=static network card to obtain the way IP address,

Static IP Address

DHCP (get IP via DHCP protocol)

Bootip IP addresses obtained through the BOOTP protocol

2. broadcast=192.168.0.255

3. Subnet broadcast address Hwaddr=00:50:56:8e:47:ee

4. Network Card Physical Address ipaddr=12.168.1.117

5. Nic IP address Ipv6init=no

6. Whether to enable Ipv6ipv6_autoconf=no

7. netmask=255.255.255.0--Nic corresponds to network mask

8. network=192.168.1.0--Network address of NIC

9. Onboot=yes

10.gateway=192.168.1.1--Gateway

11.type= "ETHERNET"

Restart Network Service after Setup: Service Network restart

Linux Modify settings 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.