如何配置VMware中Linux系統網路

來源:互聯網
上載者:User
如何配置VMwareLinux系統網路

     首先在VMware中配置Linux的network connection選擇Bridged方式,然後在Linux中進行配置。

1 配置network檔案

    編輯/etc/sysconfig/network DEVICE=eth0 --裝置 ONBOOT=yes --是否自動啟動 BOOTPROTO=static --是否使用靜態IP IPADDR=xxx.xxx.xxx.xxx --IP NETMASK=255.255.255.224 --子網路遮罩 GATEWAY=192.168.0.16 --你的網關

2 配置hosts檔案

    編輯/etc/hosts xxx.xxx.xxx.xxx andy --本機IP及機器名

3 配置DNS解析

    echo "dnsserver 211.98.1.28">> /etc/resolv.conf 如果本地網路就沒有配置DNS,這裡也不需要配置。

4 啟動網路 /etc/init.d/network restart

5 測試 ping 網關地址 Ping DNS伺服器

ping www.google.com 64 bytes from 66.249.89.104: icmp_seq=0 ttl=244 time=18.81 msec 64 bytes from 66.249.89.104: icmp_seq=1 ttl=244 time=20.12 msec 64 bytes from 66.249.89.104: icmp_seq=2 ttl=244 time=15.50 msec 64 bytes from 66.249.89.104: icmp_seq=3 ttl=244 time=22.46 msec ... ... 如果這樣就一切OK!可以上網了!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.