昆仑资源网 Design By www.lawayou.com
Centos7默认安装是没有开启配置网卡信息的,无法访问外网。
下边配置打开网络自动获取Ip地址
1.查看网卡信息
执行Ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::20c:29ff:fee8:8637 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:e8:86:37 txqueuelen 1000 (Ethernet) RX packets 1121 bytes 98968 (96.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 179 bytes 25233 (24.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 900 bytes 78372 (76.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 900 bytes 78372 (76.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
1.eno16777736代表网卡的名称,ether 00:0c:29:e8:86:37代表网卡的Mac地址
2.配置网卡开始网络连接
cd /etc/system/network-scripts/ vi ifcfg-eno16777736
HWADDR=00:0C:29:E8:86:37 TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=eno16777736 UUID=79d6c916-aab8-45e4-a163-37ae73393d26 ONBOOT=no
将ONBOOT= no改成ONBOOT=yes
3.重启网络
service network restart
4.再执行ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.159.128 netmask 255.255.255.0 broadcast 192.168.159.255 inet6 fe80::20c:29ff:fee8:8637 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:e8:86:37 txqueuelen 1000 (Ethernet) RX packets 1699 bytes 140091 (136.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 333 bytes 42669 (41.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 900 bytes 78372 (76.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 900 bytes 78372 (76.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
inet 192.168.159.128 代表IP地址
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
昆仑资源网 Design By www.lawayou.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
昆仑资源网 Design By www.lawayou.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。