Linux System Setup Static Ip__linux

Source: Internet
Author: User

(1) Intuitive way is, if you use Fedora System, at the command line input: Setup, according to the wizard input static IP, you can refer to my article "VMware Workstation build NAT test Environment"


(2) Modify the configuration file, the command line to enter
Vim/etc/sysconfig/network-script S/ifcfg-eth0


Device=eth0
Onboot=yes
Bootproto=static
ipaddr=192.168.0.3
netmask=255.255.255.0
gateway=192.168.0.1


device=eth0<--Equipment


onboot=yes<--whether to start automatically


bootproto=static<--whether to use static IP


ipaddr=xxx.xxx.xxx.xx<--your IP.


netmask=255.255.255.0<--your subnet mask.


gateway=192.168.0.1 <--your gateway.


Make IP address effective:
/sbin/ifdown eth0
/sbin/ifup eth0

Configuring DNS Resolution
echo "NameServer 211.98.1.28" >>/etc/resolv.conf

Notification Gateway Update information:
/etc/init.d/network restart


DNS is domain name System, which converts a domain name such as www.21php.com to an IP address such as 211.152.50.35; without DNS, when browsing 21php.com this site, It must be accessed with such a 211.152.50.35 number. DNS servers are provided for DNS services. The DNS server can be divided into three types, a cache server (Cache-only server), a primary server (Primary name server), and a secondary server (Second name server).

Related Article

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.