CentOS 6.5 Configuration static IP

Source: Internet
Author: User

How to configure a static IP in CentOS 6.5 the sudo vi/etc/sysconfig/network-scripts/ifcfg-em1 file reads as follows:
Device=em1 #指出设备名称 Bootproto=Static#启动类型 dhcp|StaticBroadcast=192.168.1.255#广播地址 HWADDR=xx: .: 5b:fe:df:7c #硬件Mac地址 onboot=Yes #是否开机启动TYPE=Ethernet #网络类型 ipaddr=192.168.0.2#IP地址 NETMASK=255.255.255.0#子网掩码 NETWORK=192.168.0.0#网络地址 GATEWAY=192.168.0.1#网关地址 DNS1=192.168.0.1

CentOS6.5 just installed after the internet is not possible because onboot default to no change to onboot=yes on the line

To restart the network:

Service Network Restart  

Or:/etc/init.d/network restart

CentOS 6.5 Configuration static IP

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.