Linux Configure the IP address of the NIC

Source: Internet
Author: User

1. Modify IP Address: Set static IP address

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

Device=eth0
Bootproto=static//bootproto=yes cannot appear in either state or error
ipaddr=192.168.12.28// Add IP Address
netmask=255.255.255.0// Mask
gateway=192.168.12.1// Add a gateway

Onboot=yes
Type=ethernet

2. Modify the Gateway

#vi/etc/sysconfig/network

gateway=192.168.12.1// add a row to the last editing area

3. Modify DNS

Vi/etc/resolv.conf

year Ameserver 192.168.200.1// add a row, depending on the local DNS settings

4. Restart the network configuration

Service Network Restart or /etc/init.d/neworkrestart


This article is from the "Operations" blog, please be sure to keep this source http://sky9896.blog.51cto.com/2330653/1571722

Linux Configure the IP address of the NIC

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.