电脑新装系统配置怎么看|centos7查看网卡信息及数量
Centos 7.5
VMware 16.0.0
CentOS7.5 新装系统如何查看网络,配置网卡信息
解决方案:1.查看ip信息
ip a
ip a1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:50:56:25:19:1c brd ff:ff:ff:ff:ff:ff inet 192.168.1.227/24 brd 192.168.1.255 scope global noprefixroute ens33 valid_lft forever preferred_lft forever inet6 fe80::36fd:c3d4:ea0a:5ab4/64 scope link noprefixroute valid_lft forever preferred_lft forever
2.查看编辑网卡信息
vim /etc/sysconfig/network-scripts/ifcfg-ens33(网卡名)
TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=noneDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens33UUID=bf5bb7c5-da27-44a9-b4be-7f6e4138abfdDEVICE=ens33ONBOOT=yesIPADDR=192.168.1.227PREFIX=24GATEWAY=192.168.1.1
重启网络服务
systemctl restart network
查看ens33网卡信息
ifconfig ens33
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.227 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::36fd:c3d4:ea0a:5ab4 prefixlen 64 scopeid 0x20<link> ether 00:50:56:25:19:1c txqueuelen 1000 (Ethernet) RX packets 29155875 bytes 2426699185 (2.2 GiB) RX errors 0 dropped 108161 overruns 0 frame 0 TX packets 32605674 bytes 12952561612 (12.0 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
启用ens33网卡
ifconfig ens33 up
禁用ens33网卡
ifconfig ens33 down
查看ens33网卡其他参数
ethtool ens33
Settings for ens33:Supported ports: [ TP ]Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: NoSupports auto-negotiation: YesSupported FEC modes: Not reportedAdvertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: NoAdvertised auto-negotiation: YesAdvertised FEC modes: Not reportedSpeed: 1000Mb/sDuplex: FullPort: Twisted PairPHYAD: 0Transceiver: internalAuto-negotiation: onMDI-X: off (auto)Supports Wake-on: dWake-on: dCurrent message level: 0x00000007 (7) drv probe linkLink detected: yes
DNS设置
vim /etc/resolv.conf
nameserver 192.168.1.1
关闭NetworkManager服务
systemctl stop NetworkManager.service
停止开机自启
systemctl disable NetworkManager.service
查看网络服务
systemctl status network.service
● network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: active (running) since 四 2022-03-17 23:58:09 CST; 7h left Docs: man:systemd-sysv-generator(8) Process: 975 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS) CGroup: /system.slice/network.service └─1304 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-f5774ec4-da78-4594-859b-a17bb015e929-ens33.lease -pf /var/run/dhclient-ens33.pid ens333月 17 23:58:06 localhost.localdomain network[975]: 正在打开环回接口: [ 确定 ]3月 17 23:58:07 localhost.localdomain network[975]: 正在打开接口 ens33:3月 17 23:58:07 localhost.localdomain dhclient[1193]: DHCPREQUEST on ens33 to 255.255.255.255 port 67 (xid=0x2c76a023)3月 17 23:58:07 localhost.localdomain dhclient[1193]: DHCPACK from 192.168.1.1 (xid=0x2c76a023)3月 17 23:58:09 localhost.localdomain NET[1300]: /usr/sbin/dhclient-script : updated /etc/resolv.conf3月 17 23:58:09 localhost.localdomain dhclient[1193]: bound to 192.168.1.227 -- renewal in 10429 seconds.3月 17 23:58:09 localhost.localdomain network[975]: 正在确定 ens33 的 IP 信息... 完成。3月 17 23:58:09 localhost.localdomain NET[1350]: /etc/sysconfig/network-scripts/ifup-post : updated /etc/resolv.conf3月 17 23:58:09 localhost.localdomain network[975]: [ 确定 ]3月 17 23:58:09 localhost.localdomain systemd[1]: Started LSB: Bring up/down networking.
查看网络服务日志
cat /var/log/messages | grep network
ar 17 23:53:00 localhost systemd: Started LSB: Bring up/down networking.Mar 17 23:54:11 localhost systemd: Stopping LSB: Bring up/down networking...Mar 17 23:54:12 localhost NET[3314]: /etc/sysconfig/network-scripts/ifdown-post : updated /etc/resolv.confMar 17 23:54:12 localhost network: 正在关闭接口 ens33: [ 确定 ]Mar 17 23:54:12 localhost network: 正在关闭环回接口: [ 确定 ]Mar 17 23:54:12 localhost systemd: Starting LSB: Bring up/down networking...Mar 17 23:54:12 localhost NET[3516]: /etc/sysconfig/network-scripts/ifup-post : updated
相关内容
-
新装系统搜不到wifi怎么办|电脑装不了无线网卡
新装系统搜不到wifi怎么办|电脑装不了无线网卡怎么办,无线网...
-
win10电脑如何查看wifi密码|怎样查看电脑连接过
win10电脑如何查看wifi密码|怎样查看电脑连接过的wifi密码,密...
-
怎么查看固态硬盘的寿命|固态硬盘寿命的检测方
怎么查看固态硬盘的寿命|固态硬盘寿命的检测方法,寿命,硬盘寿...
-
win7开机自启动项怎么设置|如何设置软件开机自
win7开机自启动项怎么设置|如何设置软件开机自启动,启动项,设...
-
电脑怎么查看bios版本|怎样知道电脑主板型号
电脑怎么查看bios版本|怎样知道电脑主板型号,版本,查看,推荐,...
-
电脑怎么设置开机自启动|电脑开机自动启动的软
电脑怎么设置开机自启动|电脑开机自动启动的软件怎么关闭,开...
-
win11如何更改本地账户名|win11如何查看本地账
win11如何更改本地账户名|win11如何查看本地账户密码,账户,密...
-
苹果airpods剩余电量怎么看|如何查看苹果AirPod
苹果airpods剩余电量怎么看|如何查看苹果AirPods的剩余电量,...
-
装的wifi密码忘了怎么办|快速查看WiFi密码的方
装的wifi密码忘了怎么办|快速查看WiFi密码的方法,密码,查看,...
-
windows7如何查看硬盘|u盘在电脑上读不出来解决
windows7如何查看硬盘|u盘在电脑上读不出来解决方法,解决方法...
-
如何查看u盘品牌型号|闪迪u盘CZ48和CZ80有什么
如何查看u盘品牌型号|闪迪u盘CZ48和CZ80有什么不同,查看,单位...
-
笔记本怎么无线上网卡|如何解决你家无线网络卡
笔记本怎么无线上网卡|如何解决你家无线网络卡顿,卡顿,无线网...
-
怎样查看电脑的启动项|如何查看自己电脑的MAC
怎样查看电脑的启动项|如何查看自己电脑的MAC,查看,启动项,步...
-
win10怎么查看bios版本|查看bios版本号方法介绍
win10怎么查看bios版本|查看bios版本号方法介绍,查看,版本号,...
-
如何快速查看LED控制卡的型号|怎么看led控制卡
如何快速查看LED控制卡的型号|怎么看led控制卡型号,查看,快速...