How to configure static IP address on centos 6.3 Linux Server

Source: Internet
Author: User

This post will covers the steps to configure static IP address, default gateway, netmask, DNS server and make a network auto start at boot on centos 6.3. server normally configured with static IP address, so that easier to maintain the configuration on it's client and DNS server will always able to resolve it.

 
Device = "eth0"Bootproto= "DHCP"Hwaddr= "XX: XX"Nm_controlled= "Yes"Onboot= "No"Type= "Ethernet"UUID= "Xxxxxxxx-05a0-4adf-84fd-850aca6521c7"

1. Configure eth0:

 
[Root @ centos63 ~] # Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Device = "eth0"Bootproto= "Static"Hwaddr= "XX: XX"Nm_controlled= "Yes"Onboot= "Yes"Type= "Ethernet"UUID= "Xxxxxxxx-05a0-4adf-84fd-850aca6521c7"Ipaddr= 192.168.1.54Netmask= 255.255.255.0

2. Configure Default Gateway:

 
[Root @ centos63 ~] # Vi/etc/sysconfig/Network
 
Networking =Yeshostname=Centos63.ehowstuff. localgateway= 192.168.1.1

3. Restart network interface:

[Root @ centos63 ~] # Service network restartshutting down interface eth0: [OK] Shutting Down loopback interface: [OK] Bringing up loopback interface: [OK] Bringing up interface eth0: [OK]

4. Configure DNS Server:

 
[Root @ centos63 ~] # Vi/etc/resolv. conf
 
Nameserver 8.8.8.8

 

 

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.