Quick Tip: Configure Static IP in Centos 6.5
2014-05-16 10:47
260 查看
In this small tutorial, I will show you how to convert from DHCP to Static IP address.Configure eth0
本文出自 “小小鸟你妈” 博客,请务必保留此出处http://xiaoxiaoniao.blog.51cto.com/8727225/1412228
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 HWADDR=08:00:27:76:4c:d5 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none IPV6INIT=no USERCTL=no NM_CONTROLLED=yes PEERDNS=yes IPADDR=192.168.1.140 NETMASK=255.255.255.0Configure Default Gateway
# vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=centos6 GATEWAY=192.168.1.1Configure DNS Server
# vi /etc/resolv.conf
nameserver 8.8.8.8 # Replace with your DNS1 nameserver 192.168.1.1 # Replace with your DNS2Restart Network Interface
# /etc/init.d/network restartCheck now
# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:76:4C:D5 inet addr:192.168.1.140 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe76:4cd5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:366 errors:0 dropped:0 overruns:0 frame:0 TX packets:252 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:34247 (33.4 KiB) TX bytes:27082 (26.4 KiB)Check the Connectivity
[root@centos6 ~]# ping centos.org
PING centos.org (85.12.30.227) 56(84) bytes of data. 64 bytes from 85.12.30.227: icmp_seq=1 ttl=56 time=10.2 ms 64 bytes from 85.12.30.227: icmp_seq=2 ttl=56 time=11.0 ms ^C --- centos.org ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1596ms rtt min/avg/max/mdev = 10.233/10.623/11.013/0.390 ms
[root@centos6 ~]# nslookup centos.org Server: 62.179.104.196 Address: 62.179.104.196#53 Non-authoritative answer: Name: centos.org Address: 85.12.30.227
本文出自 “小小鸟你妈” 博客,请务必保留此出处http://xiaoxiaoniao.blog.51cto.com/8727225/1412228
相关文章推荐
- Quick Tip: Configure Static IP in Centos 6.5
- Install and configure rsyslog Centralized logging server in CentOS 6.5
- How to Configure Static IP Address on CentOS 6.3 Linux Server
- Static IP Configuration for CentOS 6.5
- Linux(CentOS6.5)下编译安装PHP5.6.22时报错”configure: error: ZLIB extension requires gzgets in zlib”的解决方式(确定已经编译安装Zlib,并已经指定Zlib路径)
- How To Configure Static IP On CentOS 6.4
- How to Configure Network Static IP Address and Manage Services on RHEL/CentOS 7.0
- Setting a Static IP in a CentOS 7 Minimal Installation
- CentOS 6.5/Linux 重启网卡报错 Determining if ip address x.x.x.x is already in use
- CentOS5.8上安装PHP软件提示“configure:error:no acceptable cc found in $path”
- iOS Quick Tip – programmatically hiding sections of a UITableView with static cells
- GlusterFS in CentOS 6.5的实现和配置
- CentOS 6.5 设置固定IP
- Setup DNS Server step by step in CentOS 6.3/6.4/6.5 / RHEL 6.3/6.4/6.5 / Scientific Linux 6.3/6.4/6.
- Ultimate Guide To Installing Nginx, MySQL, PHP5, PHP-FPM In CentOS 6.5
- linux/centos6.5 关闭NetworkManager服务 network configure error
- Ubuntu 与CentOS 6.5 配置单网卡双IP
- Windows Phone 7 Quick Tip: How to use Bing Maps in XNA games
- Quick Tip: Marking an HDD as SSD or SSD as HDD in ESXi
- Centos5.8(64位)装Python2.7.5执行./configure时报错,configure: error: no acceptable C compiler found in $PATH