您好,登錄后才能下訂單哦!
這篇文章將為大家詳細(xì)講解有關(guān)RHEL7.0中如何配置網(wǎng)絡(luò)IP,小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。
RHEL7.0 配置網(wǎng)絡(luò)IP可以使用三種方法:修改配置文件、使用圖形工具nmtui、使用圖形工具nm-connection-editor。
查看你的網(wǎng)卡名稱(本機(jī)是eno16777736):
[root@linuxprobe Desktop]# ifconfigeno16777736: flags=4163 mtu 1500 inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::20c:29ff:feb8:2b07 prefixlen 64 scopeid 0x20 inet6 fde0:b912:e3a9:0:20c:29ff:feb8:2b07 prefixlen 64 scopeid 0x0 ether 00:0c:29:b8:2b:07 txqueuelen 1000 (Ethernet) RX packets 37 bytes 5428 (5.3 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 62 bytes 8269 (8.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 134 bytes 10928 (10.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 134 bytes 10928 (10.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@linuxprobe Desktop]#
編輯ifcfg-eno16777736 文件: 紅色為需要修改或者添加的內(nèi)容,保存并退出。 部分釋義:
TYPE=Ethernet #網(wǎng)絡(luò)接口類型BOOTPROTO=static #動(dòng)態(tài)為dhcpDEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes #是否支持IPV6 IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=eno16777736 #網(wǎng)卡名稱UUID=72cf53fd-534c-4765-912b-3df575a10a7d ONBOOT=yes #開啟自動(dòng)啟用網(wǎng)絡(luò)連接IPADDRO=192.168.1.20 #設(shè)置IP地址GATEWAY0=192.168.1.1 #設(shè)置網(wǎng)關(guān)PREFIX0=24 #設(shè)置子網(wǎng)掩碼DNS1=192.168.1.1 #設(shè)置DNSHWADDR=00:0C:29:B8:2B:07 PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes
重啟網(wǎng)卡并測試網(wǎng)絡(luò):
[root@linuxprobe Desktop]# systemctl restart network
在終端執(zhí)行命令:
[root@linuxprobe Desktop]# nmtui
你依然需要重啟網(wǎng)卡才能生效,并測試網(wǎng)絡(luò)。
終端執(zhí)行命令:
[root@linuxprobe Desktop]# nm-connection-editor
關(guān)于“RHEL7.0中如何配置網(wǎng)絡(luò)IP”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺得文章不錯(cuò),請把它分享出去讓更多的人看到。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。