新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
RHEL6虛擬機聯(lián)網(wǎng)具體方法
RHEL6虛擬機如何聯(lián)網(wǎng)?當本篇文章為大家分享一下RHEL6虛擬機聯(lián)網(wǎng)的具體方法,有需要的小伙伴可以參考一下。

切換到 /etc/sysconfig/network-scripts/ 知道自己的網(wǎng)卡名稱(用ifconfig命令 ) 用vim打開對應的文件
添加如下內(nèi)容(如果已經(jīng)有相同的參數(shù)存在,則修改)
shell" spellcheck="false">[root@admin network-scripts]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:B2:F3:30 #網(wǎng)卡名稱 inet addr:192.168.221.128 Bcast:192.168.221.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:feb2:f330/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4845 errors:0 dropped:0 overruns:0 frame:0 TX packets:2956 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1757331 (1.6 MiB) TX bytes:435030 (424.8 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) [root@admin network-scripts]# cd /etc/sysconfig/network-scripts/ | ls ifcfg-eth0 ifdown-ippp ifdown-routes ifup-bnep ifup-plip ifup-sit network-functions [root@admin network-scripts]# vim ifcfg-eth0 DEVICE=eth0 HWADDR=00:0C:29:B2:F3:30 TYPE=Ethernet UUID=0b622218-431e-4f5d-b828-4f23c5c3fef7 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp #1 這三點要改 NETMASK=255.255.255.0 #2 DNS=114.114.114.114 #3需要修改的參數(shù):
BOOTPROTO=dhcp
NETMASK=255.255.255.0
DNS=114.114.114.114
重啟服務
service network restart
網(wǎng)站欄目:RHEL6虛擬機聯(lián)網(wǎng)具體方法
轉(zhuǎn)載來于:http://www.dlmjj.cn/article/dpddgch.html


咨詢
建站咨詢
