RedHat static IP Address Configuration, redhat static IP Address

Source: Internet
Author: User
Tags nameserver

RedHat static IP Address Configuration, redhat static IP Address

RedHat static IP Address Configuration

Modify the following three files in sequence:/etc/sysconfig/network-scripts/ifcfg-eth0/etc/resolv. conf 1./etc/sysconfig/networkNETWORKING = yesNETWORKING_IPV6 = noHOSTNAME = WKM # host name GATEWAY = 192.168.53.1 # Default GATEWAY 2./etc/sysconfig/network-scripts/ifcfg-eth0DEVICE = eth0 # DEVICE name NETMASK = 255.255.255.0 # subnet mask IPADDR = 192.168.53.147 # IP address BOOTPROTO = static # [none | static | bootp | dhcp] Protocol not used during boot | static allocation | # BOOTP protocol | DHCP protocol DNS1 = 211.99.25.1 # domain name resolution server ONBOOT = yes # [yes | no] whether to activate the device PEERDNS = yes during boot 3./etc/hosts# Create a hosting relationship between hostName and ip address # You can create multiple hostnames. One yourHostName must be the same as the HOSTNAME in step 1. # otherwise, you will use InetAddress. getLocalhost () has an exception. The corresponding ip address 192.168.ing 192.168.0.99 yourHostName localhost locahost should not be found. domain 4./etc/resolv. conf (this step can be left blank)Nameserver 211.99.25.1 # DNS configuration is the same as [DNS1 = 211.99.25.1] In 2] 5. the restart takes effect. Make the IP address take effect: /Sbin/ifdown eth0 /Sbin/ifup eth0Configure dns resolution (this step can not be done) echo "nameserver 211.98.1.28">/etc/resolv. conf Notify gateway to update information: /Etc/init. d/network restart

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.