vmware 網絡模式爲NAT模式下配置Centos網絡

Centos6.5安裝完畢之後進行網絡配置

修改步驟:

  1. 編輯ifcfg-eth0命令: vi /etc/sysconfig/network-scripts/ifcfg-eth0
    注:下邊爲ifcfg-eth0的一個模板文件,注意
    DEVICE=eth0
    HWADDR=00:0C:29:8E:B2:4D
    TYPE=Ethernet
    UUID=0675948a-b96c-497d-8945-2e53b875e44f
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=static

    IPADDR=192.168.8.100
    NETMASK=255.255.255.0
    GATEWAY=192.168.8.1
    DNS1=8.8.8.8
    DNS2=4.4.4.4

    這裏寫圖片描述

  2. 重啓網絡服務:service network restart
    3.測試網絡是否已經通了:ping www.baidu.com
    顯示結果如下表示已經配置OK了
    [root@master ~]# ping www.baidu.com
    PING www.a.shifen.com (119.75.217.109) 56(84) bytes of data.
    64 bytes from 119.75.217.109: icmp_seq=1 ttl=128 time=4.50 ms
    64 bytes from 119.75.217.109: icmp_seq=2 ttl=128 time=11.9 ms
    64 bytes from 119.75.217.109: icmp_seq=3 ttl=128 time=6.81 ms
    64 bytes from 119.75.217.109: icmp_seq=4 ttl=128 time=11.7 ms
    CentOS—網絡配置詳解 參考方鏈接
    http://blog.chinaunix.net/uid-26495963-id-3230810.html
<script type="text/javascript"> $(function () { $('pre.prettyprint code').each(function () { var lines = $(this).text().split('\n').length; var $numbering = $('<ul/>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('<li/>').text(i)); }; $numbering.fadeIn(1700); }); }); </script>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章